/* ==========================================
   Purrformance Admin - Liquid Glass Design
   Modern iOS-inspired glassmorphism theme
   ========================================== */

/* CSS Variables - Light Theme */
:root {
    /* Colors - Soft Pastels */
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #5B21B6;
    --secondary: #06B6D4;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Backgrounds */
    --bg-base: #F0F4F8;
    --bg-gradient: linear-gradient(135deg, #E0E7FF 0%, #FCE7F3 50%, #DBEAFE 100%);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-sidebar: rgba(255, 255, 255, 0.6);
    --bg-topbar: rgba(255, 255, 255, 0.8);
    --bg-input: rgba(255, 255, 255, 0.9);

    /* Glass Effect */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --glass-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Text */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;

    /* Borders */
    --border-color: rgba(0, 0, 0, 0.06);
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 64px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-base: #0F172A;
    --bg-gradient: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #1E3A5F 100%);
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-sidebar: rgba(15, 23, 42, 0.8);
    --bg-topbar: rgba(15, 23, 42, 0.9);
    --bg-input: rgba(30, 41, 59, 0.9);

    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --border-color: rgba(255, 255, 255, 0.08);

    --gray-50: #1E293B;
    --gray-100: #334155;
    --gray-200: #475569;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==========================================
   Admin Layout
   ========================================== */

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
}

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

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity var(--transition), width var(--transition);
}

.sidebar-toggle {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--border-radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--bg-card);
    color: var(--primary);
    font-weight: 500;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-text {
    transition: opacity var(--transition), width var(--transition);
    white-space: nowrap;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: var(--glass-border);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    transition: opacity var(--transition), width var(--transition);
}

.user-name {
    display: block;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.logout-btn {
    padding: 8px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    border: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover,
.notification-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: var(--border-radius-full);
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page Content */
.page-content {
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ==========================================
   Breadcrumbs
   ========================================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* ==========================================
   Cards - Liquid Glass Style
   ========================================== */

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--glass-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: var(--glass-border);
    background: rgba(0, 0, 0, 0.02);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), transparent);
    opacity: 0.1;
    border-radius: 0 0 0 100%;
}

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

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.kpi-icon.primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.kpi-icon.secondary { background: linear-gradient(135deg, var(--secondary), #67E8F9); }
.kpi-icon.success { background: linear-gradient(135deg, var(--success), #6EE7B7); }
.kpi-icon.warning { background: linear-gradient(135deg, var(--warning), #FCD34D); }

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--border-radius-full);
}

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

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

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.kpi-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ==========================================
   Tables
   ========================================== */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.02);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-card);
}

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

/* ==========================================
   Badges
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

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

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #F87171);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ==========================================
   Forms
   ========================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-helper {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-primary);
}

/* ==========================================
   Page Headers
   ========================================== */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   Empty States
   ========================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==========================================
   Toast Notifications
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 320px;
    padding: 16px 20px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

/* ==========================================
   Modal
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: var(--transition);
}

[data-theme="dark"] .modal {
    background: #1e293b;
    border-color: #334155;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #334155;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-full);
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: var(--transition);
}

[data-theme="dark"] .modal-close {
    background: #334155;
    color: #cbd5e1;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--danger);
}

[data-theme="dark"] .modal-close:hover {
    background: #475569;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #334155;
}

/* ==========================================
   Activity Feed
   ========================================== */

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

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-message {
    font-size: 14px;
    color: var(--text-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================
   Login Page
   ========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--glass-shadow-lg);
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

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

.btn-google {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-google:hover {
    background: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--danger);
    font-size: 14px;
}

/* ==========================================
   Utilities
   ========================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-content {
        padding: 16px;
    }

    .login-card {
        padding: 24px;
    }

    .table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0 16px;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
    }
}

/* ==========================================
   Quill.js Editor — Liquid Glass Overrides
   ========================================== */

.ql-toolbar.ql-snow {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 8px 12px;
    font-family: inherit;
}

.ql-container.ql-snow {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    background: var(--bg-input);
    min-height: 300px;
    font-family: inherit;
    font-size: 14px;
}

.ql-editor {
    min-height: 280px;
    color: var(--text-primary);
    line-height: 1.7;
    padding: 16px;
}

.ql-editor.ql-blank::before {
    color: var(--text-muted);
    font-style: normal;
}

/* Focus state */
.ql-container.ql-snow:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.ql-container.ql-snow:focus-within + .ql-toolbar.ql-snow,
.ql-toolbar.ql-snow:has(+ .ql-container.ql-snow:focus-within) {
    border-color: var(--primary);
}

/* Toolbar buttons */
.ql-snow .ql-stroke {
    stroke: var(--text-secondary);
}

.ql-snow .ql-fill {
    fill: var(--text-secondary);
}

.ql-snow .ql-picker-label {
    color: var(--text-secondary);
}

.ql-snow button:hover .ql-stroke,
.ql-snow .ql-picker-label:hover .ql-stroke {
    stroke: var(--primary);
}

.ql-snow button:hover .ql-fill,
.ql-snow .ql-picker-label:hover .ql-fill {
    fill: var(--primary);
}

.ql-snow button.ql-active .ql-stroke {
    stroke: var(--primary);
}

.ql-snow button.ql-active .ql-fill {
    fill: var(--primary);
}

.ql-snow .ql-picker-label:hover,
.ql-snow button:hover {
    color: var(--primary);
}

/* Dropdowns — COULEURS OPAQUES obligatoires (règle modals CLAUDE.md) */
.ql-snow .ql-picker-options {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
}

[data-theme="dark"] .ql-snow .ql-picker-options {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ql-snow .ql-picker-item {
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
}

.ql-snow .ql-picker-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

/* Tooltip (lien) — COULEURS OPAQUES */
.ql-snow .ql-tooltip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    padding: 8px 12px;
    z-index: 100;
}

[data-theme="dark"] .ql-snow .ql-tooltip {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: #f1f5f9;
}

.ql-snow .ql-tooltip input[type="text"] {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 13px;
}

.ql-snow .ql-tooltip a.ql-action,
.ql-snow .ql-tooltip a.ql-remove {
    color: var(--primary);
}

/* Contenu éditeur — styles typographiques */
.ql-editor h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 1.2em 0 0.6em;
    color: var(--text-primary);
}

.ql-editor h3 {
    font-size: 1.15em;
    font-weight: 600;
    margin: 1em 0 0.5em;
    color: var(--text-primary);
}

.ql-editor p {
    margin-bottom: 0.8em;
}

.ql-editor blockquote {
    border-left: 3px solid var(--primary-light);
    padding-left: 16px;
    color: var(--text-secondary);
    margin: 1em 0;
}

.ql-editor a {
    color: var(--primary);
    text-decoration: underline;
}

.ql-editor ul, .ql-editor ol {
    padding-left: 1.5em;
    margin-bottom: 0.8em;
}

/* Responsive */
@media (max-width: 768px) {
    .ql-toolbar.ql-snow {
        padding: 6px 8px;
    }

    .ql-snow .ql-formats {
        margin-right: 8px;
    }

    .ql-container.ql-snow {
        min-height: 200px;
    }

    .ql-editor {
        min-height: 180px;
        padding: 12px;
    }
}

/* ==========================================
   Article Ideas Module
   ========================================== */

/* Ideas Grid */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* Idea Card */
.idea-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #f0ad4e;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.idea-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-lg);
}

/* Priority colors - left border */
.idea-card.idea-priority-haute {
    border-left-color: var(--success);
}

.idea-card.idea-priority-moyenne {
    border-left-color: #f0ad4e;
}

.idea-card.idea-priority-basse {
    border-left-color: var(--text-muted);
}

/* Card Header */
.idea-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.idea-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-input);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.idea-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Hook */
.idea-hook {
    margin: 0;
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Badges row */
.idea-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Keywords */
.idea-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.idea-keyword-tag {
    font-size: 11px;
    color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

[data-theme="dark"] .idea-keyword-tag {
    background: rgba(167, 139, 250, 0.15);
    color: var(--primary-light);
}

/* Status actions */
.idea-status-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, rgba(0,0,0,0.06));
}

.idea-status-btns {
    display: flex;
    gap: 4px;
}

.idea-status-btns .btn {
    padding: 4px 6px;
}

.idea-current-status {
    font-size: 11px;
}

/* Generation progress */
.generation-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.progress-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    animation: fadeInMessage 0.3s ease;
}

.progress-message.progress-info,
.progress-message.progress-status {
    background: rgba(59, 130, 246, 0.08);
    color: var(--info);
}

.progress-message.progress-success,
.progress-message.progress-ideas_complete {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    font-weight: 500;
}

.progress-message.progress-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

.progress-message.progress-keepalive {
    background: rgba(156, 163, 175, 0.06);
    color: var(--text-muted);
    font-size: 12px;
}

[data-theme="dark"] .progress-message.progress-info,
[data-theme="dark"] .progress-message.progress-status {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .progress-message.progress-success,
[data-theme="dark"] .progress-message.progress-ideas_complete {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .progress-message.progress-error {
    background: rgba(239, 68, 68, 0.15);
}

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinAnimation 0.6s linear infinite;
    vertical-align: middle;
}

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

/* Generate page layout */
.ideas-generate-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Responsive — Article Ideas */
@media (max-width: 768px) {
    .ideas-grid {
        grid-template-columns: 1fr;
    }

    .ideas-generate-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Site Bridge Dashboard
   ========================================== */

/* Alerte données périmées */
.bridge-stale-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
    font-size: 14px;
    margin-bottom: 24px;
}

[data-theme="dark"] .bridge-stale-alert {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.bridge-stale-alert svg {
    flex-shrink: 0;
}

.bridge-stale-alert .btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* Grille charts 2 colonnes */
.bridge-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

/* Grille contenu bas (articles + catégories) */
.bridge-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Grille info existante (2fr 1fr) */
.bridge-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Liste catégories */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-list-item .cat-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.category-list-item .cat-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 30px;
    text-align: right;
}

.category-bar-wrapper {
    flex: 2;
    min-width: 0;
}

.category-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--primary);
    opacity: 0.75;
    transition: width 0.4s ease;
}

/* Badges statut articles */
.article-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.article-status-badge.publish {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.article-status-badge.draft {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.article-status-badge.pending,
.article-status-badge.to_publish {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.article-status-badge.private {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}

.article-status-badge.future {
    background: rgba(6, 182, 212, 0.15);
    color: #0891b2;
}

.article-status-badge.deleted,
.article-status-badge.trash {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

[data-theme="dark"] .article-status-badge.publish {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .article-status-badge.draft {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .article-status-badge.pending,
[data-theme="dark"] .article-status-badge.to_publish {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .article-status-badge.private {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

[data-theme="dark"] .article-status-badge.future {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

[data-theme="dark"] .article-status-badge.deleted,
[data-theme="dark"] .article-status-badge.trash {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* KPI value petite variante (dates, textes longs) */
.kpi-value--sm {
    font-size: 18px;
}

/* Info section — Labels et grilles réutilisables */
.info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

.info-value--mono {
    font-family: monospace;
    font-size: 13px;
}

.info-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.info-stack {
    display: grid;
    gap: 16px;
}

/* Table articles récents */
.bridge-articles-table {
    width: 100%;
    border-collapse: collapse;
}

.bridge-articles-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.bridge-articles-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.bridge-articles-table tbody tr {
    transition: background-color 0.15s ease;
}

.bridge-articles-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.04);
}

[data-theme="dark"] .bridge-articles-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

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

.bridge-articles-table .article-title {
    max-width: 350px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bridge-articles-table .article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.bridge-articles-table .article-title a:hover {
    color: var(--primary);
}

.bridge-articles-table .article-date {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.bridge-articles-table .article-cats {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Trend badge (KPI) */
.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.kpi-trend.up {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.kpi-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.kpi-trend.neutral {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
}

[data-theme="dark"] .kpi-trend.up {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .kpi-trend.down {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .kpi-trend.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* Santé éditoriale */
.editorial-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .health-indicator {
    background: rgba(148, 163, 184, 0.04);
}

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

.health-dot.green { background: #22c55e; }
.health-dot.yellow { background: #f59e0b; }
.health-dot.red { background: #ef4444; }

.health-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.health-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* Date relative (tableau articles) */
.article-age {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.article-age .age-fresh {
    color: #22c55e;
    font-weight: 500;
}

.article-age .age-recent {
    color: #f59e0b;
}

.article-age .age-old {
    color: var(--text-muted);
}

.article-age .age-stale {
    color: #ef4444;
}

/* Grille charts 3 colonnes (statut + mensuel + cumulé) */
.bridge-charts-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* ==========================================
   Bridge Dashboard — Animations & Polish
   ========================================== */

/* Staggered fade-in entrance */
@keyframes bridgeFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bridge-animate {
    animation: bridgeFadeUp 0.5s ease-out both;
}

.bridge-animate-delay-1 { animation-delay: 0.06s; }
.bridge-animate-delay-2 { animation-delay: 0.12s; }
.bridge-animate-delay-3 { animation-delay: 0.18s; }
.bridge-animate-delay-4 { animation-delay: 0.24s; }
.bridge-animate-delay-5 { animation-delay: 0.3s; }
.bridge-animate-delay-6 { animation-delay: 0.36s; }

/* KPI Cards — Shine effect on hover */
.kpi-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.kpi-card:hover::after {
    left: 120%;
}

/* KPI icon — subtle float */
@keyframes kpiIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.kpi-card:hover .kpi-icon {
    animation: kpiIconFloat 1.5s ease-in-out infinite;
}

/* KPI icon — add info & danger variants */
.kpi-icon.info { background: linear-gradient(135deg, var(--info), #93C5FD); }
.kpi-icon.danger { background: linear-gradient(135deg, var(--danger), #FCA5A5); }

/* KPI value — tabular numbers for alignment */
.kpi-value {
    font-variant-numeric: tabular-nums;
}

/* Health dot — pulse animation for red status */
@keyframes healthPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

@keyframes healthPulseYellow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}

.health-dot.red {
    animation: healthPulse 2s ease-in-out infinite;
}

.health-dot.yellow {
    animation: healthPulseYellow 2.5s ease-in-out infinite;
}

/* Health indicator — hover lift */
.health-indicator {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.health-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .health-indicator:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Chart cards — no hover lift (keeps charts stable) */
.bridge-charts-grid .card {
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.bridge-charts-grid .card:hover {
    transform: none;
}

/* Category bar — animated fill on page load */
@keyframes categoryBarFill {
    from { width: 0; }
}

.category-bar {
    animation: categoryBarFill 0.8s ease-out both;
}

.category-list-item:nth-child(1) .category-bar { animation-delay: 0.1s; }
.category-list-item:nth-child(2) .category-bar { animation-delay: 0.15s; }
.category-list-item:nth-child(3) .category-bar { animation-delay: 0.2s; }
.category-list-item:nth-child(4) .category-bar { animation-delay: 0.25s; }
.category-list-item:nth-child(5) .category-bar { animation-delay: 0.3s; }
.category-list-item:nth-child(6) .category-bar { animation-delay: 0.35s; }
.category-list-item:nth-child(7) .category-bar { animation-delay: 0.4s; }
.category-list-item:nth-child(8) .category-bar { animation-delay: 0.45s; }
.category-list-item:nth-child(9) .category-bar { animation-delay: 0.5s; }
.category-list-item:nth-child(10) .category-bar { animation-delay: 0.55s; }

/* Category list item — hover highlight */
.category-list-item {
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.category-list-item:hover {
    background: rgba(99, 102, 241, 0.06);
}

[data-theme="dark"] .category-list-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Table row hover — glass tint */
.bridge-articles-table tbody tr {
    transition: background-color 0.2s ease, transform 0.15s ease;
}

/* Stale alert — subtle shake */
@keyframes staleShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-1px); }
    20%, 40%, 60%, 80% { transform: translateX(1px); }
}

.bridge-stale-alert svg {
    animation: staleShake 0.5s ease 1.5s both;
}

/* Spinner animation (sync button) */
@keyframes bridgeSpin {
    to { transform: rotate(360deg); }
}

.bridge-charts-grid .spinner,
#bridgeSyncBtn .spinner {
    animation: bridgeSpin 0.8s linear infinite;
}

/* Info section — subtle separator */
.info-grid-2col > div {
    position: relative;
}

.info-grid-2col > div:first-child::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

/* Median content age — badge style */
.bridge-median-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

[data-theme="dark"] .bridge-median-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* Responsive — Bridge Dashboard */
@media (max-width: 768px) {
    .bridge-charts-grid {
        grid-template-columns: 1fr;
    }

    .bridge-bottom-grid {
        grid-template-columns: 1fr;
    }

    .bridge-info-grid {
        grid-template-columns: 1fr;
    }

    .bridge-stale-alert {
        flex-direction: column;
        text-align: center;
    }

    .bridge-stale-alert .btn {
        margin-left: 0;
        margin-top: 8px;
    }

    .bridge-charts-grid-3 {
        grid-template-columns: 1fr;
    }

    .editorial-health-grid {
        grid-template-columns: 1fr;
    }

    .bridge-articles-table .article-title {
        max-width: 200px;
    }

    .info-grid-2col > div:first-child::after {
        display: none;
    }

    .bridge-median-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .bridge-animate {
        animation: none;
        opacity: 1;
    }

    .kpi-card:hover .kpi-icon {
        animation: none;
    }

    .health-dot.red,
    .health-dot.yellow {
        animation: none;
    }

    .category-bar {
        animation: none;
    }

    .bridge-stale-alert svg {
        animation: none;
    }

    .kpi-card::after {
        display: none;
    }
}
