:root {
    --primary-dark: #0b0c2c;
    --primary-blue: #1b1660;
    --primary-btn: #1a0b7e;
    --primary-btn-hover: #130761;
    --text-dark: #1e293b;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --blue-link: #3b82f6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Pages Top Header */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.auth-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}

.auth-header .header-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-left: 24px;
}

.auth-header .header-links a.active {
    color: var(--primary-dark);
}

.auth-header .header-links a.btn-link {
    color: var(--blue-link);
    font-weight: 600;
}

.auth-header .header-links a.btn-register {
    background: var(--primary-dark);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
}

/* Main Split Container */
.auth-container {
    display: flex;
    flex: 1;
    max-width: 1200px;
    margin: 80px auto 40px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Left Login Graphic Panel */
.auth-graphic {
    width: 45%;
    background-color: var(--primary-dark);
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
}

.auth-graphic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,12,44,0.4) 0%, rgba(11,12,44,0.9) 100%);
    z-index: 1;
}

.graphic-content {
    position: relative;
    z-index: 2;
}

.graphic-content h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.graphic-content p {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Right Login Form */
.auth-form-container {
    width: 55%;
    padding: 64px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-container h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px;
    margin-bottom: 24px;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--bg-white);
    color: var(--primary-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-flex .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.forgot-link {
    color: var(--blue-link);
    text-decoration: none;
    text-transform: none;
    font-weight: 600;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
    border-color: #cbd5e1;
    background: white;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.submit-btn {
    width: 100%;
    background: var(--primary-btn);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--primary-btn-hover);
}

.submit-btn i {
    margin-left: 8px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 32px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider::before { margin-right: 16px; }
.divider::after { margin-left: 16px; }

.social-login {
    display: flex;
    gap: 16px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s;
}

.social-btn:hover {
    background: #f8fafc;
}

.auth-footer-text {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer-text a {
    color: var(--blue-link);
    font-weight: 600;
    text-decoration: none;
}

/* ERROR & SUCCESS MESSAGES */
.msg-box {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}
.msg-error { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.msg-success { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }

/* Register Specific Layout */
.register-container {
    max-width: 1200px;
    margin: 100px auto 40px;
    display: flex;
    gap: 60px;
    background: transparent;
    box-shadow: none;
    align-items: flex-start;
}

.register-left {
    width: 35%;
    position: sticky;
    top: 100px;
}

.portal-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.register-left h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    color: var(--primary-dark);
    line-height: 1.1;
    margin-bottom: 16px;
}

.register-left h1 .highlight {
    color: var(--blue-link);
}

.register-left p {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.feature {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.register-link-box {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.register-link-box p {
    font-size: 13px;
    margin-bottom: 8px;
}

.register-link-box a {
    color: var(--blue-link);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.register-right {
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.register-form-card {
    background: var(--bg-white);
    padding: 40px ;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--blue-link);
}

.terms-text {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 16px;
}

.terms-text a {
    color: var(--blue-link);
    text-decoration: none;
}

.quote-card {
    background: var(--primary-dark);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    padding: 32px;
    color: white;
    background-size: cover;
    background-position: center;
}

.quote-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
}

.quote-content {
    position: relative;
    max-width: 80%;
}

.quote-content h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.quote-content p {
    font-size: 12px;
    color: #cbd5e1;
}

/* General Footer */
.auth-footer {
    background: var(--primary-dark);
    color: white;
    padding: 60px 48px;
    margin-top: auto;
}

.auth-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col.brand h3 {
    font-size: 20px;
}

.footer-col p {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.auth-footer .bottom-bar {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 24px;
    text-align: right;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #94a3b8;
}

/* ============================================
   LOGIN / REGISTER - MOBILE RESPONSIVE
   ============================================ */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
    .auth-container {
        margin: 80px 20px 40px;
        flex-direction: column;
    }
    .auth-graphic {
        width: 100%;
        min-height: 200px;
    }
    .auth-form-container {
        width: 100%;
        padding: 48px 40px;
    }

    /* Register layout */
    .register-container {
        flex-direction: column;
        margin: 100px 20px 40px;
        gap: 32px;
    }
    .register-left {
        width: 100%;
        position: static;
    }
    .register-right {
        width: 100%;
    }
    .register-left h1 {
        font-size: 36px;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    /* Header */
    .auth-header {
        padding: 16px 20px;
        position: relative;
    }
    .auth-logo {
        font-size: 18px;
    }
    .auth-header .header-links a {
        font-size: 13px;
        margin-left: 12px;
    }

    /* Main container: show only form, hide graphic */
    .auth-container {
        margin: 0;
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .auth-graphic {
        display: none; /* Hide image panel on mobile */
    }
    .auth-form-container {
        width: 100%;
        padding: 32px 20px;
        justify-content: flex-start;
        padding-top: 80px;
    }
    .auth-form-container h1 {
        font-size: 26px;
        margin-bottom: 6px;
    }
    .auth-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    /* Toggle tabs */
    .auth-toggle {
        margin-bottom: 20px;
    }
    .toggle-btn {
        font-size: 13px;
        padding: 9px 0;
    }

    /* Form fields */
    .form-group {
        margin-bottom: 16px;
    }
    .form-group-flex {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }
    .form-group-flex .form-group {
        margin-bottom: 16px;
    }
    .form-input, .form-select {
        font-size: 15px; /* Prevent zoom on iOS */
        padding: 13px 14px;
    }

    /* Submit button */
    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }

    /* Social buttons */
    .social-login {
        gap: 10px;
    }
    .social-btn {
        font-size: 13px;
        padding: 10px 8px;
    }

    /* Divider */
    .divider {
        margin: 24px 0;
    }

    /* Auth footer */
    .auth-footer {
        padding: 24px 16px !important;
    }
    .auth-footer .footer-container {
        flex-direction: column !important;
        gap: 12px;
    }
    .auth-footer .footer-container > div:last-child {
        text-align: left !important;
    }

    /* Register page specific */
    .register-container {
        margin: 0;
        padding: 80px 16px 40px;
        flex-direction: column;
        gap: 24px;
    }
    .register-left {
        width: 100%;
        position: static;
    }
    .register-left h1 {
        font-size: 28px;
    }
    .register-right {
        width: 100%;
        gap: 16px;
    }
    .register-form-card {
        padding: 24px 16px;
    }
    .quote-card {
        display: none;
    }
    .register-link-box {
        margin-top: 24px;
    }
}

/* Small mobiles (max 480px) */
@media (max-width: 480px) {
    .auth-form-container {
        padding: 80px 16px 24px;
    }
    .auth-form-container h1 {
        font-size: 22px;
    }
    .social-login {
        flex-direction: column;
    }
    .social-btn {
        width: 100%;
    }
    .register-container {
        padding: 80px 12px 32px;
    }
}

