/* ============================================================
   CityEye Auth — Crextio-style horizontal card login
   Palette: blue + red + white
   ============================================================ */

:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --primary-soft: #e7f1ff;
    --red: #dc3545;
    --red-dark: #a71d2a;
    --red-soft: #f8d7da;
    --red-softer: #fdecee;
    --red-text: #721c24;
    --green: #28a745;
    --white: #ffffff;
    --gray-50: #fafbfc;
    --gray-100: #f3f4f6;
    --gray-150: #ebeef2;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6c757d;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #343a40;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    height: 100%;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #aab0b6 0%, #c5cad0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-page {
    width: 100%;
    max-width: 1180px;
}

/* ============================================================
   The card
   ============================================================ */
.login-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    background: var(--white);
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -20px rgba(0,0,0,0.25),
        0 8px 24px rgba(0,0,0,0.08);
    min-height: 720px;
    animation: cardIn 0.7s var(--bounce) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   FORM PANE (left)
   ============================================================ */
.form-pane {
    position: relative;
    padding: 32px 48px 28px;
    background:
        radial-gradient(ellipse at top right, var(--primary-soft) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, var(--red-softer) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
}

/* Brand logo (top-left) */
.brand-logo {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    line-height: 0;
    transition: transform 0.3s var(--ease);
}

.brand-logo:hover { transform: translateY(-1px); }

.brand-logo img {
    height: 44px;
    width: auto;
    max-width: 100%;
    display: block;
}

/* Form body */
.form-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 0;
}

.form-body h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.6px;
}

.subtitle {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 28px;
}

/* Alert */
.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--red-softer);
    border-left: 3px solid var(--red);
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--red-text);
    font-weight: 500;
    animation: shakeX 0.45s var(--ease);
}

.alert-box i {
    color: var(--red);
    font-size: 14px;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

/* Field */
.field {
    margin-bottom: 14px;
    animation: fieldIn 0.45s var(--ease) both;
}

.field:nth-child(2) { animation-delay: 0.05s; }
.field:nth-child(3) { animation-delay: 0.1s; }

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

.field label {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 6px;
    margin-left: 16px;
    font-weight: 500;
}

.input-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 52px;
    background: var(--gray-100);
    border-radius: 100px;
    border: 1.5px solid transparent;
    transition: all 0.2s var(--ease);
}

.input-pill:hover {
    background: var(--gray-150);
}

.input-pill:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,123,255,0.14);
}

.input-pill.has-error {
    border-color: var(--red);
    background: var(--red-softer);
}

.input-pill.has-error:focus-within {
    box-shadow: 0 0 0 4px rgba(220,53,69,0.18);
}

.input-pill > i {
    color: var(--gray-400);
    font-size: 14px;
    flex-shrink: 0;
}

.input-pill:focus-within > i {
    color: var(--primary);
}

.input-pill input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    height: 100%;
    font-family: var(--font);
    font-size: 14px;
    color: var(--gray-900);
    width: 0;
}

.input-pill input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.pwd-toggle {
    border: none;
    background: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 50%;
    transition: all 0.2s var(--ease);
}

.pwd-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.field-error {
    font-size: 12px;
    color: var(--red-dark);
    margin-top: 6px;
    margin-left: 18px;
    font-weight: 500;
}

/* Remember toggle */
.remember-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 6px 0 22px 4px;
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.remember-toggle input { display: none; }

.track {
    width: 36px;
    height: 20px;
    background: var(--gray-300);
    border-radius: 100px;
    position: relative;
    transition: background 0.3s var(--ease);
    flex-shrink: 0;
}

.knob {
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s var(--bounce);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.remember-toggle input:checked ~ .track { background: var(--red); }
.remember-toggle input:checked ~ .track .knob { transform: translateX(16px); }

/* Submit button */
.submit-btn {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    box-shadow:
        0 8px 22px rgba(220,53,69,0.4),
        inset 0 1px 0 rgba(255,255,255,0.18);
    animation: fieldIn 0.45s var(--ease) 0.15s both;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(220,53,69,0.45),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

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

.submit-btn i {
    font-size: 13px;
    transition: transform 0.25s var(--ease);
}

.submit-btn:hover i {
    transform: translateX(3px);
}

/* Form footer */
.form-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-500);
    padding-top: 18px;
    border-top: 1px solid var(--gray-200);
    margin-top: 8px;
}

.form-foot a {
    color: var(--gray-700);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.form-foot a:hover { color: var(--primary); }

/* ============================================================
   VISUAL PANE (right) — CSS-built healthcare scene
   ============================================================ */
.visual-pane {
    position: relative;
    overflow: hidden;
    min-height: 720px;
}

.visual-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(220,53,69,0.18) 0%, transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(0,123,255,0.28) 0%, transparent 55%),
        linear-gradient(140deg, #1a2238 0%, #2a3756 60%, #1f2a44 100%);
}

.visual-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 1px, transparent 1.5px),
        radial-gradient(circle at 75% 60%, rgba(255,255,255,0.04) 1px, transparent 1.5px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* ---- Glow orbs (ambient depth) ---- */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

.orb-1 {
    width: 320px; height: 320px;
    background: rgba(220,53,69,0.35);
    top: -80px; left: -60px;
    animation: orbDrift1 18s ease-in-out infinite;
}
.orb-2 {
    width: 380px; height: 380px;
    background: rgba(0,123,255,0.4);
    bottom: -120px; right: -80px;
    animation: orbDrift2 22s ease-in-out infinite;
}
.orb-3 {
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.18);
    top: 60%; left: 30%;
    animation: orbDrift3 16s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(40px,30px) scale(1.08); }
}
@keyframes orbDrift2 {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-50px,-20px) scale(1.05); }
}
@keyframes orbDrift3 {
    0%, 100% { transform: translate(0,0); }
    50% { transform: translate(30px,-40px); }
}

/* ---- Glass logo stage ---- */
.glass-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 40px;
}

.glass-card {
    position: relative;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 32px;
    padding: 56px 64px 48px;
    text-align: center;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.4),
        inset 0 1px 0 rgba(255,255,255,0.9);
    animation: glassIn 0.9s var(--bounce) 0.2s both;
    max-width: 90%;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes glassIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.glass-logo {
    position: relative;
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.12));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.glass-tagline {
    position: relative;
    margin-top: 22px;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    background: linear-gradient(90deg, var(--red) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .login-card {
        grid-template-columns: 1fr 1fr;
        min-height: 640px;
    }
    .form-pane { padding: 28px 36px 24px; }
    .glass-card { padding: 44px 48px 36px; }
    .glass-logo { max-width: 280px; }
}

@media (max-width: 880px) {
    body { padding: 0; background: var(--white); }

    .login-card {
        grid-template-columns: 1fr;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .visual-pane { display: none; }

    .form-pane {
        padding: 28px 24px 20px;
        background: var(--white);
    }

    .form-body { padding: 16px 0; }
    .form-body h1 { font-size: 26px; }
}

@media (max-width: 420px) {
    .form-pane { padding: 20px 18px 16px; }
    .form-body h1 { font-size: 24px; }
    .input-pill { height: 48px; }
    .submit-btn { height: 52px; }
    .form-foot { flex-direction: column; gap: 8px; align-items: flex-start; }
}
