/* ═══════════════════════════════════════════════════════════════
   PulseTrack — Premium White Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* Brand Colors */
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --primary-light: #8b9cf0;
    --primary-50: rgba(102, 126, 234, 0.05);
    --primary-100: rgba(102, 126, 234, 0.1);
    --primary-200: rgba(102, 126, 234, 0.2);
    --accent: #764ba2;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    --gradient-hover: linear-gradient(135deg, #5a6fd6 0%, #6a4292 100%);

    /* Status Colors */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* Neutrals */
    --white: #ffffff;
    --gray-25: #fcfcfd;
    --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;

    /* Surfaces */
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #f9fafb;
    --bg-hover: #f3f4f6;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Borders */
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 68px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ── Login Screen ──────────────────────────────────────────── */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    background-image:
        radial-gradient(at 20% 50%, rgba(102, 126, 234, 0.08) 0, transparent 50%),
        radial-gradient(at 80% 20%, rgba(118, 75, 162, 0.06) 0, transparent 50%),
        radial-gradient(at 50% 80%, rgba(102, 126, 234, 0.04) 0, transparent 50%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 420px;
    width: 100%;
    padding: 48px;
    border: 1px solid var(--border-light);
    animation: cardSlideUp 0.6s ease-out;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .logo-icon {
    margin-bottom: 16px;
    display: inline-block;
}

.login-logo h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.login-logo p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    background: var(--bg-input);
    transition: all var(--transition-fast);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-field input::placeholder {
    color: var(--gray-400);
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary-200);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

.btn-icon-only {
    padding: 8px;
    min-width: 36px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--gray-500);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.ui-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn .ui-icon {
    width: 14px;
    height: 14px;
}

.btn-icon .ui-icon,
.btn-icon-only .ui-icon {
    width: 14px;
    height: 14px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading span {
    visibility: hidden;
}

.btn.loading::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── App Shell Layout ──────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.logo-mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.3px;
}

.logo-version {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.nav-item.active {
    background: var(--gradient-soft);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gradient);
    border-radius: 0 3px 3px 0;
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}

.user-card:hover {
    background: var(--gray-50);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-xs);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-toggle {
    display: none;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 1px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
    min-width: 0;
}

.site-selector {
    max-width: 240px;
}

.site-selector select {
    padding: 8px 32px 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--transition-fast);
    max-width: 100%;
}

.site-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.notification-bell {
    position: relative;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-500);
}

.notification-bell:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notification-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--white);
}

/* ── Notification Panel ────────────────────────────────────── */
.notification-panel {
    position: fixed;
    top: var(--topbar-height);
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    z-index: 200;
    overflow: hidden;
    animation: panelSlide 0.2s ease-out;
}

@keyframes panelSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.notif-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.notif-item:hover {
    background: var(--gray-50);
}

.notif-item.unread {
    background: var(--primary-50);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon .ui-icon {
    width: 16px;
    height: 16px;
}

.notif-icon.health_warning {
    background: var(--warning-bg);
}

.notif-icon.health_critical {
    background: var(--danger-bg);
}

.notif-icon.spike {
    background: var(--info-bg);
}

.notif-icon.silence {
    background: var(--warning-bg);
}

.notif-icon.sla_fail {
    background: var(--danger-bg);
}

.notif-icon.sla_pass {
    background: var(--success-bg);
}

.notif-icon.info {
    background: var(--gray-100);
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.notif-message {
    font-size: 12px;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
}

.notif-empty {
    padding: 40px;
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
}

/* ── Page Content ──────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 28px;
    animation: contentFade 0.3s ease-out;
    min-width: 0;
}

.page-content > * {
    min-width: 0;
}

@keyframes contentFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--gray-25);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Metric Cards ──────────────────────────────────────────── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.metric-icon .ui-icon {
    width: 20px;
    height: 20px;
}

.metric-icon.purple {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.metric-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.metric-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
}

.metric-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.metric-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    font-family: var(--font-mono);
    letter-spacing: -1px;
    line-height: 1.2;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.metric-change .ui-icon {
    width: 13px;
    height: 13px;
}

.metric-change.up {
    background: var(--success-bg);
    color: var(--success);
}

.metric-change.down {
    background: var(--danger-bg);
    color: var(--danger);
}

.metric-change.neutral {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* ── Reliability Gauge ─────────────────────────────────────── */
.gauge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gauge-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.gauge-canvas {
    width: 100%;
    height: 100%;
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-score {
    font-size: 40px;
    font-weight: 900;
    font-family: var(--font-mono);
    letter-spacing: -2px;
}

.gauge-label {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Data Tables ───────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap .data-table {
    min-width: 680px;
}

.data-table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-light);
    text-align: left;
    white-space: nowrap;
    background: var(--gray-25);
    position: sticky;
    top: 0;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Status Badges ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge .ui-icon {
    width: 12px;
    height: 12px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.badge-neutral {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary);
    border: 1px solid var(--primary-200);
}

/* ── Health Status Cards ───────────────────────────────────── */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.health-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition);
}

.health-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.health-card-status {
    height: 4px;
}

.health-card-status.healthy {
    background: var(--success);
}

.health-card-status.warning {
    background: var(--warning);
}

.health-card-status.critical {
    background: var(--danger);
}

.health-card-status.inactive {
    background: var(--gray-300);
}

.health-card-body {
    padding: 20px 24px;
}

.health-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.health-site-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}

.health-site-url {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

.health-status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.health-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.health-metric {
    text-align: center;
}

.health-metric-value {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--gray-900);
}

.health-metric-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    font-weight: 600;
    margin-top: 2px;
}

.health-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
}

.health-alert .ui-icon {
    width: 14px;
    height: 14px;
}

.health-alert.warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid var(--warning-border);
}

.health-alert.critical {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid var(--danger-border);
}

.health-alert.healthy {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid var(--success-border);
}

/* ── Charts Container ──────────────────────────────────────── */
.chart-container {
    position: relative;
    width: 100%;
    padding: 16px 0;
}

.chart-container canvas {
    width: 100% !important;
    height: auto !important;
}

/* ── Heatmap Calendar ──────────────────────────────────────── */
.heatmap-grid {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.heatmap-cell {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 10;
}

.heatmap-cell.level-0 {
    background: var(--gray-100);
}

.heatmap-cell.level-1 {
    background: rgba(102, 126, 234, 0.2);
}

.heatmap-cell.level-2 {
    background: rgba(102, 126, 234, 0.4);
}

.heatmap-cell.level-3 {
    background: rgba(102, 126, 234, 0.6);
}

.heatmap-cell.level-4 {
    background: rgba(102, 126, 234, 0.85);
}

.heatmap-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.heatmap-cell:hover .heatmap-tooltip {
    opacity: 1;
}

/* ── Calendar Grid ─────────────────────────────────────────── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-header-cell {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    padding: 8px 4px;
}

.calendar-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--gray-600);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    min-height: 60px;
}

.calendar-cell:hover {
    background: var(--gray-50);
}

.calendar-cell.today {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.calendar-cell.has-post {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.calendar-cell.predicted {
    background: var(--info-bg);
    border-color: var(--info-border);
    border-style: dashed;
}

.calendar-cell.worry-zone {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    border-style: dashed;
}

.calendar-cell.other-month {
    color: var(--gray-300);
}

.calendar-cell .post-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    margin-top: 4px;
}

.calendar-cell .predicted-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--info);
    margin-top: 4px;
}

/* ── SLA Grid ──────────────────────────────────────────────── */
.sla-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
}

.sla-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.sla-cell.pass {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.sla-cell.fail {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.sla-cell.pending {
    background: var(--gray-100);
    color: var(--gray-400);
    border: 1px solid var(--gray-200);
}

.sla-cell:hover {
    transform: scale(1.05);
}

/* ── Sparklines ────────────────────────────────────────────── */
.sparkline-container {
    display: inline-block;
    vertical-align: middle;
}

.sparkline-canvas {
    display: block;
}

/* ── Competitor Cards ──────────────────────────────────────── */
.competitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.competitor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: 24px;
    transition: all var(--transition);
}

.competitor-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.competitor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.competitor-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}

.competitor-url {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.competitor-card .btn-group {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.competitor-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* ── Change Log Timeline ───────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding: 16px 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-item .timeline-date {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-item .timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.timeline-item .timeline-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ── Empty States ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    opacity: 0.65;
    margin-left: auto;
    margin-right: auto;
    color: var(--gray-400);
}

.empty-state-icon .ui-icon {
    width: 100%;
    height: 100%;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Toast Notifications ───────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-width: 300px;
    max-width: 420px;
    animation: toastIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.success::before {
    background: var(--success);
}

.toast.error::before {
    background: var(--danger);
}

.toast.warning::before {
    background: var(--warning);
}

.toast.info::before {
    background: var(--info);
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

.toast-message {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-close .ui-icon {
    width: 14px;
    height: 14px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(30px);
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-light);
}

/* ── Skeleton Loading ──────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-heading {
    height: 24px;
    width: 50%;
    margin-bottom: 16px;
}

.skeleton-card {
    height: 120px;
}

.skeleton-chart {
    height: 200px;
    margin-top: 16px;
}

/* ── Grid Layouts ──────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Utility ───────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 12px;
}

.text-xs {
    font-size: 11px;
}

.text-muted {
    color: var(--gray-400);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-primary {
    color: var(--primary);
}

.font-mono {
    font-family: var(--font-mono);
}

.font-bold {
    font-weight: 700;
}

.mb-4 {
    margin-bottom: 4px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.items-center {
    align-items: center;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden {
    display: none !important;
}

/* Trend arrows */
.trend-up::before {
    content: '↑';
    color: var(--success);
    font-weight: 700;
    margin-right: 4px;
}

.trend-down::before {
    content: '↓';
    color: var(--danger);
    font-weight: 700;
    margin-right: 4px;
}

.trend-steady::before {
    content: '→';
    color: var(--gray-400);
    font-weight: 700;
    margin-right: 4px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .sidebar-toggle {
        display: flex;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 16px;
    }

    .top-bar {
        padding: 0 16px;
        height: auto;
        min-height: var(--topbar-height);
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

    .top-bar-left,
    .top-bar-right {
        width: 100%;
    }

    .top-bar-right {
        justify-content: flex-start;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }

    .competitor-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10px;
    }

    .notification-panel {
        width: calc(100vw - 40px);
        right: 10px;
    }
}

/* ── Watchlist Cards ───────────────────────────────────────── */
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.watchlist-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: 24px;
    transition: all var(--transition);
}

.watchlist-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.watchlist-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}

.watchlist-change {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.watchlist-change.up {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.watchlist-change.down {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.watchlist-change.neutral {
    background: var(--gray-100);
    color: var(--gray-500);
}

.watchlist-note {
    font-size: 13px;
    color: var(--gray-600);
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.watchlist-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.watchlist-sparkline {
    padding: 12px 0 0;
}

/* ── Calendar Content ─────────────────────────────────────── */
.calendar-cell.empty {
    visibility: hidden;
}

.calendar-cell.future {
    opacity: 0.5;
}

.calendar-cell.has-posts {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.calendar-cell.worry {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    border-style: dashed;
}

.calendar-day-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    position: absolute;
    top: 4px;
    left: 8px;
}

.calendar-cell.today .calendar-day-number {
    color: var(--primary);
}

.calendar-post-count {
    font-size: 18px;
    font-weight: 800;
    color: var(--success);
    font-family: var(--font-mono);
}

.calendar-post-titles {
    display: none;
}

.calendar-cell:hover .calendar-post-titles {
    display: block;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    min-width: 180px;
    max-width: 250px;
    z-index: 20;
    box-shadow: var(--shadow-lg);
}

.calendar-post-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.calendar-prediction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--info);
    margin-top: 4px;
}

.calendar-worry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--warning);
    margin-top: 4px;
}

.calendar-prediction .ui-icon,
.calendar-worry .ui-icon {
    width: 12px;
    height: 12px;
}

/* ── Timeline Cards ───────────────────────────────────────── */
.timeline-dot {
    position: absolute;
    left: -36px;
    top: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: var(--white);
    border-radius: 50%;
    border: 2px solid var(--border);
}

.timeline-dot .ui-icon {
    width: 14px;
    height: 14px;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
}

.timeline-card:hover {
    box-shadow: var(--shadow-sm);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-body {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
}

.timeline-diff {
    margin-top: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 12px;
}

.diff-old {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 6px 12px;
    border-left: 3px solid var(--danger);
}

.diff-new {
    background: var(--success-bg);
    color: var(--success);
    padding: 6px 12px;
    border-left: 3px solid var(--success);
}

/* ── Export Cards ──────────────────────────────────────────── */
.export-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px !important;
    min-height: 120px;
    text-align: center;
}

.export-card:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
}

/* ── Competitor Metrics ───────────────────────────────────── */
.competitor-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
}

/* ── Misc Helpers ─────────────────────────────────────────── */
.mt-4 {
    margin-top: 4px;
}

.mt-8 {
    margin-top: 8px;
}

/* ── Print Styles ──────────────────────────────────────────── */
@media print {

    .sidebar,
    .top-bar,
    .toast-container,
    .modal-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 0;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ── Articles Page ────────────────────────────────────────── */
.articles-page {
    min-width: 0;
}

.articles-filters-card {
    margin-bottom: 20px;
}

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

.articles-page .page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.articles-page .articles-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px;
    align-items: end;
}

.articles-page .articles-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.articles-page .articles-filters .filter-group-search {
    grid-column: span 2;
}

.articles-page .articles-filters .filter-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--gray-500);
}

.articles-page .form-select,
.articles-page .form-input,
.articles-modal-form .form-select,
.articles-modal-form .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.3;
    min-height: 42px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.articles-page .form-select,
.articles-modal-form .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.articles-page .form-select:focus,
.articles-page .form-input:focus,
.articles-modal-form .form-select:focus,
.articles-modal-form .form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.articles-modal-form {
    padding: 20px 24px 24px;
}

.articles-modal-form .form-group {
    margin-bottom: 14px;
}

.articles-modal-form .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.articles-modal-form .form-row {
    display: flex;
    gap: 12px;
}

.articles-modal-form .form-row .form-group {
    flex: 1;
}

.articles-modal-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.article-title-link {
    color: var(--gray-800);
    text-decoration: none;
    font-weight: 500;
    max-width: min(48vw, 520px);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.article-title-link:hover {
    color: var(--primary);
}

/* Topic & Category Badges */
.badge-topic {
    background: var(--primary-100);
    color: var(--primary-dark);
    font-weight: 500;
}

.badge-category {
    background: rgba(118, 75, 162, 0.1);
    color: var(--accent);
    font-weight: 500;
}

.badge-source-rss {
    background: #ecfdf5;
    color: #059669;
}

.badge-source-sitemap {
    background: #eff6ff;
    color: #2563eb;
}

.badge-source-html {
    background: #fef3c7;
    color: #d97706;
}

.badge-source-manual {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-source-competitor {
    background: #fff7ed;
    color: #c2410c;
}

.badge-source-unknown {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* Topic Distribution Bars */
.topic-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.topic-bar:last-child {
    border-bottom: none;
}

.topic-name {
    width: 120px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-bar-fill {
    flex: 1;
    height: 8px;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.topic-bar-fill.category {
    background: linear-gradient(135deg, var(--accent), #a855f7);
}

.topic-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 30px;
    text-align: right;
}

/* Pagination */
.articles-page .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    flex-wrap: wrap;
}

/* Metric Grid */
.articles-page .metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.articles-page .metric-grid .metric-card {
    padding: 18px 20px;
    min-height: 102px;
}

.articles-page .articles-table-wrap {
    overflow-x: auto;
    padding-right: 12px;
}

.articles-page .articles-table-wrap .articles-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.articles-page .articles-table tbody td {
    vertical-align: middle;
}

.articles-page .articles-table thead th:nth-child(1),
.articles-page .articles-table tbody td:nth-child(1) {
    width: 42%;
}

.articles-page .articles-table thead th:nth-child(2),
.articles-page .articles-table tbody td:nth-child(2) {
    width: 13%;
}

.articles-page .articles-table thead th:nth-child(3),
.articles-page .articles-table tbody td:nth-child(3) {
    width: 14%;
}

.articles-page .articles-table thead th:nth-child(4),
.articles-page .articles-table tbody td:nth-child(4) {
    width: 10%;
}

.articles-page .articles-table thead th:nth-child(5),
.articles-page .articles-table tbody td:nth-child(5) {
    width: 9%;
}

.articles-page .articles-table thead th:nth-child(6),
.articles-page .articles-table tbody td:nth-child(6) {
    width: 7%;
}

.articles-page .articles-table tbody td:last-child,
.articles-page .articles-table thead th:last-child {
    text-align: center;
    width: 96px;
    min-width: 96px;
    padding-right: 22px;
    white-space: nowrap;
}

.articles-page .articles-table .article-title-link {
    max-width: none;
}

.articles-page .articles-table tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.articles-page .action-btns {
    white-space: nowrap;
}

.export-card-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    color: var(--primary);
}

/* Action Buttons */
.articles-page .action-btns {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.articles-page .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.articles-page .btn-ghost {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.articles-page .btn-ghost:hover {
    background: var(--gray-100);
}

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

@media (max-width: 1180px) {
    .articles-page .articles-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .articles-page .articles-filters .filter-group-search {
        grid-column: span 3;
    }
}

@media (max-width: 860px) {
    .articles-page .articles-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .articles-page .articles-filters .filter-group-search {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .articles-page .articles-filters {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .articles-page .articles-filters .filter-group-search {
        grid-column: auto;
    }

    .articles-modal-form {
        padding: 16px;
    }

    .articles-modal-form .form-row {
        flex-direction: column;
    }

    .articles-page .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .articles-page .page-actions {
        width: 100%;
    }

    .articles-page .page-actions .btn {
        width: 100%;
    }

    .article-title-link {
        max-width: 220px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Competitor Deep Analysis Page
   ═══════════════════════════════════════════════════════════════ */

/* Crawl Stats Page */
.crawl-stats-layout {
    display: block;
}

.crawl-stats-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crawl-stats-submenu {
    position: static;
    max-height: none;
    overflow: visible;
}

.crawl-submenu-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding: 0;
}

.crawl-views-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.crawl-views-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crawl-views-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gray-500);
}

.crawl-views-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.crawl-submenu-item {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    border: 1px solid var(--border-light);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 70px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.crawl-submenu-item:hover {
    background: var(--white);
    border-color: var(--primary-200);
}

.crawl-submenu-item.active {
    background: var(--gradient-soft);
    border-color: var(--primary-200);
    box-shadow: inset 0 0 0 1px var(--primary-100);
}

.crawl-submenu-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crawl-submenu-meta {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crawl-stats-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.crawl-stats-scope {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.crawl-metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.crawl-metric-card {
    min-width: 0;
}

.crawl-metric-card .metric-value {
    overflow-wrap: anywhere;
}

.crawl-metric-date .metric-value {
    font-size: 18px;
    letter-spacing: 0;
    line-height: 1.35;
}

.crawl-runs-table {
    min-width: 1120px;
}

.crawl-runs-table td,
.crawl-runs-table th {
    vertical-align: top;
}

.crawl-runs-table .crawl-error-cell {
    max-width: 260px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.crawl-badge-method {
    letter-spacing: 0.4px;
}

.crawl-debug-log {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--gray-50);
    padding: 10px 12px;
}

.crawl-debug-entry {
    padding: 8px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.crawl-debug-entry:last-child {
    border-bottom: none;
}

.crawl-debug-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.crawl-debug-time {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-600);
}

.crawl-debug-target {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}

.crawl-debug-message {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 920px) {
    .crawl-submenu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crawl-views-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .crawl-stats-toolbar .btn-group {
        width: 100%;
        justify-content: flex-start;
    }

    .crawl-submenu-list {
        grid-template-columns: 1fr;
    }

    .crawl-views-grid {
        grid-template-columns: 1fr;
    }

    .crawl-metric-date .metric-value {
        font-size: 16px;
    }
}

/* Back Button */
.btn-back {
    margin-bottom: 20px;
    gap: 6px;
}

/* Hero Banner */
.comp-hero {
    background: var(--gradient-soft);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.comp-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 420px;
}

.comp-hero-left>div {
    min-width: 0;
}

.comp-hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.comp-hero-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.comp-hero-url {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    display: block;
    margin-top: 2px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comp-hero-url:hover {
    text-decoration: underline;
}

.comp-hero-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
    flex-wrap: wrap;
}

.comp-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* KPI Grid */
.cd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    width: 100%;
    min-width: 0;
}

.cd-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg, 12px);
    padding: 16px;
    text-align: center;
}

.cd-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.cd-kpi-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.cd-kpi-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 0;
}

.cd-kpi-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-400);
}

.cd-kpi-value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--gray-800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.cd-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .cd-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cd-kpi-vs {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 600;
}

.cd-kpi-win {
    color: var(--success) !important;
}

.cd-kpi-lose {
    color: var(--danger) !important;
}

.cd-gauge-box {
    width: 160px;
    height: 160px;
    max-width: 100%;
    flex: 0 0 160px;
}

@media (max-width: 768px) {
    .cd-gauge-box {
        width: 140px;
        height: 140px;
        flex-basis: 140px;
    }
}

/* Intelligence Card */
.cd-intel-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.04), rgba(118, 75, 162, 0.06));
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-lg, 12px);
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
}

.cd-intel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.03);
}

.cd-intel-icon {
    font-size: 20px;
}

.cd-intel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.cd-intel-body {
    padding: 16px 20px;
}

.cd-intel-line {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    border-bottom: 1px solid rgba(102, 126, 234, 0.06);
    overflow-wrap: anywhere;
}

.cd-intel-line:last-child {
    border-bottom: none;
}

/* Gap Analysis */
.cd-gap-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cd-gap-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cd-gap-label {
    width: 130px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    flex-shrink: 0;
    padding-top: 4px;
}

.cd-gap-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cd-gap-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cd-gap-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-400);
    width: 32px;
    flex-shrink: 0;
}

.cd-gap-track {
    flex: 1;
    height: 10px;
    background: var(--gray-100);
    border-radius: 5px;
    overflow: hidden;
}

.cd-gap-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

.cd-gap-comp {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.cd-gap-yours {
    background: var(--gradient);
}

.cd-gap-val {
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--gray-600);
    min-width: 80px;
    text-align: right;
}

/* Publishing Pattern Bars */
.cd-pattern-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.cd-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-600);
}

.cd-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cd-pattern-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.cd-pattern-label {
    width: 40px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    flex-shrink: 0;
}

.cd-pattern-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cd-bar-comp {
    height: 10px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 5px;
    font-size: 0;
    min-width: 2px;
    transition: width 0.4s ease;
}

.cd-bar-yours {
    height: 10px;
    background: var(--gradient);
    border-radius: 5px;
    font-size: 0;
    min-width: 2px;
    transition: width 0.4s ease;
}

/* Hour Distribution */
.cd-hour-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.cd-hour-grid {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 140px;
    padding-top: 10px;
    min-width: 460px;
}

.cd-hour-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.cd-hour-bars {
    flex: 1;
    display: flex;
    gap: 1px;
    align-items: flex-end;
    width: 100%;
}

.cd-hbar-comp {
    flex: 1;
    background: linear-gradient(180deg, #ef4444, #f97316);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}

.cd-hbar-yours {
    flex: 1;
    background: var(--gradient);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}

.cd-hour-label {
    font-size: 9px;
    color: var(--gray-400);
    font-weight: 600;
}

/* Momentum Card */
.cd-momentum {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cd-momentum-trend {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cd-momentum-icon {
    font-size: 32px;
}

.cd-momentum-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

.cd-momentum-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cd-momentum-val {
    display: block;
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

/* Responsive */
@media (max-width: 768px) {
    .comp-hero {
        flex-direction: column;
        gap: 16px;
        text-align: left;
    }

    .comp-hero-left {
        width: 100%;
    }

    .comp-hero-meta {
        justify-content: flex-start;
    }

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

    .cd-grid-2 {
        grid-template-columns: 1fr;
    }

    .comp-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cd-gap-row {
        flex-direction: column;
    }

    .cd-gap-label {
        width: auto;
    }

    .cd-momentum-stats {
        grid-template-columns: 1fr;
    }
}
