:root {
    --primary: #0f9f9a;
    --primary-dark: #0c827e;
    --primary-light: rgba(15, 159, 154, 0.12);
    --primary-glow: rgba(15, 159, 154, 0.35);
    --secondary: #315fd1;
    --dark: #0d1527;
    --dark-surface: #131f38;
    --ink: #111827;
    --ink-muted: #64748b;
    --ink-light: #94a3b8;
    --line: #e2e8f0;
    --line-focus: #0f9f9a;
    --panel-bg: #ffffff;
    --input-bg: #f8fafc;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
    height: 100%;
    width: 100%;
    font-family: var(--font-family);
    color: var(--ink);
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Master Layout - Strict 100vh on Desktop */
.login-shell {
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    overflow: hidden;
}

/* ==========================================================================
   LEFT PANEL - VISUAL SHOWCASE
   ========================================================================== */
.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    padding: clamp(24px, 3.5vh, 48px) clamp(28px, 4vw, 56px);
    background: 
        radial-gradient(circle at 10% 20%, rgba(15, 159, 154, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(49, 95, 209, 0.28) 0%, transparent 45%),
        linear-gradient(155deg, #090f1d 0%, #0d1b33 60%, #0a2538 100%);
    color: #ffffff;
    overflow: hidden;
}

.login-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.visual-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0f9f9a 0%, #15b8b2 100%);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 20px rgba(15, 159, 154, 0.4);
    color: #ffffff;
}

.brand-logo svg {
    width: 22px;
    height: 22px;
}

.brand-text strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.visual-body {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: auto 0;
    padding: 16px 0;
}

.visual-kicker {
    display: inline-block;
    color: #2dd4bf;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.visual-title {
    font-size: clamp(1.85rem, 2.8vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    color: #ffffff;
}

.visual-desc {
    font-size: clamp(0.88rem, 1.05vw, 1rem);
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: clamp(18px, 2.8vh, 32px);
}

/* Feature Showcase Cards */
.feature-cards {
    display: grid;
    gap: 12px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(15, 159, 154, 0.18);
    color: #2dd4bf;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.feature-card span {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.35;
}

.visual-footer {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
    color: #64748b;
}

/* ==========================================================================
   RIGHT PANEL - COMPACT FORM (NO SCROLL)
   ========================================================================== */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: clamp(20px, 3vh, 40px) clamp(24px, 4vw, 56px);
    background: var(--panel-bg);
    overflow: hidden;
}

.panel-inner {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    margin-bottom: clamp(14px, 2vh, 22px);
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

#login-title {
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.84rem;
    color: var(--ink-muted);
    line-height: 1.4;
}

/* Form Groups */
.login-form {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.6vh, 16px);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.group-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.01em;
}

/* Role Grid - Compact 2x2 */
.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.role-card {
    position: relative;
    cursor: pointer;
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-card-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    height: 38px;
    background: var(--input-bg);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-muted);
    transition: all 0.18s ease;
}

.role-card-content svg {
    width: 16px;
    height: 16px;
    color: var(--ink-light);
    transition: color 0.18s ease;
}

.role-card:hover .role-card-content {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.role-card input:checked + .role-card-content {
    background: rgba(15, 159, 154, 0.08);
    border-color: var(--primary);
    color: var(--primary-dark);
    box-shadow: 0 0 0 1px var(--primary);
}

.role-card input:checked + .role-card-content svg {
    color: var(--primary);
}

/* Input Fields */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    color: var(--ink-light);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 38px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
    background: var(--input-bg);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 0.84rem;
}

.input-wrapper input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px var(--primary-light);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    color: var(--ink-light);
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.btn-toggle-password:hover {
    color: var(--ink);
}

.btn-toggle-password svg {
    width: 16px;
    height: 16px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -2px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 4px;
    background: linear-gradient(135deg, #0f9f9a 0%, #0d8b87 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 159, 154, 0.32);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #11ada8 0%, #0f9f9a 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 159, 154, 0.42);
}

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

.btn-submit svg {
    width: 18px;
    height: 18px;
}


/* ==========================================================================
   RESPONSIVE BEHAVIOR (MOBILE & SMALL SCREENS)
   ========================================================================== */
@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .login-visual {
        height: auto;
        min-height: 320px;
        padding: 32px 24px;
    }

    .visual-body {
        margin: 28px 0;
    }

    .feature-cards {
        display: none; /* Hide in compact mobile header for clean layout */
    }

    .login-panel {
        height: auto;
        padding: 36px 24px;
        overflow: visible;
    }
}

@media (max-height: 640px) and (min-width: 961px) {
    .login-shell {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    .login-panel, .login-visual {
        height: auto;
        min-height: 100vh;
    }
}
