/* Header */
.header {
    background: rgba(var(--surface-rgb), 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 0.5px solid rgba(var(--ink-rgb), 0.1);
    padding: 0 2rem 0 6rem;
    /* Adjusted left padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 2.75rem;
}

.header h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.header-section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: super;
    margin-left: 2px;
    background: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.85;
}

.header h1 .icon {
    display: none;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    /* Push to right */
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header[data-collapsible-nav="1"] .header-actions {
    position: relative;
}

.header-menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(var(--ink-rgb), 0.16);
    background: rgba(var(--surface-rgb), 0.86);
    color: var(--text);
    align-items: center;
    justify-content: center;
    padding: 0;
}

.header-menu-toggle .material-symbols-outlined {
    font-size: 19px;
    line-height: 1;
}

.user-badge {
    width: 36px;
    height: 36px;
    background: var(--surface);
    color: var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.user-badge::before {
    content: "";
    position: absolute;
    inset: -2px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(90deg, #4285f4, #9b72cb, #d96570, #ea4335, #fbbc05, #34a853, #4285f4);
    background-size: 200% auto;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ai-border-shimmer 4s linear infinite;
    animation-play-state: paused;
    pointer-events: none;
    z-index: -1;
}

.user-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-badge:hover::before {
    animation-play-state: running;
}

.admin-link {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.admin-link:hover {
    opacity: 1;
    text-decoration: none;
    background: linear-gradient(-45deg, #1a73e8, #7b2ff7, #c4291c, #e8710a, #1a73e8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: ai-bg-shimmer 3s ease infinite;
}

@media (max-width: 900px) {
    /* Fallback mobile: mostra sempre hamburger e collassa links.
       La logica JS decide quando aprire il menu con .menu-open. */
    .header[data-collapsible-nav="1"] .header-menu-toggle {
        display: inline-flex;
    }

    .header[data-collapsible-nav="1"] .header-nav-links {
        display: none;
    }

    .header[data-collapsible-nav="1"] .header-nav-links.menu-open {
        display: flex;
    }

    .header[data-collapsible-nav="1"].header-nav-measuring .header-nav-links {
        display: flex !important;
        position: static !important;
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        min-width: 0 !important;
        background: transparent !important;
    }

    .header[data-collapsible-nav="1"].header-nav-measuring .header-menu-toggle {
        display: none !important;
    }

    .header[data-collapsible-nav="1"].header-nav-collapsed .header-menu-toggle {
        display: inline-flex;
    }

    .header[data-collapsible-nav="1"].header-nav-collapsed .header-nav-links {
        display: none;
    }

    .header[data-collapsible-nav="1"].header-nav-collapsed .header-nav-links.menu-open {
        display: flex;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        z-index: 260;
        min-width: 180px;
        max-width: min(80vw, 280px);
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid rgba(var(--ink-rgb), 0.08);
        background: rgba(var(--surface-rgb), 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    }

    .header[data-collapsible-nav="1"].header-nav-collapsed .header-nav-links.menu-open .admin-link {
        display: block !important;
        margin-right: 0;
        padding: 4px 2px;
        white-space: nowrap;
    }
}

/* Corner Fold (Left Side) */
.corner-fold {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    z-index: 1001;
    cursor: pointer;
}

/* Ombra morbida sulla pagina sottostante */
.corner-fold::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, rgba(var(--ink-rgb), 0) 0%, rgba(var(--ink-rgb), 0.05) 50%, rgba(var(--ink-rgb), 0.15) 100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* La piega della pagina (il retro del foglio) */
.corner-fold::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    /* Flipped gradient for left fold */
    background: radial-gradient(circle at 0% 0%, #ffffff 0%, #f0f0f0 70%, #dcdcdc 100%);
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-bottom-right-radius: 8px;
    /* Changed to right */
    filter: none;
}

/* Dark: il "retro del foglio" non deve restare bianco (vertice in alto a sx). */
:root[data-theme="dark"] .corner-fold::after {
    background: radial-gradient(circle at 0% 0%, var(--surface) 0%, var(--surface-2) 70%, var(--app-bg) 100%);
}

/* Lo sfondo colorato scoperto (Google AI Style) */
.corner-fold-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: linear-gradient(135deg,
            rgba(66, 133, 244, 0.8),
            rgba(155, 114, 203, 0.8),
            rgba(217, 101, 112, 0.8),
            rgba(234, 67, 53, 0.8),
            rgba(251, 188, 5, 0.8),
            rgba(52, 168, 83, 0.8));
    background-size: 300% 300%;
    border-right: 1px solid rgba(var(--surface-rgb), 0.4);
    border-bottom: 1px solid rgba(var(--surface-rgb), 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

@keyframes google-ai-dynamic {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Stato iniziale visibile (piccola orecchia) */
.corner-fold::before,
.corner-fold::after,
.corner-fold-bg {
    width: 40px;
    height: 40px;
}

.corner-fold::after {
    /* Flipped clip-path for left fold */
    clip-path: polygon(-10% 110%, 110% -10%, 110% 110%);
}

.corner-fold-bg {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Hover: sfoglia la pagina */
.corner-fold:hover::before {
    width: 125px;
    height: 125px;
    filter: blur(10px);
    /* Increased blur for softer shadow */
}

.corner-fold:hover::after {
    width: 125px;
    height: 125px;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.2);
    filter: url(#paper-wrinkle);
}

.corner-fold:hover .corner-fold-bg {
    width: 125px;
    height: 125px;
    animation: google-ai-dynamic 6s ease-in-out;
}

.corner-fold-text {
    position: absolute;
    top: 25px;
    left: 15px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(-45deg);
    pointer-events: none;
    opacity: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    z-index: 3;
}

.corner-fold:hover .corner-fold-text {
    opacity: 1;
    top: 45px;
    left: 25px;
}

/* Nascondi il vecchio bottone se presente nel JS */
#btnScrape {
    display: none !important;
}

/* Buttons */
.btn {
    padding: 0 16px;
    height: 32px;
    border-radius: var(--radius-xs);
    border: none;
    background: rgba(var(--ink-rgb), 0.05);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    background: rgba(var(--ink-rgb), 0.08);
    transform: scale(1.02);
}

.btn-primary {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--blue-rgb), 0.2);
}

.btn-primary:hover {
    background: #0066d6;
    box-shadow: 0 6px 16px rgba(var(--blue-rgb), 0.3);
    transform: translateY(-1px);
}

.btn-ai {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: none !important;
    background-clip: padding-box !important;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Google AI Style Shimmering Border */
.btn-ai::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    padding: 1.5px;
    border-radius: 11.5px;
    background: linear-gradient(90deg,
            #4285f4, #9b72cb, #d96570, #ea4335, #fbbc05, #34a853, #4285f4);
    background-size: 200% auto;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

.btn-ai:hover::before {
    animation: ai-border-shimmer 4s linear infinite;
}

@keyframes ai-border-shimmer {
    to {
        background-position: 200% center;
    }
}

.btn-ai::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(var(--surface-rgb), 0.2), transparent);
    pointer-events: none;
}

.btn-ai:hover {
    transform: scale(1.02) translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(var(--surface-rgb), 0.4) !important;
}

/* Low Power Mode Overrides */
body.low-graphics *,
body.adaptive-low-graphics * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

body.low-graphics .btn-ai::before,
body.adaptive-low-graphics .btn-ai::before {
    background: #d2d2d7 !important;
    animation: none !important;
    mask: none !important;
    -webkit-mask: none !important;
    border: 1px solid #d2d2d7;
    inset: 0;
    padding: 0;
}

body.low-graphics .modal,
body.low-graphics .modal-content,
body.low-graphics .status-bar,
body.adaptive-low-graphics .modal,
body.adaptive-low-graphics .modal-content,
body.adaptive-low-graphics .status-bar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--surface) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-danger {
    color: var(--red);
    background: var(--red-bg);
}

.btn-danger:hover {
    background: rgba(var(--red-rgb), 0.12);
}

.btn-sm {
    padding: 0 12px;
    height: 28px;
    font-size: 12px;
}

.main {
    padding: 1rem 2rem;
    max-width: 87.5rem;
    margin: 0 auto;
}

/* Global Footer Styles & Dock Effect */
.footer-note {
    font-size: 12px;
    color: var(--text3, #9ca3af);
    font-weight: 500;
    text-align: center;
    padding: 6px 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(var(--surface-rgb), 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 0.5px solid rgba(var(--ink-rgb), 0.08);
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 0.75rem;
}

.footer-meta {
    pointer-events: auto;
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

.footer-active-users {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(var(--ink-rgb), 0.12);
    border-radius: 999px;
    background: rgba(var(--surface-rgb), 0.85);
    color: var(--text2);
    font-size: 11px;
    font-weight: 600;
    height: 24px;
    padding: 0 8px;
    cursor: pointer;
    transition: all var(--transition);
    position: static;
    transform: none;
    margin: 0;
}

.footer-active-users:hover {
    background: rgba(var(--surface-rgb), 1);
    border-color: rgba(var(--blue-rgb), 0.4);
    color: var(--blue);
}

.footer-absolute {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    padding-bottom: 0;
    z-index: 1000;
}

@keyframes textShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.dock-link {
    display: inline-flex;
    align-items: baseline;
    position: relative;
    padding: 0 4px;
    white-space: nowrap;
}

.dock-char {
    display: inline-block;
    transition: transform 0.1s cubic-bezier(0.2, 0, 0, 1);
    transform-origin: bottom center;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(90deg, #4285f4, #ea4335, #fbbc05, #34a853, #4285f4);
    background-size: 200vw auto;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    padding: 0 0.5px;
}

.dock-link:hover .dock-char {
    animation: textShimmer 3s linear infinite;
}

/* --- GLOBAL LOADING SPINNER --- */
/* Moved from controls.css to be available on all pages (login, admin, etc.) */

/* Loading Overlay & Futuristic Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--surface-rgb), 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-overlay .zf-ring,
.loading-overlay .zf-ring-2,
.loading-overlay .zf-ring-3 {
    animation-play-state: paused;
}

.loading-overlay.active .zf-ring,
.loading-overlay.active .zf-ring-2,
.loading-overlay.active .zf-ring-3 {
    animation-play-state: running;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-overlay.active .spinner-container {
    transform: translateY(0);
}

/* ZF Golden Spiral (Fractal Vortex) */
.zf-spiral-loader {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zf-text {
    font-size: 16px;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    /* Segue il tema: nero in light, chiaro in dark */
    z-index: 20;
    position: relative;
    letter-spacing: -0.5px;
}

/* Base ring style for fractal spiral arms */
.zf-ring,
.zf-ring-2,
.zf-ring-3 {
    position: absolute;
    border-radius: 50%;
    /* Create a fading spiral tail */
    background: conic-gradient(from 0deg, transparent 0%, transparent 20%, currentColor 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    animation: spiral-spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    mix-blend-mode: multiply;
}

/* Layer 1: Outer Arm (Blue) - Base Scale */
.zf-ring {
    inset: 0;
    color: #4285f4;
    animation-delay: -0.1s;
}

/* Layer 2: Middle Arm (Red) - Scaled Down (Fractal Step) */
.zf-ring-2 {
    inset: 0;
    width: 80%;
    /* Increased from 72% to move away from center */
    height: 80%;
    margin: auto;
    color: #ea4335;
    animation-delay: -0.2s;
    /* Golden Angle Offset approx */
    transform: rotate(137.5deg);
}

/* Layer 3: Inner Arm (Yellow) - Scaled Down Further */
.zf-ring-3 {
    inset: 0;
    width: 55%;
    /* Increased from 45% to move away from center */
    height: 55%;
    margin: auto;
    color: #fbbc05;
    animation-delay: -0.3s;
    /* 2x Golden Angle */
    transform: rotate(275deg);
}



@keyframes spiral-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Override transform for specific rings to maintain relative offset while spinning */
/* We need to apply the rotation offset ON TOP of the animation. 
   Best way is to wrap or use a wrapper, but with 3 divs restricted, we use different animations or `from/to` with offsets.
*/

.zf-ring {
    animation-name: spin-0;
}

.zf-ring-2 {
    animation-name: spin-137;
}

.zf-ring-3 {
    animation-name: spin-275;
}

@keyframes spin-0 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-137 {
    from {
        transform: rotate(137.5deg);
    }

    to {
        transform: rotate(497.5deg);
    }
}

@keyframes spin-275 {
    from {
        transform: rotate(275deg);
    }

    to {
        transform: rotate(635deg);
    }
}

.loading-text {
    font-size: 13px;
    font-weight: 500;
    /* More sober weight */
    color: var(--text2);
    /* Dark Grey (Sober) instead of stark black */
    font-family: 'Inter', sans-serif;
    /* Sober standard font */
    letter-spacing: 0.5px;
    margin-top: 16px;
    /* Slightly more breathing room */
}

/* ── Avvisi crawler (campanella header, solo superadmin) ─────────────────── */
.crawler-alerts {
    position: relative;
    display: inline-flex;
}

.crawler-alerts-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    background: var(--glass);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    color: var(--text2);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: color var(--transition), transform 0.15s ease, box-shadow 0.15s ease;
}
.crawler-alerts-btn:hover {
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.crawler-alerts-btn .material-symbols-outlined { font-size: 20px; }

.crawler-alerts-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--red);
    border-radius: 100px;
    border: 2px solid var(--surface);
    animation: caBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes caBadgePop {
    from { transform: scale(0.4); }
    to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .crawler-alerts-badge { animation: none; }
    .crawler-alerts-btn:hover { transform: none; }
}

.crawler-alerts-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: min(480px, 70vh);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1300;
    padding: 10px;
}

.crawler-alerts-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 4px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    color: var(--text);
}
.crawler-alerts-sub { font-size: 11px; color: var(--text3); margin-left: auto; }

/* "Segna come letti": azzera il badge salvando il timestamp per-utente */
.crawler-alerts-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text2);
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
}
.crawler-alerts-clear:hover { color: var(--green); border-color: var(--green); }
.crawler-alerts-clear .material-symbols-outlined { font-size: 17px; }
@media (max-width: 768px) {
    .crawler-alerts-clear { width: 44px; height: 44px; }
}
.crawler-alerts-empty { padding: 14px 6px; font-size: 12px; color: var(--text3); }

.ca-site { border-bottom: 1px solid var(--border); }
.ca-site:last-child { border-bottom: none; }

.ca-site-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 9px 4px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: var(--text);
    text-align: left;
}
.ca-site-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-chevron { font-size: 18px; color: var(--text3); }

.ca-tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}
.ca-tag.ca-err { background: var(--red-bg); color: var(--red); }
.ca-tag.ca-zero { background: var(--yellow-bg); color: var(--yellow); }

.ca-site-detail { padding: 0 4px 10px; }
.ca-run { margin-top: 8px; }
.ca-run-head { font-size: 11px; font-weight: 600; color: var(--text2); }
.ca-run-sub { font-size: 11px; color: var(--text3); }
.ca-msg {
    margin-top: 4px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    word-break: break-word;
}
.ca-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}
