/* ============================================================
   Login Page — Split Layout | Slideshow + Glass Form
   Palette: #2FA4D7  #F5E9D8  #3E2C23  #E76F2E
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.login-page {
    min-height: 100vh;
    font-family: 'Jost', 'Segoe UI', sans-serif;
    background: #0d1b2a;
    overflow: hidden;
    /* prevent any stray horizontal scroll */
    max-width: 100%;
}

[x-cloak] { display: none !important; }

/* ── Split wrapper ─────────────────────────────────────────── */
.login-split {
    display: flex;
    height: 100vh;
    width: 100%;          /* 100% not 100vw — avoids scrollbar-width overflow */
    overflow: hidden;
}

/* ============================================================
   LEFT PANEL — 3D Coverflow Slideshow (Light / Glass / Gloss)
   ============================================================ */
.login-slide-panel {
    position: relative;
    flex: 0 0 60%;
    overflow: hidden;
    background: linear-gradient(135deg, #E76F2E 0%, #c95a1e 100%);
    /* 3D stage */
    perspective: 1100px;
    perspective-origin: 50% 50%;
}

/* Blurred backdrop removed — hidden */
.slide-bg-blur { display: none; }

/* ── 3D Card ─────────────────────────────────────────────── */
.slide-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transform-style: preserve-3d;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
                opacity   0.72s ease;
    will-change: transform, opacity;
}

/* ── Glass frame around each image ──────────────────────── */
.slide-card__frame {
    position: relative;
    width: 86%;
    aspect-ratio: 1920 / 907;
    border-radius: 14px;
    overflow: hidden;
    /* Glass border */
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    /* Layered shadow: soft lift + colored ambient */
    box-shadow:
        0  2px  0   rgba(255,255,255,0.90) inset,   /* top inner highlight */
        0  1px 24px rgba(47,164,215,0.14),
        0  8px 32px rgba(62,44,35,0.12),
        0 22px 60px rgba(62,44,35,0.10);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: box-shadow 0.72s ease, border-color 0.72s ease;
}

/* Active frame — stronger glass glow */
.slide-card[style*="z-index:3"] .slide-card__frame,
.slide-card[style*="z-index: 3"] .slide-card__frame {
    border-color: rgba(255,255,255,0.90);
    box-shadow:
        0  2px  0   rgba(255,255,255,0.95) inset,
        0  0   0   1.5px rgba(47,164,215,0.30),
        0  0  28px rgba(47,164,215,0.22),
        0 10px 40px rgba(47,164,215,0.14),
        0 28px 72px rgba(62,44,35,0.14);
}

/* ── Gloss shine layer (CSS-only) ────────────────────────── */
.slide-card__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: 13px;
    /* Diagonal gloss sweep top-left → center */
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.42) 0%,
        rgba(255,255,255,0.14) 28%,
        rgba(255,255,255,0.0)  52%
    );
}

/* Top-half horizontal shine band */
.slide-card__frame::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 44%;
    z-index: 11;
    pointer-events: none;
    border-radius: 13px 13px 0 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.28) 0%,
        rgba(255,255,255,0.06) 60%,
        transparent 100%
    );
}

/* The actual image */
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 12px;
}

/* Subtle vignette overlay on active slide */
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: 12px;
    background:
        linear-gradient(to top,   rgba(30,20,10,0.62) 0%, transparent 46%),
        linear-gradient(to bottom, rgba(20,30,50,0.22) 0%, transparent 30%);
}

/* Caption wrap */
.slide-caption-wrap {
    position: absolute;
    bottom: 52px;
    left: 7%;
    right: 7%;
    z-index: 12;
    animation: captionSlideUp 0.55s cubic-bezier(0.22,1,0.36,1) both 0.28s;
}
@keyframes captionSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Accent bar */
.slide-caption-wrap::before {
    content: '';
    display: block;
    width: 38px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #E76F2E, #2FA4D7);
    margin-bottom: 9px;
}

.slide-caption {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.60), 0 1px 4px rgba(0,0,0,0.40);
    line-height: 1.35;
}

/* Dot nav */
.login-slide-dots {
    position: absolute;
    bottom: 18px;
    left: 0; right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}
.slide-dot {
    width: 8px; height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.40);
    border: 1px solid rgba(255,255,255,0.60);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, width 0.3s;
}
.slide-dot--active {
    background: #fff;
    width: 26px;
    border-color: transparent;
}

/* ============================================================
   RIGHT PANEL — Login form
   ============================================================ */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f4faff 0%, #fef7f0 55%, #fde8d8 100%);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 28px;
    position: relative;
}

/* Decorative blobs */
.login-form-panel::before {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,164,215,0.13), transparent 70%);
    top: -80px; right: -80px;
    pointer-events: none;
}
.login-form-panel::after {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(231,111,46,0.11), transparent 70%);
    bottom: -60px; left: -60px;
    pointer-events: none;
}

.login-form-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    animation: fadeSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Logo */
.login-logo-wrap {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo {
    max-width: 220px;
    height: auto;
    display: inline-block;
}

/* Headings */
.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3E2C23;
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}
.login-subtitle {
    font-size: 0.88rem;
    color: #8a6f60;
    margin-bottom: 30px;
}

/* ── Input Fields ──────────────────────────────────────────── */
.login-field {
    position: relative;
    margin-bottom: 16px;
}
.login-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2FA4D7;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}
input.login-input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    background: rgba(255,255,255,0.78);
    border: 1.5px solid rgba(47,164,215,0.25);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Jost', 'Segoe UI', sans-serif;
    color: #3E2C23;
    outline: none;
    transition: border-color 0.25s, background 0.25s;
}
input.login-input::placeholder { color: #b8a49a; }
input.login-input:focus {
    background: #fff;
    border-color: #2FA4D7;
}

.login-field__action {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9b8880;
    cursor: pointer;
    font-size: 0.9rem;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}
.login-field__action:hover { color: #2FA4D7; }

/* ── Errors ───────────────────────────────────────────────── */
.login-error {
    display: block;
    font-size: 0.8rem;
    color: #e53e3e;
    margin: -8px 0 12px 4px;
}

/* ── Remember / Forgot ────────────────────────────────────── */
.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 0.875rem;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #3E2C23;
    cursor: pointer;
}
.login-remember input[type="checkbox"] {
    accent-color: #2FA4D7;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.login-forgot {
    color: #2FA4D7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.login-forgot:hover { color: #1d83b0; text-decoration: underline; }

/* ── Submit Button ────────────────────────────────────────── */
.btn-login {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #E76F2E 0%, #c95a1e 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Jost', 'Segoe UI', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: transform 0.18s;
}
.btn-login:hover { transform: translateY(-2px); }
.btn-login:active { transform: translateY(0); }
.btn-login--loading { opacity: 0.82; cursor: not-allowed; transform: none !important; }

/* ── Divider ──────────────────────────────────────────────── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 18px;
    font-size: 0.75rem;
    color: #a08070;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(62,44,35,0.14);
}

/* ── Social ───────────────────────────────────────────────── */
.login-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}
.social-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(47,164,215,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3E2C23;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.22s, transform 0.22s, color 0.22s;
}
.social-btn:hover { color: #fff; transform: translateY(-3px); border-color: transparent; }
.social-btn--facebook:hover  { background: #1877f2; box-shadow: 0 6px 16px rgba(24,119,242,0.35); }
.social-btn--twitter:hover   { background: #1da1f2; box-shadow: 0 6px 16px rgba(29,161,242,0.35); }
.social-btn--instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    box-shadow: 0 6px 16px rgba(214,36,159,0.35);
}
.social-btn--linkedin:hover  { background: #0a66c2; box-shadow: 0 6px 16px rgba(10,102,194,0.35); }

/* ── Footer note ──────────────────────────────────────────── */
.login-footer-note {
    text-align: center;
    font-size: 0.85rem;
    color: #7a6358;
}
.login-footer-note a { color: #E76F2E; font-weight: 600; text-decoration: none; }
.login-footer-note a:hover { text-decoration: underline; }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(47,164,215,0.30);
    background: rgba(255,255,255,0.82);
    color: #3E2C23;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(47,164,215,0.18);
    transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: rgba(255,255,255,0.96);
    box-shadow: 0 4px 18px rgba(47,164,215,0.28);
}

/* ============================================================
   DARK MODE
   ============================================================ */
.theme-dark.login-page {
    background: #0d1b2a;
}

/* Slide panel keeps the same orange in dark mode */
.theme-dark .login-slide-panel {
    background: linear-gradient(135deg, #c95a1e 0%, #a34717 100%);
}
.theme-dark .slide-card__frame {
    border-color: rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.35);
    box-shadow:
        0  2px  0   rgba(255,255,255,0.06) inset,
        0  8px 32px rgba(0,0,0,0.55),
        0 24px 64px rgba(0,0,0,0.45);
}
.theme-dark .slide-card[style*="z-index:3"] .slide-card__frame,
.theme-dark .slide-card[style*="z-index: 3"] .slide-card__frame {
    border-color: rgba(47,164,215,0.28);
    box-shadow:
        0  2px  0   rgba(255,255,255,0.08) inset,
        0  0   0   1.5px rgba(47,164,215,0.28),
        0  0  30px rgba(47,164,215,0.20),
        0 16px 60px rgba(0,0,0,0.70);
}
.theme-dark .slide-dot {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.15);
}

/* Toggle button in dark mode */
.theme-dark .theme-toggle {
    background: rgba(22,38,55,0.88);
    border-color: rgba(47,164,215,0.35);
    color: #f0c97a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.theme-dark .theme-toggle:hover {
    background: rgba(30,50,72,0.98);
}

/* Right panel */
.theme-dark .login-form-panel {
    background: linear-gradient(160deg, #0f1f30 0%, #1a2a3a 55%, #1e2830 100%);
}
.theme-dark .login-form-panel::before {
    background: radial-gradient(circle, rgba(47,164,215,0.10), transparent 70%);
}
.theme-dark .login-form-panel::after {
    background: radial-gradient(circle, rgba(231,111,46,0.08), transparent 70%);
}

/* Logo — invert to white in dark mode */
.theme-dark .login-logo {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* Headings */
.theme-dark .login-title   { color: #f0f4f8; }
.theme-dark .login-subtitle { color: #8fafc8; }

/* Inputs */
.theme-dark input.login-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(47,164,215,0.25);
    color: #e8f0f8;
}
.theme-dark input.login-input::placeholder { color: #5a7a90; }
.theme-dark input.login-input:focus {
    background: rgba(255,255,255,0.10);
    border-color: #2FA4D7;
    box-shadow: 0 0 0 4px rgba(47,164,215,0.18);
}
.theme-dark .login-field__icon   { color: #2FA4D7; }
.theme-dark .login-field__action { color: #5a7a90; }
.theme-dark .login-field__action:hover { color: #2FA4D7; }

/* Errors */
.theme-dark .login-error { color: #fc8181; }

/* Remember / Forgot */
.theme-dark .login-remember { color: #c8d8e8; }
.theme-dark .login-forgot   { color: #2FA4D7; }
.theme-dark .login-forgot:hover { color: #60c4ee; }

/* Divider */
.theme-dark .login-divider { color: #4a6a80; }
.theme-dark .login-divider::before,
.theme-dark .login-divider::after { background: rgba(255,255,255,0.10); }

/* Social buttons */
.theme-dark .social-btn {
    background: rgba(255,255,255,0.07);
    border-color: rgba(47,164,215,0.22);
    color: #c8d8e8;
}

/* Footer */
.theme-dark .login-footer-note       { color: #5a7a90; }
.theme-dark .login-footer-note a     { color: #E76F2E; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    body.login-page { overflow-y: auto; }
    .login-split    { flex-direction: column; height: auto; min-height: 100vh; }

    .login-slide-panel { flex: 0 0 auto; height: 58vw; max-height: 340px; }
    .slide-card__frame { width: 80%; }
    .slide-caption     { font-size: 1rem; }
    .slide-caption-wrap { bottom: 40px; }
    .login-slide-dots  { bottom: 14px; }

    .login-form-panel  { flex: 1; padding: 36px 20px 40px; }
    .login-form-panel::before,
    .login-form-panel::after { display: none; }
}
