:root {
    /* Brand Core */
    --primary: #2563eb;
    /* OverseePos bright blue */
    --primary-light: #3b82f6;
    /* Hover / elevated */
    --primary-dark: #1b2080;
    /* OverseePos navy */
    --primary-faint: #eff4ff;
    /* Tinted surface */
    --primary-glass: rgba(37, 99, 235, 0.1);

    /* Accent — kept single, pulled from navy-to-blue gradient */
    --accent: #1d4ed8;
    /* Mid-blue accent */
    --accent2: #0ea5e9;
    /* Sky-blue pop */

    /* Semantic */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-deep: #f0f4ff;
    /* Soft blue-tinted page bg */
    --bg-surface: #ffffff;
    --bg-elevated: #e8eefb;
    /* Cards on tinted bg */

    /* Card */
    --card-bg: #ffffff;
    --card-hover: #f0f4ff;

    /* Borders */
    --border: rgba(27, 32, 128, 0.1);
    --border-light: rgba(27, 32, 128, 0.05);

    /* Text */
    --text: #0f1240;
    /* Near-navy, very readable */
    --text-muted: #4b5563;
    --text-dim: #9ca3af;
    --text-on-primary: #ffffff;

    /* Gradients */
    --gradient: linear-gradient(135deg, #1b2080 0%, #2563eb 50%, #38bdf8 100%);
    --gradient-soft: linear-gradient(135deg, #eff4ff 0%, #dbeafe 100%);
    --gradient2: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);

    /* Shadows */
    --shadow-card: 0 6px 24px rgba(27, 32, 128, 0.08);
    --shadow-float: 0 20px 60px rgba(27, 32, 128, 0.14);
    --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.3);

    /* Shape & Motion */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --sidebar-w: 240px;
    --layout-gap: clamp(8px, 1vw, 14px);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Nav */
    --nav-hover-active: rgba(37, 99, 235, 0.1);

    /* Sidebar */
    --sidebar-bg: #ffffff;
    --sidebar-border: rgba(27, 32, 128, 0.08);
    --sidebar-item-active-bg: var(--primary-faint);
    --sidebar-item-active-text: var(--primary);

    /* Table / List */
    --row-hover: rgba(37, 99, 235, 0.04);
    --row-stripe: rgba(240, 244, 255, 0.6);

    /* Input */
    --input-bg: #ffffff;
    --input-border: rgba(27, 32, 128, 0.18);
    --input-focus: rgba(37, 99, 235, 0.3);

    /* Select2 — blue-accent control (aligned with .form-select); themes override via vars */
    --select2-selection-bg: color-mix(
        in srgb,
        var(--bg-elevated) 88%,
        var(--primary-faint) 12%
    );
    --select2-border: color-mix(in srgb, var(--primary) 45%, var(--border));
    --select2-dropdown-bg: var(--card-bg);
    --select2-option-highlight-bg: color-mix(
        in srgb,
        var(--primary) 14%,
        var(--card-bg)
    );
    --select2-option-highlight-text: var(--primary);
    --select2-search-bg: color-mix(
        in srgb,
        var(--bg-elevated) 90%,
        var(--primary-faint) 10%
    );
    --select2-search-border: color-mix(
        in srgb,
        var(--primary) 38%,
        var(--border)
    );
    --select2-min-height: 2.375rem;

    /* Badge */
    --badge-primary-bg: rgba(37, 99, 235, 0.12);
    --badge-primary-text: #1d4ed8;
    --badge-success-bg: rgba(16, 185, 129, 0.12);
    --badge-success-text: #059669;
    --badge-danger-bg: rgba(239, 68, 68, 0.12);
    --badge-danger-text: #dc2626;

    /* Scrollbar */
    --scrollbar-thumb: rgba(37, 99, 235, 0.2);
    --scrollbar-track: transparent;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--bg-deep);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}
/* ─── LEFT PANEL ─── */
.left-panel {
    flex: 1.1;
    background: var(--gradient);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    overflow: hidden;
    min-height: 100vh;
}

/* decorative blobs */
.left-panel::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -120px;
    left: -160px;
    pointer-events: none;
}
.left-panel::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.12);
    bottom: -80px;
    right: -100px;
    pointer-events: none;
}

/* floating rings */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}
.ring-1 {
    width: 240px;
    height: 240px;
    bottom: 160px;
    left: -60px;
}
.ring-2 {
    width: 160px;
    height: 160px;
    top: 200px;
    right: 40px;
    border-color: rgba(56, 189, 248, 0.2);
}
.ring-3 {
    width: 90px;
    height: 90px;
    top: 380px;
    left: 60px;
}

/* animated grid dots */
.grid-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.08) 1px,
        transparent 1px
    );
    background-size: 36px 36px;
    pointer-events: none;
}

/* Brand */
.brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.brand-icon svg {
    width: 26px;
    height: 26px;
}
.brand-name {
    font-family: "Sora", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}
.brand-tag {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
    display: block;
    margin-top: 1px;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
    width: fit-content;
    animation: fadeSlideUp 0.6s ease both;
}
.hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-family: "Sora", sans-serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
    animation: fadeSlideUp 0.6s 0.1s ease both;
}
.hero-title span {
    background: linear-gradient(90deg, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 0.97rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 44px;
    animation: fadeSlideUp 0.6s 0.2s ease both;
}

/* Feature pills */
.features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeSlideUp 0.6s 0.3s ease both;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}
.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.feature-text strong {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}
.feature-text span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.58);
}

/* Stats row */
.stats-row {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 28px;
    animation: fadeSlideUp 0.6s 0.4s ease both;
}
.stat-item {
    flex: 1;
    padding-right: 20px;
}
.stat-item + .stat-item {
    padding-left: 20px;
    padding-right: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.stat-num {
    font-family: "Sora", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ─── RIGHT PANEL ─── */
.right-panel {
    width: min(700px, 48vw);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 52px;
    position: relative;
    overflow-y: auto;
    min-height: 100vh;
}

.right-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.login-header {
    margin-bottom: 36px;
    animation: fadeSlideUp 0.5s 0.1s ease both;
}
.login-header h2 {
    font-family: "Sora", sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.login-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Tab switcher */
.auth-tabs {
    display: flex;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 5px;
    margin-bottom: 32px;
    gap: 4px;
    animation: fadeSlideUp 0.5s 0.15s ease both;
}
.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.tab-btn svg {
    width: 15px;
    height: 15px;
}
.tab-btn.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-card);
}

/* Form */
.auth-form {
    animation: fadeSlideUp 0.5s 0.2s ease both;
}

.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}
.input-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    display: flex;
    pointer-events: none;
}
.input-icon svg {
    width: 17px;
    height: 17px;
}
.form-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    transition: all var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}
.form-input::placeholder {
    color: var(--text-dim);
}

/* Password toggle */
.eye-btn {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.eye-btn:hover {
    color: var(--primary);
}
.eye-btn svg {
    width: 16px;
    height: 16px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}
.checkbox-wrap label {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}
.forgot-link {
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}
.forgot-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Submit */
.btn-login {
    width: 100%;
    height: 48px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: "Sora", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-primary);
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-login:hover {
    opacity: 0.92;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}
.btn-login:active {
    transform: translateY(0);
}
.btn-login svg {
    width: 16px;
    height: 16px;
}

/* Error / Success messages */
.alert-box {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    display: none;
}
.alert-box.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #dc2626;
}
.alert-box.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #059669;
}

/* Footer note */
.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-dim);
    animation: fadeSlideUp 0.5s 0.3s ease both;
}
.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 0.76rem;
    color: var(--text-dim);
}
.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* floating card decoration */
.deco-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    padding: 14px 18px;
    animation: float 4s ease-in-out infinite;
    z-index: 3;
}
.deco-card-1 {
    top: 22%;
    right: -20px;
    animation-delay: 0s;
    min-width: 170px;
}
.deco-card-2 {
    bottom: 28%;
    left: -24px;
    animation-delay: 1.8s;
    min-width: 150px;
}
.deco-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.deco-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.deco-text strong {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}
.deco-text span {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.6);
}
.deco-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    padding: 2px 8px;
    font-size: 0.65rem;
    color: #6ee7b7;
    font-weight: 600;
    margin-top: 6px;
}
.deco-badge-dot {
    width: 5px;
    height: 5px;
    background: #34d399;
    border-radius: 50%;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .left-panel {
        display: none;
    }
    .right-panel {
        width: 100%;
        min-height: 100vh;
        padding: 48px 28px;
    }
}
