/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

/* ══════════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════════════════════ */
:root {
    /* Backgrounds */
    --bg-base:       #e4f1f5;
    --bg-surface:    #ffffff;
    --bg-elevated:   #f1f1f1;
    --bg-hover:      rgba(102, 79, 255, 0.07);
    --bg-active:     #23273a;

    /* Borders — fixed to work on light backgrounds */
    --border-subtle: #ebebf0;
    --border-mid:    #d8d8e8;

    /* Brand accent — electric teal */
    --accent:        #00d4aa;
    --accent-dim:    rgba(102, 79, 255, 0.08);
    --accent-glow:   rgba(0, 212, 170, 0.25);

    /* Secondary accent — warm amber */
    --amber:         #f5a623;
    --amber-dim:     rgba(245, 166, 35, 0.12);

    /* Tertiary — soft violet */
    --violet:        #a78bfa;
    --violet-dim:    rgba(167, 139, 250, 0.12);

    /* Text */
    --text-primary:  #241a4f;
    --text-secondary:#241a4f; /*#664fff*/
    --text-muted:    #8a85a8;   /* fixed — was identical to --text-primary */

    /* Status */
    --green:         #00d4aa;
    --green-dim:     rgba(0, 212, 170, 0.12);
    --red:           #ef4444;
    --red-dim:       rgba(239, 68, 68, 0.10);
    --amber-status:  #f5a623;
    --orange:        #ff4f01;

    /* Layout */
    --sidebar-w:     280px;
    --header-h:      64px;
    --sidebar-h:     60px;/*94px*/

    /* Radius */
    --r-sm:  6px;
    --r-md:  12px;
    --r-lg:  18px;
    --r-xl:  24px;

    /* Typography */
    --font-display: "Google Sans", sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'Courier New', monospace;

    /* Transitions */
    --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm:  0 1px 4px rgba(36, 26, 79, 0.06);
    --shadow-md:  0 4px 16px rgba(36, 26, 79, 0.10);
    --shadow-lg:  0 8px 32px rgba(36, 26, 79, 0.12), 0 2px 8px rgba(36, 26, 79, 0.06);
}


/* ══════════════════════════════════════════════════════════════════════════════
   RESET
══════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100%;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a      { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul     { list-style: none; }
img    { display: block; max-width: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar             { width: 6px; }
::-webkit-scrollbar-track       { background: transparent; }
::-webkit-scrollbar-thumb       { background: var(--border-mid); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ══════════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════════════════════════════════════════ */
.t-display {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--text-primary);
}

.t-heading {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.t-subheading {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.t-body       { font-size: 0.9rem;  color: var(--text-primary); line-height: 1.6; }
.t-small      { font-size: 0.8rem;  color: var(--text-muted); }
.t-label      { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.t-muted      { color: var(--text-muted); }
.t-accent     { color: var(--text-secondary); }
.t-success    { color: var(--green); }
.t-danger     { color: var(--red); }
.t-amber      { color: var(--amber); }


/* ══════════════════════════════════════════════════════════════════════════════
   LAYOUT SHELL
══════════════════════════════════════════════════════════════════════════════ */
.layout {
    display: flex;
    min-height: 100vh;
    /*padding-top: var(--header-h);*/
}

.main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page fade-in stagger */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main > * { animation: fade-up 0.4s ease both; }
.main > *:nth-child(1) { animation-delay: 0.05s; }
.main > *:nth-child(2) { animation-delay: 0.10s; }
.main > *:nth-child(3) { animation-delay: 0.15s; }
.main > *:nth-child(4) { animation-delay: 0.20s; }
.main > *:nth-child(5) { animation-delay: 0.25s; }


/* ══════════════════════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    flex-shrink: 0;
    width: var(--sidebar-w);
    transition: opacity var(--t);
}

.header__logo:hover { opacity: 0.8; }

.header__logo-mark {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header__logo-mark svg { width: 18px; height: 18px; color: var(--text-primary); }

.header__right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background var(--t), color var(--t);
}

.header__icon-btn:hover,
.header__icon-btn--active {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.header__icon-btn svg { width: 18px; height: 18px; }

.header__divider {
    width: 1px;
    height: 22px;
    background: var(--border-subtle);
    margin: 0 4px;
}

.header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: box-shadow var(--t);
}

.header__avatar:hover {
    box-shadow: 0 0 0 2px var(--accent-glow), 0 0 12px var(--accent-glow);
}

/* Site selector pill */
.header__site-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--text-secondary);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--t), border-color var(--t);
}

.header__site-selector:hover { background: var(--bg-hover); }

.header__site-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
    flex-shrink: 0;
}

.header__site-selector svg { width: 14px; height: 14px; color: var(--text-muted); }


/* ══════════════════════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    /*top: calc(var(--header-h) + 15px);*/
    top:25px;
    height: calc(100vh - var(--sidebar-h));
    overflow-y: auto;
    padding: 20px 12px;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 15px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-subtle);
}

.sidebar__section-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 18px 10px 8px;
}

.sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: background var(--t), color var(--t);
    position: relative;
    cursor: pointer;
}

.sidebar__nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar__nav-item:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.sidebar__nav-item--active {
    background: var(--accent-dim);
    color: var(--text-secondary);
    font-weight: 500;
}

.sidebar__nav-item--active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    
}

.sidebar__badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 99px;
}

.sidebar__badge--amber {
    background: var(--amber-dim);
    color: var(--amber);
}

.sidebar__spacer { flex: 1; }

.sidebar__footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
}

.sidebar__footer .sidebar__nav-item { color: var(--text-muted); }
.sidebar__footer .sidebar__nav-item:hover {
    color: var(--red);
    background: var(--red-dim);
}


/* ── Logo ──────────────────────────────────────────────────────────────────── */
.sidebar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 16px;
    text-decoration: none;
    margin-bottom: 8px;
    transition: opacity var(--t);
}

.sidebar__logo:hover { opacity: 0.75; }

.sidebar__logo-mark {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: var(--r-sm);
    flex-shrink: 0;
    color: var(--accent);
}

.sidebar__logo-mark svg { width: 16px; height: 16px; }

.sidebar__logo-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}


/* ── Site switcher trigger ─────────────────────────────────────────────────── */
.sidebar__site-switcher {
    position: relative;
    margin-bottom: 12px;
}

.sidebar__site-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    background: #ffffff;;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background var(--t), border-color var(--t);
}

.sidebar__site-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-mid);
}

.sidebar__site-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
    flex-shrink: 0;
}

.sidebar__site-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar__site-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--t);
}

/* Rotate chevron when open */
.sidebar__site-btn[aria-expanded="true"] .sidebar__site-chevron {
    transform: rotate(180deg);
}


/* ── Dropdown (opens to the right of the sidebar) ──────────────────────────── */
/*
   Reuses the existing .site-switcher__dropdown animation and item styles.
   We give it its own class so the old header-based dropdown is unaffected.
*/
.sidebar__site-dropdown {
    position: fixed;         /* JS sets top + left at open time */
    z-index: 300;
    min-width: 240px;
    max-width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

/* Piggybacks the existing --open modifier + animation from style.css */
.sidebar__site-dropdown.site-switcher__dropdown--open {
    display: flex;
    animation: switcher-in 180ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}



/* ══════════════════════════════════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-header__sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 300;
}

.date-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--t), border-color var(--t), color var(--t);
}

.date-pill:hover {
    background: var(--bg-hover);
    border-color: var(--border-mid);
    color: var(--text-primary);
}

.date-pill svg { width: 14px; height: 14px; }


/* ══════════════════════════════════════════════════════════════════════════════
   CARD
══════════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
}

.card__title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card__action {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
    transition: opacity var(--t);
    cursor: pointer;
}

.card__action:hover { opacity: 0.7; }

.card__body  { padding: 0 22px 22px; }
.card__body--padded { padding: 22px; }
.card__divider { height: 1px; background: var(--border-subtle); margin: 0 22px; }


/* ══════════════════════════════════════════════════════════════════════════════
   STAT CARD
══════════════════════════════════════════════════════════════════════════════ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 20px 22px;
}

.stat-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card__value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card__delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
}

.stat-card__delta--up   { background: var(--green-dim); color: var(--green); }
.stat-card__delta--down { background: var(--red-dim);   color: var(--red); }
.stat-card__delta--flat { background: var(--bg-elevated); color: var(--text-muted); }


/* ══════════════════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--t);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Sizes */
.btn--sm { padding: 6px 14px; font-size: 0.8rem; }
.btn--lg { padding: 13px 28px; font-size: 0.95rem; }

/* Variants */
.btn--primary {
    background: var(--text-secondary);
    color: var(--bg-surface);   
}

.btn--primary:hover {
    background: var(--bg-active);
    transform: translateY(-2px);
}

.btn--ghost {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--bg-active);
}

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

.btn--danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid transparent;
}

.btn--danger:hover {
    background: var(--red);
    color: #fff;
}

.btn--subtle {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

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

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}


/* ══════════════════════════════════════════════════════════════════════════════
   BADGES / PILLS
══════════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    letter-spacing: 0.02em;
}

.badge--accent  { background: var(--accent-dim);  color: var(--text-secondary); }
.badge--green   { background: var(--green-dim);   color: var(--green); }
.badge--red     { background: var(--red-dim);     color: var(--red); }
.badge--amber   { background: var(--amber-dim);   color: var(--amber); }
.badge--violet  { background: var(--violet-dim);  color: var(--violet); }
.badge--neutral { background: var(--bg-elevated); color: var(--text-muted); }

.badge__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════════════════════════════════════ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label--required::after {
    content: ' *';
    color: var(--red);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 2px;
}

/* Input / Select / Textarea base */
.input,
.select,
.textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: border-color var(--t), box-shadow var(--t);
    outline: none;
    -webkit-appearance: none;
}

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

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.input--error,
.select--error,
.textarea--error {
    border-color: var(--red);
}

.input--error:focus,
.select--error:focus,
.textarea--error:focus {
    box-shadow: 0 0 0 3px var(--red-dim);
}

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a85a8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.textarea { resize: vertical; min-height: 100px; line-height: 1.55; }

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

.check-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 17px;
    height: 17px;
    border: 2px solid var(--border-mid);
    border-radius: 4px;
    background: var(--bg-surface);
    cursor: pointer;
    accent-color: var(--text-secondary);
    flex-shrink: 0;
}

.radio-group input[type="radio"] { border-radius: 50%; }

.check-group__label,
.radio-group__label {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}


/* ══════════════════════════════════════════════════════════════════════════════
   ALERTS / NOTIFICATIONS
══════════════════════════════════════════════════════════════════════════════ */
.alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert__content { flex: 1; }
.alert__title   { font-weight: 600; margin-bottom: 2px; }
.alert__body    { font-size: 0.82rem; opacity: 0.85; }

.alert--success { background: var(--green-dim);  color: var(--green);  border-color: rgba(0,212,170,0.25); }
.alert--danger  { background: var(--red-dim);    color: var(--red);    border-color: rgba(239,68,68,0.25); }
.alert--warning { background: var(--amber-dim);  color: var(--amber);  border-color: rgba(245,166,35,0.25); }
.alert--info    { background: var(--accent-dim); color: var(--text-secondary); border-color: rgba(102,79,255,0.15); }


/* ══════════════════════════════════════════════════════════════════════════════
   TABLE LIST  (top pages, referrers, etc.)
══════════════════════════════════════════════════════════════════════════════ */
.table-list { display: flex; flex-direction: column; }

.table-list__row {
    display: flex;
    align-items: center;
    padding: 11px 22px;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--t);
}

.table-list__row:last-child { border-bottom: none; }
.table-list__row:hover      { background: var(--bg-hover); }

.table-list__rank {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-muted);
    width: 18px;
    flex-shrink: 0;
    text-align: center;
}

.table-list__label {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-list__label strong {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
}

.table-list__label span { font-size: 0.73rem; color: var(--text-muted); }

.table-list__bar-wrap {
    width: 80px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 99px;
    overflow: hidden;
    flex-shrink: 0;
}

.table-list__bar {
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    opacity: 0.8;
}

.table-list__count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
    flex-shrink: 0;
    width: 44px;
    text-align: right;
}


/* ══════════════════════════════════════════════════════════════════════════════
   CODE BOX
══════════════════════════════════════════════════════════════════════════════ */
.code-box {
    background: var(--bg-active);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-md);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    word-break: break-all;
    line-height: 1.7;
    position: relative;
}

.code-box__copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-sm);
    padding: 4px 10px;
    font-size: 0.72rem;
    font-family: var(--font-body);
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--t), color var(--t);
}

.code-box__copy:hover {
    background: var(--accent-dim);
    color: var(--accent);
}


/* ══════════════════════════════════════════════════════════════════════════════
   LIVE BADGE
══════════════════════════════════════════════════════════════════════════════ */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.live-badge__dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0   rgba(0, 212, 170, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(0, 212, 170, 0);   }
}


/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state svg            { width: 36px; height: 36px; opacity: 0.35; }
.empty-state__title         { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.empty-state__sub           { font-size: 0.8rem; max-width: 240px; line-height: 1.6; }


/* ══════════════════════════════════════════════════════════════════════════════
   CONTENT LAYOUTS
══════════════════════════════════════════════════════════════════════════════ */
.content-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 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; }


/* ══════════════════════════════════════════════════════════════════════════════
   SITE SWITCHER
══════════════════════════════════════════════════════════════════════════════ */
.site-switcher { position: relative; }

.site-switcher .header__site-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.site-switcher__current {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.site-switcher__dropdown {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    z-index: 300;
    min-width: 240px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.site-switcher__dropdown--open {
    display: flex;
    animation: switcher-in 180ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes switcher-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.site-switcher__heading {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px 4px;
}

.site-switcher__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--r-md);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--t);
}

.site-switcher__item:hover        { background: var(--bg-elevated); }
.site-switcher__item--active      { background: var(--accent-dim); }

.site-switcher__item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.site-switcher__item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-switcher__item--active .site-switcher__item-name {
    color: var(--text-secondary);
    font-weight: 600;
}

.site-switcher__item-domain {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.site-switcher__check { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-secondary); }

.site-switcher__footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 4px;
    padding-top: 4px;
}

.site-switcher__add {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--r-md);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background var(--t);
}

.site-switcher__add:hover { background: var(--bg-elevated); }
.site-switcher__add svg   { width: 14px; height: 14px; flex-shrink: 0; }


/* ══════════════════════════════════════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════════════════════════════════════ */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 24px 0;
}

.divider--label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════════ */

.site-footer {
    width: 100%;
    /*background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);*/
    padding: 5px 24px;
}

.site-footer__inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.site-footer__logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.3px;   
    transition: opacity var(--t);
}

.site-footer__logo-mark {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.site-footer__logo-name {
    color: var(--text-primary);
}

/* ── Disclaimer ──────────────────────────────────────────────────────────── */
.site-footer__disclaimer {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 520px;
    font-weight: 300;    
}

/* ── Nav links ───────────────────────────────────────────────────────────── */
.site-footer__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 2px;
    margin-bottom: 14px;
}
.site-footer__link {
    font-size: .8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    transition: color var(--t), background var(--t);
    font-weight: 600;
}

.site-footer__link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.site-footer__sep {
    font-size: .7rem;
    color: var(--border-mid);
    line-height: 1;
    user-select: none;
}
/* ── Copyright ───────────────────────────────────────────────────────────── */
.site-footer__copy {
    font-size: .75rem;
    color: var(--text-muted);
    opacity: .7;
}
/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .site-footer {
        padding: 40px 16px 32px;
    }

    .site-footer__logo-name {
        font-size: 1rem;
    }

    .site-footer__disclaimer {
        font-size: .78rem;
    }
}


/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .content-row         { grid-template-columns: 1fr; }
    .stat-grid           { grid-template-columns: repeat(2, 1fr); }
    .grid-4              { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar                         { display: none; }
    .main                            { padding: 20px 16px 40px; }
    .header__logo                    { width: auto; }
    .header__site-selector span      { display: none; }
    .grid-2, .grid-3                 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .grid-4    { grid-template-columns: 1fr; }
}
