/* ──────────────────────────────────────────────────────────────────
   UKUU HR — World-Class Theme System
   Brand-forward design language inspired by:
   • Stripe (clean spacing, premium feel)
   • Linear (dark gradients, micro-typography)
   • Notion (calm hierarchy)
   • Satoshi-driven Material 3 ink-forward palette from Dart original
   ────────────────────────────────────────────────────────────────── */

:root {
    /* ───── Brand Purple Palette ───── */
    --ukuu-ink: #7B2FBE;          /* primary brand purple */
    --ukuu-ink-deep: #6A24A8;     /* primary hover */
    --ukuu-ink-darker: #5B1F96;
    --ukuu-accent-cyan: #2D1B69;  /* dark purple */
    --ukuu-accent-gold: #5B3A9E;  /* medium purple */
    --ukuu-accent-violet: #7B2FBE;
    --ukuu-accent-lavender: #A78BFA;

    /* ───── Surfaces ───── */
    --ukuu-surface: #FFFFFF;
    --ukuu-surface-alt: #F8F6FF;
    --ukuu-surface-strong: #E8DFF5;
    --ukuu-surface-70: rgba(123, 47, 190, 0.7);
    --ukuu-surface-54: rgba(167, 139, 250, 0.54);

    /* ───── Text ───── */
    --ukuu-text: #2D1B69;
    --ukuu-text-muted: #5B3A9E;
    --ukuu-text-subtle: #7C6BAA;
    --ukuu-text-on-dark: #FFFFFF;

    /* ───── Borders ───── */
    --ukuu-border-soft: #E8DFF5;
    --ukuu-border-strong: #7B2FBE;
    --ukuu-divider: rgba(123, 47, 190, 0.08);

    /* ───── Status ───── */
    --ukuu-success: #16A34A;
    --ukuu-success-bg: #DCFCE7;
    --ukuu-warning: #F59E0B;
    --ukuu-warning-bg: #FEF3C7;
    --ukuu-error: #DC2626;
    --ukuu-error-bg: #FEE2E2;
    --ukuu-info: #2563EB;
    --ukuu-info-bg: #DBEAFE;

    /* ───── Layout ───── */
    --ukuu-bg: #FFFFFF;
    --ukuu-radius-sm: 8px;
    --ukuu-radius-md: 12px;
    --ukuu-radius-lg: 16px;
    --ukuu-radius-xl: 24px;
    --ukuu-shadow-sm: 0 1px 2px rgba(123, 47, 190, 0.05);
    --ukuu-shadow-md: 0 4px 12px rgba(123, 47, 190, 0.08);
    --ukuu-shadow-lg: 0 12px 32px rgba(123, 47, 190, 0.12);
    --ukuu-shadow-xl: 0 24px 64px rgba(123, 47, 190, 0.18);

    /* ───── Type ───── */
    --ukuu-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ukuu-font-display: 'Plus Jakarta Sans', sans-serif;
    --ukuu-font-mono: 'JetBrains Mono', monospace;

    /* ───── Sidebar ───── */
    --ukuu-sidebar-w-collapsed: 84px;
    --ukuu-sidebar-w-expanded: 280px;
    --ukuu-sidebar-bg: linear-gradient(180deg, #7B2FBE 0%, #5B1F96 100%);
    --ukuu-sidebar-item: rgba(255, 255, 255, 0.75);
    --ukuu-sidebar-item-active: #FFFFFF;
    --ukuu-sidebar-item-active-bg: rgba(255, 255, 255, 0.15);

    /* ───── MudBlazor overrides ───── */
    --mud-palette-primary: #7B2FBE;
    --mud-palette-primary-lighten: #A78BFA;
    --mud-palette-primary-darken: #6A24A8;
    --mud-palette-text-primary: #2D1B69;
    --mud-palette-text-secondary: #5B3A9E;
    --mud-palette-background: #FFFFFF;
    --mud-palette-surface: #FFFFFF;
    --mud-palette-appbar-background: #7B2FBE;
    --mud-palette-appbar-text: #FFFFFF;
    --mud-palette-drawer-background: #7B2FBE;
    --mud-palette-drawer-text: #FFFFFF;
    --mud-palette-drawer-icon: #A78BFA;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--ukuu-font);
    background: var(--ukuu-bg);
    color: var(--ukuu-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ukuu-font-display);
    font-weight: 700;
    color: var(--ukuu-text);
    margin: 0;
    letter-spacing: -0.02em;
}

#blazor-error-ui {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: fixed !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    background: var(--ukuu-error-bg);
    color: var(--ukuu-error);
    border: 1px solid var(--ukuu-error);
    border-radius: var(--ukuu-radius-md);
    padding: 16px 20px;
    box-shadow: var(--ukuu-shadow-lg);
}

/* Additional guard: if JS forces display:block, this keeps the UI invisible */
#blazor-error-ui[style*="display: block"],
#blazor-error-ui[style*="display:block"] {
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

#blazor-error-ui .dismiss { cursor: pointer; margin-left: 1rem; }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #7B2FBE;
    stroke-width: 0.1rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #A78BFA;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: relative;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: #5B3A9E;
    font-size: 14px;
    letter-spacing: 0.05em;
}

code {
    background: #F3EFFE;
    color: #2D1B69;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

/* ───── MudBlazor theme overrides for world-class polish ───── */
.mud-card {
    background: var(--ukuu-surface);
    border: 1px solid var(--ukuu-border-soft) !important;
    border-radius: var(--ukuu-radius-lg) !important;
    box-shadow: var(--ukuu-shadow-sm) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mud-card.ukuu-card-hover:hover {
    box-shadow: var(--ukuu-shadow-md) !important;
    transform: translateY(-2px);
}

.mud-card-header {
    padding: 20px 24px !important;
    border-bottom: 1px solid var(--ukuu-divider);
}

.mud-card-content {
    padding: 20px 24px !important;
}

.mud-button-root {
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    border-radius: var(--ukuu-radius-sm) !important;
    transition: all 0.15s ease !important;
}

.mud-button-filled {
    box-shadow: 0 1px 2px rgba(123, 47, 190, 0.1) !important;
}

.mud-button-filled:hover {
    box-shadow: 0 4px 12px rgba(123, 47, 190, 0.2) !important;
    transform: translateY(-1px);
}

.mud-button-filled:active {
    transform: translateY(0);
}

.mud-input {
    border-radius: var(--ukuu-radius-sm) !important;
}

.mud-input-control {
    margin-bottom: 4px;
}

.mud-table {
    background: transparent !important;
}

.mud-table-head {
    background: var(--ukuu-surface-alt) !important;
}

.mud-table-head .mud-table-cell {
    color: var(--ukuu-text-muted) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--ukuu-border-soft) !important;
}

.mud-table-body .mud-table-cell {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
    font-size: 13px !important;
}

.mud-table-row:hover {
    background: var(--ukuu-surface-alt) !important;
}

.mud-chip {
    font-weight: 500 !important;
    border-radius: 100px !important;
    height: 24px !important;
    font-size: 11px !important;
    padding: 0 10px !important;
    letter-spacing: 0.02em !important;
}

.mud-avatar {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.mud-dialog {
    border-radius: var(--ukuu-radius-lg) !important;
    box-shadow: var(--ukuu-shadow-xl) !important;
}

.mud-dialog-title {
    padding: 24px 28px 16px !important;
    border-bottom: 1px solid var(--ukuu-divider);
}

.mud-dialog-content {
    padding: 24px 28px !important;
}

.mud-dialog-actions {
    padding: 16px 28px 24px !important;
}

/* ───── Custom scrollbar ───── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(123, 47, 190, 0.3);
    border-radius: 5px;
    border: 2px solid var(--ukuu-bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(123, 47, 190, 0.5); }

/* ───── Utility classes ───── */
.ukuu-gradient-text {
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 50%, #5B3A9E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ukuu-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.ukuu-ink-gradient {
    background: linear-gradient(135deg, #7B2FBE 0%, #6A24A8 100%);
}

.ukuu-ink-gradient-soft {
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 100%);
}

.ukuu-shimmer {
    background: linear-gradient(110deg, #f0ecf8 8%, #faf8ff 18%, #f0ecf8 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to { background-position-x: -200%; }
}

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

.ukuu-fade-in { animation: fadeInUp 0.4s ease-out; }

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(123, 47, 190, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(123, 47, 190, 0); }
}

.ukuu-pulse { animation: pulseGlow 2s infinite; }

/* ───── KPI card ───── */
.ukuu-kpi-card {
    background: var(--ukuu-surface);
    border: 1px solid var(--ukuu-border-soft);
    border-radius: var(--ukuu-radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ukuu-kpi-card:hover {
    box-shadow: var(--ukuu-shadow-md);
    transform: translateY(-2px);
    border-color: var(--ukuu-accent-gold);
}

.ukuu-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2FBE 0%, #A78BFA 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.ukuu-kpi-card:hover::before {
    transform: scaleX(1);
}

.ukuu-kpi-value {
    font-family: var(--ukuu-font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--ukuu-text);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.ukuu-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ukuu-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.ukuu-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

.ukuu-kpi-delta-up {
    background: var(--ukuu-success-bg);
    color: var(--ukuu-success);
}

.ukuu-kpi-delta-down {
    background: var(--ukuu-error-bg);
    color: var(--ukuu-error);
}

/* ───── Section header ───── */
.ukuu-section-header {
    margin-bottom: 24px;
}

.ukuu-section-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.ukuu-section-header p {
    color: var(--ukuu-text-muted);
    font-size: 14px;
    margin: 0;
}

/* ───── Status pills ───── */
.ukuu-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ukuu-status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ukuu-status-active { background: var(--ukuu-success-bg); color: var(--ukuu-success); }
.ukuu-status-probation { background: var(--ukuu-warning-bg); color: var(--ukuu-warning); }
.ukuu-status-inactive { background: var(--ukuu-error-bg); color: var(--ukuu-error); }
.ukuu-status-pending { background: var(--ukuu-warning-bg); color: var(--ukuu-warning); }
.ukuu-status-approved { background: var(--ukuu-success-bg); color: var(--ukuu-success); }
.ukuu-status-rejected { background: var(--ukuu-error-bg); color: var(--ukuu-error); }

/* ───── Spinner / loader ───── */
.ukuu-loader {
    width: 32px;
    height: 32px;
    border: 3px solid var(--ukuu-surface-strong);
    border-top-color: var(--ukuu-ink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ───── Empty state ───── */
.ukuu-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ukuu-text-muted);
}

.ukuu-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--ukuu-surface-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ukuu-accent-gold);
}

/* ───── Sidebar (custom — replaces MudDrawer for premium feel) ───── */
.ukuu-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--ukuu-sidebar-w-expanded);
    background: var(--ukuu-sidebar-bg);
    color: var(--ukuu-text-on-dark);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(123, 47, 190, 0.2);
}

.ukuu-sidebar.collapsed {
    width: var(--ukuu-sidebar-w-collapsed);
}

.ukuu-sidebar-brand {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.10);
}

.ukuu-sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ukuu-font-display);
    font-weight: 800;
    font-size: 18px;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ukuu-sidebar-brand-text { overflow: hidden; }
.ukuu-sidebar-brand-name {
    font-family: var(--ukuu-font-display);
    font-weight: 800;
    font-size: 18px;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.ukuu-sidebar-brand-tag {
    font-size: 10px;
    color: rgba(252, 251, 255, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.ukuu-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.ukuu-sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(252, 251, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 12px 12px 6px;
    white-space: nowrap;
}

.ukuu-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--ukuu-radius-sm);
    color: var(--ukuu-sidebar-item);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: 2px;
    text-decoration: none;
    position: relative;
}

.ukuu-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.ukuu-sidebar-item.active {
    background: rgba(167, 139, 250, 0.10);
    color: #FFFFFF;
}

.ukuu-sidebar-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #A78BFA 0%, #7B2FBE 100%);
    border-radius: 0 4px 4px 0;
}

.ukuu-sidebar-item-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ukuu-sidebar-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ukuu-sidebar-item-badge {
    background: var(--ukuu-warning);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 100px;
    min-width: 18px;
    text-align: center;
}

.ukuu-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ukuu-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--ukuu-radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.ukuu-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ukuu-sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7B2FBE, #A78BFA);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.ukuu-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ukuu-sidebar-user-role {
    font-size: 11px;
    color: rgba(252, 251, 255, 0.5);
    white-space: nowrap;
}

/* ───── Top bar ───── */
.ukuu-topbar {
    height: 64px;
    background: var(--ukuu-surface);
    border-bottom: 1px solid var(--ukuu-border-soft);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.ukuu-topbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.ukuu-topbar-search input {
    width: 100%;
    height: 40px;
    border-radius: var(--ukuu-radius-sm);
    border: 1px solid var(--ukuu-border-soft);
    background: var(--ukuu-surface-alt);
    padding: 0 16px 0 40px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ukuu-text);
    outline: none;
    transition: all 0.15s ease;
}

.ukuu-topbar-search input::placeholder { color: var(--ukuu-text-subtle); }

.ukuu-topbar-search input:focus {
    background: var(--ukuu-surface);
    border-color: var(--ukuu-ink);
    box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.08);
}

.ukuu-topbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ukuu-text-subtle);
    pointer-events: none;
}

.ukuu-topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--ukuu-radius-sm);
    border: 1px solid var(--ukuu-border-soft);
    background: var(--ukuu-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ukuu-text-muted);
    position: relative;
    transition: all 0.15s ease;
}

.ukuu-topbar-icon-btn:hover {
    background: var(--ukuu-surface-alt);
    border-color: var(--ukuu-accent-gold);
    color: var(--ukuu-ink);
}

.ukuu-topbar-icon-btn .ukuu-dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ukuu-error);
    border: 2px solid var(--ukuu-surface);
}

/* ───── Main content ───── */
.ukuu-main {
    margin-left: var(--ukuu-sidebar-w-expanded);
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ukuu-main.collapsed {
    margin-left: var(--ukuu-sidebar-w-collapsed);
}

.ukuu-content {
    padding: 32px 40px 48px;
    max-width: 1600px;
    margin: 0 auto;
}

.ukuu-content-tight { padding: 20px 24px 32px; max-width: 100%; }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
    .ukuu-sidebar {
        transform: translateX(-100%);
        width: var(--ukuu-sidebar-w-expanded);
    }
    .ukuu-sidebar.mobile-open { transform: translateX(0); }
    .ukuu-main { margin-left: 0 !important; }
    .ukuu-content { padding: 20px; }
}

/* ───── Login / auth ───── */
.ukuu-auth-bg {
    min-height: 100vh;
    background: radial-gradient(ellipse at top left, #7B2FBE 0%, #5B1F96 40%, #2D1B69 100%);
    position: relative;
    overflow: hidden;
}

.ukuu-auth-bg::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.4) 0%, transparent 70%);
    top: -200px; right: -200px;
    filter: blur(40px);
}

.ukuu-auth-bg::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 47, 190, 0.3) 0%, transparent 70%);
    bottom: -200px; left: -100px;
    filter: blur(40px);
}

.ukuu-auth-card {
    background: var(--ukuu-surface);
    border-radius: var(--ukuu-radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--ukuu-shadow-xl);
    position: relative;
    z-index: 1;
}

/* ───── Landing ───── */
.ukuu-landing-hero {
    background: linear-gradient(135deg, #5B1F96 0%, #7B2FBE 50%, #6A24A8 100%);
    min-height: 600px;
    color: #FFFFFF;
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.ukuu-landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(167, 139, 250, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 47, 190, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.ukuu-landing-hero h1 {
    color: #FFFFFF;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 20px;
}

/* ───── Drawer panel for create flows ───── */
.ukuu-drawer-panel {
    background: var(--ukuu-surface);
    box-shadow: var(--ukuu-shadow-xl);
}

/* ───── Tabs ───── */
.ukuu-tab {
    padding: 12px 16px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--ukuu-text-muted);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ukuu-tab:hover { color: var(--ukuu-ink); }

.ukuu-tab.active {
    color: var(--ukuu-ink);
    border-bottom-color: var(--ukuu-ink);
}

/* ───── Print styles for payslips ───── */
@media print {
    .ukuu-sidebar, .ukuu-topbar, .no-print { display: none !important; }
    .ukuu-main { margin-left: 0 !important; }
    body { background: white; }
}

/* ═══════════════════════════════════════════════════════════════════
   BUILDERKING-INSPIRED THEME ADDITIONS
   Warm off-white background, gold accent, pill buttons, big headlines
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* BuilderKing palette — purple & white theme */
    --bk-bg: #FFFFFF;
    --bk-bg-strong: #FFFFFF;
    --bk-ink: #2D1B69;
    --bk-ink-2: #5B3A9E;
    --bk-ink-3: #7C6BAA;
    --bk-line: rgba(123, 47, 190, 0.14);
    --bk-line-strong: rgba(123, 47, 190, 0.42);
    --bk-muted: #F3EFFE;
    --bk-muted-2: #E8DFF5;
    --bk-accent: #7B2FBE;          /* primary purple */
    --bk-accent-2: #6c63ff;        /* bright purple */
    --bk-accent-3: #14a37f;        /* green */
    --bk-accent-4: #e85d75;        /* pink */
    --bk-shadow: 0 24px 80px rgba(123, 47, 190, 0.08);
    --bk-radius: 8px;
    --bk-container: 1180px;
    --bk-wide: 1520px;
}

/* ───── Body with warm gradient + grid texture (BuilderKing signature) ───── */
.bk-body {
    background:
        repeating-linear-gradient(90deg, rgba(123, 47, 190, 0.015) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, #FFFFFF 0%, #F8F6FF 54%, #FFFFFF 100%);
    color: var(--bk-ink);
    font-family: "Geist", "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.bk-container { width: min(100% - 48px, var(--bk-container)); margin-inline: auto; }
.bk-wide { width: min(100% - 48px, var(--bk-wide)); margin-inline: auto; }
.bk-section { padding: 96px 0; position: relative; }
.bk-section-tight { padding: 64px 0; }

/* ───── Eyebrow badge (BuilderKing signature) ───── */
.bk-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(123, 47, 190, 0.055);
    color: var(--bk-ink-2);
    font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bk-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A78BFA;
    box-shadow: 0 0 0 4px rgba(123, 47, 190, 0.14);
}

.bk-eyebrow.green::before { background: var(--bk-accent-3); box-shadow: 0 0 0 4px rgba(20, 163, 127, 0.14); }
.bk-eyebrow.purple::before { background: var(--bk-accent-2); box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.14); }
.bk-eyebrow.pink::before { background: var(--bk-accent-4); box-shadow: 0 0 0 4px rgba(232, 93, 117, 0.14); }

/* ───── Headlines (BuilderKing scale) ───── */
.bk-h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--bk-ink);
    margin: 0;
    font-family: "Geist", "Plus Jakarta Sans", sans-serif;
}

.bk-h2 {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 710;
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--bk-ink);
    margin: 0;
    font-family: "Geist", "Plus Jakarta Sans", sans-serif;
}

.bk-h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bk-ink);
    margin: 0;
    font-family: "Geist", "Plus Jakarta Sans", sans-serif;
}

.bk-lead {
    color: var(--bk-ink-2);
    font-size: 20px;
    line-height: 1.65;
    max-width: 720px;
}

.bk-small { color: var(--bk-ink-3); font-size: 14px; }

/* Outlined word (BuilderKing signature) */
.bk-word-outline {
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: 1.4px var(--bk-ink);
    text-shadow: 0 1px 0 rgba(123, 47, 190, 0.18);
}

/* ───── Pills / buttons ───── */
.bk-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.bk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
    white-space: nowrap;
    font-family: inherit;
}

.bk-btn:hover { transform: translateY(-1px); }

.bk-btn-primary {
    background: linear-gradient(180deg, #7B2FBE, #6A24A8);
    color: white;
    box-shadow: 0 12px 34px rgba(123, 47, 190, 0.18);
}

.bk-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(123, 47, 190, 0.24); }

.bk-btn-secondary {
    background: rgba(255, 255, 255, 0.74);
    border-color: var(--bk-line);
    color: var(--bk-ink);
    backdrop-filter: blur(10px);
}

.bk-btn-secondary:hover { border-color: var(--bk-line-strong); background: white; }

.bk-btn-accent {
    background: linear-gradient(180deg, var(--bk-accent), #6A24A8);
    color: white;
    box-shadow: 0 12px 34px rgba(123, 47, 190, 0.28);
}

.bk-btn-text {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    color: var(--bk-ink);
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
}

.bk-btn-text::after {
    content: '→';
    transition: transform 180ms ease;
}

.bk-btn-text:hover { transform: none; }
.bk-btn-text:hover::after { transform: translateX(4px); }

/* ───── Site header ───── */
.bk-header {
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(123, 47, 190, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.bk-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.bk-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 850;
    text-decoration: none;
    color: var(--bk-ink);
}

.bk-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #7B2FBE, #5B1F96);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Geist", "Plus Jakarta Sans", sans-serif;
    font-weight: 850;
    font-size: 18px;
    border: 1px solid rgba(123, 47, 190, 0.18);
}

.bk-brand-name { font-size: 17px; letter-spacing: 0.02em; }
.bk-brand-tag { font-size: 10px; color: var(--bk-ink-3); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }

/* Brand mark glyphs — the real Ukuu mark replaces the letter "U" chips.
   The chip keeps its gradient tile; the glyph sits inside with object-fit. */
.bk-brand-logo img,
.bk-auth-brand-logo img,
.bk-admin-sidebar-brand-logo img,
.bk-admin-topbar-mobile-brand-logo img,
.bk-footer-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 7px;
    display: block;
    border-radius: inherit;
}

.bk-nav-links { display: flex; align-items: center; gap: 24px; }
.bk-nav-links a {
    color: var(--bk-ink-2);
    font-size: 14px;
    font-weight: 680;
    text-decoration: none;
    transition: color 180ms ease;
}
.bk-nav-links a:hover { color: var(--bk-ink); }

.bk-nav-cta { display: flex; align-items: center; gap: 12px; }

.bk-availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bk-ink-2);
    font-size: 13px;
    white-space: nowrap;
}

.bk-availability::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #26c56a;
    box-shadow: 0 0 0 4px rgba(38, 197, 106, 0.14);
    animation: bk-pulse 2.2s ease-in-out infinite;
}

@keyframes bk-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(38, 197, 106, 0.14); }
    50% { box-shadow: 0 0 0 8px rgba(38, 197, 106, 0.06); }
}

/* ───── Section header ───── */
.bk-section-header {
    display: grid;
    gap: 18px;
    max-width: 760px;
    margin-bottom: 42px;
}

.bk-section-header.center {
    margin-inline: auto;
    text-align: center;
    justify-items: center;
}

/* ───── Hero ───── */
.bk-hero {
    min-height: calc(100vh - 76px);
    padding: clamp(58px, 7.2vh, 104px) 0 clamp(80px, 10vh, 120px);
    position: relative;
    display: grid;
    align-content: center;
    overflow: hidden;
    isolation: isolate;
}

.bk-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(123, 47, 190, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(108, 99, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 60% 30%, rgba(167, 139, 250, 0.05) 0%, transparent 60%);
}

.bk-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    align-items: center;
    column-gap: 48px;
    row-gap: 48px;
}

@media (max-width: 980px) {
    .bk-hero-grid { grid-template-columns: 1fr; }
}

.bk-hero-copy { display: grid; gap: 26px; }
.bk-hero-copy .bk-lead { max-width: 720px; }

.bk-hero-visual {
    position: relative;
    min-height: clamp(420px, 50vh, 560px);
    perspective: 1150px;
}

.bk-artboard {
    position: relative;
    border: 1px solid var(--bk-line-strong);
    background: rgba(255, 255, 255, 0.54);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--bk-radius);
    padding: 24px;
    box-shadow: var(--bk-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bk-artboard::before, .bk-artboard::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--bk-ink);
    z-index: 2;
}

.bk-artboard::before { left: -4px; top: -4px; }
.bk-artboard::after { right: -4px; bottom: -4px; }

.bk-corner-tr, .bk-corner-bl {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--bk-ink);
    z-index: 2;
}
.bk-corner-tr { right: -4px; top: -4px; }
.bk-corner-bl { left: -4px; bottom: -4px; }

/* Floating cards over hero visual */
.bk-floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--bk-shadow);
    z-index: 3;
    max-width: 240px;
}

.bk-floating-card.top { top: -28px; right: -32px; }
.bk-floating-card.bottom { bottom: -28px; left: -32px; }

@media (max-width: 980px) {
    .bk-floating-card.top { top: -20px; right: 12px; }
    .bk-floating-card.bottom { bottom: -20px; left: 12px; }
}

.bk-card-kicker {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bk-ink-3);
}

.bk-mini-metric {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--bk-line);
}

.bk-mini-metric span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bk-ink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.bk-mini-metric span.accent { background: #A78BFA; }

/* ───── Stats band ───── */
.bk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding: 32px 0;
}

.bk-stat strong {
    display: block;
    font-size: 44px;
    font-weight: 800;
    color: var(--bk-ink);
    letter-spacing: -0.02em;
    line-height: 1;
    font-family: "Geist", sans-serif;
}

.bk-stat span {
    display: block;
    margin-top: 8px;
    color: var(--bk-ink-3);
    font-size: 14px;
    line-height: 1.4;
}

/* ───── Stage cards (numbered cards) ───── */
.bk-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.bk-stage-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-bg-strong);
    text-decoration: none;
    color: var(--bk-ink);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
    position: relative;
}

.bk-stage-card:hover {
    transform: translateY(-3px);
    border-color: var(--bk-line-strong);
    box-shadow: var(--bk-shadow);
}

.bk-stage-card small {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 8px;
}

.bk-stage-card h3 { margin-bottom: 8px; }
.bk-stage-card p { color: var(--bk-ink-2); font-size: 14px; line-height: 1.6; margin: 0; }

/* ───── Discipline / capability cards ───── */
.bk-discipline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bk-discipline-card {
    padding: 28px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-bg-strong);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.bk-discipline-card:hover {
    transform: translateY(-3px);
    border-color: var(--bk-line-strong);
    box-shadow: var(--bk-shadow);
}

.bk-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bk-ink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Geist Mono", "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 16px;
}

.bk-discipline-card h3 { margin-bottom: 8px; }
.bk-discipline-card p { color: var(--bk-ink-2); font-size: 14px; line-height: 1.6; margin: 0 0 14px 0; }

.bk-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.bk-tag {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bk-muted);
    color: var(--bk-ink-2);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--bk-line);
}

/* ───── Split section ───── */
.bk-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 900px) {
    .bk-split { grid-template-columns: 1fr; }
}

/* ───── Payroll band (dark) ───── */
.bk-band-dark {
    background: linear-gradient(180deg, #2D1B69, #3A2566);
    color: white;
    padding: 96px 0;
}

.bk-band-dark h2, .bk-band-dark h3 { color: white; }
.bk-band-dark .bk-lead { color: rgba(255, 255, 255, 0.75); }
.bk-band-dark .bk-eyebrow { background: rgba(167, 139, 250, 0.10); color: rgba(255, 255, 255, 0.8); }

.bk-band-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}

.bk-band-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(123, 47, 190, 0.18);
    color: #A78BFA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.bk-band-row-value {
    font-size: 18px;
    font-weight: 800;
    color: #A78BFA;
    margin-left: auto;
}

/* ───── Product grid ───── */
.bk-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bk-product-card {
    padding: 24px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-bg-strong);
    text-decoration: none;
    color: var(--bk-ink);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
    display: block;
}

.bk-product-card:hover {
    transform: translateY(-3px);
    border-color: var(--bk-line-strong);
    box-shadow: var(--bk-shadow);
}

.bk-product-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bk-product-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bk-product-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.bk-product-card h3 { margin-bottom: 2px; }
.bk-product-card p { color: var(--bk-ink-2); font-size: 14px; line-height: 1.6; margin: 0; }

/* ───── Case grid ───── */
.bk-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.bk-case-card {
    padding: 24px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-bg-strong);
}

.bk-case-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.bk-case-card h3 { font-size: 18px; }
.bk-case-card p { color: var(--bk-ink-2); font-size: 14px; line-height: 1.6; margin: 0; }

/* ───── CTA section ───── */
.bk-cta {
    padding: 80px 0 120px;
    text-align: center;
}

.bk-cta-card {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123, 47, 190, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, var(--bk-bg-strong), var(--bk-muted));
    border: 1px solid var(--bk-line);
    border-radius: 16px;
    padding: 64px 48px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--bk-shadow);
}

.bk-cta-card h2 { margin-bottom: 16px; }
.bk-cta-card .bk-lead { margin: 0 auto 32px; }

.bk-credentials {
    margin-top: 24px;
    padding: 14px 20px;
    background: var(--bk-bg-strong);
    border: 1px dashed var(--bk-accent);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--bk-ink-2);
}

.bk-credentials strong { color: var(--bk-ink); font-weight: 700; }
.bk-credentials code { font-family: "JetBrains Mono", monospace; color: #A78BFA; font-weight: 700; }

/* ───── Footer ───── */
.bk-footer {
    background: #2D1B69;
    color: rgba(243, 240, 255, 0.6);
    padding: 48px 0 32px;
    font-size: 14px;
}

.bk-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

@media (max-width: 720px) {
    .bk-footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.bk-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bk-footer-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.bk-footer-brand span { color: white; font-weight: 800; }

.bk-footer h4 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.bk-footer ul { list-style: none; padding: 0; margin: 0; }
.bk-footer li { margin-bottom: 8px; }
.bk-footer a { color: rgba(255, 255, 255, 0.65); text-decoration: none; transition: color 180ms ease; }
.bk-footer a:hover { color: white; }

.bk-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

/* ───── Logo strip ───── */
.bk-logo-strip {
    margin-top: 56px;
    padding: 24px 0;
    border-top: 1px solid var(--bk-line);
    border-bottom: 1px solid var(--bk-line);
}

.bk-logo-strip-label {
    text-align: center;
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.bk-logo-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.bk-logo-item {
    padding: 8px 18px;
    border: 1px solid var(--bk-line);
    border-radius: 999px;
    background: var(--bk-bg-strong);
    color: var(--bk-ink-2);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.bk-logo-item:hover {
    transform: translateY(-2px);
    border-color: var(--bk-line-strong);
}

.bk-logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ───── Pillar / proof band ───── */
.bk-proof-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 900px) {
    .bk-proof-band { grid-template-columns: 1fr; }
}

.bk-proof-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.bk-proof-stats > div {
    padding: 18px;
    background: var(--bk-bg-strong);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
}

.bk-proof-stats strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--bk-ink);
    letter-spacing: -0.02em;
    line-height: 1;
}

.bk-proof-stats span {
    display: block;
    margin-top: 6px;
    color: var(--bk-ink-3);
    font-size: 12px;
    line-height: 1.4;
}

/* ───── Method illustration ───── */
.bk-method-illustration {
    background: var(--bk-bg-strong);
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    padding: 32px;
    position: relative;
    box-shadow: var(--bk-shadow);
}

.bk-method-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bk-line);
}

.bk-method-step:last-child { border-bottom: none; }

.bk-method-step-num {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bk-ink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Geist Mono", "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.bk-method-step-num.gold { background: #A78BFA; }
.bk-method-step-num.green { background: var(--bk-accent-3); }
.bk-method-step-num.purple { background: var(--bk-accent-2); }
.bk-method-step-num.pink { background: var(--bk-accent-4); }

.bk-method-step h4 { font-size: 15px; font-weight: 760; margin: 0 0 2px 0; color: var(--bk-ink); }
.bk-method-step p { font-size: 13px; color: var(--bk-ink-3); margin: 0; line-height: 1.4; }

/* ───── Fade-in animation ───── */
@keyframes bkFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bk-fade-in { animation: bkFadeIn 0.6s ease-out; }
.bk-fade-in-delay-1 { animation: bkFadeIn 0.6s ease-out 0.1s both; }
.bk-fade-in-delay-2 { animation: bkFadeIn 0.6s ease-out 0.2s both; }
.bk-fade-in-delay-3 { animation: bkFadeIn 0.6s ease-out 0.3s both; }

/* ═══════════════════════════════════════════════════════════════════
   BUILDERKING-INSPIRED AUTH PAGES (Login + Register)
   ═══════════════════════════════════════════════════════════════════ */

/* ───── Auth page layout (split: visual left, form right) ───── */
.bk-auth {
    min-height: 100vh;
    background:
        repeating-linear-gradient(90deg, rgba(123, 47, 190, 0.015) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, #FFFFFF 0%, #F8F6FF 54%, #FFFFFF 100%);
    color: var(--bk-ink);
    font-family: "Geist", "Plus Jakarta Sans", system-ui, sans-serif;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
    .bk-auth { grid-template-columns: 1fr; }
    .bk-auth-visual { display: none !important; }
}

/* ───── Left visual panel (dark gradient with brand storytelling) ───── */
.bk-auth-visual {
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(167, 139, 250, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(108, 99, 255, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #7B2FBE 0%, #5B1F96 100%);
    color: white;
    padding: 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bk-auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px);
    pointer-events: none;
}

.bk-auth-visual > * { position: relative; z-index: 1; }

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

.bk-auth-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Geist", sans-serif;
    font-weight: 850;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(123, 47, 190, 0.3);
}

.bk-auth-brand-name { font-size: 18px; font-weight: 850; letter-spacing: 0.02em; }
.bk-auth-brand-tag { font-size: 11px; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }

.bk-auth-visual-mid { display: grid; gap: 24px; }

.bk-auth-visual-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.90);
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bk-auth-visual-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A78BFA;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18);
}

.bk-auth-visual h1 {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 760;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
    color: white;
    font-family: "Geist", sans-serif;
}

.bk-auth-visual h1 .bk-word-outline {
    -webkit-text-stroke: 1.4px white;
}

.bk-auth-visual-lead {
    color: rgba(255, 255, 255, 0.75);
    font-size: 17px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0;
}

.bk-auth-visual-foot {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bk-auth-quote {
    padding: 20px 24px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.bk-auth-quote p {
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: 14px;
    line-height: 1.6;
    font-style: italic;
}

.bk-auth-quote-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

.bk-auth-quote-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
}

.bk-auth-quote-foot strong { color: white; font-weight: 700; }

.bk-auth-visual-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bk-auth-visual-stats > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bk-auth-visual-stats strong {
    font-size: 24px;
    font-weight: 800;
    color: #A78BFA;
    letter-spacing: -0.02em;
    line-height: 1;
}

.bk-auth-visual-stats span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

/* ───── Right form panel ───── */
.bk-auth-form-side {
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .bk-auth-form-side { padding: 40px 24px; }
}

.bk-auth-card {
    width: 100%;
    max-width: 440px;
}

/* Mobile brand (when visual side is hidden) */
.bk-auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    text-decoration: none;
    color: var(--bk-ink);
}

@media (max-width: 900px) {
    .bk-auth-mobile-brand { display: flex; }
}

.bk-auth-mobile-brand .bk-auth-brand-logo {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* ───── Form header ───── */
.bk-auth-header { margin-bottom: 32px; }

.bk-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(123, 47, 190, 0.055);
    color: var(--bk-ink-2);
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
}

.bk-auth-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A78BFA;
    box-shadow: 0 0 0 4px rgba(123, 47, 190, 0.14);
}

.bk-auth-h1 {
    font-size: 36px;
    font-weight: 760;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--bk-ink);
    margin: 0 0 8px 0;
    font-family: "Geist", sans-serif;
}

.bk-auth-sub {
    color: var(--bk-ink-2);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ───── Form fields (BuilderKing-style) ───── */
.bk-field { margin-bottom: 18px; }

.bk-label {
    display: block;
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.bk-input-wrap { position: relative; }

.bk-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-bg-strong);
    font-family: inherit;
    font-size: 15px;
    color: var(--bk-ink);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.bk-input::placeholder { color: var(--bk-ink-3); }

.bk-input:focus {
    border-color: var(--bk-ink);
    box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.08);
    background: white;
}

.bk-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bk-ink-3);
    pointer-events: none;
    font-size: 20px;
}

.bk-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bk-ink-3);
    padding: 4px;
    border-radius: 4px;
    transition: color 180ms ease, background 180ms ease;
}

.bk-input-toggle:hover { color: var(--bk-ink); background: var(--bk-muted); }

/* ───── Form row (label + action) ───── */
.bk-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bk-auth-row .bk-label { margin-bottom: 0; }

.bk-auth-link {
    font-size: 13px;
    color: var(--bk-ink);
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.bk-auth-link:hover { color: #7B2FBE; }

/* ───── Checkbox row ───── */
.bk-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 24px;
    cursor: pointer;
    user-select: none;
}

.bk-check {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--bk-line-strong);
    border-radius: 4px;
    background: var(--bk-bg-strong);
    cursor: pointer;
    position: relative;
    transition: background 180ms ease, border-color 180ms ease;
    flex-shrink: 0;
}

.bk-check:checked {
    background: #7B2FBE;
    border-color: #7B2FBE;
}

.bk-check:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.bk-check-label { font-size: 13px; color: var(--bk-ink-2); cursor: pointer; }

/* ───── Primary auth button ───── */
.bk-auth-submit {
    width: 100%;
    height: 50px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, #7B2FBE, #6A24A8);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 12px 34px rgba(123, 47, 190, 0.18);
}

.bk-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(123, 47, 190, 0.24);
}

.bk-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.bk-auth-submit-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bk-spin 0.8s linear infinite;
}

@keyframes bk-spin { to { transform: rotate(360deg); } }

/* ───── Divider ───── */
.bk-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.bk-divider::before, .bk-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bk-line);
}

.bk-divider span {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ───── Social buttons ───── */
.bk-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bk-social-btn {
    height: 46px;
    padding: 0 18px;
    border: 1px solid var(--bk-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--bk-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
    backdrop-filter: blur(10px);
}

.bk-social-btn:hover {
    border-color: var(--bk-line-strong);
    background: white;
    transform: translateY(-1px);
}

.bk-social-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Google "G" SVG */
.bk-social-icon-google {
    background: conic-gradient(from 0deg, #ea4335 0% 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
    border-radius: 50%;
    position: relative;
}

.bk-social-icon-google::after {
    content: 'G';
    position: absolute;
    inset: 3px;
    background: white;
    color: #4285f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    font-family: "Geist", sans-serif;
}

/* Microsoft four-square */
.bk-social-icon-ms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 18px;
    height: 18px;
}

.bk-social-icon-ms span:nth-child(1) { background: #f25022; }
.bk-social-icon-ms span:nth-child(2) { background: #7fba00; }
.bk-social-icon-ms span:nth-child(3) { background: #00a4ef; }
.bk-social-icon-ms span:nth-child(4) { background: #ffb900; }

/* ───── Demo credentials pill ───── */
.bk-demo-creds {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--bk-bg-strong);
    border: 1.5px dashed var(--bk-accent);
    border-radius: 12px;
    text-align: center;
}

.bk-demo-creds-label {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--bk-ink-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bk-demo-creds-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

.bk-demo-creds-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
}

.bk-demo-creds-email { font-weight: 700; color: var(--bk-ink); }
.bk-demo-creds-sep { color: var(--bk-ink-3); }
.bk-demo-creds-pass {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    color: #A78BFA;
    font-weight: 700;
    background: rgba(123, 47, 190, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ───── Footer link ───── */
.bk-auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--bk-ink-2);
}

.bk-auth-footer a {
    color: var(--bk-ink);
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.bk-auth-footer a:hover { color: #7B2FBE; }

/* ───── Back-to-home link (top-right of form side) ───── */
.bk-auth-back {
    position: absolute;
    top: 24px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--bk-line);
    border-radius: 999px;
    background: var(--bk-bg-strong);
    color: var(--bk-ink-2);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.bk-auth-back:hover {
    border-color: var(--bk-line-strong);
    color: var(--bk-ink);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .bk-auth-back { top: 16px; right: 16px; }
}

/* ───── Form-side container (relative for absolute back link) ───── */
.bk-auth-form-side { position: relative; }

/* ───── Two-column form grid (register) ───── */
.bk-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .bk-form-grid-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   BUILDERKING AUTH FORM — Blazor InputText/InputCheckbox overrides
   ═══════════════════════════════════════════════════════════════════ */

/* InputText renders as <input type="text" class="bk-input valid" /> — make sure
   the .valid/.invalid classes from Blazor don't override our styling */
.bk-input.valid,
.bk-input.invalid {
    border-color: var(--bk-line);
    background-image: none;
    padding-right: 16px;
}

.bk-input.valid:focus,
.bk-input.invalid:focus {
    border-color: var(--bk-ink);
}

.bk-input.invalid {
    border-color: #dc2626;
}

/* InputText doesn't get padding-left automatically when we have an icon — fix it */
.bk-input-wrap .inputvalid,
.bk-input-wrap input.bk-input,
.bk-input-wrap select.bk-input {
    padding-left: 44px;
}

/* Inputs without icons (not inside .bk-input-wrap) keep default 16px padding */
input.bk-input:not(.bk-input-wrap *),
select.bk-input:not(.bk-input-wrap *) {
    padding-left: 16px;
}

/* For password field with toggle button */
.bk-input-wrap input.bk-input[style*="padding-right:48px"],
.bk-input-wrap input.bk-input[style*="padding-right: 48px"] {
    padding-right: 48px;
}

/* ───── World-class <select> styling (InputSelect) ─────
   Native <select> elements styled with .bk-input:
   - Reset left padding (no icon by default)
   - Custom chevron arrow that adapts to light/dark mode
   - Consistent 48px height matching text inputs
   - Proper appearance across Chrome/Firefox/Safari */
select.bk-input {
    padding: 0 40px 0 16px;              /* 16px left (no icon), 40px right for arrow */
    appearance: none;                     /* remove native arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    cursor: pointer;
    line-height: 48px;                    /* vertically center the selected value */
}

/* When a select DOES have an icon (inside .bk-input-wrap with .bk-input-icon),
   restore the icon padding and shift the arrow slightly more right */
.bk-input-wrap select.bk-input {
    padding-left: 44px;
}

/* Hide the default arrow on IE/Edge legacy */
select.bk-input::-ms-expand { display: none; }

/* Style the placeholder/empty option (the "Select …" row) */
select.bk-input option[value=""] {
    color: var(--bk-ink-3);
    font-style: italic;
}

/* Dark-mode adjustments for the select arrow + optgroup */
html[data-theme="dark"] select.bk-input {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C6BAA' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

html[data-theme="dark"] select.bk-input optgroup {
    background: #221440;
    color: var(--ukuu-text-muted, #7C6BAA);
    font-style: normal;
    font-weight: 700;
}

html[data-theme="dark"] select.bk-input option {
    background: #1A0F2E;
    color: var(--ukuu-text, #F3F0FF);
}

/* Light-mode optgroup styling for a clean, editorial feel */
select.bk-input optgroup {
    background: #fafafa;
    color: var(--bk-ink-2, #525252);
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

select.bk-input option {
    background: #ffffff;
    color: var(--bk-ink, #2D1B69);
    padding: 8px 12px;
}

/* Hover/focus ring on the select matches text inputs */
select.bk-input:hover {
    border-color: var(--bk-ink-3);
}

select.bk-input:focus {
    border-color: var(--bk-ink);
    box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.08);
    background-color: white;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B2FBE' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
}

html[data-theme="dark"] select.bk-input:focus {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(252, 251, 255, 0.08);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FCFBFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ValidationMessage */
.validation-message {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    font-weight: 600;
}

/* Make sure InputCheckbox inside .bk-check-row doesn't get default styling */
.bk-check-row input[type="checkbox"].bk-check {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ═══════════════════════════════════════════════════════════════════
   BUILDERKING-INSPIRED ADMIN THEME
   Applies the warm off-white + gold + dark ink palette to the admin shell
   ═══════════════════════════════════════════════════════════════════ */

/* ───── Admin body ───── */
.bk-admin-body {
    background:
        repeating-linear-gradient(90deg, rgba(123, 47, 190, 0.015) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, #FFFFFF 0%, #F8F6FF 54%, #FFFFFF 100%);
    color: var(--bk-ink);
    font-family: "Geist", "Plus Jakarta Sans", system-ui, sans-serif;
    min-height: 100vh;
}

/* ───── Admin sidebar (dark ink, not purple) ───── */
.bk-admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    background:
        radial-gradient(ellipse 60% 40% at 20% 0%, rgba(167, 139, 250, 0.10) 0%, transparent 60%),
        linear-gradient(180deg, #7B2FBE 0%, #5B1F96 100%);
    color: rgba(255, 255, 255, 0.90);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.bk-admin-sidebar.collapsed { width: 84px; }

.bk-admin-sidebar-brand {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.10);
    text-decoration: none;
    color: inherit;
}

.bk-admin-sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Geist", sans-serif;
    font-weight: 850;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(123, 47, 190, 0.3);
}

.bk-admin-sidebar-brand-name {
    font-family: "Geist", sans-serif;
    font-weight: 850;
    font-size: 18px;
    color: #FFFFFF;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bk-admin-sidebar-brand-tag {
    font-size: 10px;
    color: rgba(243, 240, 255, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}

/* ───── Sidebar nav ───── */
.bk-admin-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.bk-admin-sidebar-section-label {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    color: rgba(243, 240, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 12px 12px 6px;
    white-space: nowrap;
}

.bk-admin-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(243, 240, 255, 0.75);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: 2px;
    text-decoration: none;
    position: relative;
}

.bk-admin-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.bk-admin-sidebar-item.active {
    background: rgba(167, 139, 250, 0.10);
    color: #FFFFFF;
}

.bk-admin-sidebar-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #A78BFA 0%, #7B2FBE 100%);
    border-radius: 0 4px 4px 0;
}

.bk-admin-sidebar-item-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-admin-sidebar-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-admin-sidebar-item-badge {
    background: var(--bk-accent-4);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 100px;
    min-width: 18px;
    text-align: center;
}

/* ───── Sidebar footer (user) ───── */
.bk-admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bk-admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.bk-admin-sidebar-user:hover { background: rgba(255, 255, 255, 0.05); }

.bk-admin-sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.bk-admin-sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-admin-sidebar-user-role {
    font-size: 11px;
    color: rgba(243, 240, 255, 0.55);
    white-space: nowrap;
}

/* ───── Admin main ───── */
.bk-admin-main {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bk-admin-main.collapsed { margin-left: 84px; }

/* ───── Admin topbar ───── */
.bk-admin-topbar {
    height: 64px;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(123, 47, 190, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.bk-admin-topbar-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--bk-line);
    background: rgba(255, 255, 255, 0.74);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bk-ink-2);
    transition: all 0.15s ease;
}

.bk-admin-topbar-toggle:hover {
    border-color: var(--bk-line-strong);
    background: white;
    color: var(--bk-ink);
}

.bk-admin-topbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.bk-admin-topbar-search input {
    width: 100%;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--bk-line);
    background: rgba(255, 255, 255, 0.74);
    padding: 0 16px 0 40px;
    font-family: inherit;
    font-size: 13px;
    color: var(--bk-ink);
    outline: none;
    transition: all 0.15s ease;
}

.bk-admin-topbar-search input::placeholder { color: var(--bk-ink-3); }

.bk-admin-topbar-search input:focus {
    background: white;
    border-color: var(--bk-ink);
    box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.06);
}

.bk-admin-topbar-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bk-ink-3);
    pointer-events: none;
    font-size: 20px;
}

.bk-admin-topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--bk-line);
    background: rgba(255, 255, 255, 0.74);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bk-ink-2);
    position: relative;
    transition: all 0.15s ease;
    text-decoration: none;
}

.bk-admin-topbar-icon-btn:hover {
    border-color: var(--bk-line-strong);
    background: white;
    color: var(--bk-ink);
}

.bk-admin-topbar-icon-btn .bk-dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--bk-accent-4);
    border: 2px solid var(--bk-bg);
}

.bk-admin-topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7B2FBE, #5B1F96);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: none;
}

/* ───── Admin content ───── */
.bk-admin-content {
    padding: 32px 40px 48px;
    /* Removed max-width: 1600px cap so tables and content extend to the
       full width of the viewport (minus the 280px sidebar). On a 1920px
       screen the content area now uses 1640px instead of being capped. */
    margin: 0 auto;
}

/* ───── Admin section header ───── */
.bk-admin-section-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.bk-admin-section-header-left { flex: 1; min-width: 300px; }

.bk-admin-greeting {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: #A78BFA;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-admin-greeting::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bk-accent-3);
    box-shadow: 0 0 0 4px rgba(20, 163, 127, 0.14);
}

.bk-admin-h1 {
    font-size: 32px;
    font-weight: 760;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--bk-ink);
    margin: 0 0 4px 0;
    font-family: "Geist", sans-serif;
}

.bk-admin-sub {
    color: var(--bk-ink-2);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.bk-admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ───── Admin KPI cards ───── */
.bk-admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.bk-admin-kpi-card {
    background: var(--bk-bg-strong);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bk-admin-kpi-card:hover {
    border-color: var(--bk-line-strong);
    box-shadow: var(--bk-shadow);
    transform: translateY(-2px);
}

.bk-admin-kpi-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.bk-admin-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-admin-kpi-icon.blue { background: rgba(108, 99, 255, 0.12); color: var(--bk-accent-2); }
.bk-admin-kpi-icon.green { background: rgba(20, 163, 127, 0.12); color: var(--bk-accent-3); }
.bk-admin-kpi-icon.gold { background: rgba(123, 47, 190, 0.12); color: #7B2FBE; }
.bk-admin-kpi-icon.pink { background: rgba(232, 93, 117, 0.12); color: var(--bk-accent-4); }
.bk-admin-kpi-icon.ink { background: rgba(123, 47, 190, 0.08); color: var(--bk-ink); }

.bk-admin-kpi-value {
    font-family: "Geist", sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--bk-ink);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.bk-admin-kpi-label {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.bk-admin-kpi-sub {
    margin-top: 8px;
    font-size: 12px;
    color: var(--bk-ink-3);
}

.bk-admin-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.bk-admin-kpi-delta.up { background: rgba(20, 163, 127, 0.12); color: var(--bk-accent-3); }
.bk-admin-kpi-delta.down { background: rgba(232, 93, 117, 0.12); color: var(--bk-accent-4); }
.bk-admin-kpi-delta.neutral { background: var(--bk-muted); color: var(--bk-ink-2); }

/* ───── Admin card (generic) ───── */
.bk-admin-card {
    background: var(--bk-bg-strong);
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    overflow: hidden;
}

.bk-admin-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bk-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.bk-admin-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--bk-ink);
    margin: 0;
    font-family: "Geist", sans-serif;
}

.bk-admin-card-header p {
    font-size: 12px;
    color: var(--bk-ink-3);
    margin: 2px 0 0 0;
}

.bk-admin-card-content { padding: 20px 24px; }

/* ───── Admin status pills ───── */
.bk-admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bk-admin-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.bk-admin-pill.active { background: rgba(20, 163, 127, 0.12); color: var(--bk-accent-3); }
.bk-admin-pill.probation { background: rgba(123, 47, 190, 0.12); color: #7B2FBE; }
.bk-admin-pill.inactive { background: rgba(232, 93, 117, 0.12); color: var(--bk-accent-4); }
.bk-admin-pill.pending { background: rgba(123, 47, 190, 0.12); color: #7B2FBE; }
.bk-admin-pill.approved { background: rgba(20, 163, 127, 0.12); color: var(--bk-accent-3); }
.bk-admin-pill.rejected { background: rgba(232, 93, 117, 0.12); color: var(--bk-accent-4); }

/* ───── Admin progress bar ───── */
.bk-admin-progress {
    height: 8px;
    background: var(--bk-muted);
    border-radius: 999px;
    overflow: hidden;
}

.bk-admin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7B2FBE 0%, #A78BFA 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* ───── Admin table ───── */
.bk-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.bk-admin-table thead th {
    background: var(--bk-muted);
    color: var(--bk-ink-3);
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bk-line);
}

.bk-admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bk-line);
    color: var(--bk-ink);
    font-size: 13px;
}

.bk-admin-table tbody tr:last-child td { border-bottom: none; }
.bk-admin-table tbody tr:hover { background: var(--bk-muted); }

/* ───── Admin avatar ───── */
.bk-admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7B2FBE, #5B1F96);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.bk-admin-avatar.gold { background: linear-gradient(135deg, var(--bk-accent), #6A24A8); }
.bk-admin-avatar.green { background: linear-gradient(135deg, var(--bk-accent-3), #0d8061); }
.bk-admin-avatar.purple { background: linear-gradient(135deg, var(--bk-accent-2), #4f46e5); }
.bk-admin-avatar.pink { background: linear-gradient(135deg, var(--bk-accent-4), #be4258); }

/* ───── Admin grid layouts ───── */
.bk-admin-grid-2 {
    display: grid;
    /* Changed from 1fr 360px to a fluid ratio so the left column (tables,
       lists) gets more space on wide screens while the right column (side
       widgets, donut charts) stays a comfortable reading width. */
    grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
    gap: 24px;
}

@media (max-width: 1200px) {
    .bk-admin-grid-2 { grid-template-columns: 1fr; }
}

.bk-admin-grid-2-even {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .bk-admin-grid-2-even { grid-template-columns: 1fr; }
}

/* ───── Admin stat box (in cards) ───── */
.bk-admin-stat-box {
    text-align: center;
    padding: 16px;
    background: var(--bk-muted);
    border-radius: var(--bk-radius);
}

.bk-admin-stat-box-label {
    font-family: "JetBrains Mono", "Geist Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--bk-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bk-admin-stat-box-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--bk-ink);
    margin-top: 4px;
    font-family: "Geist", sans-serif;
}

.bk-admin-stat-box.dark {
    background: linear-gradient(135deg, #7B2FBE 0%, #5B1F96 100%);
    color: white;
}

.bk-admin-stat-box.dark .bk-admin-stat-box-label { color: rgba(255, 255, 255, 0.65); }
.bk-admin-stat-box.dark .bk-admin-stat-box-value { color: #A78BFA; }

/* ───── Admin fade-in ───── */
@keyframes bkAdminFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.bk-admin-fade-in { animation: bkAdminFadeIn 0.5s ease-out; }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
    .bk-admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .bk-admin-sidebar.mobile-open { transform: translateX(0); }
    .bk-admin-main { margin-left: 0 !important; }
    .bk-admin-content { padding: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════
   BUILDERKING DARK MODE
   Activated when <html data-theme="dark"> is set
   ═══════════════════════════════════════════════════════════════════ */

html[data-theme="dark"] {
    --bk-bg: #1A0F2E;
    --bk-bg-strong: #2D1B4E;
    --bk-ink: #F3F0FF;
    --bk-ink-2: #A78BFA;
    --bk-ink-3: #7C6BAA;
    --bk-line: rgba(167, 139, 250, 0.15);
    --bk-line-strong: rgba(167, 139, 250, 0.35);
    --bk-muted: #221440;
    --bk-muted-2: #3A2566;
    --bk-accent: #A78BFA;          /* light purple for dark mode */
    --bk-accent-2: #8b80ff;        /* bright purple */
    --bk-accent-3: #2dd4a7;
    --bk-accent-4: #ff7a91;
    --bk-shadow: 0 24px 80px rgba(26, 15, 46, 0.6);

    /* ───── Purple dark mode overrides for --ukuu-* variables ─────
       Deep purple backgrounds instead of pure black. */
    --ukuu-ink: #A78BFA;
    --ukuu-ink-deep: #1A0F2E;
    --ukuu-ink-darker: #130A25;
    --ukuu-accent-cyan: #C4B5FD;   /* bright lavender */
    --ukuu-accent-gold: #A78BFA;
    --ukuu-accent-violet: #A78BFA;  /* purple accent */
    --ukuu-accent-lavender: #7C6BAA; /* muted purple */

    --ukuu-surface: #2D1B4E;
    --ukuu-surface-alt: #221440;
    --ukuu-surface-strong: #3A2566;
    --ukuu-surface-70: rgba(167, 139, 250, 0.15);
    --ukuu-surface-54: rgba(167, 139, 250, 0.10);

    --ukuu-text: #F3F0FF;
    --ukuu-text-muted: #A78BFA;   /* medium purple */
    --ukuu-text-subtle: #7C6BAA;   /* muted purple */
    --ukuu-text-on-dark: #F3F0FF;

    --ukuu-border-soft: #4A3478;
    --ukuu-border-strong: #A78BFA;
    --ukuu-divider: rgba(167, 139, 250, 0.15);

    --ukuu-success: #2DD4A7;
    --ukuu-success-bg: rgba(45, 212, 167, 0.15);
    --ukuu-warning: #F4B942;
    --ukuu-warning-bg: rgba(244, 185, 66, 0.15);
    --ukuu-error: #FF7A91;
    --ukuu-error-bg: rgba(255, 122, 145, 0.15);
    --ukuu-info: #C4B5FD;         /* bright lavender */
    --ukuu-info-bg: rgba(196, 181, 253, 0.15);

    --ukuu-bg: #1A0F2E;
    --ukuu-radius-sm: 8px;
    --ukuu-radius-md: 12px;
    --ukuu-radius-lg: 16px;
    --ukuu-radius-xl: 24px;
    --ukuu-shadow-sm: 0 1px 2px rgba(26, 15, 46, 0.5);
    --ukuu-shadow-md: 0 4px 12px rgba(26, 15, 46, 0.6);
    --ukuu-shadow-lg: 0 12px 32px rgba(26, 15, 46, 0.7);
    --ukuu-shadow-xl: 0 24px 64px rgba(26, 15, 46, 0.8);

    --ukuu-sidebar-bg: #130A25;
    --ukuu-sidebar-item: rgba(255, 255, 255, 0.65);
    --ukuu-sidebar-item-active: #F3F0FF;
    --ukuu-sidebar-item-active-bg: rgba(167, 139, 250, 0.15);

    /* MudBlazor palette dark mode overrides — purple dark mode */
    --mud-palette-primary: #A78BFA;          /* light purple */
    --mud-palette-primary-lighten: rgba(167, 139, 250, 0.3);
    --mud-palette-primary-darken: #7C6BAA;     /* muted purple */
    --mud-palette-text-primary: #F3F0FF;
    --mud-palette-text-secondary: #A78BFA;    /* medium purple */
    --mud-palette-background: #1A0F2E;
    --mud-palette-surface: #2D1B4E;
    --mud-palette-appbar-background: #130A25;
    --mud-palette-appbar-text: #F3F0FF;
    --mud-palette-drawer-background: #130A25;
    --mud-palette-drawer-text: #F3F0FF;
    --mud-palette-drawer-icon: #A78BFA;       /* medium purple */
}

html[data-theme="dark"] body,
html[data-theme="dark"] .bk-body,
html[data-theme="dark"] .bk-admin-body {
    background: #1A0F2E;
    color: var(--bk-ink);
}

/* Dark mode: sidebar — pure black */
html[data-theme="dark"] .bk-admin-sidebar {
    background: #130A25;
    border-right-color: rgba(167, 139, 250, 0.10);
}

/* Dark mode: topbar */
html[data-theme="dark"] .bk-admin-topbar {
    background: rgba(26, 15, 46, 0.92);
    border-bottom-color: rgba(167, 139, 250, 0.10);
}

html[data-theme="dark"] .bk-admin-topbar-search input,
html[data-theme="dark"] .bk-admin-topbar-toggle,
html[data-theme="dark"] .bk-admin-topbar-icon-btn {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.12);
    color: var(--bk-ink-2);
}

html[data-theme="dark"] .bk-admin-topbar-search input:focus {
    background: rgba(167, 139, 250, 0.08);
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.10);
}

html[data-theme="dark"] .bk-admin-topbar-icon-btn:hover,
html[data-theme="dark"] .bk-admin-topbar-toggle:hover {
    background: rgba(167, 139, 250, 0.10);
    border-color: rgba(167, 139, 250, 0.25);
    color: var(--bk-ink);
}

html[data-theme="dark"] .bk-admin-topbar-avatar {
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
}

/* Dark mode: cards */
html[data-theme="dark"] .bk-admin-card,
html[data-theme="dark"] .bk-admin-kpi-card {
    background: var(--bk-bg-strong);
    border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .bk-admin-card:hover,
html[data-theme="dark"] .bk-admin-kpi-card:hover {
    border-color: rgba(167, 139, 250, 0.25);
    box-shadow: 0 24px 80px rgba(26, 15, 46, 0.4);
}

html[data-theme="dark"] .bk-admin-card-header {
    border-bottom-color: rgba(167, 139, 250, 0.12);
}

/* Dark mode: table */
html[data-theme="dark"] .bk-admin-table thead th {
    background: var(--bk-muted);
    color: var(--bk-ink-3);
}

html[data-theme="dark"] .bk-admin-table tbody td {
    color: var(--bk-ink);
    border-bottom-color: rgba(167, 139, 250, 0.10);
}

html[data-theme="dark"] .bk-admin-table tbody tr:hover {
    background: rgba(167, 139, 250, 0.04);
}

/* Dark mode: stat boxes */
html[data-theme="dark"] .bk-admin-stat-box {
    background: var(--bk-muted);
}

html[data-theme="dark"] .bk-admin-stat-box.dark {
    background: linear-gradient(135deg, #1A0F2E 0%, #2D1B4E 100%);
}

/* Dark mode: progress bar */
html[data-theme="dark"] .bk-admin-progress {
    background: rgba(167, 139, 250, 0.08);
}

html[data-theme="dark"] .bk-admin-progress-fill {
    background: linear-gradient(90deg, #A78BFA 0%, #7C6BAA 100%);
}

/* Dark mode: KPI icon boxes */
html[data-theme="dark"] .bk-admin-kpi-icon.blue { background: rgba(139, 128, 255, 0.15); color: var(--bk-accent-2); }
html[data-theme="dark"] .bk-admin-kpi-icon.green { background: rgba(45, 212, 167, 0.15); color: var(--bk-accent-3); }
html[data-theme="dark"] .bk-admin-kpi-icon.gold { background: rgba(244, 185, 66, 0.15); color: #A78BFA; }
html[data-theme="dark"] .bk-admin-kpi-icon.pink { background: rgba(255, 122, 145, 0.15); color: var(--bk-accent-4); }
html[data-theme="dark"] .bk-admin-kpi-icon.ink { background: rgba(167, 139, 250, 0.08); color: var(--bk-ink); }

/* Dark mode: pills */
html[data-theme="dark"] .bk-admin-pill.active { background: rgba(45, 212, 167, 0.15); color: var(--bk-accent-3); }
html[data-theme="dark"] .bk-admin-pill.probation,
html[data-theme="dark"] .bk-admin-pill.pending { background: rgba(244, 185, 66, 0.15); color: #A78BFA; }
html[data-theme="dark"] .bk-admin-pill.inactive,
html[data-theme="dark"] .bk-admin-pill.rejected { background: rgba(255, 122, 145, 0.15); color: var(--bk-accent-4); }
html[data-theme="dark"] .bk-admin-pill.approved { background: rgba(45, 212, 167, 0.15); color: var(--bk-accent-3); }

/* Dark mode: buttons */
html[data-theme="dark"] .bk-btn-secondary {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.15);
    color: var(--bk-ink);
}

html[data-theme="dark"] .bk-btn-secondary:hover {
    background: rgba(167, 139, 250, 0.10);
    border-color: rgba(167, 139, 250, 0.25);
}

html[data-theme="dark"] .bk-btn-primary {
    background: linear-gradient(180deg, #A78BFA, #7C6BAA);
    color: #2D1B4E;
    box-shadow: 0 12px 34px rgba(167, 139, 250, 0.25);
}

/* Dark mode: inputs */
html[data-theme="dark"] .bk-input {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.12);
    color: var(--bk-ink);
}

html[data-theme="dark"] .bk-input::placeholder { color: var(--bk-ink-3); }

html[data-theme="dark"] .bk-input:focus {
    background: rgba(167, 139, 250, 0.08);
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.10);
}

/* Dark mode: MudBlazor overrides */
html[data-theme="dark"] .mud-card {
    background: var(--bk-bg-strong) !important;
    border-color: rgba(167, 139, 250, 0.12) !important;
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .mud-table-head {
    background: var(--bk-muted) !important;
}

html[data-theme="dark"] .mud-table-head .mud-table-cell {
    color: var(--bk-ink-3) !important;
    border-bottom-color: rgba(167, 139, 250, 0.12) !important;
}

html[data-theme="dark"] .mud-table-body .mud-table-cell {
    color: var(--bk-ink) !important;
    border-bottom-color: rgba(167, 139, 250, 0.10) !important;
}

html[data-theme="dark"] .mud-table-row:hover {
    background: rgba(167, 139, 250, 0.04) !important;
}

html[data-theme="dark"] .mud-input {
    background: rgba(167, 139, 250, 0.06) !important;
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .mud-input-root {
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .mud-input-label {
    color: var(--bk-ink-3) !important;
}

html[data-theme="dark"] .mud-chip {
    background: rgba(167, 139, 250, 0.08) !important;
    color: var(--bk-ink-2) !important;
}

html[data-theme="dark"] .mud-button-text {
    color: var(--bk-ink-2) !important;
}

html[data-theme="dark"] .mud-button-outlined {
    background: rgba(167, 139, 250, 0.06) !important;
    border-color: rgba(167, 139, 250, 0.15) !important;
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .mud-popover {
    background: var(--bk-bg-strong) !important;
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .mud-list-item:hover {
    background: rgba(167, 139, 250, 0.06) !important;
}

html[data-theme="dark"] .mud-select-input {
    background: rgba(167, 139, 250, 0.06) !important;
}

/* Dark mode: remove purple patches from sidebar elements */
html[data-theme="dark"] .ukuu-sidebar-brand-logo {
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
    box-shadow: 0 4px 12px rgba(244, 185, 66, 0.25);
}

html[data-theme="dark"] .ukuu-sidebar-item.active::before {
    background: linear-gradient(180deg, #A78BFA 0%, #7B2FBE 100%);
}

html[data-theme="dark"] .ukuu-sidebar-user-avatar {
    background: linear-gradient(135deg, var(--bk-accent), #6A24A8);
}

html[data-theme="dark"] .loading-progress circle {
    stroke: #4A3478;
}

html[data-theme="dark"] .loading-progress circle:last-child {
    stroke: var(--bk-accent);
}

html[data-theme="dark"] .loading-progress-text {
    color: #A78BFA;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.25);
    border-color: #1A0F2E;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

html[data-theme="dark"] .bk-modal-backdrop {
    background: rgba(26, 15, 46, 0.6);
}

html[data-theme="dark"] .bk-modal {
    box-shadow: 0 24px 64px rgba(26, 15, 46, 0.8);
}

/* Dark mode: landing page */
html[data-theme="dark"] .bk-landing-hero {
    background: linear-gradient(135deg, #1A0F2E 0%, #221440 50%, #1A0F2E 100%);
}

html[data-theme="dark"] .bk-header {
    background: rgba(34, 20, 64, 0.78);
    border-bottom-color: rgba(167, 139, 250, 0.12);
}

/* ───── Theme toggle button in sidebar ───── */
.bk-theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(243, 240, 255, 0.75);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.bk-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.bk-theme-toggle-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-theme-toggle-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

.bk-theme-toggle-switch {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.25);
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.bk-theme-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s ease;
}

.bk-theme-toggle.dark .bk-theme-toggle-switch {
    background: #A78BFA;
}

.bk-theme-toggle.dark .bk-theme-toggle-switch::after {
    transform: translateX(16px);
}

/* ───── Logout button in sidebar ───── */
.bk-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--bk-accent-4);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.bk-logout-btn:hover {
    background: rgba(232, 93, 117, 0.10);
    color: var(--bk-accent-4);
}

.bk-logout-btn-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark mode: theme toggle + logout in sidebar */
html[data-theme="dark"] .bk-theme-toggle {
    color: rgba(243, 240, 255, 0.75);
}

html[data-theme="dark"] .bk-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}


/* ──────────────────────────────────────────────────────────────────
   Phase 1 additions — Shifts page modals, hover cards, avatars
   ────────────────────────────────────────────────────────────────── */

/* Modal backdrop + dialog */
.bk-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(123, 47, 190, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: bk-modal-fade-in 0.18s ease;
}

.bk-modal {
    background: var(--ukuu-surface, #FFFFFF);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(123, 47, 190, 0.32);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: bk-modal-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--ukuu-divider, rgba(123, 47, 190, 0.08));
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: inherit;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.bk-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ukuu-text, #2D1B69);
    margin: 0;
}

.bk-modal-close {
    background: transparent;
    border: none;
    color: var(--ukuu-text-muted, #5B3A9E);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-modal-close:hover {
    background: var(--ukuu-surface-alt, #F8F6FF);
    color: var(--ukuu-text, #2D1B69);
}

.bk-modal-body {
    padding: 20px 24px 8px;
}

@keyframes bk-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bk-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Small avatar for table rows */
.bk-admin-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 100%);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Hover-lift card */
.bk-admin-card-hover {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bk-admin-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(123, 47, 190, 0.14);
}

.bk-admin-card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #7B2FBE 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.18s ease;
    border-radius: 16px 16px 0 0;
}

.bk-admin-card-hover:hover::before {
    opacity: 1;
}

/* Additional pill colors */
.bk-admin-pill.info {
    background: rgba(37, 99, 235, 0.12);
    color: var(--ukuu-info, #2563EB);
}

html[data-theme="dark"] .bk-admin-pill.info {
    background: rgba(167, 139, 250, 0.15);
    color: #93C5FD;
}

/* Dark mode modal adjustments */
html[data-theme="dark"] .bk-modal {
    background: #2D1B4E;
    box-shadow: 0 24px 64px rgba(26, 15, 46, 0.5);
}

html[data-theme="dark"] .bk-modal-header {
    border-bottom-color: rgba(167, 139, 250, 0.12);
}

html[data-theme="dark"] .bk-modal-close:hover {
    background: rgba(167, 139, 250, 0.10);
    color: #FFFFFF;
}


/* ════════════════════════════════════════════════════════════════════════════
   PHASE 6 — MOBILE RESPONSIVE OVERHAUL
   ════════════════════════════════════════════════════════════════════════════

   Design philosophy:
   - Mobile-first: every component defaults to mobile, then scales UP to desktop
   - Touch targets: minimum 44×44px (iOS HIG) / 48×48px (Material 3)
   - Bottom navigation for primary destinations (thumb-friendly zone)
   - Drawer sidebar with backdrop overlay (replaces desktop sidebar < 1024px)
   - Sticky compact topbar with hamburger + brand + avatar
   - Card-based layouts collapse to single column with stacked KPIs
   - Tables become horizontal-scroll cards on mobile (not hidden — data must
     stay accessible)
   - Modals become bottom sheets on mobile (drag-handle, slide-up animation)
   - Forms stack labels above inputs (no side-by-side on mobile)
   - Snackbars move to top on mobile (avoid bottom-nav overlap)

   Breakpoints:
   - xs: 0–479px   (small phones, portrait)
   - sm: 480–767px (large phones, small tablets portrait)
   - md: 768–1023px (tablets, small laptops)
   - lg: 1024–1439px (laptops)
   - xl: 1440px+    (desktops)

   The existing project already had @media (max-width: 1024px) for the sidebar
   drawer. This phase formalises and extends the system to ALL pages.
   ════════════════════════════════════════════════════════════════════════════ */

/* ───── Mobile CSS variables (override at < 768px) ───── */
:root {
    --ukuu-mobile-topbar-h: 56px;
    --ukuu-mobile-bottomnav-h: 64px;
    --ukuu-mobile-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --ukuu-mobile-safe-area-top: env(safe-area-inset-top, 0px);
    --ukuu-mobile-touch-target: 44px;
    --ukuu-mobile-radius: 16px;
    --ukuu-mobile-card-padding: 16px;
    --ukuu-mobile-content-padding: 16px;
}

/* ───── Base responsive typography ───── */
@media (max-width: 767px) {
    html, body {
        font-size: 15px; /* slightly larger for readability on mobile */
        -webkit-text-size-adjust: 100%; /* prevent iOS auto-zoom */
    }
    h1.bk-admin-h1 { font-size: 24px; line-height: 1.2; }
    h2 { font-size: 20px; }
    h3 { font-size: 17px; }
    h4 { font-size: 15px; }
    .bk-admin-greeting { font-size: 12px; }
    .bk-admin-sub { font-size: 13px; line-height: 1.5; }
}

/* ───── Admin layout: mobile shell ───── */
@media (max-width: 1023px) {
    .bk-admin-body {
        --ukuu-sidebar-w-expanded: 280px;
    }

    /* Sidebar becomes a drawer (off-canvas by default) */
    .bk-admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        box-shadow: 0 0 40px rgba(26, 15, 46, 0.3);
    }
    .bk-admin-sidebar.mobile-open { transform: translateX(0); }
    .bk-admin-sidebar.collapsed { width: 280px; } /* always full width on mobile when open */

    /* Main content takes full width */
    .bk-admin-main,
    .bk-admin-main.collapsed {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Topbar becomes mobile-compact */
    .bk-admin-topbar {
        height: var(--ukuu-mobile-topbar-h);
        padding: 0 12px;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(26, 15, 46, 0.92);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--ukuu-divider, rgba(123, 47, 190, 0.08));
    }

    /* Hide the search bar on mobile — replaced by a search icon that opens a sheet */
    .bk-admin-topbar-search {
        display: none;
    }

    /* Topbar buttons: keep icon-only, slightly larger touch targets */
    .bk-admin-topbar-icon-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bk-admin-topbar-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    /* Hamburger toggle: always visible on mobile */
    .bk-admin-topbar-toggle {
        display: flex !important;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--ukuu-ink, #7B2FBE);
        cursor: pointer;
        padding: 0;
    }

    /* Compact brand on mobile topbar */
    .bk-admin-topbar-mobile-brand {
        display: flex !important;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        font-size: 15px;
        color: var(--ukuu-ink, #7B2FBE);
        text-decoration: none;
    }
    .bk-admin-topbar-mobile-brand .bk-admin-topbar-mobile-brand-logo {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 100%);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 800;
    }

    /* Content padding tighter on mobile */
    .bk-admin-content {
        padding: 16px 16px calc(var(--ukuu-mobile-bottomnav-h) + var(--ukuu-mobile-safe-area-bottom) + 16px);
    }

    /* Section header stacks vertically */
    .bk-admin-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .bk-admin-section-header-left {
        width: 100%;
    }
    .bk-admin-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .bk-admin-actions .bk-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }
    .bk-admin-actions .bk-btn .material-icons-round {
        font-size: 16px;
    }

    /* KPI grid: 2 columns on phones, 3 on landscape */
    .bk-admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .bk-admin-kpi-card {
        padding: 12px 14px !important;
    }
    .bk-admin-kpi-value {
        font-size: 22px !important;
    }
    .bk-admin-kpi-label {
        font-size: 11px !important;
    }
    .bk-admin-kpi-sub {
        font-size: 11px !important;
    }
    .bk-admin-kpi-icon {
        width: 32px !important;
        height: 32px !important;
    }
    .bk-admin-kpi-icon .material-icons-round {
        font-size: 16px !important;
    }
    .bk-admin-kpi-delta {
        font-size: 10px !important;
    }

    /* Cards: full width, tighter padding */
    .bk-admin-card {
        border-radius: var(--ukuu-mobile-radius);
        margin-bottom: 12px;
    }
    .bk-admin-card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .bk-admin-card-header h3 { font-size: 16px; }
    .bk-admin-card-header p { font-size: 12px; }
    .bk-admin-card-content {
        padding: 14px 16px;
    }

    /* Tables: horizontal scroll wrapper (data stays accessible) */
    .bk-admin-table {
        font-size: 13px;
    }
    .bk-admin-table thead th {
        padding: 10px 12px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }
    .bk-admin-table tbody td {
        padding: 10px 12px;
        white-space: nowrap;
    }
    /* Wrap tables in horizontal scroll if not already wrapped */
    .bk-admin-card > table,
    .bk-admin-card > div > table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Buttons: minimum 44px touch target height */
    .bk-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }
    .bk-btn .material-icons-round { font-size: 18px; }

    /* Pills: slightly larger for readability */
    .bk-admin-pill {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* Forms stack */
    .bk-field {
        width: 100%;
        margin-bottom: 12px;
    }
    .bk-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .bk-input,
    .bk-input-wrap .bk-input {
        height: 44px;
        font-size: 15px; /* prevent iOS zoom by being ≥16px — 15 is acceptable with -webkit-text-size-adjust */
    }
    textarea.bk-input {
        min-height: 88px;
    }

    /* Modals become bottom sheets */
    .bk-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .bk-modal {
        max-width: 100% !important;
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: bk-modal-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .bk-modal-header {
        border-radius: 20px 20px 0 0;
        padding: 16px 20px 12px;
        position: relative;
    }
    .bk-modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--ukuu-border-soft, #E8DFF5);
    }
    .bk-modal-body {
        padding: 16px 20px 24px;
    }
    .bk-modal-body > div > [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* ───── Phone-only (< 480px): even more compact ───── */
@media (max-width: 479px) {
    .bk-admin-content {
        padding: 12px 12px calc(var(--ukuu-mobile-bottomnav-h) + var(--ukuu-mobile-safe-area-bottom) + 12px);
    }
    .bk-admin-kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    /* On very small screens, show 2-col KPIs but more compact */
    .bk-admin-kpi-grid[data-mobile-cols="2"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .bk-admin-actions {
        gap: 6px;
    }
    .bk-admin-actions .bk-btn {
        padding: 10px 10px;
        font-size: 12px;
    }
    .bk-admin-actions .bk-btn span:not(.material-icons-round) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* Hide button text on phone-only when icon is present (icon-only buttons) */
    .bk-admin-actions .bk-btn.bk-btn-icon-only span:not(.material-icons-round) {
        display: none;
    }
}

/* ───── Bottom navigation (mobile only, thumb-friendly) ───── */
.bk-mobile-bottomnav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--ukuu-mobile-bottomnav-h) + var(--ukuu-mobile-safe-area-bottom));
    padding-bottom: var(--ukuu-mobile-safe-area-bottom);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--ukuu-divider, rgba(123, 47, 190, 0.08));
    z-index: 999;
    box-shadow: 0 -4px 24px rgba(123, 47, 190, 0.06);
}

.bk-mobile-bottomnav-items {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: var(--ukuu-mobile-bottomnav-h);
    max-width: 600px;
    margin: 0 auto;
}

.bk-mobile-bottomnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--ukuu-text-muted, #5B3A9E);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 4px;
    transition: color 0.15s ease;
    position: relative;
}

.bk-mobile-bottomnav-item .material-icons-round {
    font-size: 22px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-mobile-bottomnav-item.active {
    color: var(--ukuu-ink, #7B2FBE);
}

.bk-mobile-bottomnav-item.active .material-icons-round {
    transform: translateY(-2px) scale(1.1);
}

.bk-mobile-bottomnav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--ukuu-ink, #7B2FBE);
}

.bk-mobile-bottomnav-item .bk-mobile-bottomnav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    margin-right: -16px;
    background: var(--ukuu-error, #DC2626);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ukuu-surface, #FFFFFF);
}

/* Show bottom nav only on mobile */
@media (max-width: 1023px) {
    .bk-mobile-bottomnav { display: block; }
}

/* ───── Mobile FAB (Floating Action Button) for primary action ───── */
.bk-mobile-fab {
    display: none;
    position: fixed;
    bottom: calc(var(--ukuu-mobile-bottomnav-h) + var(--ukuu-mobile-safe-area-bottom) + 16px);
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(123, 47, 190, 0.32);
    cursor: pointer;
    z-index: 998;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-mobile-fab:active {
    transform: scale(0.92);
}

.bk-mobile-fab .material-icons-round {
    font-size: 24px;
}

@media (max-width: 1023px) {
    .bk-mobile-fab { display: flex; }
}

/* ───── Mobile hero section (greeting + quick actions) ───── */
.bk-mobile-hero {
    display: none;
    background: linear-gradient(135deg, #7B2FBE 0%, #A78BFA 60%, #5B3A9E 100%);
    color: #FFFFFF;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.bk-mobile-hero::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bk-mobile-hero-greeting {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.bk-mobile-hero-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.bk-mobile-hero-sub {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

.bk-mobile-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bk-mobile-hero-stat-value {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bk-mobile-hero-stat-label {
    font-size: 10px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

@media (max-width: 1023px) {
    .bk-mobile-hero { display: block; }
}

/* ───── Mobile: hide desktop-only elements ───── */
@media (max-width: 1023px) {
    .bk-desktop-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .bk-mobile-only {
        display: none !important;
    }
}

/* ───── Dark mode adjustments for mobile ───── */
html[data-theme="dark"] .bk-admin-topbar {
    background: rgba(26, 15, 46, 0.92);
    border-bottom-color: rgba(167, 139, 250, 0.12);
}

html[data-theme="dark"] .bk-mobile-bottomnav {
    background: rgba(26, 15, 46, 0.96);
    border-top-color: rgba(167, 139, 250, 0.12);
}

html[data-theme="dark"] .bk-mobile-bottomnav-item {
    color: rgba(255, 255, 255, 0.65);
}

html[data-theme="dark"] .bk-mobile-bottomnav-item.active {
    color: #FFFFFF;
}

html[data-theme="dark"] .bk-mobile-bottomnav-item.active::before {
    background: #A78BFA;
}

/* ───── Mobile snackbar position (top, avoid bottom nav) ───── */
@media (max-width: 1023px) {
    .mud-snackbarContainer {
        top: calc(var(--ukuu-mobile-topbar-h) + 8px) !important;
        bottom: auto !important;
        left: 12px !important;
        right: 12px !important;
        align-items: stretch !important;
    }
    .mud-snackbar {
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* ───── Mobile: improved table card view (for narrow tables) ───── */
@media (max-width: 639px) {
    /* When a table has the .bk-mobile-card-view class, render rows as stacked cards */
    table.bk-mobile-card-view {
        display: block;
    }
    table.bk-mobile-card-view thead {
        display: none;
    }
    table.bk-mobile-card-view tbody,
    table.bk-mobile-card-view tr {
        display: block;
        width: 100%;
    }
    table.bk-mobile-card-view tr {
        background: var(--ukuu-surface, #FFFFFF);
        border: 1px solid var(--ukuu-border-soft, #E8DFF5);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 12px;
    }
    table.bk-mobile-card-view td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        white-space: normal;
        text-align: right;
    }
    table.bk-mobile-card-view td::before {
        content: attr(data-label);
        font-size: 11px;
        color: var(--ukuu-text-subtle, #7C6BAA);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-weight: 600;
        text-align: left;
        padding-right: 12px;
    }
}

/* ───── Mobile: stat box grid ───── */
@media (max-width: 767px) {
    .bk-admin-stat-box {
        padding: 10px 12px;
    }
    .bk-admin-stat-box-label {
        font-size: 10px !important;
    }
    .bk-admin-stat-box-value {
        font-size: 18px !important;
    }
}

/* ───── Mobile: improved MudBlazor component overrides ───── */
@media (max-width: 767px) {
    .mud-card-header {
        padding: 12px 16px !important;
    }
    .mud-card-content {
        padding: 12px 16px !important;
    }
    .mud-table {
        font-size: 13px !important;
    }
    .mud-table-cell {
        padding: 8px 12px !important;
    }
    .mud-table-head-cell {
        padding: 10px 12px !important;
        font-size: 11px !important;
    }
    .mud-button {
        min-height: 44px;
    }
    .mud-input-control {
        margin-bottom: 8px;
    }
    .mud-input {
        font-size: 15px !important;
    }
}

/* ───── Mobile: avatar sizing ───── */
@media (max-width: 767px) {
    .bk-admin-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 12px !important;
    }
    .bk-admin-avatar-sm {
        width: 28px !important;
        height: 28px !important;
        font-size: 10px !important;
    }
}

/* ───── Mobile: prevent layout shift on input focus (iOS zoom) ───── */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 767px) {
        .bk-input,
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="number"],
        input[type="tel"],
        input[type="search"],
        textarea,
        select {
            font-size: 16px !important;
        }
    }
}

/* ───── Mobile: improve tap highlight color ───── */
@media (max-width: 1023px) {
    .bk-btn,
    .bk-admin-sidebar-item,
    .bk-mobile-bottomnav-item,
    .bk-admin-card-hover {
        -webkit-tap-highlight-color: rgba(123, 47, 190, 0.08);
    }
}

/* ───── Mobile: smooth scrolling ───── */
@media (max-width: 1023px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    body {
        overscroll-behavior-y: none; /* prevent pull-to-refresh from triggering on inner scrolls */
    }
}

/* ───── Mobile: hide print-only elements always, show desktop print on mobile too ───── */
@media (max-width: 1023px) {
    .bk-admin-actions .bk-btn[onclick="window.print()"] {
        display: none;
    }
}


/* ───── Phase 6: Login + Register mobile polish ───── */
@media (max-width: 600px) {
    .bk-auth-form-side {
        padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .bk-auth-card {
        max-width: 100% !important;
        padding: 24px 20px;
        border-radius: 20px;
    }
    .bk-auth-mobile-brand {
        margin-bottom: 24px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--ukuu-divider, rgba(123, 47, 190, 0.08));
    }
    .bk-auth-h1 {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }
    .bk-auth-sub {
        font-size: 14px !important;
    }
    .bk-auth-submit {
        height: 52px;
        font-size: 15px;
        width: 100%;
    }
    .bk-social-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .bk-social-btn {
        height: 48px;
        font-size: 13px;
        justify-content: center;
    }
    .bk-demo-creds {
        padding: 12px 14px;
    }
    .bk-demo-creds-row {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    .bk-demo-creds-sep { display: none; }
    .bk-auth-footer {
        font-size: 13px;
        text-align: center;
        padding-top: 16px;
    }
    .bk-auth-back {
        position: absolute;
        top: 16px;
        left: 16px;
        font-size: 12px;
    }
}

/* ───── Phase 6: Landing page mobile polish ───── */
@media (max-width: 767px) {
    .bk-hero {
        padding: 48px 20px 40px !important;
        min-height: auto;
    }
    .bk-hero h1 {
        font-size: 32px !important;
        line-height: 1.15 !important;
    }
    .bk-hero .bk-lead {
        font-size: 15px !important;
    }
    .bk-hero-cta {
        flex-direction: column;
        width: 100%;
    }
    .bk-hero-cta .bk-btn {
        width: 100%;
        justify-content: center;
    }
    .bk-hero-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }
    .bk-hero-stats > div:nth-child(3) {
        grid-column: 1 / -1;
    }
    .bk-section {
        padding: 48px 20px !important;
    }
    .bk-section-title {
        font-size: 26px !important;
    }
    .bk-feature-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .bk-pricing-grid {
        grid-template-columns: 1fr !important;
    }
    .bk-footer {
        padding: 40px 20px !important;
    }
    .bk-footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }
}

/* ───── Phase 6: Dashboard mobile hero (visible only on mobile) ───── */
.bk-dashboard-mobile-hero {
    display: none;
}

@media (max-width: 1023px) {
    .bk-dashboard-mobile-hero {
        display: block;
    }
    /* Hide the desktop section header on mobile when hero is shown */
    .bk-admin-section-header.bk-hide-on-mobile {
        display: none;
    }
}

/* ───── Phase 6: Employee cards grid (mobile-friendly) ───── */
@media (max-width: 767px) {
    .bk-employees-grid,
    .bk-admin-kpi-grid[style*="repeat(auto-fit,minmax(360px,1fr))"],
    .bk-admin-kpi-grid[style*="repeat(auto-fit,minmax(380px,1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .bk-employee-card {
        padding: 14px;
    }
    .bk-employee-card-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .bk-employee-card-actions {
        flex-direction: column;
        gap: 6px;
        margin-top: 12px;
    }
    .bk-employee-card-actions .bk-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ───── Phase 6: Settings page mobile (vertical tabs) ───── */
@media (max-width: 767px) {
    .bk-settings-layout,
    div[style*="grid-template-columns:240px 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .bk-settings-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--ukuu-divider, rgba(123, 47, 190, 0.08));
        position: sticky;
        top: var(--ukuu-mobile-topbar-h);
        background: var(--ukuu-surface, #FFFFFF);
        z-index: 10;
    }
    .bk-settings-nav-item {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 10px 14px !important;
        border-left: none !important;
        border-bottom: 2px solid transparent;
        font-size: 13px;
    }
    .bk-settings-nav-item.active {
        border-left: none !important;
        border-bottom: 2px solid var(--ukuu-ink, #7B2FBE);
        background: transparent !important;
    }
}

/* ───── Phase 6: Modal form fields stack on mobile (already handled, but force grid layouts) ───── */
@media (max-width: 767px) {
    .bk-modal-body [style*="grid-template-columns:1fr 1fr"],
    .bk-modal-body [style*="grid-template-columns:repeat(auto-fit,minmax(220px,1fr))"],
    .bk-modal-body [style*="grid-template-columns:repeat(auto-fit,minmax(280px,1fr))"],
    .bk-modal-body [style*="grid-template-columns:repeat(auto-fit,minmax(200px,1fr))"],
    .bk-modal-body [style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}


/* ════════════════════════════════════════════════════════════════════════════
   Phase 14: Dark mode overrides for AUTH pages (login, register, landing)
   Previously the .bk-auth container, .bk-auth-form-side, .bk-auth-card, and
   related elements used hardcoded light backgrounds (#fbfaf6, #ffffff) with
   NO dark mode overrides — causing the login/register right panel to stay
   white in dark mode.
   ════════════════════════════════════════════════════════════════════════════ */

/* Auth container background */
html[data-theme="dark"] .bk-auth {
    background: #1A0F2E;
    color: var(--bk-ink);
}

/* Form side panel (right side of login/register) */
html[data-theme="dark"] .bk-auth-form-side {
    background: #1A0F2E;
}

/* Auth card (the form container) */
html[data-theme="dark"] .bk-auth-card {
    background: transparent;
}

/* Mobile brand on auth pages */
html[data-theme="dark"] .bk-auth-mobile-brand .bk-auth-brand-name {
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-auth-mobile-brand .bk-auth-brand-tag {
    color: var(--bk-ink-3);
}

/* Auth header text */
html[data-theme="dark"] .bk-auth-h1 {
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-auth-sub {
    color: var(--bk-ink-2);
}
html[data-theme="dark"] .bk-auth-eyebrow {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-auth-eyebrow::before {
    background: #A78BFA;
}

/* Auth form inputs */
html[data-theme="dark"] .bk-auth .bk-input,
html[data-theme="dark"] .bk-auth .bk-input-wrap {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.12);
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-auth .bk-input::placeholder {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-auth .bk-input-icon {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-auth .bk-input-wrap:focus-within {
    border-color: #A78BFA;
    background: rgba(167, 139, 250, 0.06);
}
html[data-theme="dark"] .bk-auth .bk-label {
    color: var(--bk-ink-2);
}

/* Auth submit button — keep gradient but ensure visibility */
html[data-theme="dark"] .bk-auth-submit {
    background: linear-gradient(135deg, #A78BFA 0%, #7C6BAA 100%);
    color: #2D1B4E;
}

/* Social login buttons */
html[data-theme="dark"] .bk-social-btn {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.12);
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-social-btn:hover {
    background: rgba(167, 139, 250, 0.10);
}

/* Demo credentials box */
html[data-theme="dark"] .bk-demo-creds {
    background: rgba(167, 139, 250, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .bk-demo-creds-label {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-demo-creds-email,
html[data-theme="dark"] .bk-demo-creds-pass {
    color: var(--bk-ink);
}

/* Divider ("or continue with") */
html[data-theme="dark"] .bk-divider {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-divider::before,
html[data-theme="dark"] .bk-divider::after {
    background: rgba(167, 139, 250, 0.12);
}

/* Auth footer */
html[data-theme="dark"] .bk-auth-footer {
    color: var(--bk-ink-2);
}
html[data-theme="dark"] .bk-auth-footer a {
    color: #A78BFA;
}

/* Auth back link */
html[data-theme="dark"] .bk-auth-back {
    color: var(--bk-ink-3);
}

/* Checkbox row */
html[data-theme="dark"] .bk-auth .bk-check-row {
    color: var(--bk-ink-2);
}
html[data-theme="dark"] .bk-auth .bk-check {
    accent-color: #A78BFA;
}

/* Auth link (forgot password, etc.) */
html[data-theme="dark"] .bk-auth-link {
    color: #A78BFA;
}

/* Landing page sections that need dark backgrounds */
html[data-theme="dark"] .bk-hero {
    background:
        radial-gradient(ellipse 60% 40% at 20% 0%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #221440 0%, #2D1B4E 100%);
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-section {
    background: #221440;
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-section-title {
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-feature-card,
html[data-theme="dark"] .bk-pricing-card {
    background: #2D1B4E;
    border-color: rgba(167, 139, 250, 0.12);
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-cta-card {
    background: linear-gradient(135deg, #2D1B4E 0%, #3A2566 100%);
    color: var(--bk-ink);
}
html[data-theme="dark"] .bk-footer {
    background: #221440;
    color: var(--bk-ink-2);
}
html[data-theme="dark"] .bk-footer a {
    color: var(--bk-ink-3);
}
html[data-theme="dark"] .bk-footer a:hover {
    color: var(--bk-ink);
}

/* Landing hero artboard (the mockup dashboard) */
html[data-theme="dark"] .bk-artboard {
    background: #2D1B4E;
    border-color: rgba(167, 139, 250, 0.12);
}
html[data-theme="dark"] .bk-artboard > div {
    color: var(--bk-ink);
}


/* Phase 22: Fix sidebar overflow — too many items causing layout breakage */
.bk-admin-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bk-admin-sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* critical for flexbox scroll */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(167,139,250,0.2) transparent;
}
.bk-admin-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.bk-admin-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.bk-admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,0.15);
    border-radius: 2px;
}
.bk-admin-sidebar-footer {
    flex-shrink: 0;
    padding: 12px;
    border-top: 1px solid rgba(167,139,250,0.10);
}


/* ════════════════════════════════════════════════════════════════════════════
   Phase 25: KAZ AI chat widget overflow prevention
   The KAZ AI chat system adds a floating widget (~64px) in the bottom-right
   corner of all pages. These rules ensure page content + footers don't
   overlap with it.
   ════════════════════════════════════════════════════════════════════════════ */

/* Admin pages: add extra bottom padding for the chat widget */
.bk-admin-content {
    padding-bottom: 80px !important;
}

/* On mobile, account for both bottom nav AND chat widget */
@media (max-width: 1023px) {
    .bk-admin-content {
        padding-bottom: calc(var(--ukuu-mobile-bottomnav-h) + var(--ukuu-mobile-safe-area-bottom) + 80px) !important;
    }
}

/* Landing page footer: add bottom padding so the chat widget doesn't cover footer content */
.bk-footer {
    padding-bottom: 80px !important;
}

/* Login/Register pages: add bottom padding */
.bk-auth-form-side {
    padding-bottom: 80px;
}

/* Any page with a sticky bottom bar (like tolerance save bar) */
.bk-admin-card-content {
    padding-bottom: 16px;
}

/* Ensure modals don't overlap with the chat widget */
.bk-modal {
    max-height: calc(90vh - 80px) !important;
}

/* Hide the KAZ AI chat widget when a modal is open (prevents z-index conflicts) */
body:has(.bk-modal-backdrop) ~ [class*="chat"],
body:has(.bk-modal-backdrop) ~ [id*="chat"],
body:has(.bk-modal-backdrop) ~ [class*="zai"],
body:has(.bk-modal-backdrop) ~ [id*="zai"] {
    display: none !important;
}

/* Push down any fixed bottom elements above the chat widget area */
.bk-mobile-bottomnav {
    bottom: 0;
}

/* Ensure the floating theme toggle on public pages doesn't overlap with chat */
.bk-public-theme-toggle {
    top: 20px;
    bottom: auto;
}


/* ════════════════════════════════════════════════════════════════════════════
   Phase 26: Comprehensive dark mode — ensure ALL elements have dark styling
   ════════════════════════════════════════════════════════════════════════════ */

/* Cards + content areas */
html[data-theme="dark"] .bk-admin-card,
html[data-theme="dark"] .bk-admin-kpi-card,
html[data-theme="dark"] .bk-admin-stat-box {
    background: var(--ukuu-surface) !important;
    border-color: var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-admin-card h3,
html[data-theme="dark"] .bk-admin-card-header h3,
html[data-theme="dark"] .bk-admin-kpi-value,
html[data-theme="dark"] .bk-admin-stat-box-value {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-admin-card-header p,
html[data-theme="dark"] .bk-admin-card-content p,
html[data-theme="dark"] .bk-admin-kpi-label,
html[data-theme="dark"] .bk-admin-kpi-sub,
html[data-theme="dark"] .bk-admin-stat-box-label,
html[data-theme="dark"] .bk-admin-greeting,
html[data-theme="dark"] .bk-admin-sub {
    color: var(--ukuu-text-muted) !important;
}

/* Topbar */
html[data-theme="dark"] .bk-admin-topbar {
    background: rgba(26, 15, 46, 0.92) !important;
    border-bottom-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] .bk-admin-topbar-search input {
    background: rgba(167, 139, 250, 0.06) !important;
    border-color: var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-admin-topbar-search input::placeholder {
    color: var(--ukuu-text-subtle) !important;
}

html[data-theme="dark"] .bk-admin-topbar-icon-btn,
html[data-theme="dark"] .bk-admin-topbar-toggle {
    background: rgba(167, 139, 250, 0.06) !important;
    color: var(--ukuu-text-muted) !important;
}

html[data-theme="dark"] .bk-admin-topbar-avatar {
    background: #A78BFA !important;
    color: #2D1B4E !important;
}

html[data-theme="dark"] .bk-admin-topbar-mobile-brand {
    color: var(--ukuu-text) !important;
}

/* Main content area */
html[data-theme="dark"] .bk-admin-main {
    background: var(--ukuu-bg) !important;
}

html[data-theme="dark"] .bk-admin-content {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-admin-h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
    color: var(--ukuu-text) !important;
}

/* Tables */
html[data-theme="dark"] .bk-admin-table {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-admin-table thead th {
    color: var(--ukuu-text-muted) !important;
    border-bottom-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] .bk-admin-table tbody td {
    color: var(--ukuu-text) !important;
    border-bottom-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] .bk-admin-table tbody tr:hover {
    background: rgba(167, 139, 250, 0.04) !important;
}

/* Inputs + forms */
html[data-theme="dark"] .bk-input,
html[data-theme="dark"] select.bk-input,
html[data-theme="dark"] textarea.bk-input,
html[data-theme="dark"] input.bk-input {
    background: rgba(167, 139, 250, 0.06) !important;
    border-color: var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-input::placeholder,
html[data-theme="dark"] .bk-input-wrap .bk-input-icon {
    color: var(--ukuu-text-subtle) !important;
}

html[data-theme="dark"] .bk-label {
    color: var(--ukuu-text-muted) !important;
}

html[data-theme="dark"] .bk-input-wrap {
    background: rgba(167, 139, 250, 0.06) !important;
    border-color: var(--ukuu-divider) !important;
}

/* Buttons */
html[data-theme="dark"] .bk-btn-secondary {
    background: rgba(167, 139, 250, 0.06) !important;
    border-color: var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-btn-secondary:hover {
    background: rgba(167, 139, 250, 0.12) !important;
}

/* Pills / badges */
html[data-theme="dark"] .bk-admin-pill {
    border-color: transparent !important;
}

/* Modal */
html[data-theme="dark"] .bk-modal {
    background: var(--ukuu-surface) !important;
    box-shadow: 0 24px 64px rgba(26, 15, 46, 0.5) !important;
}

html[data-theme="dark"] .bk-modal-header {
    border-bottom-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] .bk-modal-header h3 {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-modal-close {
    color: var(--ukuu-text-muted) !important;
}

html[data-theme="dark"] .bk-modal-close:hover {
    background: rgba(167, 139, 250, 0.10) !important;
    color: var(--ukuu-text) !important;
}

/* Date input + select */
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select {
    background: rgba(167, 139, 250, 0.06) !important;
    color: var(--ukuu-text) !important;
    border-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Checkboxes */
html[data-theme="dark"] input[type="checkbox"] {
    accent-color: #A78BFA !important;
}

/* Progress bars */
html[data-theme="dark"] .bk-admin-progress {
    background: rgba(167, 139, 250, 0.08) !important;
}

/* Empty state messages */
html[data-theme="dark"] .bk-admin-card-content p,
html[data-theme="dark"] div[style*="color:var(--bk-ink-3)"],
html[data-theme="dark"] div[style*="color: var(--bk-ink-3)"] {
    color: var(--ukuu-text-subtle) !important;
}

/* Section header */
html[data-theme="dark"] .bk-admin-section-header-left .bk-admin-greeting {
    color: var(--ukuu-text-subtle) !important;
}

/* Links */
html[data-theme="dark"] a {
    color: #A78BFA !important;
}

html[data-theme="dark"] .bk-admin-sidebar-item,
html[data-theme="dark"] .bk-mobile-bottomnav-item {
    color: var(--ukuu-sidebar-item) !important;
}

html[data-theme="dark"] .bk-admin-sidebar-item.active,
html[data-theme="dark"] .bk-mobile-bottomnav-item.active {
    color: var(--ukuu-sidebar-item-active) !important;
}

/* Inline styles using --bk-* vars (these should work because --bk-* has dark overrides) */
html[data-theme="dark"] [style*="var(--bk-ink)"],
html[data-theme="dark"] [style*="var(--bk-ink-2)"],
html[data-theme="dark"] [style*="var(--bk-ink-3)"] {
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] [style*="var(--bk-bg)"],
html[data-theme="dark"] [style*="var(--bk-bg-strong)"],
html[data-theme="dark"] [style*="var(--bk-muted)"] {
    background: var(--bk-bg-strong) !important;
}

html[data-theme="dark"] [style*="var(--bk-line)"] {
    border-color: var(--bk-line) !important;
}

/* Landing page sections */
html[data-theme="dark"] .bk-section,
html[data-theme="dark"] .bk-hero {
    background: #221440 !important;
    color: var(--bk-ink) !important;
}

html[data-theme="dark"] .bk-feature-card,
html[data-theme="dark"] .bk-pricing-card,
html[data-theme="dark"] .bk-discipline-card,
html[data-theme="dark"] .bk-stage-card {
    background: var(--ukuu-surface) !important;
    border-color: var(--ukuu-divider) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-section-title,
html[data-theme="dark"] .bk-h2,
html[data-theme="dark"] .bk-h3 {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .bk-lead,
html[data-theme="dark"] .bk-eyebrow {
    color: var(--ukuu-text-muted) !important;
}

/* Footer */
html[data-theme="dark"] .bk-footer {
    background: #221440 !important;
    color: var(--ukuu-text-muted) !important;
}

html[data-theme="dark"] .bk-footer a {
    color: var(--ukuu-text-subtle) !important;
}

/* Artboard (dashboard mockup on landing) */
html[data-theme="dark"] .bk-artboard {
    background: var(--ukuu-surface) !important;
    border-color: var(--ukuu-divider) !important;
}

/* MudBlazor overrides */
html[data-theme="dark"] .mud-card,
html[data-theme="dark"] .mud-paper {
    background: var(--ukuu-surface) !important;
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .mud-input {
    color: var(--ukuu-text) !important;
}

html[data-theme="dark"] .mud-table-cell {
    color: var(--ukuu-text) !important;
    border-bottom-color: var(--ukuu-divider) !important;
}

html[data-theme="dark"] .mud-table-head-cell {
    color: var(--ukuu-text-muted) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE TRANSITION ANIMATION
   Smooth fade + slide animation when navigating between pages.
   Triggered by adding .page-entering class to .bk-admin-main or .bk-admin-fade-in
   ═══════════════════════════════════════════════════════════════════ */

/* Initial state — invisible + slightly translated down */
.bk-admin-fade-in {
    animation: pageEnter 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes pageEnter {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
    .bk-admin-fade-in {
        animation: none;
    }
}

/* Smooth theme transition — when toggling dark/light, animate the change */
html {
    transition: background-color 280ms ease, color 280ms ease;
}

body, .bk-admin-body, .bk-admin-sidebar, .bk-admin-topbar,
.bk-admin-card, .bk-admin-kpi-card, .bk-admin-table thead th,
.bk-input, .bk-btn, .bk-admin-stat-box, .bk-auth, .bk-auth-form-side {
    transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease;
}
