:root {
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --bg-elevated: #1c1c20;
    --bg-input: #111113;
    --surface: #18181b;
    --border: #27272a;
    --border-subtle: #1e1e22;
    --text-primary: #fafafa;
    --text-secondary: #b0b0bb;
    --text-tertiary: #71717a;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-subtle: rgba(139, 92, 246, 0.12);
    --accent-glow: rgba(139, 92, 246, 0.22);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.14);
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, "DejaVu Sans", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.52);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.16);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    color-scheme: dark;
}

.theme-dark,
.dashboard-shell.theme-dark {
    color-scheme: dark;
}

.theme-light,
.dashboard-shell.theme-light {
    --bg-primary: #f6f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef1f7;
    --bg-elevated: #ffffff;
    --bg-input: #ffffff;
    --surface: #ffffff;
    --border: #d9deeb;
    --border-subtle: #e8ecf4;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-subtle: rgba(124, 58, 237, 0.1);
    --accent-glow: rgba(124, 58, 237, 0.18);
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info-bg: rgba(59, 130, 246, 0.12);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 14px 30px rgba(15, 23, 42, 0.12);
    color-scheme: light;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

*::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text-tertiary) 45%, transparent);
    border-radius: 999px;
    border: 2px solid var(--bg-secondary);
}

*::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--text-secondary) 55%, transparent);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
svg { display: block; }
code, pre, .mono, .mono-badge { font-family: var(--font-mono); }
.mono { font-variant-numeric: tabular-nums; }
.arabic-text,
[lang="ar"] {
    font-family: var(--font-arabic);
}

[dir="rtl"],
[dir="rtl"] *:not(code):not(pre):not(.mono):not(.mono-badge) {
    font-family: var(--font-arabic) !important;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.small { font-size: var(--text-xs); }
.muted { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.text-link {
    border: 0;
    background: transparent;
    color: var(--accent);
    padding: 0;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
}
.text-link:hover { color: #a78bfa; }

:focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.42);
    outline-offset: 2px;
}

#blazor-error-ui {
    background: #3f1d1d;
    color: #ffd0d0;
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
}
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: 0.55rem; cursor: pointer; }

.dashboard-shell {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    transition: grid-template-columns var(--transition-base);
}
.dashboard-shell.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--bg-secondary);
    border-inline-end: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-width: 0;
    z-index: 30;
}
.sidebar-top {
    padding: 20px 14px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.brand-wrap { min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 24px; height: 24px; filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.35)); }
.brand-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand-title { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.brand-subtitle { font-size: var(--text-xs); color: var(--text-tertiary); white-space: nowrap; }
.sidebar-scroll { flex: 1; overflow: auto; padding-bottom: 8px; }
.nav-label {
    margin: 18px 16px 6px;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { position: relative; }
.sidebar-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    margin: 2px 8px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    overflow: hidden;
}
.sidebar-nav a > span:first-of-type {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-count-badge {
    margin-inline-start: auto;
    flex: 0 0 auto;
    min-width: 24px;
    max-width: 72px;
    height: 20px;
    padding-inline: 6px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.22);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-nav a svg {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    flex: 0 0 auto;
    transition: color var(--transition-fast);
}
.sidebar-nav a:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-nav a:hover svg { color: var(--text-primary); }
.sidebar-nav a.active { background: var(--accent-subtle); color: var(--accent-hover); }
.sidebar-nav a.active svg { color: var(--accent); }
.sidebar-nav a.active::before {
    content: "";
    position: absolute;
    inset-block: 7px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--accent);
}

.sidebar-bottom {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border-subtle);
    display: grid;
    gap: 10px;
}
.user-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    flex: 0 0 auto;
}
.user-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user-name {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.role-pill {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    line-height: 1.2;
    color: var(--text-secondary);
    background: rgba(113, 113, 122, 0.2);
    border: 1px solid rgba(113, 113, 122, 0.22);
    text-transform: capitalize;
}
.role-admin { color: #c4b5fd; background: rgba(139, 92, 246, 0.2); border-color: rgba(139, 92, 246, 0.28); }
.role-reviewer { color: #93c5fd; background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.28); }
.role-annotator { color: #fbbf24; background: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.28); }
.role-viewer { color: #d4d4d8; }

.logout-btn {
    width: 100%;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover {
    border-color: rgba(239, 68, 68, 0.36);
    color: #fda4af;
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-nav a span,
.sidebar-collapsed .user-meta,
.sidebar-collapsed .logout-btn span { display: none; }
.sidebar-collapsed .sidebar-top,
.sidebar-collapsed .sidebar-bottom { padding-inline: 10px; }
.sidebar-collapsed .sidebar-nav a,
.sidebar-collapsed .logout-btn { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-count-badge { display: none; }
.sidebar-collapsed .user-mini-card { justify-content: center; padding: 6px; }
.sidebar-collapsed .sidebar-nav li[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    inset-inline-start: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #15151a;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: var(--text-xs);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    z-index: 30;
}

.content-shell { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 56px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
    background: rgba(9, 9, 11, 0.86);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: var(--text-xl); color: var(--text-primary); line-height: 1.2; }
.topbar-subtitle {
    margin-top: 2px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(68vw, 780px);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.session-warning {
    margin: 12px 24px 0;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border));
    background: color-mix(in srgb, var(--warning-bg) 84%, var(--bg-secondary));
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sensitive-toggle-btn.is-on {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: rgba(139, 92, 246, 0.3);
}
.mobile-toggle { display: none; }

.lang-switch {
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    display: inline-flex;
    padding: 2px;
    background: var(--bg-secondary);
}
.lang-switch button {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    min-width: 36px;
    height: 26px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.lang-switch button.active { background: var(--accent); color: #fff; }

.health-chip {
    height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
}
.health-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health-chip.is-healthy {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.08);
}
.health-chip.is-unhealthy {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.1);
}

.page-host {
    min-width: 0;
    padding: 22px 24px 30px;
    animation: pageHostIn var(--duration-normal) var(--ease-out);
}
.page-header {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.page-title { font-size: var(--text-2xl); color: var(--text-primary); }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: 25;
}

.btn {
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
    user-select: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-outline { border-color: var(--border); background: transparent; color: var(--text-secondary); }
.btn-outline:hover:not(:disabled) { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary { border-color: transparent; background: var(--bg-tertiary); color: var(--text-secondary); }
.btn-secondary:hover:not(:disabled) { color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-sm { height: 30px; padding-inline: 10px; font-size: var(--text-xs); }

.text-input,
.select-input,
.search-input,
.control,
textarea,
input[type="date"] {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    padding: 0 12px;
}
textarea.text-input,
textarea.control,
textarea { min-height: 92px; resize: vertical; padding: 10px 12px; }
.text-input:focus,
.select-input:focus,
.search-input:focus,
.control:focus,
textarea:focus,
input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.text-input::placeholder,
.search-input::placeholder,
.control::placeholder,
textarea::placeholder { color: var(--text-tertiary); }
.select-input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-inline-end: 34px;
}
label { display: grid; gap: 6px; font-size: var(--text-sm); color: var(--text-secondary); }
.field-group { display: grid; gap: 7px; margin-bottom: 14px; }
.field-group label { font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); }
.switch-label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--text-sm); }
.switch-label input { width: 16px; height: 16px; accent-color: var(--accent); }
.panel-card,
.stat-card,
.endpoint-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.panel-card { padding: 18px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.panel-title { font-size: var(--text-lg); }
.panel-meta { color: var(--text-tertiary); font-size: var(--text-xs); }
.panel-card p,
.endpoint-card p { color: var(--text-secondary); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.stats-grid.stagger-children > * {
    animation: fadeInUp var(--duration-normal) var(--ease-out) both;
}
.stats-grid.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stats-grid.stagger-children > *:nth-child(2) { animation-delay: 60ms; }
.stats-grid.stagger-children > *:nth-child(3) { animation-delay: 120ms; }
.stats-grid.stagger-children > *:nth-child(4) { animation-delay: 180ms; }
.stats-grid.stagger-children > *:nth-child(5) { animation-delay: 240ms; }
.stat-card {
    padding: 18px;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.stat-card-button {
    width: 100%;
    padding: 18px;
    text-align: start;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.stat-card-button.is-clickable {
    appearance: none;
    background: var(--bg-secondary);
}
.stat-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.stat-card-button:focus-visible {
    border-color: rgba(139, 92, 246, 0.42);
    box-shadow: var(--shadow-glow);
}
.stat-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-label { margin-top: 2px; color: var(--text-tertiary); font-size: var(--text-sm); }
.stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--accent);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.violet,
.stat-icon.purple { background: rgba(139, 92, 246, 0.16); color: #a78bfa; }
.stat-icon.success,
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.danger,
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.warning,
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info,
.stat-icon.blue { background: var(--info-bg); color: var(--info); }

.chart-grid,
.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.trend-svg {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.05), rgba(139, 92, 246, 0));
}
.trend-grid { stroke: var(--border-subtle); stroke-width: 0.7; }
.trend-area { fill: url(#trendFill); }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.trend-labels {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}
.trend-link {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}
.trend-link:hover {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    transform: translateY(-1px);
}
.trend-link:focus-visible {
    outline: 2px solid var(--accent-glow);
    outline-offset: 1px;
}

.donut-wrap { position: relative; width: 180px; margin: 8px auto 12px; }
.donut { width: 180px; height: 180px; border-radius: 50%; position: relative; }
.donut::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}
.donut-center {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    text-align: center;
    gap: 2px;
}
.donut-center strong { font-size: var(--text-2xl); line-height: 1; }
.donut-center span { color: var(--text-tertiary); font-size: var(--text-xs); }
.legend-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
.legend-button {
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: inherit;
    min-height: 38px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    font-size: inherit;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}
.legend-button:hover {
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-input));
    transform: translateY(-1px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; }
.dot.success { background: var(--success); }
.dot.warning { background: var(--warning); }
.dot.danger { background: var(--danger); }

.bar-list { display: grid; gap: 10px; }
.bar-item {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
    gap: 10px;
    align-items: center;
}
.bar-item-button {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.bar-item-button:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    transform: translateY(-1px);
}
.bar-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bar-track {
    height: 8px;
    border-radius: var(--radius-full);
    background: #141418;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 100%); }
.bar-value { font-size: var(--text-xs); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

.pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-button {
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.pill-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    box-shadow: var(--shadow-sm);
}
.category-pill {
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: #141418;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: var(--text-xs);
}
.category-pill strong { color: var(--text-primary); font-size: var(--text-xs); }
.category-religious,
.category-divine_names { border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.14); color: #c4b5fd; }
.category-government { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.14); color: #93c5fd; }
.category-political { border-color: rgba(249, 115, 22, 0.35); background: rgba(249, 115, 22, 0.14); color: #fdba74; }
.category-military { border-color: rgba(148, 163, 184, 0.34); background: rgba(71, 85, 105, 0.24); color: #cbd5e1; }
.category-profanity,
.category-morality { border-color: rgba(239, 68, 68, 0.34); background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.category-pill-registered { border-color: rgba(59, 130, 246, 0.34); background: rgba(59, 130, 246, 0.12); color: #93c5fd; }

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: start;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 600;
    background: #141418;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
}
.data-table tbody td {
    padding: 12px 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-sm);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.data-table tbody tr:hover td { background: rgba(39, 39, 42, 0.42); }
.data-table .primary-cell { color: var(--text-primary); font-weight: 500; }
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.table-responsive > .data-table {
    min-width: 100%;
}
.clickable-rows tbody tr { cursor: pointer; }
.actions-cell { white-space: nowrap; display: flex; gap: 8px; }

.badge {
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: var(--text-xs);
    line-height: 1.2;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}
.decision-approved,
.badge-approved { color: var(--success); background: var(--success-bg); border-color: rgba(34, 197, 94, 0.25); }
.decision-rejected,
.badge-rejected { color: var(--danger); background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.25); }
.decision-review,
.badge-review { color: var(--warning); background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.3); }
.severity-critical { color: var(--danger); background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.35); }
.severity-high { color: #fb923c; background: rgba(251, 146, 60, 0.15); border-color: rgba(251, 146, 60, 0.3); }
.severity-medium { color: #facc15; background: rgba(250, 204, 21, 0.15); border-color: rgba(250, 204, 21, 0.3); }
.severity-low { color: var(--info); background: var(--info-bg); border-color: rgba(59, 130, 246, 0.3); }
.mono-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding-inline: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 11px;
}

.filters-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(160px, 220px) auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.compact-select {
    width: 90px;
    justify-self: end;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-grid-single { grid-template-columns: 1fr; }
.metadata-header {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
}
.metadata-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 18px;
}
.modal-content {
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    animation: modalIn var(--transition-base);
}
.modal-title { font-size: var(--text-xl); margin-bottom: 12px; }
.modal-message { margin-bottom: 14px; color: var(--text-secondary); }
.modal-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px; }

.new-data-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    background: var(--accent-subtle);
    color: var(--accent-hover);
    font-size: var(--text-sm);
}

.pagination-wrap {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-summary {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-subtle);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-ellipsis {
    min-width: 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.loading-container,
.empty-state {
    min-height: 220px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
    color: var(--text-tertiary);
}
.spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2.5px solid rgba(139, 92, 246, 0.25);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
.loading-text,
.empty-text { font-size: var(--text-sm); }
.empty-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
}
.empty-icon svg { width: 20px; height: 20px; }
.inline-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}
.notification-root { position: relative; }
.bell-btn { position: relative; }
.notification-badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    padding-inline: 4px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(340px, 86vw);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 70;
}
.notification-panel-header {
    min-height: 56px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.notification-panel-title,
.notification-panel-tools {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.notification-panel-tools {
    align-items: flex-end;
}
.notification-unread {
    color: var(--text-tertiary);
    font-size: 11px;
}
.signalr-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.signalr-indicator.connected {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
}
.signalr-indicator.disconnected {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.notification-empty {
    min-height: 120px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}
.notification-empty svg { width: 20px; height: 20px; }
.notification-list {
    max-height: 400px;
    overflow: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}
.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.notification-item:hover { background: rgba(39, 39, 42, 0.35); }
.notification-item.unread::before {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: 0;
    width: 3px;
    background: var(--accent);
}
.notification-item.read { opacity: 0.82; }
.notification-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.notification-icon span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sev-success { color: var(--success); background: var(--success-bg); }
.sev-warning { color: var(--warning); background: var(--warning-bg); }
.sev-error { color: var(--danger); background: var(--danger-bg); }
.sev-info { color: var(--info); background: var(--info-bg); }
.notification-content { min-width: 0; }
.notification-type { font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: 2px; }
.notification-message { font-size: var(--text-sm); color: var(--text-primary); overflow-wrap: anywhere; }
.notification-time { margin-top: 3px; color: var(--text-tertiary); font-size: 11px; }

.login-shell {
    position: relative;
    min-height: 100vh;
    padding: 20px;
    display: grid;
    place-items: center;
    background: var(--bg-primary);
    overflow: hidden;
}
.mesh-layer {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 82% 18%, rgba(139, 92, 246, 0.2), transparent 45%),
        radial-gradient(circle at 18% 78%, rgba(59, 130, 246, 0.15), transparent 45%),
        radial-gradient(circle at 52% 50%, rgba(139, 92, 246, 0.07), transparent 55%);
    animation: meshDrift 15s ease-in-out infinite alternate;
    pointer-events: none;
}
.login-lang-switch {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    z-index: 2;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
    display: inline-flex;
    padding: 2px;
}
.login-lang-switch button {
    min-width: 34px;
    height: 26px;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
}
.login-lang-switch button.active { background: var(--accent); color: #fff; }
.login-card-modern {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    padding: 36px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}
.login-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-subtle);
    border: 1px solid rgba(139, 92, 246, 0.26);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}
.login-logo-modern { width: 30px; height: 30px; }
.login-heading { color: var(--text-primary); font-size: var(--text-2xl); margin-bottom: 2px; }
.login-subheading { color: var(--text-tertiary); font-size: var(--text-sm); margin-bottom: 20px; }
.login-submit { width: 100%; margin-top: 8px; height: 44px; }
.login-error-modern,
.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    color: #fca5a5;
    margin: 8px 0;
    animation: fadeIn var(--transition-base);
}
.error-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.32);
}
.login-footer { margin-top: 16px; text-align: center; color: var(--text-tertiary); font-size: var(--text-xs); }
.tester-layout {
    display: grid;
    grid-template-columns: minmax(280px, 40%) minmax(0, 60%);
    gap: 14px;
    margin-bottom: 14px;
}
.tester-request,
.tester-response { min-height: 460px; }
.tester-trade-input {
    min-height: 124px;
    font-size: 18px;
    line-height: 1.5;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 12px;
    resize: vertical;
}
.quick-tests { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    padding: 5px 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.pill-btn:hover {
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.12);
}
.tester-options {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    background: var(--bg-input);
}
.tester-options summary { cursor: pointer; color: var(--text-secondary); font-size: var(--text-sm); }
.tester-options .switch-label { margin-top: 8px; }
.tester-submit { margin-top: 14px; width: 100%; height: 42px; }

.decision-hero {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    min-height: 110px;
    display: grid;
    place-items: center;
    font-size: clamp(2.1rem, 4.5vw, 3.6rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.decision-hero.decision-approved { background: rgba(34, 197, 94, 0.12); color: #86efac; box-shadow: 0 0 22px rgba(34, 197, 94, 0.18); }
.decision-hero.decision-rejected { background: rgba(239, 68, 68, 0.12); color: #fca5a5; box-shadow: 0 0 22px rgba(239, 68, 68, 0.18); }
.decision-hero.decision-review { background: rgba(245, 158, 11, 0.14); color: #fcd34d; box-shadow: 0 0 22px rgba(245, 158, 11, 0.16); }
.response-meta { color: var(--text-tertiary); font-size: var(--text-sm); margin-bottom: 10px; }
.response-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.response-tabs .btn.active { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.42); background: rgba(139, 92, 246, 0.13); }

.findings-list { display: grid; gap: 10px; }
.finding-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    padding: 12px;
}
.finding-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.finding-title { display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.finding-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-tertiary); font-size: var(--text-xs); }
.itda-checklist { display: flex; flex-direction: column; gap: 10px; }
.itda-rule-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-secondary); }
.itda-rule-row.passed { border-color: color-mix(in srgb, var(--accent-success) 32%, var(--border-subtle)); }
.itda-rule-row.failed { border-color: color-mix(in srgb, var(--accent-danger) 40%, var(--border-subtle)); background: color-mix(in srgb, var(--accent-danger) 10%, var(--bg-secondary)); }
.itda-rule-row.skipped, .itda-rule-row.notapplicable { opacity: 0.92; }
.itda-rule-id { min-width: 76px; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; color: var(--text-secondary); }
.itda-rule-body { flex: 1; min-width: 0; }
.itda-rule-desc { color: var(--text-primary); font-size: var(--text-sm); font-weight: 600; }
.itda-rule-detail { margin-top: 4px; font-size: var(--text-xs); line-height: 1.5; }
.itda-rule-status { align-self: center; white-space: nowrap; }
mark { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border-radius: 4px; padding: 1px 4px; }

.code-block-wrap { position: relative; }
.code-block {
    margin: 0;
    width: 100%;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    padding: 14px;
    color: var(--text-primary);
    font-size: var(--text-xs);
    line-height: 1.55;
}
.tester-error {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
    border-radius: var(--radius-md);
    padding: 12px;
    display: grid;
    gap: 4px;
}
.copy-btn {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(9, 9, 11, 0.75);
    color: var(--text-secondary);
    padding-inline: 8px;
    font-size: 11px;
    cursor: pointer;
}
.copy-btn:hover { color: var(--text-primary); }
.tester-history { margin-top: 14px; }

.docs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
.docs-nav {
    position: sticky;
    top: 70px;
    align-self: start;
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 88px);
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}
.docs-nav a {
    display: block;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.35;
    transition: all var(--transition-fast);
}
.docs-nav a:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.docs-nav-home,
.docs-nav-section-link {
    font-weight: 700;
    color: var(--text-primary);
}
.docs-nav-section {
    display: grid;
    gap: 4px;
}
.docs-nav-endpoint {
    margin-inline-start: 10px;
    padding-inline-start: 12px;
    border-inline-start: 2px solid var(--border-subtle);
}
.docs-nav-endpoint:hover {
    border-inline-start-color: var(--accent);
}
.docs-content { display: grid; gap: 12px; }
.endpoint-card {
    padding: 16px;
    scroll-margin-top: 72px;
}
.endpoint-card h2 { margin-bottom: 8px; font-size: var(--text-xl); }
.endpoint-card h4 { margin: 10px 0 6px; color: var(--text-secondary); }
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
.docs-table th,
.docs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: start;
    vertical-align: top;
    font-size: var(--text-sm);
}
.docs-table th {
    width: 140px;
    color: var(--text-secondary);
    font-weight: 600;
}
.endpoint-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.endpoint-head code {
    font-size: var(--text-sm);
    color: var(--text-primary);
    background: #111113;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
}
.method-badge {
    height: 24px;
    border-radius: var(--radius-sm);
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.method-get { color: var(--success); background: var(--success-bg); border: 1px solid rgba(34, 197, 94, 0.25); }
.method-post { color: var(--info); background: var(--info-bg); border: 1px solid rgba(59, 130, 246, 0.25); }
.method-put { color: var(--warning); background: var(--warning-bg); border: 1px solid rgba(245, 158, 11, 0.27); }
.method-delete { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.28); }
.docs-list { margin: 8px 0 0; padding-inline-start: 18px; color: var(--text-secondary); }
.docs-list li { margin-bottom: 4px; }
.endpoint-actions { margin-top: 8px; }
.status-bar {
    margin-bottom: 12px;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    font-size: var(--text-sm);
}
.tabs-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs-row .btn { border-radius: 999px; }
.json-editor { font-family: var(--font-mono); min-height: 140px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-row {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: 0; }
.settings-meta-list { display: grid; gap: 8px; }
.settings-meta-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
.settings-meta-list strong { color: var(--text-primary); font-weight: 600; }

.detail-wrapper { display: grid; gap: 12px; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.detail-title { font-size: var(--text-xl); margin-bottom: 2px; }
.info-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
.evidence-block {
    margin-top: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #101014;
    padding: 10px;
    white-space: pre-wrap;
    color: #d4d4d8;
    font-size: var(--text-xs);
    max-height: 280px;
    overflow: auto;
}
.disclaimer-card {
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    color: var(--text-tertiary);
}

.brand-row-selected td {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.brands-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 220px);
    overflow: hidden;
}

.brands-table-section {
    flex: 1;
    min-width: 0;
    transition: flex var(--duration-slow) var(--ease-out);
}

.brands-table-section.compressed {
    flex: 0.55;
}

.variant-panel {
    flex: 0.45;
    min-width: 360px;
    margin-inline-start: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.variant-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-primary) 76%, transparent);
}

.variant-panel-meta {
    margin-top: 4px;
    color: var(--text-secondary);
}

.variant-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 18px;
    display: grid;
    gap: 14px;
}

.variant-panel-actions {
    display: flex;
}

.btn-full {
    width: 100%;
}

.brand-input-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.brand-input-card h4 {
    font-size: var(--text-lg);
}

.brand-variants-textarea {
    min-height: 140px;
}

.brand-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.brand-generation-result {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.variant-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.review-detail-card {
    display: grid;
    gap: 14px;
    padding: 12px 0 4px;
}

.review-finding-list {
    display: grid;
    gap: 10px;
}

.review-action-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 88%, transparent);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.review-action-card label {
    display: grid;
    gap: 8px;
}

.review-action-card .switch-label {
    justify-content: flex-start;
}

.bulk-action-bar {
    margin-bottom: 12px;
}

.bulk-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.diff-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.diff-card {
    display: grid;
    gap: 12px;
}

.diff-list {
    display: grid;
    gap: 10px;
}

.diff-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    background: var(--bg-input);
}

.diff-added {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.diff-removed {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.diff-changed {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
}

.diff-same {
    border-color: rgba(113, 113, 122, 0.25);
}

.variant-groups {
    display: grid;
    gap: 12px;
}

.variant-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.variant-group-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-tertiary) 82%, transparent);
}

.variant-group-head h4 {
    font-size: var(--text-base);
}

.variant-list {
    display: grid;
}

.variant-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    animation: fadeIn var(--duration-normal) var(--ease-out) both;
}

.variant-row:last-child {
    border-bottom: 0;
}

.variant-row:hover {
    background: var(--bg-tertiary);
}

.variant-text {
    flex: 1;
    word-break: break-word;
}

.variant-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 500;
    font-family: var(--font-sans);
}

.badge-ar {
    background: var(--success-bg);
    color: var(--success);
}

.badge-en {
    background: var(--info-bg);
    color: var(--info);
}

.badge-franco {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-llm {
    background: var(--accent-subtle);
    color: var(--accent);
}

.badge-user {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-system {
    background: rgba(113, 113, 122, 0.2);
    color: var(--text-secondary);
}

.category-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
}

.brand-modal {
    max-width: 720px;
}

.stakeholder-editor-list,
.stakeholder-list {
    display: grid;
    gap: 12px;
}

.stakeholder-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-tertiary) 76%, transparent);
    padding: 12px;
}

.stakeholder-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stakeholder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.stakeholder-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.blazored-toast-container { z-index: 1200; }
.blazored-toast {
    border-radius: var(--radius-md) !important;
    background: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-md) !important;
    backdrop-filter: blur(14px);
}
.blazored-toast .blazored-toast-message {
    color: var(--text-primary) !important;
}
.blazored-toast .blazored-toast-close {
    color: var(--text-tertiary) !important;
}
.blazored-toast .blazored-toast-close:hover {
    color: var(--text-primary) !important;
}
.blazored-toast.blazored-toast-info {
    border-top: 4px solid #3b82f6 !important;
}
.blazored-toast.blazored-toast-success {
    border-top: 4px solid var(--success) !important;
}
.blazored-toast.blazored-toast-warning {
    border-top: 4px solid var(--warning) !important;
}
.blazored-toast.blazored-toast-error {
    border-top: 4px solid var(--danger) !important;
}
.blazored-toast-progressbar { background-color: var(--accent) !important; }

.dashboard-shell.theme-light .btn-primary {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #fff;
}

.dashboard-shell.theme-light .topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
}

.dashboard-shell.theme-light .btn-primary:hover:not(:disabled) {
    background: #7c3aed;
    border-color: #7c3aed;
}

.dashboard-shell.theme-light .pill-btn {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.26);
    color: #6d28d9;
}

.dashboard-shell.theme-light .pill-btn:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(124, 58, 237, 0.38);
    color: #5b21b6;
}

.dashboard-shell.theme-light .tester-options {
    background: #f4f4f5;
    border-color: #e4e4e7;
}

.dashboard-shell.theme-light .tester-trade-input,
.dashboard-shell.theme-light .finding-card,
.dashboard-shell.theme-light .code-block {
    background: #fff;
    border-color: #d9deeb;
    color: #111827;
}

.dashboard-shell.theme-light .tester-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.dashboard-shell.theme-light mark {
    background: rgba(245, 158, 11, 0.24);
    color: #92400e;
}

.dashboard-shell.theme-light .copy-btn {
    background: #ffffff;
    color: #374151;
    border-color: #d9deeb;
}

.dashboard-shell.theme-light .copy-btn:hover {
    color: #111827;
    background: #f8fafc;
}

.dashboard-shell.theme-light .endpoint-head code {
    background: #ffffff;
    color: #111827;
    border-color: #d9deeb;
}

.dashboard-shell.theme-light .evidence-block {
    background: #ffffff;
    color: #1f2937;
    border-color: #d9deeb;
}

.theme-light .blazored-toast {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #111827 !important;
    border-color: #d9deeb !important;
}

.theme-dark .blazored-toast {
    background: rgba(24, 24, 27, 0.96) !important;
}

.dashboard-shell.theme-light .data-table {
    background: #ffffff;
    border-color: #d9deeb;
}

.dashboard-shell.theme-light .data-table thead th {
    background: #f8fafc;
    color: #334155;
    border-bottom-color: #d9deeb;
}

.dashboard-shell.theme-light .data-table tbody td {
    color: #374151;
    border-bottom-color: #e8ecf4;
}

.dashboard-shell.theme-light .data-table tbody tr:hover td {
    background: #f3f4f6;
}

.dashboard-shell.theme-light .category-pill {
    background: #f8fafc;
    border-color: #d9deeb;
    color: #475569;
}

.dashboard-shell.theme-light .category-pill strong {
    color: #111827;
}

.dashboard-shell.theme-light .category-pill-registered {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dashboard-shell.theme-light .category-profanity,
.dashboard-shell.theme-light .category-morality {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.dashboard-shell.theme-light .mono-badge {
    background: #ffffff;
    border-color: #d1d5db;
    color: #475569;
}

.dashboard-shell.theme-light .bar-track {
    background: #edf1f7;
    border-color: #d9deeb;
}

.dashboard-shell.theme-light .notification-item:hover {
    background: #f3f4f6;
}

.dashboard-shell.theme-light .sidebar-collapsed .sidebar-nav li[data-title]:hover::after {
    background: #ffffff;
    color: #111827;
    border-color: #d9deeb;
}

.theme-light .login-lang-switch {
    background: rgba(255, 255, 255, 0.94);
    border-color: #d9deeb;
}

.theme-light .login-card-modern {
    background: #ffffff;
    border-color: #d9deeb;
}

.dashboard-shell.theme-light .response-tabs .btn.active {
    color: #6d28d9;
    border-color: rgba(139, 92, 246, 0.34);
    background: rgba(139, 92, 246, 0.12);
}

.dashboard-shell.theme-light .role-viewer {
    color: #475569;
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.28);
}

.dashboard-shell.theme-light .role-annotator {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3);
}

.dashboard-shell.theme-light .category-religious,
.dashboard-shell.theme-light .category-divine_names {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.dashboard-shell.theme-light .category-government {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dashboard-shell.theme-light .category-political {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.dashboard-shell.theme-light .category-military {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.app-container { min-height: 100vh; }
.main-content { padding: 24px; }
.top-bar,
.top-title,
.health-indicator,
.sidebar-brand,
.sidebar-footer { all: unset; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%,
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pageHostIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes meshDrift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2%, 2%) scale(1.02); }
    100% { transform: translate(2%, -2%) scale(1.01); }
}
.pulse { animation: pulse 1.5s ease-out infinite; }

[dir="rtl"] { direction: rtl; }
[dir="rtl"] .topbar-subtitle,
[dir="rtl"] .page-title,
[dir="rtl"] .data-table th,
[dir="rtl"] .data-table td,
[dir="rtl"] .docs-content,
[dir="rtl"] .panel-card,
[dir="rtl"] .endpoint-card { text-align: right; }
[dir="rtl"] .sidebar { border-inline-end: none; border-inline-start: 1px solid var(--border); }
[dir="rtl"] .sidebar-nav a.active::before,
[dir="rtl"] .notification-item.unread::before { inset-inline-start: auto; inset-inline-end: 0; }
[dir="rtl"] .sidebar-collapsed .sidebar-nav li[data-title]:hover::after { inset-inline-start: auto; inset-inline-end: calc(100% + 10px); }
[dir="rtl"] .select-input { background-position: 16px calc(50% - 2px), 22px calc(50% - 2px); padding-inline-start: 34px; padding-inline-end: 12px; }

.status-summary-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--surface);
}
.status-summary-card.is-operational {
    border-color: color-mix(in srgb, var(--success) 65%, var(--border));
}
.status-summary-card.is-degraded {
    border-color: color-mix(in srgb, var(--warning) 60%, var(--border));
}
.status-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 1.1rem;
    background: color-mix(in srgb, var(--success) 18%, transparent);
}
.status-summary-card.is-degraded .status-summary-head {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
}
.status-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: var(--success);
    font-weight: 700;
}
.status-summary-card.is-degraded .status-icon {
    background: var(--warning);
}
.status-summary-body {
    margin: 0;
    padding: 14px 16px;
    color: var(--text-secondary);
}
.status-summary-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 16px 14px;
    color: var(--text-secondary);
    font-size: .92rem;
}
.status-summary-metrics strong {
    color: var(--text-primary);
    font-weight: 700;
}

.status-history-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 14px;
}
.status-history-card .panel-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.status-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 16px 8px;
    color: var(--text-secondary);
    font-size: .9rem;
}
.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.status-big-bars {
    display: grid;
    grid-template-columns: repeat(90, minmax(0, 1fr));
    gap: 2px;
    padding: 0 16px 8px;
}
.status-big-bar {
    height: 24px;
    border-radius: 2px;
    background: var(--text-tertiary);
    opacity: .75;
}
.status-big-bar.up {
    background: var(--success);
    opacity: .95;
}
.status-big-bar.degraded {
    background: var(--warning);
    opacity: .95;
}
.status-big-bar.down {
    background: var(--danger);
    opacity: .95;
}
.status-big-bar.disabled,
.status-big-bar.unknown {
    background: color-mix(in srgb, var(--text-tertiary) 75%, transparent);
}
.status-axis {
    display: flex;
    justify-content: space-between;
    padding: 0 16px 14px;
    color: var(--text-tertiary);
    font-size: .82rem;
}

.status-panel {
    padding: 0;
    overflow: hidden;
}
.status-panel .panel-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.status-row {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.status-row:last-child {
    border-bottom: 0;
}
.status-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.status-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--text-tertiary);
}
.status-dot.up { background: var(--success); }
.status-dot.down { background: var(--danger); }
.status-dot.degraded { background: var(--warning); }
.status-dot.disabled { background: var(--text-tertiary); }
.status-dot.unknown { background: var(--text-tertiary); }

.status-small {
    color: var(--text-secondary);
    font-size: .9rem;
}
.status-uptime {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.status-sparkline {
    width: 100%;
    height: 42px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-tertiary) 72%, transparent);
}
.spark-line {
    fill: none;
    stroke-width: 2;
}
.spark-line.up { stroke: var(--success); }
.spark-line.degraded { stroke: var(--warning); }
.spark-line.down { stroke: var(--danger); }
.spark-line.disabled,
.spark-line.unknown { stroke: var(--text-tertiary); }
.spark-area {
    opacity: .22;
}
.spark-area.up { fill: var(--success); }
.spark-area.degraded { fill: var(--warning); }
.spark-area.down { fill: var(--danger); }
.spark-area.disabled,
.spark-area.unknown { fill: var(--text-tertiary); }

.uptime-bars {
    display: grid;
    grid-template-columns: repeat(90, minmax(0, 1fr));
    gap: 2px;
}
.uptime-bar {
    height: 16px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--text-tertiary) 80%, transparent);
    opacity: .85;
}
.uptime-bar.up {
    background: var(--success);
    opacity: .95;
}
.uptime-bar.down {
    background: var(--danger);
    opacity: .95;
}
.uptime-bar.degraded {
    background: var(--warning);
    opacity: .95;
}
.uptime-bar.disabled,
.uptime-bar.unknown {
    background: color-mix(in srgb, var(--text-tertiary) 65%, transparent);
}

.smart-suggestions {
    margin: 12px 0;
    padding: 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
}

.smart-suggestions h4 {
    margin: 0 0 10px;
    font-size: .95rem;
}

.suggestion-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.suggestion-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.suggestion-card.flagged {
    padding-inline-start: 10px;
    border-inline-start: 3px solid var(--danger);
}

.suggestion-name {
    font-weight: 600;
}

.suggestion-reason,
.suggestion-flag {
    width: 100%;
    margin: 0;
    font-size: .85rem;
}

.suggestion-confidence {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confidence-bar {
    height: 8px;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, white));
}

.suggestion-flag {
    color: var(--danger);
    font-weight: 600;
}

.be-smart-section,
.attempt-selector {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.attempt-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attempt-btn {
    min-width: 78px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.attempt-btn:hover {
    border-color: var(--accent);
}

.attempt-btn.selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
    color: var(--accent);
    font-weight: 600;
}

.attempt-options .attempt-btn:last-child {
    font-size: 0;
}

.attempt-options .attempt-btn:last-child::before {
    content: "\221E";
    display: block;
    font-size: 1rem;
    line-height: 1;
}

.attempt-btn small {
    display: block;
    margin-top: 4px;
    font-size: .75rem;
    color: var(--text-tertiary);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

.status-success {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
}

.status-warning {
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 16%, transparent);
}

.status-danger {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.status-muted {
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--text-tertiary) 16%, transparent);
}

@media (max-width: 1280px) {
    .status-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .status-big-bars,
    .uptime-bars { grid-template-columns: repeat(60, minmax(0, 1fr)); }
    .topbar-subtitle { max-width: 46vw; }
}

@media (max-width: 1024px) {
    .dashboard-shell,
    .dashboard-shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed;
        inset-inline-start: 0;
        top: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    [dir="rtl"] .sidebar { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(100%); }
    .dashboard-shell.sidebar-open .sidebar { transform: translateX(0); }
    .dashboard-shell.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    .mobile-toggle { display: grid; }
    .collapse-btn { display: none; }
    .page-host { padding: 18px; }
    .chart-grid,
    .two-col,
    .settings-grid,
    .tester-layout,
    .docs-layout,
    .form-grid,
    .info-grid,
    .filters-bar { grid-template-columns: 1fr; }
    .brands-layout {
        display: grid;
        gap: 14px;
        min-height: auto;
    }
    .brands-table-section.compressed {
        flex: 1;
    }
    .variant-panel {
        margin-inline-start: 0;
        min-width: 0;
    }
    .docs-nav {
        position: static;
        display: flex;
        overflow: auto;
        white-space: nowrap;
        padding: 8px;
        max-height: none;
    }
    .docs-nav a { flex: 0 0 auto; }
    .docs-nav-section {
        display: flex;
        gap: 6px;
        align-items: center;
    }
    .docs-nav-endpoint {
        margin-inline-start: 0;
        padding-inline-start: 10px;
        border-inline-start: 0;
    }
}

@media (max-width: 768px) {
    .topbar { padding-inline: 12px; }
    .topbar-title { font-size: 1rem; }
    .topbar-subtitle,
    .health-chip { display: none; }
    .topbar-actions { gap: 6px; }
    .stats-grid { grid-template-columns: 1fr; }
    .status-summary-metrics { grid-template-columns: 1fr; }
    .status-row-head { flex-direction: column; align-items: flex-start; }
    .status-big-bars,
    .uptime-bars { grid-template-columns: repeat(40, minmax(0, 1fr)); }
    .session-warning {
        margin: 12px 12px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .login-card-modern { padding: 26px; }
    .variant-panel {
        position: fixed;
        inset: 0;
        z-index: 50;
        width: 100%;
        border-radius: 0;
    }
}

.audit-row-flagged {
    border-inline-start: 3px solid var(--danger);
    background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.audit-flag-open {
    border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--border));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 12%, transparent);
}

.decision-muted {
    background: color-mix(in srgb, var(--text-tertiary) 22%, transparent);
    color: var(--text-secondary);
}

.detail-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.global-loading {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--bg-primary, #09090b);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.global-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
    box-shadow: var(--shadow-glow);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid color-mix(in srgb, var(--border) 75%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--bg-tertiary) 92%, transparent) 25%,
        color-mix(in srgb, var(--bg-secondary) 96%, transparent) 50%,
        color-mix(in srgb, var(--bg-tertiary) 92%, transparent) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}

.skeleton * {
    visibility: hidden;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text-lg {
    height: 20px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 28px;
    width: min(60%, 320px);
    margin-bottom: 12px;
}

.skeleton-stat {
    height: 100px;
    border-radius: 12px;
}

.skeleton-chart {
    height: 280px;
    border-radius: 12px;
}

.skeleton-table-row {
    height: 48px;
    margin-bottom: 4px;
}

.skeleton-btn {
    width: 96px;
    height: 36px;
    border-radius: 8px;
    display: inline-block;
}

.page-skeleton {
    display: grid;
    gap: 18px;
}

.skeleton-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.page-skeleton-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
    .page-skeleton-charts {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-out) both;
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-normal) var(--ease-out) both;
}

.animate-fade-in-down {
    animation: fadeInDown var(--duration-normal) var(--ease-out) both;
}

.animate-slide-in {
    animation: slideInRight var(--duration-slow) var(--ease-out) both;
}

[dir="rtl"] .animate-slide-in {
    animation-name: slideInLeft;
}

.animate-pop-in {
    animation: popIn var(--duration-normal) var(--ease-out) both;
}

.modal-overlay {
    animation: fadeIn var(--duration-fast) var(--ease-out) both;
}

.modal-content {
    animation: popIn var(--duration-normal) var(--ease-out) both;
}

.blazored-toast {
    animation: slideInRight var(--duration-normal) var(--ease-out) both;
}

[dir="rtl"] .blazored-toast {
    animation-name: slideInLeft;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
