/* =============================================
   Auth Layout CSS
   ============================================= */

/* html & body both get the same gradient background so any overflow
   area is covered in the same dark purple — no "fake dark footer" */
html {
    background: linear-gradient(135deg, #0F0A1E 0%, #2A1551 100%);
    min-height: 100%;
}

body.auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    height: 100vh;
    display: flex;
    background: transparent;
    overflow: hidden; /* Page itself does NOT scroll */
}

/* ---- LEFT PANEL ---- */
.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    padding: 48px 40px 40px;
    color: white;
    background: linear-gradient(135deg, #0F0A1E, #2A1551);
    height: 100vh;
    overflow-x: hidden;     /* Hide horizontal blob overflow */
    overflow-y: auto;       /* Left panel scrolls if content is taller */
}

/* Decorative animated blobs */
.auth-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    animation: blobBounce 10s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    border-radius: 50%;
    animation: blobBounce 8s infinite alternate-reverse ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes blobBounce {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(20px, 30px); }
}

/* Grid dot overlay (inside auth-left, NOT body) */
.auth-grid-bg {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    z-index: 1;
    pointer-events: none;
}

/* ---- Logo + Title at the top of left panel ---- */
.auth-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    justify-content: center;
    position: relative;
    z-index: 10;          /* Above grid overlay */
    width: 100%;
    max-width: 480px;
}

.auth-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #7C3AED, #D97706);
    border-radius: 14px;
    font-size: 26px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px -4px rgba(124, 58, 237, 0.5);
}

.auth-logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 2px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.auth-logo-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.3px;
    display: block;
}

/* Legacy .auth-logo (kept for compatibility) */
.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #7C3AED, #D97706);
    border-radius: 20px;
    font-size: 36px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.5);
}

.auth-left-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 480px;
}

.auth-left-content h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #ffffff;
}

/* ---- Hero text (subtitle + description) ---- */
.auth-hero-text {
    position: relative;
    z-index: 10;         /* Above grid overlay */
    text-align: center;
    max-width: 480px;
    width: 100%;
    margin-bottom: 8px;
}

.auth-hero-text h2 {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 12px;
}

.auth-hero-text p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ---- Feature list items ---- */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 10;          /* Above grid overlay */
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature-item i {
    font-size: 20px;
    color: #D97706;
    background: rgba(217, 119, 6, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fixed size so every icon is perfectly aligned */
    min-width: 42px;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.auth-feature-item .text {
    flex: 1;
}

.auth-feature-item strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 2px;
}

.auth-feature-item span {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.4;
}

/* ---- RIGHT PANEL ---- */
.auth-right {
    width: 480px;
    min-width: 400px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 48px 52px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
    z-index: 20;
    /* Fixed height with own scroll — no dark footer bar possible */
    height: 100vh;
    overflow-y: auto;
}

/* ---- Auth Card container ---- */
.auth-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    justify-content: center;
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.auth-card-header p {
    color: #6B7280;
    font-size: 14px;
}

/* ---- Form header (alternative markup) ---- */
.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
}

.auth-form-header p {
    color: #6B7280;
    font-size: 14px;
}

/* ---- Input wrappers ---- */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i.icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 18px;
    transition: color 0.3s;
}

.input-icon-wrapper input {
    padding-left: 44px;
    height: 48px;
    border-radius: 8px;
}

.input-icon-wrapper input:focus + i.icon-left {
    color: #7C3AED;
}

.input-icon-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    cursor: pointer;
    font-size: 18px;
}

/* ---- Submit button ---- */
.btn-auth {
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

/* ---- Divider line ---- */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 14px;
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

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

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

/* ---- Demo account buttons ---- */
.demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-accounts h4 {
    display: none;
}

.demo-account-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.demo-account-btn:hover {
    background: #EDE9FE;
    border-color: #7C3AED;
}

.demo-account-btn i {
    font-size: 16px;
    color: #7C3AED;
    width: 20px;
    flex-shrink: 0;
}

.demo-account-btn .role {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    flex: 1;
    display: block;
}

.demo-account-btn .cred {
    font-size: 11px;
    color: #9CA3AF;
    font-family: monospace;
    display: block;
}

/* ---- Legacy demo buttons (kept for compatibility) ---- */
.demo-credentials {
    margin-top: 32px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px dashed #D1D5DB;
}

.demo-credentials p {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.demo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-demo {
    padding: 6px;
    font-size: 11px;
    font-weight: 600;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-demo:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

/* =============================================
   Auth Responsive
   ============================================= */
@media (max-width: 900px) {
    html {
        background: linear-gradient(135deg, #0F0A1E 0%, #2A1551 100%);
    }

    body.auth-body {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .auth-left {
        order: 2;
        padding: 40px 24px;
        height: auto;
        min-height: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .auth-right {
        order: 1;
        width: 100%;
        min-width: unset;
        padding: 40px 24px;
        box-shadow: none;
        height: auto;
        overflow-y: visible;
    }

    .auth-logo-wrap { justify-content: center; }
    .auth-card { justify-content: flex-start; min-height: auto; }
}
