/* ===== FONTS & VARIABLES ===== */
:root {
    --font-family-base: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-family-display: 'Oswald', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --bg-raised: #151A21;
    --text-primary: #F2F5F8;
    --text-muted: #B5C0CC;
    --brand-teal: #12DAD1;
    --accent-copper: #FF9A3C;
}

/* ===== BODY ===== */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    background: linear-gradient(135deg, #0B0E13 0%, #1a1d26 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: var(--bg-raised) !important;
    padding: 12px 24px !important;
    color: var(--text-primary) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 3px 20px #0005 !important;
    gap: 20px !important;
    min-height: 68px !important;
    flex-wrap: nowrap !important;
}

/* ===== BRAND SECTION ===== */
.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: var(--text-primary);
    min-width: fit-content;
    flex-shrink: 0;
}

.brand-logo {
    height: 58px;
    width: 58px;
    object-fit: contain;
    display: block;
    background: none;
    border-radius: 10px;
    box-shadow: 0 1px 10px rgba(30, 220, 230, 0.10), 0 2px 14px rgba(16, 38, 65, 0.19), 0 8px 36px rgba(0, 0, 0, 0.18);
    filter: drop-shadow(0 0 4px #0ff5) brightness(1.18) contrast(1.15);
    transition: filter .21s, transform .19s;
}

.brand-logo:hover {
    filter: drop-shadow(0 0 12px #12dad1bb) brightness(1.28) contrast(1.19);
    transform: scale(1.09);
}

.brand-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.1;
}

.brand-text {
    font-family: var(--font-family-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    line-height: 1.1;
    white-space: nowrap;
    text-transform: uppercase;
}

.nextgen-highlight {
    color: var(--brand-teal);
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.facade-highlight {
    color: var(--accent-copper);
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.brand-tagline {
    font-family: var(--font-family-base);
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: .8px;
    font-weight: 300;
    margin-top: 2px;
    text-shadow: 0 2px 8px #141e1e4a;
    line-height: 1.33;
    white-space: nowrap;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: fit-content;
}

.home-btn {
    font-family: var(--font-family-base);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all .24s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    border: 1.5px solid rgba(18, 218, 209, 0.3);
}

.home-btn:hover {
    color: var(--brand-teal);
    background: rgba(18, 218, 209, 0.08);
    border-color: var(--brand-teal);
}

.home-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(18, 218, 209, 0.25);
    outline: 2px solid var(--brand-teal);
    outline-offset: 2px;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 85px 20px 20px 20px;
    min-height: calc(100vh - 68px);
}

.login-card {
    background: rgba(32, 38, 48, 0.95);
    border-radius: 14px;
    padding: 20px 32px 24px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 1px rgba(18, 218, 209, 0.3);
    border: 1px solid rgba(18, 218, 209, 0.1);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 16px;
}

.login-icon {
    display: none;
}

.login-header h1 {
    font-family: var(--font-family-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: 0.8px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.3;
    margin: 0;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 0.86rem;
    color: #b2e3fc;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.input-group input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 2px solid #313b4e;
    border-radius: 8px;
    background: #1a1d26;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-family-base);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(18, 218, 209, 0.12);
    background: #23252b;
}

.input-group input::placeholder {
    color: #6b7280;
    font-size: 0.9rem;
}

.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-group input {
    width: 100%;
    height: 42px;
    padding-right: 44px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.05em;
    background: transparent;
    border: none;
    padding: 4px;
    outline: none;
    transition: color 0.15s;
    z-index: 10;
}

.toggle-password:hover,
.toggle-password:focus {
    color: var(--brand-teal);
}

.forgot-password {
    text-align: right;
    margin: -4px 0 12px 0;
}

.forgot-link {
    color: var(--brand-teal);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent-copper);
    text-decoration: underline;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.login-btn,
.register-btn {
    flex: 1;
    height: 42px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-family-display);
    letter-spacing: 0.6px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn {
    background: linear-gradient(135deg, var(--brand-teal) 0%, #0088ff 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(18, 218, 209, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #00e5e5 0%, #0099ff 100%);
    box-shadow: 0 6px 24px rgba(18, 218, 209, 0.4);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.register-btn {
    background: rgba(54, 63, 85, 0.8);
    color: var(--accent-copper);
    border: 1.5px solid rgba(255, 154, 60, 0.2);
}

.register-btn:hover {
    background: rgba(35, 42, 56, 0.9);
    color: #ffd740;
    border-color: rgba(255, 154, 60, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 12px 0 10px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #313b4e;
}

.divider span {
    padding: 0 10px;
}

.google-btn {
    width: 100%;
    height: 40px;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.google-btn:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error-msg {
    background: rgba(255, 107, 107, 0.1);
    border: 1.5px solid rgba(255, 107, 107, 0.3);
    border-left: 3px solid #ff6b6b;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.81rem;
    font-weight: 600;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.success-message,
.logout-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1.5px solid rgba(76, 175, 80, 0.3);
    border-left: 3px solid #4caf50;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 8px;
    color: #4caf50;
    font-size: 0.81rem;
    font-weight: 600;
    text-align: center;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1.5px solid rgba(255, 193, 7, 0.3);
    border-left: 3px solid #ffc107;
    padding: 8px 12px;
    margin: 10px 0 0 0;
    border-radius: 8px;
    color: #ffc107;
    font-size: 0.81rem;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .navbar {
        padding: 8px 12px !important;
        gap: 12px !important;
    }
    .brand {
        gap: 12px;
    }
    .brand-logo {
        height: 44px;
        width: 44px;
    }
    .brand-text {
        font-size: 1.2rem;
        letter-spacing: 1.8px;
    }
    .brand-tagline {
        font-size: 0.9rem;
        display: none;
    }
    .home-btn {
        font-size: 0.88rem;
        padding: 6px 12px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 6px 8px !important;
    }
    .brand {
        gap: 8px;
    }
    .brand-logo {
        height: 36px;
        width: 36px;
    }
    .brand-text {
        font-size: 1rem;
        letter-spacing: 1.2px;
    }
    .home-btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .login-container {
        padding: 80px 16px 20px 16px;
    }

    .login-card {
        padding: 18px 20px 20px 20px;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .input-group input {
        height: 40px;
        font-size: 0.88rem;
    }

    .password-group input {
        height: 40px;
    }

    .login-btn,
    .register-btn {
        height: 40px;
        font-size: 0.86rem;
    }

    .button-row {
        flex-direction: column;
        gap: 8px;
    }

    .google-btn {
        height: 38px;
        font-size: 0.84rem;
    }
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1.5px solid rgba(255, 193, 7, 0.3);
    border-left: 4px solid #ffc107;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 10px;
    color: #ffc107;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.1);
}

.alert-warning a {
    color: #ffc107;
    text-decoration: underline;
    font-weight: 700;
}

.alert-warning a:hover {
    color: #ff9a3c;
}
