/* ======================================================= */
/* BDP WORKSPACE LOGIN - STYLED FROM BNB                   */
/* ======================================================= */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
    --primary-color: #85DB29;
    --primary-dark: #136F42;
    --secondary-green: #9BCC79;
    --text-on-dark: #ffffff;
    --text-dark: #4B453F;
    --text-light: #6B7B6E;
    --border-light: #9BCC79;
    --bg-light: #EDEEE8;
    --error-red: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #ffffff;
    position: relative;
    min-height: 100vh;
}

.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Decorative Shapes */
.header-shape,
.footer-shape {
    position: absolute;
}

.header-shape {
    width: 380px;
    height: 380px;
    top: -220px;
    left: -120px;
}

.header-shape::before,
.header-shape::after {
    content: "";
    position: absolute;
    background: var(--primary-dark);
    animation: morph 12s ease-in-out infinite;
}

.header-shape::before {
    width: 100%;
    height: 100%;
    border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%;
    transform: rotate(-15deg);
    z-index: 2;
}

.header-shape::after {
    width: 60%;
    height: 60%;
    border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%;
    bottom: 20px;
    right: 0;
    opacity: 0.8;
    background: var(--primary-color);
    transform: rotate(20deg);
    animation-direction: reverse;
    z-index: 1;
}

@keyframes morph {
    0% { border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%; }
    50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%; }
}

.footer-shape {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    bottom: -150px;
    right: -150px;
    border-radius: 100% 0 0 0;
    opacity: 0.9;
}

/* Main Content Layout */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.75rem;
}

.login-header {
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.9;
    color: var(--text-on-dark);
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-on-dark);
}

.login-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-bottom: 2rem;
}

/* Logo Section */
.form-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 0;
}

.form-logo img {
    width: 200px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Form Styles */
.login-main form {
    width: 100%;
    max-width: 380px;
    margin-top: 5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    border: 0;
    border-bottom: 2px solid var(--border-light);
    outline: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    padding: 10px 5px;
    background: transparent;
    transition: border-color 0.3s ease;
}

.input-field::placeholder {
    color: transparent;
}

.input-label {
    position: absolute;
    top: 10px;
    left: 5px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: var(--text-light);
    pointer-events: none;
}

.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label {
    top: -16px;
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.input-field:focus {
    border-bottom-color: var(--primary-dark);
}

.input-field.has-icon {
    padding-right: 45px;
}

/* Toggle Password Button */
.toggle-password-btn {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.toggle-password-btn:hover {
    color: var(--primary-dark);
}

/* Remember Me / Tetap Login */
.remember-group {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
    padding: 0 5px;
}

.remember-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-dark);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.remember-group label {
    margin-left: 8px;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 400;
    line-height: 1.4;
}

/* Error Message */
.login-error {
    color: var(--error-red);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(229, 57, 53, 0.1);
    border-radius: 8px;
    display: none;
}

.login-error.show {
    display: block;
}

/* Submit Button */
@keyframes shine-effect {
    0% { transform: translateX(-200%) skewX(-25deg); }
    10% { transform: translateX(-200%) skewX(-25deg); }
    30% { transform: translateX(200%) skewX(-25deg); }
    100% { transform: translateX(200%) skewX(-25deg); }
}

button[type="submit"] {
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    padding: 14px;
    cursor: pointer;
    transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(19, 111, 66, 0.4);
}

button[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shine-effect 10s infinite;
}

button[type="submit"]:hover {
    background-position: 100% 50%;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(133, 219, 41, 0.4);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
}

.branding-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
}

.branding-text span {
    font-weight: 400;
    color: var(--text-light);
}

.copyright-text {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-light);
}

/* Desktop Styles */
@media (min-width: 768px) {
    .main-content {
        padding: 3rem 4rem;
    }
    
    .header-shape {
        transform: scale(1.5);
        top: -250px;
        left: -80px;
    }
    
    .footer-shape {
        transform: scale(1.3);
        bottom: -180px;
        right: -180px;
    }
    
    .login-main {
        justify-content: center;
    }
    
    .login-header h1 {
        font-size: 1.4rem;
    }
    
    .login-header h2 {
        font-size: 2.5rem;
    }
    
    .form-logo {
        margin-top: 0;
        margin-bottom: 2.5rem;
    }
    
    .form-logo img {
        width: 240px;
        height: auto;
    }
    
    .input-group {
        margin-bottom: 1.75rem;
    }
    
    button[type="submit"] {
        padding: 16px;
        font-size: 1.15rem;
    }
}

@media (min-width: 1024px) {
    .login-main {
        margin-top: -2rem;
    }
    
    .login-footer {
        margin-top: 0;
    }
}
