:root {
    color-scheme: light;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    --bg-app: #f4f6fb;
    --bg-app-alt: #e9eef8;
    --bg-surface: #ffffff;
    --bg-surface-muted: rgba(255, 255, 255, 0.7);
    --bg-elevated: #fefefe;
    --text-primary: #0f172a;
    --text-secondary: #4b5565;
    --text-muted: #7b8297;
    --text-inverse: #f8fafc;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.16);
    --accent-gradient: linear-gradient(135deg, #2563eb, #7c3aed);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --border-color: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.2);
    --glass: rgba(255, 255, 255, 0.65);
    --card-blur: 24px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.16);
    --transition-base: 200ms ease;
}

.dark-mode {
    color-scheme: dark;
    --bg-app: #050608;
    --bg-app-alt: #0f1623;
    --bg-surface: #121824;
    --bg-surface-muted: rgba(18, 24, 36, 0.72);
    --bg-elevated: #1a2233;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-inverse: #0f172a;
    --accent: #60a5fa;
    --accent-strong: #3b82f6;
    --accent-soft: rgba(96, 165, 250, 0.16);
    --accent-gradient: linear-gradient(135deg, #3b82f6, #a855f7);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #38bdf8;
    --border-color: rgba(148, 163, 184, 0.2);
    --border-strong: rgba(148, 163, 184, 0.35);
    --glass: rgba(18, 24, 36, 0.72);
    --shadow-sm: 0 8px 22px rgba(3, 7, 18, 0.65);
    --shadow-md: 0 18px 40px rgba(3, 7, 18, 0.55);
    --shadow-lg: 0 28px 60px rgba(3, 7, 18, 0.5);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-app) 0%, var(--bg-app-alt) 60%, var(--bg-app) 100%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background 0.4s ease, color 0.2s ease;
}

/* Ensure all headings and text elements have proper font declarations */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p, span, div, li, td, th {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--text-primary);
}

.dark-mode p,
.dark-mode span:not(.badge):not(.chip):not(.meta-pill),
.dark-mode div:not(.badge):not(.chip):not(.meta-pill),
.dark-mode li,
.dark-mode td,
.dark-mode th {
    color: var(--text-primary);
}

strong, b {
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    font-family: var(--font-sans);
    font-weight: 500;
}

/* Ensure text utility classes have proper contrast */
.text-muted {
    color: var(--text-muted) !important;
}

.dark-mode .text-muted {
    color: var(--text-secondary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.dark-mode .text-secondary {
    color: var(--text-secondary) !important;
}

.small {
    color: var(--text-secondary) !important;
}

.dark-mode .small {
    color: var(--text-secondary) !important;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover,
a:focus-visible {
    color: var(--accent-strong);
}

img {
    max-width: 100%;
    display: block;
}

button:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-shell {
    position: relative;
    min-height: 100vh;
    padding: 1.25rem;
}

@media (max-width: 768px) {
    .app-shell {
        padding: 0.5rem;
    }
}

.app-header {
    position: sticky;
    top: 0.75rem;
    z-index: 1030;
}

.app-navbar {
    border-radius: var(--radius-lg);
    background: var(--bg-surface-muted);
    backdrop-filter: blur(var(--card-blur));
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 0.875rem 1.25rem;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
    overflow: visible;
}

.app-navbar .container-fluid {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.25rem;
    min-width: 0;
    width: 100%;
}

.app-navbar .navbar-collapse {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (min-width: 992px) {
    .app-navbar .navbar-collapse {
        display: flex !important;
    }
}

.dark-mode .app-navbar {
    border-color: rgba(255, 255, 255, 0.08);
}

.app-navbar .navbar-toggler {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface);
    transition: all var(--transition-base);
}

.app-navbar .navbar-toggler:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.app-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.app-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dark-mode .app-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-body {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

@media (max-width: 991px) {
    .nav-body {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.brand-link:hover {
    transform: translateX(-2px);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: grid;
    place-items: center;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.brand-link:hover .brand-mark {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.2;
    font-family: var(--font-sans);
}

.dark-mode .brand-title {
    color: var(--text-secondary);
}

.brand-subtitle {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.dark-mode .brand-subtitle {
    color: var(--text-primary);
}

.modern-nav {
    gap: 0.25rem;
    margin: 0;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modern-nav::-webkit-scrollbar {
    display: none;
}

@media (min-width: 992px) {
    .modern-nav {
        flex-wrap: nowrap;
        overflow-x: visible;
        flex: 0 0 auto;
        gap: 0.5rem;
    }
}

@media (max-width: 991px) {
    .modern-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

.modern-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6875rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    will-change: background-color, transform;
}

.dark-mode .modern-nav .nav-link {
    color: var(--text-primary) !important;
}

.dark-mode .modern-nav .nav-link:hover,
.dark-mode .modern-nav .nav-link.active {
    color: var(--text-primary) !important;
}

.modern-nav .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modern-nav .nav-link:hover,
.modern-nav .nav-link:focus-visible {
    color: var(--text-primary) !important;
    background: var(--bg-surface);
}

.modern-nav .nav-link:hover::before,
.modern-nav .nav-link:focus-visible::before {
    opacity: 0.5;
}

.modern-nav .nav-link.active {
    color: var(--accent-strong) !important;
    background: var(--accent-soft);
    font-weight: 600;
}

.modern-nav .nav-link.active::before {
    opacity: 0;
}

.modern-nav .nav-link > * {
    position: relative;
    z-index: 1;
}

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.85;
    transition: opacity var(--transition-base);
    flex-shrink: 0;
}

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

.dark-mode .nav-icon {
    opacity: 0.9;
}

.theme-toggle {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-surface);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}

.dark-mode .theme-toggle {
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.dark-mode .theme-toggle:hover {
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.25);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Light mode: show moon icon (to switch to dark), hide sun */
.theme-toggle .icon-sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.3);
    visibility: hidden;
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    visibility: visible;
}

/* Dark mode: show sun icon (to switch to light), hide moon */
.dark-mode .theme-toggle .icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    visibility: visible;
}

.dark-mode .theme-toggle .icon-moon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.3);
    visibility: hidden;
}

/* Hover animation */
.theme-toggle:hover .icon-sun {
    transform: translate(-50%, -50%) rotate(15deg) scale(1.05);
}

.theme-toggle:hover .icon-moon {
    transform: translate(-50%, -50%) rotate(-15deg) scale(1.05);
}

.nav-utilities {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-top: 0;
    margin-left: 0;
    min-height: 40px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    min-width: 0;
}

.nav-utilities::before {
    content: '';
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin-right: 0.5rem;
    opacity: 0.25;
}

.nav-utilities > * {
    height: 40px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 40px;
}

.nav-utilities .d-flex {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    height: 40px;
    flex-shrink: 0;
}

.nav-utilities .user-greeting {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dark-mode .nav-utilities .user-greeting {
    color: var(--text-secondary);
}

.command-launcher {
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.4rem 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent-strong);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    height: 40px;
    font-size: 0.8125rem;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
    will-change: transform;
}

.dark-mode .command-launcher {
    background: rgba(96, 165, 250, 0.2);
    color: var(--text-primary);
}

.command-launcher:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}


@media (min-width: 992px) {
    .nav-utilities {
        margin-top: 0;
        justify-content: flex-end;
        gap: 0.5rem;
        align-items: center;
    }
    
    .nav-utilities > * {
        height: 40px;
    }
    
    .nav-utilities .d-flex {
        height: 40px;
    }
}

@media (max-width: 991px) {
    .nav-utilities {
        flex-wrap: wrap;
        margin-top: 1rem;
    }
}

.nav-utilities .btn {
    border-radius: 999px;
    padding: 0 0.875rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    font-family: var(--font-sans);
    height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: fit-content;
    line-height: 1;
}

.nav-utilities .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 999px;
}

.nav-utilities .btn:active {
    transform: translateY(0) scale(0.97);
}

.nav-utilities .btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.nav-utilities .btn-outline-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nav-utilities .btn-outline-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--accent);
    color: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15);
}

.nav-utilities .btn-outline-secondary:hover::before {
    opacity: 0.05;
}

.dark-mode .nav-utilities .btn-outline-secondary {
    color: var(--text-primary);
    border-color: rgba(148, 163, 184, 0.2);
    background: var(--bg-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark-mode .nav-utilities .btn-outline-secondary:hover {
    color: var(--accent);
    background: var(--bg-surface);
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(96, 165, 250, 0.25);
}

.nav-utilities .btn-soft-primary {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-utilities .btn-soft-primary:hover {
    background: var(--accent);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    border-color: transparent;
}

.nav-utilities .btn-soft-primary:hover::before {
    opacity: 0;
}

.dark-mode .nav-utilities .btn-soft-primary {
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: 0 2px 5px rgba(96, 165, 250, 0.2);
}

.dark-mode .nav-utilities .btn-soft-primary:hover {
    background: var(--accent);
    color: var(--text-inverse);
    box-shadow: 0 5px 16px rgba(96, 165, 250, 0.35);
}

.year-select {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 1.125rem 0 0.875rem;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    height: 40px;
    min-width: 70px;
    font-family: var(--font-sans);
    flex-shrink: 0;
    cursor: pointer;
}

.year-select:hover {
    border-color: var(--accent);
    background: var(--bg-surface);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.dark-mode .year-select {
    border-color: rgba(148, 163, 184, 0.25);
}

.dark-mode .year-select:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

.year-select select {
    border: none;
    background: transparent;
    color: inherit;
    font-weight: 600;
    outline: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding-right: 1.25rem;
}

.year-select::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.625rem;
    color: var(--accent);
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.year-select:hover::after {
    opacity: 1;
    color: var(--accent-strong);
}

.year-select:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark-mode .year-select:focus-within {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.app-main {
    padding: 2rem 0 3.5rem;
}

.cta-ribbon {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    align-items: center;
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.cta-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.container-xl {
    max-width: 1260px;
}

.page-hero {
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
    pointer-events: none;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.82;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin: 0.5rem 0 1rem;
    line-height: 1.15;
}

.hero-subtitle {
    max-width: 620px;
    font-size: 1.05rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.25);
    font-size: 0.9rem;
    font-weight: 500;
}

.content-section {
    margin-top: 2.25rem;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 500;
}

.dark-mode .section-subtitle {
    color: var(--text-secondary);
}

.surface-card,
.glass-panel {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.dark-mode .surface-card,
.dark-mode .glass-panel {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.surface-card *:not(.badge):not(.chip):not(.meta-pill):not(.btn):not(.badge-pill),
.glass-panel *:not(.badge):not(.chip):not(.meta-pill):not(.btn):not(.badge-pill) {
    color: inherit;
}

.content-frame {
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: clamp(1.25rem, 2vw, 2rem);
    box-shadow: var(--shadow-md);
}

.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flash-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.1rem;
    font-weight: 500;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.flash-card.flash-success {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.flash-card.flash-error,
.flash-card.flash-danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.search-panel .search-bar {
    gap: 1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.filter-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 0.9rem;
}

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

.filter-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pill {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 0.3rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-pill.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.search-result-card mark {
    background-color: rgba(255, 208, 0, 0.35);
    padding: 0 0.15rem;
    border-radius: 4px;
}

.preview-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.preference-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.preference-header h5 {
    margin-bottom: 0.25rem;
}

.preference-block {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.preference-block:first-of-type {
    border-top: none;
    padding-top: 0;
}

.dark-mode .surface-card h1,
.dark-mode .surface-card h2,
.dark-mode .surface-card h3,
.dark-mode .surface-card h4,
.dark-mode .surface-card h5,
.dark-mode .surface-card h6,
.dark-mode .surface-card p,
.dark-mode .surface-card span:not(.badge):not(.chip):not(.meta-pill):not(.badge-pill),
.dark-mode .surface-card div:not(.badge):not(.chip):not(.meta-pill):not(.badge-pill) {
    color: var(--text-primary);
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(var(--card-blur));
}

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

.kpi-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.08));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.kpi-card:hover::after {
    opacity: 1;
}

.kpi-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.kpi-value {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 600;
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.trend-up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.trend-down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

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

.insight-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--glass);
    backdrop-filter: blur(var(--card-blur));
    border: 1px solid var(--border-color);
    min-height: 200px;
}

.chart-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.chart-card canvas {
    width: 100% !important;
}

.chart-container {
    position: relative;
    height: 320px;
}

.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.keyword-tag {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-strong);
    font-weight: 500;
    transition: transform var(--transition-base), border var(--transition-base);
}

.keyword-tag:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.list-toolbar {
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: transparent;
}

.chip.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.result-stack {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.result-card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    color: var(--text-primary);
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.result-card * {
    color: inherit;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.6rem 0 0.9rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.dark-mode .result-meta {
    color: var(--text-secondary);
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 500;
    font-size: 0.85rem;
}

.meta-pill.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.meta-pill.is-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.empty-state {
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-surface);
}

.dark-mode .empty-state {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.table-modern thead th {
    background: var(--bg-surface-muted);
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--border-color);
}

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

.calendar-table {
    box-shadow: var(--shadow-sm);
}

.calendar-cell {
    min-width: 220px;
}

.calendar-event {
    border-radius: var(--radius-sm);
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.calendar-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.calendar-badge.talk {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-strong);
}

.calendar-badge.poster {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.calendar-badge.general {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

.sticky-panel {
    position: sticky;
    top: 6.5rem;
}

.optimizer-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.optimizer-card .card-header {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    border: none;
}

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

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.metric-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-strong);
    margin: 0.5rem 0;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-bar-container {
    margin-top: 0.5rem;
    height: 8px;
    background: var(--table-hover-bg);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00c6ff);
    transition: width 0.5s ease;
}

.metric-block {
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.metric-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.refinement-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.refinement-btn {
    border-radius: 999px;
    padding: 0.45rem 1.25rem;
    border: 1px solid var(--border-color);
    background: transparent;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.refinement-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.event-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-surface);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
    color: var(--text-primary);
}

.event-card *:not(.badge):not(.chip):not(.meta-pill):not(.btn) {
    color: inherit;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--accent-soft);
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

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

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

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--table-hover-bg) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
}

.skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
}

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

.timeline-container {
    position: relative;
    padding-left: 1rem;
}

.timeline-day {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.timeline-day-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.timeline-day-header .badge {
    font-size: 0.8rem;
}

.timeline-events {
    position: relative;
    padding: 1.5rem;
}

.timeline-line {
    position: absolute;
    left: 3rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: var(--border-color);
}

.timeline-event {
    position: relative;
    padding-left: 4.5rem;
    margin-bottom: 1.5rem;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: 2.85rem;
    top: 0.75rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.walking-time-badge {
    position: absolute;
    left: 0;
    top: 0.5rem;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.75rem;
}

.poster-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.poster-actions .btn {
    flex: 1;
    min-width: 130px;
}

.validation-warnings {
    margin-top: 1rem;
}

.warning-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.warning-item.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.sticky-controls {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: var(--bg-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

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

.profile-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-family: var(--font-display);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pill.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-pill.info {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

.status-pill.muted {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.btn-soft-primary {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}

.btn-soft-primary:hover {
    background: rgba(37, 99, 235, 0.2);
}

.btn-ghost {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 0.45rem 1.1rem;
    color: var(--text-secondary);
}

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

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.list-divider {
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

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

.poster-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-primary);
}

.poster-card *:not(.badge):not(.chip):not(.meta-pill):not(.btn) {
    color: inherit;
}

.poster-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.poster-card .badge {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}

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

.directory-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.directory-card h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

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

.podium-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.podium-card.gold {
    border-color: rgba(234, 179, 8, 0.4);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), transparent);
}

.podium-card.silver {
    border-color: rgba(148, 163, 184, 0.4);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.18), transparent);
}

.podium-card.bronze {
    border-color: rgba(248, 113, 113, 0.4);
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.15), transparent);
}

.form-control,
.form-select,
.input-group-text {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0.6rem 0.9rem;
    font-family: var(--font-sans);
    font-weight: 400;
}

.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .input-group-text {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.dark-mode .form-control::placeholder {
    color: var(--text-muted);
}

.footer {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.global-footer {
    margin-top: 3rem;
    border-radius: var(--radius-lg);
    padding: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.global-footer .container-xl {
    padding: 2.5rem;
}

.footer-cta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    margin-bottom: 2.5rem;
}

.dark-mode .footer-cta {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(168, 85, 247, 0.18));
    border-color: rgba(255, 255, 255, 0.08);
}

.cta-copy h2 {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.cta-copy p {
    max-width: 520px;
    color: var(--text-secondary);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
}

.footer-metrics .metric {
    flex: 1;
    min-width: 120px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
}

.dark-mode .footer-metrics .metric {
    border-color: rgba(96, 165, 250, 0.35);
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-form {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.footer-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-feedback {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.footer-feedback-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.footer-feedback-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(140px, 1fr)) minmax(280px, 1.5fr);
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2.5rem;
    align-items: start;
}

.footer-logo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    grid-column: 2 / 5;
    grid-row: 2;
    margin-top: 1rem;
    width: 100%;
}

.footer-brand {
    grid-row: 1 / 3;
}

.footer-connect-col {
    grid-row: 1 / 3;
}

.footer-column h6 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-base);
}

.footer-column ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    display: inline-block;
    transition: background var(--transition-base);
}

.footer-column ul li a:hover {
    color: var(--accent-strong);
}

.footer-column ul li a:hover::before {
    background: var(--accent-strong);
}

.footer-brand .brand-link {
    padding: 0;
    border: none;
    box-shadow: none;
}

.footer-accreditations {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-chip-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-primary);
    transition: all var(--transition-base);
    text-decoration: none;
}

/* Hide platform name text, show icon instead */
.social-chip > span:first-child {
    display: none !important;
}

/* Add icons before username */
.social-chip[href*="twitter"]::before,
.social-chip[href*="x.com"]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23475569' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.social-chip[href*="linkedin"]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23475569' d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.social-chip[href*="github"]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23475569' d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.social-chip:hover::before {
    opacity: 1;
}

.dark-mode .social-chip::before {
    filter: brightness(0) saturate(100%) invert(0.85);
    opacity: 0.8;
}

.dark-mode .social-chip:hover::before {
    filter: brightness(0) saturate(100%) invert(1);
    opacity: 1;
}

/* Style the username text in social chips */
.social-chip > span.text-muted {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    flex-shrink: 1;
    min-width: 0;
    font-size: 0.875rem;
}

.dark-mode .social-chip {
    background: rgba(96, 165, 250, 0.12);
}

.social-chip:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    box-shadow: var(--shadow-sm);
}

.icon-pill {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.dark-mode .icon-pill {
    background: rgba(255, 255, 255, 0.05);
}

.social-chip:hover .icon-pill {
    background: var(--bg-surface);
    color: var(--accent);
}

.social-chip i {
    width: 16px;
    height: 16px;
}

.chip-label {
    font-weight: 600;
    display: block;
    line-height: 1.2;
    font-size: 0.9rem;
}

.chip-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

.footer-contact-card {
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-surface), rgba(37, 99, 235, 0.03));
    color: var(--text-secondary);
}

.contact-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.footer-contact-card p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.footer-logo-gallery img {
    height: 100px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.footer-logo-gallery img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.dark-mode .footer-logo-gallery img {
    opacity: 0.6;
    filter: grayscale(100%) invert(1) brightness(2);
}

.dark-mode .footer-logo-gallery img:hover {
    opacity: 1;
    filter: grayscale(0%) invert(1) brightness(2);
}

.footer-logo-gallery img:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-bottom-links a:hover {
    color: var(--accent-strong);
}

@media (max-width: 768px) {
    .global-footer .container-xl {
        padding: 1.5rem;
    }

    .footer-cta {
        padding: 1.5rem;
    }

    .footer-form {
        padding: 1rem;
    }

    .footer-metrics {
        flex-direction: column;
    }
    
    .social-chip-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-logo-gallery {
        grid-column: auto;
        grid-row: auto;
        margin-top: 1.5rem;
        justify-content: flex-start;
        gap: 1.25rem;
        width: 100%;
    }
    
    .footer-brand,
    .footer-connect-col {
        grid-row: auto;
    }
    
    .footer-logo-gallery img {
        height: 36px;
    }
}

.search-panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.search-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    background: var(--bg-surface);
}

.search-field input {
    border: none;
    background: transparent;
    width: 100%;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-field button {
    border-radius: var(--radius-md);
}

.field-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.poster-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge-pill {
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dark-mode .badge-pill {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
}

.back-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.detail-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.detail-card *:not(.badge):not(.chip):not(.meta-pill):not(.btn) {
    color: inherit;
}

.detail-card h5 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.detail-card p {
    margin-bottom: 0.4rem;
}

.abstract-content {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    background: var(--bg-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.keyword-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.keyword-chip {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.link-set {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-set .btn {
    min-width: 140px;
}

.list-group-modern .list-group-item {
    border: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: var(--bg-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.list-group-modern .list-group-item:hover {
    background: var(--accent-soft);
}

/* Bootstrap list-group-item dark mode fixes */
.list-group-item {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.dark-mode .list-group-item {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-group-flush .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}

.dark-mode .list-group-flush .list-group-item {
    border-color: var(--border-color);
}

.list-group-item a {
    color: var(--text-primary);
    text-decoration: none;
}

.dark-mode .list-group-item a {
    color: var(--text-primary);
}

.list-group-item a:hover {
    color: var(--accent);
}

.dark-mode .list-group-item a:hover {
    color: var(--accent);
}

.list-group-item:hover {
    background-color: var(--accent-soft);
    border-color: var(--border-color);
}

.dark-mode .list-group-item:hover {
    background-color: var(--accent-soft);
}

.list-group-item:focus {
    background-color: var(--accent-soft);
    border-color: var(--accent);
}

.dark-mode .list-group-item:focus {
    background-color: var(--accent-soft);
    border-color: var(--accent);
}

.alert-modern {
    border-radius: var(--radius-md);
    border: 1px solid rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.15);
    color: #854d0e;
    padding: 1rem 1.25rem;
}

.alert-modern.info {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.12);
    color: #0c4a6e;
}

.empty-illustration {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: var(--accent-soft);
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    color: var(--accent-strong);
}

.modal-event-preview {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1rem;
    background: var(--bg-surface);
    transition: border var(--transition-base), transform var(--transition-base);
}

.modal-event-preview:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Pagination dark mode fixes */
.page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.dark-mode .page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.page-link:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.dark-mode .page-link:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverse);
}

.page-item.disabled .page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-muted);
    opacity: 0.6;
}

.dark-mode .page-item.disabled .page-link {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .modern-nav {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .brand-text {
        display: none;
    }
    
    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .page-hero {
        padding: 1.5rem;
    }

    .app-navbar {
        padding: 0.65rem 1rem;
    }

    .nav-utilities {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-utilities > * {
        height: 40px;
    }
    
    .nav-utilities .btn {
        flex: 0 1 auto;
        min-width: fit-content;
        padding: 0 0.875rem;
        font-size: 0.85rem;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .year-select {
        padding: 0 1.125rem 0 0.875rem;
        font-size: 0.8125rem;
        height: 40px;
        min-width: 70px;
    }
    
    .year-select select {
        font-size: 0.875rem;
    }
    
    .year-select::after {
        right: 0.75rem;
        font-size: 0.625rem;
    }

    .list-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-event {
        padding-left: 2.5rem;
    }

    .timeline-line {
        left: 1.1rem;
    }

    .timeline-event::before {
        left: 0.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.navbar-elevated {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
}

.admin-hero-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pill .pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-ok {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}
.status-ok .pill-dot { background: #198754; }
.status-warn {
    background: rgba(255, 193, 7, 0.18);
    color: #b58100;
}
.status-warn .pill-dot { background: #b58100; }

.admin-nav {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 0.9rem;
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 0.7rem;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.7;
}
.admin-nav-link.is-active {
    background: rgba(13, 110, 253, 0.15);
    opacity: 1;
}

.admin-shell {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-surface);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.year-card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.9rem;
    padding: 1rem;
}
.year-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}
.year-card dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
}
.year-card dd {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.keyword-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.keyword-chips .chip {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

/* Author page visualizations */
.bar-chart-item {
    position: relative;
}

.bar-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
}

.bar-chart-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.bar-chart-track {
    height: 12px;
    background: var(--bg-app-alt);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.bar-chart-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    max-width: 100%;
}

.bar-chart-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dist-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .dist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.dist-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 140px;
    flex-shrink: 0;
}

.dist-bar-container {
    position: relative;
    height: 32px;
    background: var(--bg-app-alt);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.dist-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    padding-left: 0.5rem;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: fit-content;
    max-width: 100%;
}

.dist-value {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.pie-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.pie-chart {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.pie-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-app-alt);
    transition: background var(--transition-base);
}

.legend-item:hover {
    background: var(--bg-elevated);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.legend-value {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.activity-item {
    display: flex;
    flex-direction: column;
}

.activity-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.activity-count {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.activity-bar {
    height: 10px;
    background: var(--bg-app-alt);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.activity-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 100%;
}

.activity-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.chart-container {
    padding: 0.5rem 0;
}

.metric-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}
.metric-label {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}
.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.audit-log {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 320px;
    overflow: auto;
}
.audit-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding-bottom: 0.6rem;
}

.admin-table td,
.admin-table th {
    white-space: nowrap;
}

.upload-dropzone {
    border: 1px dashed rgba(148, 163, 184, 0.6);
    border-radius: 0.9rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.upload-dropzone input[type="file"] {
    display: none;
}
.upload-dropzone.is-hovered {
    border-color: var(--accent);
    background: rgba(13, 110, 253, 0.04);
}

.dataset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.dataset-section + .dataset-section {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 1rem;
}

.admin-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    border-radius: 0.9rem;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2000;
    background: #0d6efd;
}
.admin-toast-warning {
    background: #b58100;
}
.admin-toast-error {
    background: #dc3545;
}
.admin-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.admin-login-shell {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}
.admin-login-card {
    width: min(420px, 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.admin-login-hero {
    padding: 1.5rem;
    border-radius: 1rem;
}

@media (max-width: 768px) {
    .admin-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .dataset-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pie-chart {
        width: 140px;
        height: 140px;
    }
    
    .bar-chart-item {
        font-size: 0.9rem;
    }
    
    .bar-chart-header {
        gap: 0.5rem;
    }
    
    .bar-chart-label {
        font-size: 0.85rem;
    }
    
    .dist-bar-container {
        height: 28px;
    }
    
    .dist-label {
        min-width: auto;
        font-size: 0.85rem;
    }
}

/* Hover effects for charts */
.bar-chart-item:hover .bar-chart-fill {
    transform: scaleY(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.dist-bar:hover {
    transform: scaleY(1.1);
    filter: brightness(1.1);
}

.activity-item:hover .activity-fill {
    transform: scaleY(1.2);
    filter: brightness(1.1);
}

/* Dark mode dropdown support */
.dark-mode .dropdown-menu {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.dark-mode .dropdown-item {
    color: var(--text-primary);
}

.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
    background-color: var(--accent-soft);
    color: var(--text-primary);
}

.dark-mode .dropdown-divider {
    border-color: var(--border-color);
}
