/* ============================================
   YoPedia - Design System
   shadcn/ui — 2 Colors (Blue + Slate)
   ============================================ */

/* Google Fonts - Loaded asynchronously via HTML link tag for better PageSpeed performance */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap'); */

/* ============ CSS Variables / Tokens ============ */
:root {
    /* ── Primary: Blue ── */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-foreground: #ffffff;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;

    /* ── Neutrals: Slate ── */
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --popover: #ffffff;
    --popover-foreground: #0f172a;
    --secondary: #f8fafc;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #475569;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #2563eb;
    --destructive: #dc2626;
    --destructive-foreground: #ffffff;

    /* ── Status ── */
    --success: #16a34a;
    --success-light: #f0fdf4;
    --success-border: #bbf7d0;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --info: #2563eb;
    --info-light: #eff6ff;
    --info-border: #bfdbfe;

    /* ── Radius ── */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

    /* ── Layout ── */
    --sidebar-width: 256px;
    --topbar-height: 60px;

    /* ── Transitions ── */
    --transition: all 0.15s ease;
    --transition-slow: all 0.3s ease;

    /* ── Skeleton ── */
    --skeleton-base: #e2e8f0;
    --skeleton-shine: #f8fafc;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-foreground: #ffffff;
    --primary-light: rgba(59, 130, 246, 0.12);
    --primary-border: rgba(59, 130, 246, 0.3);
    --background: #09090b;
    --foreground: #fafafa;
    --card: #0c0c0e;
    --card-foreground: #fafafa;
    --popover: #0c0c0e;
    --popover-foreground: #fafafa;
    --secondary: #18181b;
    --secondary-foreground: #fafafa;
    --muted: #18181b;
    --muted-foreground: #a1a1aa;
    --accent: #1c1c1f;
    --accent-foreground: #fafafa;
    --border: #27272a;
    --input: #27272a;
    --ring: #3b82f6;
    --destructive: #ef4444;
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.12);
    --success-border: rgba(34, 197, 94, 0.25);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.25);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.25);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.12);
    --info-border: rgba(59, 130, 246, 0.25);
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    --skeleton-base: #27272a;
    --skeleton-shine: #3f3f46;
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============ Typography ============ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--foreground);
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-muted {
    color: var(--muted-foreground);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* ============ Container ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-md {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-lg {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-xl {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============ Flex & Grid Utilities ============ */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.flex-1 {
    flex: 1;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    .grid>* {
        grid-column: span 1 !important;
    }
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* ============ Spacing ============ */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

/* ============ Card ============ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

.card-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* ============ Button ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--primary-foreground);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--accent);
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background: var(--accent);
}

.btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-destructive:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

/* ============ Form Controls ============ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--foreground);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--background);
    color: var(--foreground);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    transition: var(--transition);
    line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--muted-foreground);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

/* ============ Badge ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
    border-color: var(--info);
}

.badge-secondary {
    background: var(--secondary);
    color: var(--muted-foreground);
    border-color: var(--border);
}

/* ============ Table ============ */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background: var(--muted);
    font-weight: 500;
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--muted);
}

/* ============ Alert ============ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--success-light);
    border-color: var(--success);
    color: #15803d;
}

.alert-error {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #b91c1c;
}

.alert-warning {
    background: var(--warning-light);
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: #1d4ed8;
}

[data-theme="dark"] .alert-success {
    color: var(--success);
}

[data-theme="dark"] .alert-error {
    color: var(--danger);
}

[data-theme="dark"] .alert-warning {
    color: var(--warning);
}

[data-theme="dark"] .alert-info {
    color: var(--info);
}

/* ============ Stat Card ============ */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
    margin-top: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

/* ============ Pagination ============ */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--foreground);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--accent);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* ============ Empty State ============ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    max-width: 400px;
}

/* ============ Code Block ============ */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    overflow-x: auto;
    position: relative;
}

[data-theme="dark"] .code-block {
    background: #0c0c0d;
    border: 1px solid var(--border);
}

.code-block .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block .code-lang {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.code-block .code-copy {
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

.code-block .code-copy:hover {
    color: #ffffff;
}

.code-string {
    color: #a5d6ff;
}

.code-keyword {
    color: #ff7b72;
}

.code-comment {
    color: #8b949e;
}

.code-number {
    color: #79c0ff;
}

/* ============ Divider ============ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ============ Modal Overlay ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    cursor: pointer;
    color: var(--muted-foreground);
    background: none;
    border: none;
    font-size: 1.25rem;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--foreground);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hide-xs {
        display: none !important;
    }
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(110%);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Staggered animations */
.stagger>* {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

.stagger>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger>*:nth-child(6) {
    animation-delay: 0.3s;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}


/* ============ Selection ============ */
::selection {
    background: var(--primary);
    color: var(--primary-foreground);
}

/* ============ Skeleton Loading ============ */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--skeleton-base) 25%,
            var(--skeleton-shine) 50%,
            var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 0.875rem;
    border-radius: var(--radius-sm);
}

.skeleton-title {
    height: 1.25rem;
    border-radius: var(--radius-sm);
}

.skeleton-h1 {
    height: 1.75rem;
    border-radius: var(--radius-sm);
}

.skeleton-avatar {
    border-radius: 50%;
}

.skeleton-card {
    border-radius: var(--radius-lg);
}

.skeleton-btn {
    height: 2.25rem;
    border-radius: var(--radius);
}

.skeleton-badge {
    height: 1.375rem;
    width: 4.5rem;
    border-radius: var(--radius-full);
}

/* skeleton stat card */
.skeleton-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

/* skeleton table row */
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.skeleton-row:last-child {
    border-bottom: none;
}

/* ============ Logo SVG inline ============ */
.brand-logo-svg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--foreground);
}

.brand-logo-svg .logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: var(--radius);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.brand-logo-svg .logo-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
}

.brand-logo-svg .logo-text {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--foreground);
}

.brand-logo-svg .logo-text span {
    color: var(--primary);
}

/* ============ Badge overrides (tighter) ============ */
.badge {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success-border);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-color: var(--warning-border);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger-border);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
    border-color: var(--info-border);
}

/* ============ Card micro polish ============ */
.card {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    border-color: var(--primary-border);
}

/* ============ Stat card ============ */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    gap: 0.75rem;
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-border);
}

.stat-card .stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
}

.stat-card .stat-delta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}