/* ============================================
   Big Bruh! - Administration Dashboard
   Theme: tweakcn/shadcn dark-first (oklch)
   Layered on The Geek Network Design System
   ============================================ */

/* App-specific theme override for [data-app="admin"] */
[data-app="admin"] {
    --tgn-primary: oklch(0.6053 0.2163 257.1603);
    --tgn-primary-rgb: 79, 70, 229;
    --tgn-accent: oklch(0.6772 0.1571 35.1898);
}

/* ============================================
   Design Tokens - Dark Mode (default)
   Matching shadcn/tweakcn "First Of His Name"
   ============================================ */
:root, [data-theme="dark"] {
    --background: oklch(0.1290 0.0042 285.82);
    --foreground: oklch(0.9848 0 0);
    --card: oklch(0.1560 0.0046 286.00);
    --card-foreground: oklch(0.9848 0 0);
    --popover: oklch(0.1560 0.0046 286.00);
    --popover-foreground: oklch(0.9848 0 0);
    --primary: oklch(0.6352 0.1991 255.1217);
    --primary-foreground: oklch(1.0000 0 0);
    --secondary: oklch(0.2200 0.0050 286.03);
    --secondary-foreground: oklch(0.9848 0 0);
    --muted: oklch(0.2200 0.0050 286.03);
    --muted-foreground: oklch(0.6200 0.0100 286.07);
    --accent: oklch(0.2200 0.0050 286.03);
    --accent-foreground: oklch(0.9848 0 0);
    --destructive: oklch(0.6344 0.2511 28.4565);
    --destructive-foreground: oklch(0.9848 0 0);
    --border: oklch(0.2500 0.0055 286.01);
    --input: oklch(0.2500 0.0055 286.01);
    --ring: oklch(0.6352 0.1991 255.1217);
    --radius: 0.625rem;
    --sidebar-bg: oklch(0.1100 0.0038 285.82);
    --sidebar-fg: oklch(0.8500 0.0050 286.00);
    --sidebar-primary: oklch(0.6352 0.1991 255.1217);
    --sidebar-border: oklch(0.2200 0.0050 286.03);
    --sidebar-hover: oklch(0.1800 0.0046 286.00);
    --chart-1: oklch(0.5292 0.1931 262.1292);
    --chart-2: oklch(0.6983 0.1337 165.4626);
    --chart-3: oklch(0.7232 0.1500 60.6307);
    --chart-4: oklch(0.6192 0.2037 312.7283);
    --chart-5: oklch(0.6123 0.2093 6.3856);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.4);

    /* Status colors - brighter for dark bg */
    --green: #4ade80;
    --yellow: #facc15;
    --red: #f87171;
    --green-muted: oklch(0.20 0.03 145);
    --yellow-muted: oklch(0.20 0.03 95);
    --red-muted: oklch(0.20 0.03 25);
}

/* ============================================
   Design Tokens - Light Mode
   ============================================ */
[data-theme="light"] {
    --background: oklch(0.9848 0 0);
    --foreground: oklch(0.1405 0.0044 285.8238);
    --card: oklch(1.0000 0 0);
    --card-foreground: oklch(0.1405 0.0044 285.8238);
    --popover: oklch(1.0000 0 0);
    --popover-foreground: oklch(0.1405 0.0044 285.8238);
    --primary: oklch(0.6053 0.2163 257.1603);
    --primary-foreground: oklch(1.0000 0 0);
    --secondary: oklch(0.9676 0.0013 286.3752);
    --secondary-foreground: oklch(0.2103 0.0059 285.8835);
    --muted: oklch(0.9676 0.0013 286.3752);
    --muted-foreground: oklch(0.5519 0.0137 285.9422);
    --accent: oklch(0.9676 0.0013 286.3752);
    --accent-foreground: oklch(0.2103 0.0059 285.8835);
    --destructive: oklch(0.6280 0.2577 29.2339);
    --destructive-foreground: oklch(0.9848 0 0);
    --border: oklch(0.9197 0.0040 286.3200);
    --input: oklch(0.9197 0.0040 286.3200);
    --ring: oklch(0.6053 0.2163 257.1603);
    --sidebar-bg: oklch(0.9848 0 0);
    --sidebar-fg: oklch(0.3705 0.0120 285.8008);
    --sidebar-primary: oklch(0.6053 0.2163 257.1603);
    --sidebar-border: oklch(0.9197 0.0040 286.3200);
    --sidebar-hover: oklch(0.9500 0.0013 286.38);
    --chart-1: oklch(0.6772 0.1571 35.1898);
    --chart-2: oklch(0.6309 0.1013 183.4907);
    --chart-3: oklch(0.3787 0.0440 225.5393);
    --chart-4: oklch(0.8336 0.1186 88.1463);
    --chart-5: oklch(0.7834 0.1261 58.7491);
    --shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);

    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --green-muted: oklch(0.92 0.06 145);
    --yellow-muted: oklch(0.92 0.06 95);
    --red-muted: oklch(0.92 0.06 25);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Admin Shell Layout
   ============================================ */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar - shadcn dark panel
   ============================================ */
.admin-sidebar {
    width: 256px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header h2 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    letter-spacing: -0.02em;
}

.sidebar-subtitle {
    font-size: 0.675rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    color: var(--sidebar-fg);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--foreground);
}

.sidebar-link.active {
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 600;
}

.sidebar-link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.active .sidebar-link-icon {
    opacity: 1;
}

.sidebar-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-version {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.theme-btn {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.theme-btn:hover {
    background: var(--sidebar-hover);
}

/* ============================================
   Main Content Area
   ============================================ */
.admin-main {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    min-width: 0;
}

/* ============================================
   Page Titles
   ============================================ */
.page-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.75rem;
    letter-spacing: -0.025em;
}

/* ============================================
   Dashboard Card Grid - command center layout
   ============================================ */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-card {
    background: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.dash-card:hover {
    border-color: var(--muted-foreground);
}

.dash-card-full {
    grid-column: 1 / -1;
}

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

.dash-card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--foreground);
}

/* ── Stats Row (Healthy / Unhealthy pair) ── */
.dash-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.dash-stat {
    padding: 0.625rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
}

.dash-stat.healthy {
    border-left: 3px solid var(--green);
}

.dash-stat.unhealthy {
    border-left: 3px solid var(--red);
}

.dash-stat-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.dash-stat-value {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
}

.dash-stat-pct {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-top: 0.125rem;
}

/* ── Metrics Grid (inner metric cells) ── */
.dash-metrics-grid {
    display: grid;
    gap: 0.625rem;
}

.dash-metrics-grid.cols-1 { grid-template-columns: 1fr; }
.dash-metrics-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.dash-metrics-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-metrics-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.dash-metrics-grid.cols-5 { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }

.mt-1 { margin-top: 0.625rem; }

.dash-metric {
    padding: 0.5rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    background: var(--secondary);
}

.dash-metric-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.dash-metric-value {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.3;
}

.dash-metric-value.muted {
    color: var(--muted-foreground);
    font-size: 1.25rem;
}

.dash-metric-detail {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    margin-top: 0.125rem;
}

/* ── Placeholder / Coming Soon ── */
.dash-metric.placeholder {
    opacity: 0.5;
    border: 1px dashed var(--border);
    background: transparent;
}

.dash-metric-coming {
    font-size: 0.5625rem;
    color: var(--muted-foreground);
    font-style: italic;
    margin-top: 0.125rem;
    opacity: 0.7;
}

.placeholder-dot {
    background: var(--muted-foreground) !important;
    opacity: 0.4;
}

/* ── Placeholder Banner (Social Media) ── */
.dash-placeholder-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem 1rem;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) - 2px);
    opacity: 0.5;
}

.dash-placeholder-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

/* ============================================
   Summary Cards (Detail Pages - API/DB Health)
   ============================================ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--muted-foreground);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.card-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground);
}

.card-value {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
}

.card-pct {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* ============================================
   Gauge Bars - polished track + rounded fill
   ============================================ */
.gauges-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gauge-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
}

.gauge-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.625rem;
}

.gauge-bar {
    height: 8px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}

.gauge-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-green { background: var(--green); }
.gauge-yellow { background: var(--yellow); }
.gauge-red { background: var(--red); }

.gauge-value {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

/* ============================================
   Health Summary Bar (API/DB detail pages)
   ============================================ */
.health-summary {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.summary-stat {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--foreground);
}

.summary-pct {
    font-weight: 700;
    font-size: 1.05rem;
}

.summary-note {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-left: auto;
}

.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }

/* ============================================
   Tier Sections & Health Tables
   ============================================ */
.tier-section {
    margin-bottom: 1.5rem;
}

.tier-heading {
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.health-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
}

.health-table th {
    background: var(--muted);
    text-align: left;
    padding: 0.625rem 0.875rem;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
}

.health-table td {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border);
    color: var(--card-foreground);
}

.health-table tr:last-child td {
    border-bottom: none;
}

.health-table tbody tr {
    transition: background 0.1s ease;
}

.health-table tbody tr:hover {
    background: var(--accent);
}

.row-healthy {}
.row-unhealthy td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.row-down td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ============================================
   Status Dots
   ============================================ */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted-foreground);
    vertical-align: middle;
    flex-shrink: 0;
}

.status-dot.healthy {
    background: var(--green);
    box-shadow: 0 0 0 3px var(--green-muted);
}

.status-dot.unhealthy {
    background: var(--yellow);
    box-shadow: 0 0 0 3px var(--yellow-muted);
}

.status-dot.down {
    background: var(--red);
    box-shadow: 0 0 0 3px var(--red-muted);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   Status Footer (Live / Disconnected)
   ============================================ */
.status-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.connection-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.connection-status.connected::before {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.connection-status.connected { color: var(--green); }
.connection-status.disconnected { color: var(--red); }

/* ============================================
   Sidebar Progress Indicator
   ============================================ */
.sidebar-progress {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    transition: opacity 0.6s ease;
}

.sidebar-progress.complete {
    opacity: 0.6;
}

.progress-track {
    height: 4px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-progress.complete .progress-fill {
    background: var(--green);
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--muted-foreground);
    letter-spacing: 0.01em;
}

.sidebar-progress.complete .progress-text {
    color: var(--green);
}

.progress-check {
    font-size: 0.6875rem;
    font-weight: 700;
}

.progress-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid var(--muted);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* ============================================
   Loading & Empty States
   ============================================ */
.loading-text {
    color: var(--muted-foreground);
    font-style: italic;
    padding: 3rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ============================================
   Dashboard Loading Skeleton
   ============================================ */
.dash-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.dash-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.dash-loading-text {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.dash-loading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .dash-loading-grid {
        grid-template-columns: 1fr;
    }
}

.skeleton-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    border-radius: calc(var(--radius) - 2px);
    background: linear-gradient(90deg, var(--border) 25%, var(--muted) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-title {
    height: 14px;
    width: 40%;
}

.skeleton-metrics {
    display: flex;
    gap: 0.75rem;
}

.skeleton-value {
    height: 28px;
    flex: 1;
}

.skeleton-bar {
    height: 6px;
    width: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--border) 25%, var(--muted) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

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

/* ============================================
   API Health Loading Skeleton
   ============================================ */
.api-health-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
}

.skeleton-tier {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-tier-title {
    height: 16px;
    width: 200px;
}

.skeleton-table {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.skeleton-row:last-child {
    border-bottom: none;
}

.skeleton-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-name {
    height: 14px;
    width: 120px;
}

.skeleton-port {
    height: 14px;
    width: 50px;
}

.skeleton-ms {
    height: 14px;
    width: 40px;
}

.skeleton-code {
    height: 14px;
    width: 30px;
}

.skeleton-action {
    height: 28px;
    width: 70px;
    border-radius: calc(var(--radius) - 2px);
}

/* ============================================
   Alerts Loading Skeleton
   ============================================ */
.alerts-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.alerts-skeleton .skeleton-card {
    padding: 1.25rem 1.5rem;
}

.skeleton-card-label {
    height: 12px;
    width: 60%;
    margin-bottom: 0.5rem;
}

.skeleton-card-value {
    height: 32px;
    width: 40%;
}

.skeleton-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-alert-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 3px solid var(--border);
    padding: 0.875rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-alert-header {
    height: 14px;
    width: 45%;
}

.skeleton-alert-message {
    height: 14px;
    width: 75%;
}

@media (max-width: 1024px) {
    .skeleton-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Critical Alert Bar (Sidebar)
   ============================================ */
.critical-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: oklch(0.25 0.08 25);
    border-bottom: 1px solid var(--red);
    animation: alert-pulse 2s infinite;
}

[data-theme="light"] .critical-alert {
    background: oklch(0.92 0.08 25);
}

@keyframes alert-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.alert-icon {
    color: var(--red);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.alert-text {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--red);
    flex: 1;
}

.btn-restart-sm {
    background: var(--red);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.btn-restart-sm:hover:not(:disabled) {
    opacity: 0.85;
}

.btn-restart-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Restart Buttons (API Health Page)
   ============================================ */
.btn-restart {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.2rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-restart:hover:not(:disabled) {
    background: var(--sidebar-hover);
}

.btn-restart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-restart-all {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border: none;
    border-radius: var(--radius);
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    font-family: inherit;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-restart-all:hover:not(:disabled) {
    opacity: 0.85;
}

.btn-restart-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.restart-result {
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    border-left: 3px solid var(--primary);
}

/* ============================================
   Restart Progress Panel (API Health Page)
   ============================================ */
.restart-progress-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.restart-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625rem;
}

.restart-progress-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.restart-progress-count {
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

.restart-track {
    height: 6px;
    margin-bottom: 0.625rem;
}

.restart-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.restart-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.restart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
}

.restart-item.success {
    color: var(--green);
}

.restart-item.failed {
    color: var(--red);
}

.restart-item-icon {
    font-weight: 700;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.restart-item-name {
    font-weight: 600;
    flex: 1;
}

.restart-item-tier {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--muted-foreground);
    opacity: 0.7;
}

/* ============================================
   Stop Buttons (API Health Page)
   ============================================ */
.btn-stop {
    padding: 0.25rem 0.75rem;
    background: oklch(0.45 0.15 25);
    color: oklch(0.95 0.02 85);
    border: 1px solid oklch(0.55 0.15 25);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.btn-stop:hover:not(:disabled) {
    background: oklch(0.55 0.18 25);
}

.btn-stop:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-stop-all {
    padding: 0.5rem 1.25rem;
    background: oklch(0.45 0.15 25);
    color: oklch(0.95 0.02 85);
    border: 1px solid oklch(0.55 0.15 25);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-stop-all:hover:not(:disabled) {
    background: oklch(0.55 0.18 25);
}

.btn-stop-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-stop-aspire {
    padding: 0.5rem 1.25rem;
    background: oklch(0.35 0.15 25);
    color: oklch(0.95 0.02 85);
    border: 2px solid oklch(0.50 0.20 25);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-stop-aspire:hover:not(:disabled) {
    background: oklch(0.50 0.20 25);
}

.btn-stop-aspire:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stop-result {
    padding: 0.75rem 1rem;
    background: oklch(0.20 0.05 25);
    border: 1px solid oklch(0.45 0.15 25);
    border-radius: 8px;
    color: oklch(0.85 0.05 85);
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

/* Start buttons */
.btn-start {
    background: oklch(0.35 0.12 145);
    color: oklch(0.92 0.02 145);
    border: 1px solid oklch(0.45 0.12 145);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-start:hover:not(:disabled) {
    background: oklch(0.42 0.14 145);
}
.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-start-all {
    background: oklch(0.35 0.12 145);
    color: oklch(0.92 0.02 145);
    border: 1px solid oklch(0.45 0.12 145);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-start-all:hover:not(:disabled) {
    background: oklch(0.42 0.14 145);
}
.btn-start-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Restart small button (per-row) */
.btn-restart-sm {
    background: oklch(0.35 0.12 60);
    color: oklch(0.92 0.02 60);
    border: 1px solid oklch(0.45 0.12 60);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-restart-sm:hover:not(:disabled) {
    background: oklch(0.42 0.14 60);
}
.btn-restart-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Start result message */
.start-result {
    background: oklch(0.20 0.05 145);
    border: 1px solid oklch(0.35 0.08 145);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: oklch(0.85 0.04 145);
}

/* Restart result message */
.restart-result {
    background: oklch(0.20 0.04 60);
    border: 1px solid oklch(0.35 0.06 60);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: oklch(0.85 0.03 60);
}

/* Action result (database page) */
.action-result {
    background: oklch(0.20 0.04 250);
    border: 1px solid oklch(0.35 0.06 250);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: oklch(0.85 0.03 250);
}

/* ============================================
   404 / Not Found
   ============================================ */
.not-found {
    text-align: center;
    padding: 6rem 2rem;
}

.not-found h1 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--muted-foreground);
    line-height: 1;
}

.not-found p {
    color: var(--muted-foreground);
    margin: 0.75rem 0 2rem;
    font-size: 0.9375rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: opacity 0.15s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
    }
    .admin-main {
        padding: 1.5rem 1.5rem;
    }
    .dash-grid,
    .summary-cards,
    .gauges-row {
        grid-template-columns: 1fr;
    }
    .dash-card-full {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .admin-shell {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
}

/* ============================================
   Login Page
   ============================================ */
.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--background);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
}

.login-subtitle {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
    display: block;
}

.login-error {
    background: var(--red-muted);
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-align: center;
}

.login-field {
    margin-bottom: 1rem;
}

.login-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.375rem;
}

.login-field input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px oklch(0.6352 0.1991 255.1217 / 0.25);
}

.login-btn {
    width: 100%;
    padding: 0.625rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--muted-foreground);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ============================================
   Sidebar Auth (user + logout)
   ============================================ */
.sidebar-user {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--foreground);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form {
    display: inline;
}

.btn-logout {
    background: transparent;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.15rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

.btn-logout:hover {
    background: var(--sidebar-hover);
    color: var(--foreground);
}

/* ============================================
   Alerts Page
   ============================================ */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1.25rem;
    border-left: 3px solid var(--border);
}

.alert-item.alert-critical {
    border-left-color: var(--red);
    background: var(--red-muted);
}

.alert-item.alert-warning {
    border-left-color: var(--yellow);
    background: var(--yellow-muted);
}

.alert-item.alert-info {
    border-left-color: var(--primary);
}

.alert-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
}

.alert-severity {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.alert-severity.critical {
    background: var(--red);
    color: white;
}

.alert-severity.warning {
    background: var(--yellow);
    color: oklch(0.15 0 0);
}

.alert-severity.info {
    background: var(--primary);
    color: white;
}

.alert-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.alert-time {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-left: auto;
}

.alert-message {
    font-size: 0.8125rem;
    color: var(--foreground);
    font-weight: 500;
}

.alert-detail {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Alert badge on sidebar nav */
.alert-badge {
    background: var(--red);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
    margin-left: auto;
}

/* Threshold configuration grid */
.threshold-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.threshold-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.625rem;
    background: var(--secondary);
    border-radius: calc(var(--radius) - 2px);
}

.threshold-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.threshold-value {
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--foreground);
}

/* ============================================
   Trend Indicators
   ============================================ */
.trend-indicator {
    font-size: 0.625rem;
    font-weight: 700;
    margin-left: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trend-indicator.up {
    color: var(--red);
    opacity: 1;
}

.trend-indicator.down {
    color: var(--green);
    opacity: 1;
}

.trend-indicator.stable {
    color: var(--muted-foreground);
    opacity: 0.6;
}

/* ============================================
   Blazor Error UI (ecosystem standard)
   ============================================ */
#blazor-error-ui {
    background: var(--destructive);
    color: var(--destructive-foreground);
    bottom: 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    display: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    text-align: center;
}

#blazor-error-ui .reload {
    color: var(--destructive-foreground);
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0.5rem;
}

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

/* ============================================
   Sidebar Section Labels
   ============================================ */
.sidebar-section-label {
    display: block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    padding: 0.75rem 1rem 0.25rem;
    opacity: 0.6;
}

/* ============================================
   Feature Flags Page
   ============================================ */
.feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.btn-create {
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-create:hover { opacity: 0.9; }
.btn-create:disabled { opacity: 0.5; cursor: not-allowed; }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.filter-select {
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
    font-family: inherit;
}

.filter-search {
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
    flex: 1;
    max-width: 250px;
}

.filter-search::placeholder { color: var(--muted-foreground); }

/* Scope Badges */
.scope-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scope-badge.global { background: oklch(0.55 0.15 250); color: white; }
.scope-badge.app { background: oklch(0.55 0.15 170); color: white; }
.scope-badge.tier { background: oklch(0.55 0.15 50); color: white; }
.scope-badge.user { background: oklch(0.55 0.15 310); color: white; }

/* Feature Toggle Switch */
.feature-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.feature-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    width: 32px;
    height: 18px;
    background: var(--muted);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s;
}

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

.feature-toggle input:checked + .toggle-slider {
    background: var(--green);
}

.feature-toggle input:checked + .toggle-slider::after {
    transform: translateX(14px);
}

.feature-toggle input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rollout Bar */
.rollout-bar {
    position: relative;
    width: 60px;
    height: 14px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}

.rollout-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s;
}

.rollout-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 14px;
}

/* Override Chips */
.override-counts {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.override-chip {
    display: inline-block;
    padding: 0.05rem 0.3rem;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 600;
}

.override-chip.app { background: oklch(0.55 0.15 170 / 0.2); color: oklch(0.7 0.15 170); }
.override-chip.tier { background: oklch(0.55 0.15 50 / 0.2); color: oklch(0.7 0.15 50); }
.override-chip.user { background: oklch(0.55 0.15 310 / 0.2); color: oklch(0.7 0.15 310); }

/* Feature Table enhancements */
.feature-table { width: 100%; }

.mono-text {
    font-family: 'Comfortaa', monospace;
    font-size: 0.6875rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0;
    text-align: left;
}

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

.btn-edit, .btn-delete {
    background: none;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.25rem;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover { color: var(--primary); border-color: var(--primary); }
.btn-delete:hover { color: var(--red); border-color: var(--red); }

.action-cell {
    display: flex;
    gap: 0.25rem;
}

.row-selected { background: oklch(0.25 0.02 250) !important; }

/* Detail Panel (expandable row) */
.detail-row td {
    padding: 0 !important;
}

.detail-panel {
    padding: 1rem 1.25rem;
    background: var(--secondary);
    border-top: 1px solid var(--border);
}

.detail-section {
    margin-bottom: 0.75rem;
}

.detail-section h4 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-desc {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin: 0 0 0.375rem;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.625rem;
    color: var(--muted-foreground);
}

/* Override List */
.override-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.override-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--background);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.6875rem;
}

.override-name {
    font-weight: 600;
    min-width: 80px;
}

.override-reason {
    color: var(--muted-foreground);
    font-size: 0.625rem;
    font-style: italic;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: auto;
    line-height: 1;
}

.btn-remove:hover { opacity: 0.7; }

/* Audit Timeline */
.audit-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.audit-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    border-left: 2px solid var(--border);
    padding-left: 0.625rem;
}

.audit-time {
    color: var(--muted-foreground);
    min-width: 80px;
    font-family: 'Comfortaa', monospace;
}

.audit-action {
    font-weight: 600;
    color: var(--foreground);
    min-width: 100px;
}

.audit-value {
    color: var(--muted-foreground);
    font-size: 0.5625rem;
}

.btn-sm {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    color: var(--foreground);
    cursor: pointer;
}

.btn-sm:hover { background: var(--muted); }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-card h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--foreground);
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-cancel {
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-cancel:hover { background: var(--muted); }

/* Operation Result Toast */
.operation-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.6875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.result-success {
    background: oklch(0.35 0.1 150);
    color: oklch(0.85 0.15 150);
    border: 1px solid oklch(0.45 0.1 150);
}

.result-error {
    background: oklch(0.35 0.1 25);
    color: oklch(0.85 0.15 25);
    border: 1px solid oklch(0.45 0.1 25);
}

.btn-dismiss {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    opacity: 0.7;
}

.btn-dismiss:hover { opacity: 1; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

/* Feature Skeleton (loading) */
.feature-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-skeleton .skeleton-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.feature-skeleton .skeleton-name { width: 120px; height: 14px; }
.feature-skeleton .skeleton-key { width: 100px; height: 14px; }
.feature-skeleton .skeleton-scope { width: 50px; height: 14px; }
.feature-skeleton .skeleton-toggle { width: 32px; height: 14px; }
.feature-skeleton .skeleton-pct { width: 60px; height: 14px; }
.feature-skeleton .skeleton-action { width: 60px; height: 14px; }

.text-muted { color: var(--muted-foreground); font-size: 0.625rem; }

/* ============================================
   Geo-Availability Matrix
   ============================================ */
.geo-matrix {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.geo-table {
    width: auto;
    min-width: 100%;
}

.geo-col-header {
    text-align: center;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 48px;
    padding: 0.375rem 0.25rem !important;
}

.geo-app-name {
    font-weight: 600;
    font-size: 0.6875rem;
    white-space: nowrap;
    min-width: 130px;
}

.geo-cell {
    text-align: center;
    padding: 0.25rem !important;
}

.geo-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.geo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.geo-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    transition: background 0.2s;
}

.geo-dot.available { background: var(--green); }
.geo-dot.unavailable { background: var(--red); opacity: 0.6; }
.geo-dot.planned { background: oklch(0.7 0.15 80); }
.geo-dot.empty { background: var(--muted); opacity: 0.3; }

.geo-cell.geo-available { background: oklch(0.2 0.05 150 / 0.15); }
.geo-cell.geo-unavailable { background: oklch(0.2 0.05 25 / 0.1); }
.geo-cell.geo-planned { background: oklch(0.2 0.05 80 / 0.1); }

.geo-legend {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.625rem;
    color: var(--muted-foreground);
}

.geo-legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.geo-legend .geo-dot {
    width: 10px;
    height: 10px;
}

.geo-seed-hint {
    text-align: center;
    padding: 1rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

/* ============================================
   API Tester
   ============================================ */
.tester-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    min-height: 500px;
}

.tester-sidebar {
    border-right: 1px solid var(--border);
    padding-right: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.tester-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.api-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.api-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    color: var(--foreground);
    font-size: 0.6875rem;
    text-align: left;
    transition: background 0.15s;
    width: 100%;
}

.api-list-item:hover { background: var(--secondary); }
.api-list-item.selected { background: var(--primary); color: var(--primary-foreground); }

.api-list-name { font-weight: 600; }
.api-list-port { font-size: 0.5625rem; opacity: 0.7; font-family: 'Comfortaa', monospace; }

/* Request Builder */
.request-builder {
    margin-bottom: 1rem;
}

.request-url-bar {
    display: flex;
    gap: 0.375rem;
    align-items: stretch;
}

.method-select {
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Comfortaa', monospace;
    min-width: 80px;
}

.url-input {
    flex: 1;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-family: 'Comfortaa', monospace;
}

.url-input:focus { outline: none; border-color: var(--primary); }

.btn-send {
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    min-width: 70px;
}

.btn-send:hover { opacity: 0.9; }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

.request-body-section {
    margin-top: 0.5rem;
}

.form-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.request-body-input {
    width: 100%;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.625rem;
    font-size: 0.6875rem;
    font-family: 'Comfortaa', monospace;
    resize: vertical;
}

/* Endpoint Shortcuts */
.endpoint-shortcuts {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.shortcuts-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    cursor: pointer;
    color: var(--foreground);
    transition: border-color 0.15s;
}

.shortcut-btn:hover { border-color: var(--primary); }

/* Method Badges */
.method-badge {
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: 'Comfortaa', monospace;
}

.method-badge.get { background: oklch(0.45 0.12 150); color: white; }
.method-badge.post { background: oklch(0.45 0.12 250); color: white; }
.method-badge.put { background: oklch(0.45 0.12 50); color: white; }
.method-badge.delete { background: oklch(0.45 0.12 25); color: white; }

/* Response Panel */
.response-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--secondary);
    border-bottom: 1px solid var(--border);
}

.response-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-family: 'Comfortaa', monospace;
}

.status-2xx { background: oklch(0.35 0.1 150); color: oklch(0.85 0.15 150); }
.status-3xx { background: oklch(0.35 0.1 250); color: oklch(0.85 0.15 250); }
.status-4xx { background: oklch(0.35 0.1 50); color: oklch(0.85 0.15 50); }
.status-5xx { background: oklch(0.35 0.1 25); color: oklch(0.85 0.15 25); }
.status-error { background: oklch(0.35 0.1 25); color: oklch(0.85 0.15 25); }

.response-time {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    font-family: 'Comfortaa', monospace;
}

.response-body-section {
    max-height: 400px;
    overflow: auto;
}

.response-body {
    padding: 0.75rem;
    font-size: 0.6875rem;
    font-family: 'Comfortaa', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--foreground);
    margin: 0;
    line-height: 1.5;
}

.error-text { color: var(--red); }

.response-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

/* Request History */
.request-history {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0.25rem 0.375rem;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    color: var(--foreground);
    font-size: 0.5625rem;
    text-align: left;
    width: 100%;
    transition: background 0.15s;
}

.history-item:hover { background: var(--secondary); }

.history-url {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Comfortaa', monospace;
}

.history-status {
    font-weight: 700;
    font-size: 0.5rem;
    padding: 0 0.2rem;
    border-radius: 2px;
}

.history-time {
    color: var(--muted-foreground);
    font-family: 'Comfortaa', monospace;
    font-size: 0.5rem;
}

/* ============================================
   Audit Log Table
   ============================================ */
.audit-table {
    width: 100%;
}

.audit-ts {
    white-space: nowrap;
    font-size: 0.625rem;
}

.audit-user {
    font-weight: 600;
    font-size: 0.6875rem;
}

.audit-action-badge {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 600;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
}

.audit-target {
    font-size: 0.6875rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-details {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
}

.page-info {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.page-size-select {
    width: auto;
    min-width: 55px;
}

/* ============================================
   Compliance Testing
   ============================================ */
.compliance-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.compliance-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-align: center;
}

.compliance-card-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    margin-bottom: 0.375rem;
}

.compliance-card-value {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.compliance-section {
    margin-bottom: 1.5rem;
}

.compliance-section-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

/* Domain Stats Grid */
.compliance-domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.compliance-domain-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
}

.domain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.domain-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--foreground);
    text-transform: capitalize;
}

.domain-stats-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.domain-stat {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.domain-pass-bar {
    height: 4px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}

.domain-pass-fill {
    height: 100%;
    background: var(--green);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.domain-badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: capitalize;
    background: oklch(0.3 0.06 250);
    color: oklch(0.8 0.1 250);
}

/* Compliance Badges */
.compliance-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-passed {
    background: oklch(0.35 0.1 150);
    color: oklch(0.85 0.15 150);
}

.badge-failed {
    background: oklch(0.35 0.1 25);
    color: oklch(0.85 0.15 25);
}

.badge-lg {
    font-size: 0.75rem;
    padding: 0.2rem 0.75rem;
}

/* Step Indicators (in table row) */
.step-indicators {
    display: flex;
    gap: 0.2rem;
}

.step-dot {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 700;
}

.step-dot.step-ok {
    background: oklch(0.35 0.1 150);
    color: oklch(0.85 0.15 150);
}

.step-dot.step-fail {
    background: oklch(0.35 0.1 25);
    color: oklch(0.85 0.15 25);
}

/* Compliance Test Button */
.btn-compliance-test {
    background: oklch(0.35 0.12 250);
    color: oklch(0.9 0.05 250);
    border: 1px solid oklch(0.45 0.12 250);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.15s;
}

.btn-compliance-test:hover:not(:disabled) {
    background: oklch(0.45 0.14 250);
}

.btn-compliance-test:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Untested Features */
.untested-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.untested-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--yellow);
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.untested-name {
    font-weight: 600;
    color: var(--foreground);
    min-width: 150px;
}

.untested-key {
    color: var(--muted-foreground);
    min-width: 140px;
}

.untested-domain {
    color: var(--muted-foreground);
    text-transform: capitalize;
    min-width: 80px;
}

/* Compliance Detail Modal */
.compliance-detail-modal {
    max-width: 600px;
}

.compliance-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.compliance-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.625rem;
    color: var(--muted-foreground);
}

/* Compliance Steps */
.compliance-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.compliance-step {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.compliance-step.step-passed {
    border-left: 3px solid var(--green);
}

.compliance-step.step-failed {
    border-left: 3px solid var(--red);
}

.compliance-step.step-skipped {
    border-left: 3px solid var(--muted-foreground);
    opacity: 0.6;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    background: var(--secondary);
}

.step-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--foreground);
    flex-shrink: 0;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    flex: 1;
}

.step-status {
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: 'Comfortaa', monospace;
    color: var(--muted-foreground);
}

.step-response {
    padding: 0.5rem 0.75rem;
    font-size: 0.625rem;
    font-family: 'Comfortaa', monospace;
    color: var(--muted-foreground);
    background: var(--background);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
    margin: 0;
}

/* Compliance Checkbox */
.compliance-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--foreground);
    cursor: pointer;
}

.compliance-checkbox input {
    accent-color: var(--primary);
}

/* Compliance Table */
.compliance-table .compliance-feature-name {
    font-weight: 600;
    font-size: 0.75rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Compliance Pagination */
.compliance-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
    .compliance-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .compliance-domain-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Release Management
   ============================================ */

.release-section {
    margin-bottom: 1.5rem;
}

.release-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.release-section-header h2 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
}

.release-active-deployment {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.active-deploy-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.active-deploy-header strong {
    color: var(--accent);
    font-size: 0.8125rem;
}

.deploy-actor {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.deploy-elapsed {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-left: auto;
}

.active-deploy-jobs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.deploy-job {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.6875rem;
    background: var(--muted);
}

.deploy-job-icon { font-size: 0.75rem; }
.deploy-job-name { font-weight: 500; }
.deploy-job-duration { color: var(--muted-foreground); }

.job-success { border-left: 2px solid var(--green); }
.job-failure { border-left: 2px solid var(--red); background: rgba(239, 68, 68, 0.08); }
.job-running { border-left: 2px solid var(--accent); }
.job-pending { border-left: 2px solid var(--muted-foreground); opacity: 0.7; }

.release-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.release-notification.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--green);
}

.release-notification.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
}

.build-status-icon {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.build-status-text {
    font-size: 0.6875rem;
    text-transform: capitalize;
}

.commit-sha {
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.btn-deploy-sm {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 0.25rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-deploy-sm:hover { opacity: 0.9; }
.btn-deploy-sm:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-deploy {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-deploy:hover { opacity: 0.9; }
.btn-deploy:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger-sm {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    padding: 0.25rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-danger-sm:hover { background: rgba(239, 68, 68, 0.1); }
.btn-danger-sm:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-link-sm {
    color: var(--muted-foreground);
    font-size: 0.6875rem;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    transition: color 0.15s;
}

.btn-link-sm:hover { color: var(--foreground); }

.row-active td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

.last-updated {
    color: var(--muted-foreground);
    font-size: 0.6875rem;
    margin-left: 0.75rem;
}

/* ============================================
   Role Badge — ReadOnlyAdmin indicator
   ============================================ */
.role-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
    margin-left: 0.375rem;
}

.role-badge.read-only {
    background: rgba(250, 204, 21, 0.15);
    color: var(--yellow);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

[data-theme="light"] .role-badge.read-only {
    background: rgba(202, 138, 4, 0.1);
    color: #92400e;
    border: 1px solid rgba(202, 138, 4, 0.3);
}
