:root {
    --cyb-bg: #f4f6fb;
    --cyb-surface: #ffffff;
    --cyb-sidebar: #0b1120;
    --cyb-sidebar-hover: #162036;
    --cyb-primary: #4f46e5;
    --cyb-primary-hover: #4338ca;
    --cyb-accent: #06b6d4;
    --cyb-text: #0f172a;
    --cyb-muted: #64748b;
    --cyb-border: #e2e8f0;
    --cyb-success: #10b981;
    --cyb-warning: #f59e0b;
    --cyb-danger: #ef4444;
    --cyb-info: #0ea5e9;
    --cyb-radius: 12px;
    --cyb-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
    background: var(--cyb-bg);
    color: var(--cyb-text);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--cyb-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* App Shell */
.cyb-shell {
    display: flex;
    min-height: 100vh;
}

.cyb-sidebar {
    width: 248px;
    background: var(--cyb-sidebar);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1.25rem 0.9rem;
}

.cyb-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 0.6rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    color: #ffffff;
}

.cyb-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 5px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.cyb-logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.cyb-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--cyb-primary), var(--cyb-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

.cyb-brand-text strong {
    display: block;
    font-size: 16px;
    letter-spacing: -0.2px;
}

.cyb-brand-text span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

.cyb-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.cyb-nav-section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.8rem 0.75rem 0.25rem;
    font-weight: 600;
}

.cyb-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    color: #cbd5e1;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.cyb-nav a:hover,
.cyb-nav a.active {
    background: var(--cyb-sidebar-hover);
    color: #ffffff;
    text-decoration: none;
}

.cyb-nav a.active {
    border-left: 3px solid var(--cyb-accent);
    padding-left: calc(0.8rem - 3px);
}

.cyb-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cyb-topbar {
    background: var(--cyb-surface);
    border-bottom: 1px solid var(--cyb-border);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cyb-topbar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.cyb-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cyb-content {
    padding: 1.5rem 1.75rem 2.5rem;
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
}

/* Cards & Grids */
.card {
    background: var(--cyb-surface);
    border: 1px solid var(--cyb-border);
    border-radius: var(--cyb-radius);
    box-shadow: var(--cyb-shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cyb-border);
}

.card-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    background: var(--cyb-surface);
    border: 1px solid var(--cyb-border);
    border-radius: var(--cyb-radius);
    box-shadow: var(--cyb-shadow);
    padding: 1.1rem 1.25rem;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cyb-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 0.3rem;
    color: var(--cyb-text);
}

.stat-sub {
    font-size: 12px;
    color: var(--cyb-muted);
    margin-top: 0.25rem;
}

/* Tables */
.table-wrap { overflow-x: auto; }
table.cyb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.cyb-table th, .cyb-table td {
    padding: 0.7rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--cyb-border);
    vertical-align: middle;
}
.cyb-table th {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cyb-muted);
    font-weight: 700;
    background: #f8fafc;
}
.cyb-table tr:hover td { background: #f8fafc; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-info    { background: #e0f2fe; color: #075985; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.52rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cyb-primary); color: #fff; }
.btn-primary:hover { background: var(--cyb-primary-hover); }
.btn-gold { background: #facc15; color: #0f172a; font-weight: 700; border-color: #f5c518; }
.btn-gold:hover { background: #eab308; color: #0f172a; }
.btn-accent { background: var(--cyb-accent); color: #082f49; }
.btn-success { background: var(--cyb-success); color: #fff; }
.btn-danger { background: var(--cyb-danger); color: #fff; }
.btn-outline { background: #fff; color: var(--cyb-text); border-color: var(--cyb-border); }
.btn-outline:hover { background: #f8fafc; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 12.5px; }

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.form-group { margin-bottom: 0.9rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 0.35rem;
    color: var(--cyb-text);
}
.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: var(--cyb-text);
}
.form-control:focus {
    outline: none;
    border-color: var(--cyb-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Alerts */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 9px;
    margin-bottom: 1rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* BotGuard & reCAPTCHA Box */
.bot-challenge-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0.9rem 0;
}
.bot-challenge-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}
.shield-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyb-success);
    display: inline-block;
}
.bot-challenge-label { font-size: 13.5px; font-weight: 600; margin-bottom: 0.4rem; display: block; }
.text-muted { color: var(--cyb-muted); font-size: 12px; }

/* Running Timer Pill */
.timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ecfeff;
    border: 1px solid #67e8f9;
    color: #0e7490;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: cybPulse 1.3s infinite;
}
@keyframes cybPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.25); }
}

/* Public Wrapper */
.public-header {
    background: var(--cyb-sidebar);
    color: #fff;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 20;
}
.public-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-decoration: none;
}
.public-brand-link:hover {
    text-decoration: none;
    opacity: 0.94;
}
.public-header-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.public-header-links a.public-nav-link {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.public-header-links a.public-nav-link:hover { color: #fff; text-decoration: none; }
.public-header-links a.btn-gold { color: #0f172a; }
.public-header-links a.btn-gold:hover { color: #0f172a; text-decoration: none; }
.public-container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}
.auth-box {
    max-width: 440px;
    margin: 2.5rem auto;
}

/* Redesigned Split Hero Login Page */
.public-body-default {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.public-body-hero {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.public-hero-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
}
.public-hero-main::before {
    content: "";
    position: absolute;
    left: 38%;
    bottom: -170px;
    width: 340px;
    height: 620px;
    background: linear-gradient(155deg, rgba(254, 240, 138, 0.35) 0%, rgba(250, 204, 21, 0.85) 55%, rgba(234, 179, 8, 0.95) 100%);
    transform: rotate(28deg);
    border-radius: 36px;
    pointer-events: none;
    z-index: 0;
}
.public-hero-alerts {
    position: relative;
    z-index: 5;
    max-width: 1240px;
    width: 100%;
    margin: 1.25rem auto 0;
    padding: 0 2.25rem;
}
.cyb-login-container {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2.25rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(350px, 445px);
    gap: 3rem;
    align-items: stretch;
    flex: 1;
}
.cyb-login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0.75rem;
}
.cyb-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #334155;
    margin-bottom: 0.9rem;
}
.cyb-hero-eyebrow-bar {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: #f5c518;
    display: inline-block;
}
.cyb-hero-title {
    margin: 0 0 1rem;
    font-size: clamp(2.35rem, 4.3vw, 3.5rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}
.cyb-hero-title-accent {
    color: #f5b800;
    display: block;
}
.cyb-hero-subtitle {
    margin: 0 0 1.85rem;
    font-size: 16.5px;
    line-height: 1.55;
    color: #475569;
    max-width: 500px;
}
.cyb-hero-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    max-width: 560px;
}
.cyb-hero-feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    color: #0f172a;
    text-decoration: none;
    padding-right: 0.75rem;
    border-right: 1px solid #e2e8f0;
}
.cyb-hero-feature:last-child {
    border-right: none;
}
.cyb-hero-feature:hover {
    text-decoration: none;
    color: #b45309;
}
.cyb-hero-feature-icon {
    color: #eab308;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cyb-hero-feature-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.cyb-hero-visual {
    margin-top: auto;
    max-width: 610px;
    position: relative;
}
.cyb-hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 12%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 12%, #000 100%);
    mask-composite: intersect;
}
.cyb-login-card-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    padding-bottom: 2.5rem;
}
.cyb-login-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.09), 0 4px 16px rgba(15, 23, 42, 0.04);
    padding: 2rem 2.15rem 1.75rem;
    margin-bottom: 0;
}
.cyb-card-logo-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}
.cyb-card-logo-link:hover {
    opacity: 0.9;
}
.cyb-login-footer-links {
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--cyb-border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 13px;
}

.public-footer {
    background: var(--cyb-sidebar);
    color: #94a3b8;
    font-size: 12.5px;
    padding: 0.85rem 2.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.public-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.public-footer a {
    color: #facc15;
    font-weight: 600;
}
.public-footer a:hover {
    color: #fde047;
}

@media (max-width: 960px) {
    .cyb-login-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.75rem 1.25rem 2.5rem;
    }
    .public-hero-main::before {
        display: none;
    }
    .cyb-hero-features {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .cyb-hero-feature {
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 0.65rem;
        padding-right: 0;
    }
    .cyb-hero-feature:last-child {
        border-bottom: none;
    }
    .cyb-hero-visual {
        display: none;
    }
    .cyb-login-card-wrap {
        padding-bottom: 0;
    }
}

/* Progress bar */
.progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyb-primary), var(--cyb-accent));
    border-radius: 999px;
}

@media print {
    .cyb-sidebar, .cyb-topbar, .no-print, .public-header { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: none; }
}

@media (max-width: 860px) {
    .cyb-shell { flex-direction: column; }
    .cyb-sidebar { width: 100%; }
    .grid-2 { grid-template-columns: 1fr; }
}
