:root {
    --bg: #080b14;
    --bg2: #0d1324;
    --panel: rgba(18, 25, 43, .82);
    --panel2: rgba(25, 35, 62, .84);
    --line: rgba(255, 255, 255, .09);
    --text: #eef4ff;
    --muted: #8f9bb8;
    --muted2: #65718d;
    --brand: #6ee7ff;
    --brand2: #9b7cff;
    --ok: #36e59c;
    --warn: #ffcc66;
    --fail: #ff5d7d;
    --shadow: 0 24px 80px rgba(0, 0, 0, .34);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 10% 0%, rgba(110,231,255,.16), transparent 34%),
        radial-gradient(circle at 90% 10%, rgba(155,124,255,.18), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(54,229,156,.08), transparent 34%),
        linear-gradient(135deg, var(--bg), var(--bg2));
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.01em;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.app-shell { display: grid; grid-template-columns: 286px 1fr; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px;
    background: rgba(8, 12, 23, .70);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 10px 10px 24px; }
.sidebar-brand strong { display: block; font-size: 17px; }
.sidebar-brand span { color: var(--muted); font-size: 12px; }
.brand-icon, .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(110,231,255,.24), rgba(155,124,255,.24));
    color: var(--brand);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 45px rgba(110,231,255,.10);
}
.nav { display: grid; gap: 7px; }
.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 13px;
    color: #b8c4df;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: .18s ease;
}
.nav a:hover, .nav a.active {
    color: #fff;
    background: rgba(255,255,255,.075);
    border-color: rgba(255,255,255,.10);
}
.nav a.active { box-shadow: inset 0 0 0 1px rgba(110,231,255,.16), 0 16px 40px rgba(0,0,0,.12); }
.sidebar-foot {
    margin-top: auto;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.online-dot { width: 8px; height: 8px; background: var(--ok); border-radius: 50%; box-shadow: 0 0 16px var(--ok); }

.main { min-width: 0; padding: 28px; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}
.topbar h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1; letter-spacing: -.045em; }
.topbar p { margin: 8px 0 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #dce7ff;
    border: 1px solid var(--line);
    font-size: 13px;
}
.mobile-menu { display: none; }

.card, .metric-card, .login-card {
    background: linear-gradient(180deg, rgba(27, 37, 65, .82), rgba(16, 23, 42, .82));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.card { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px;  }
.card.table-card .card-head { padding: 15px; }
.card-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-card { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.metric-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--brand);
    background: rgba(110,231,255,.10);
    border: 1px solid rgba(110,231,255,.16);
}
.metric-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.metric-card strong { display: block; font-size: 27px; letter-spacing: -.04em; }
.metric-card p { margin: 6px 0 0; color: var(--muted2); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 16px; }

.store-list, .incident-list { display: grid; gap: 10px; }
.store-row, .incident-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
}
.store-row strong, .incident-item strong { display: block; }
.store-row span, .incident-item span, .store-row em, .incident-item small { display: block; color: var(--muted); font-style: normal; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.store-row > div:last-child { text-align: right; }
.empty-state { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty-state .icon { color: var(--ok); width: 32px; height: 32px; }
.empty-state h3 { color: var(--text); margin: 12px 0 6px; }
.empty-state p { margin: 0; }

.page-actions { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.btn, .icon-btn {
    border: 1px solid var(--line);
    color: #eaf2ff;
    background: rgba(255,255,255,.055);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    cursor: pointer;
    transition: .18s ease;
}
.btn:hover, .icon-btn:hover { color: #ffffff; transform: translateY(-1px); background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.btn-primary {
    background: linear-gradient(135deg, rgba(110,231,255,.95), rgba(155,124,255,.95));
    color: #061020;
    border: none;
    font-weight: 800;
    box-shadow: 0 16px 40px rgba(110,231,255,.17);
}
.btn-small { min-height: 34px; padding: 7px 11px; border-radius: 12px; font-size: 13px; }
.btn-full { width: 100%; }
.icon-btn { width: 40px; height: 40px; padding: 0; }
.icon-btn.danger { color: var(--fail); }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.actions form { display: inline-flex; margin: 0; }

.table-card { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: #a8b5d2; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.025); }
td strong { display: block; }
td small { display: block; color: var(--muted); margin-top: 4px; }
tr:last-child td { border-bottom: 0; }
.td-url, .td-error { max-width: 340px; overflow-wrap: anywhere; color: #cdd8f4; }
details { margin-top: 7px; color: var(--muted); }
details p { max-width: 520px; line-height: 1.45; }

.status-pill, .type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    border: 1px solid var(--line);
    text-transform: uppercase;
}
.status-pill:before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 14px currentColor;
}
.status-ok { color: var(--ok); background: rgba(54,229,156,.09); border-color: rgba(54,229,156,.18); }
.status-warning { color: var(--warn); background: rgba(255,204,102,.09); border-color: rgba(255,204,102,.18); }
.status-fail, .status-open { color: var(--fail); background: rgba(255,93,125,.09); border-color: rgba(255,93,125,.18); }
.status-closed { color: var(--muted); background: rgba(255,255,255,.04); }
.status-unknown, .status-muted { color: var(--muted); background: rgba(255,255,255,.04); }
.type-chip { color: #cfdcff; background: rgba(155,124,255,.10); border-color: rgba(155,124,255,.18); }
.severity-critical { color: var(--fail); background: rgba(255,93,125,.09); }
.severity-warning { color: var(--warn); background: rgba(255,204,102,.09); }

.form-card { max-width: 1080px; }
.stack-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 8px; color: #cbd7f2; font-size: 13px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    color: var(--text);
    background: rgba(5, 10, 22, .72);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 15px;
    padding: 12px 13px;
    outline: none;
    transition: .16s ease;
}
textarea { resize: vertical; min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: rgba(110,231,255,.55); box-shadow: 0 0 0 4px rgba(110,231,255,.08); }
.toggle-row { display: flex; align-items: center; gap: 10px; align-self: end; padding: 12px 0; cursor: pointer;
padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
        flex-flow: wrap;
 }
.toggle-row:hover {       }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }

.notice {
    margin-bottom: 16px;
    border-radius: 16px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.055);
    color: #e9f1ff;
}
.notice-success { border-color: rgba(54,229,156,.25); background: rgba(54,229,156,.08); }
.notice-warning { border-color: rgba(255,204,102,.25); background: rgba(255,204,102,.08); }
.notice-error { border-color: rgba(255,93,125,.25); background: rgba(255,93,125,.08); }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(460px, 100%); }
.login-card { padding: 28px; text-align: center; }
.login-card h1 { margin: 16px 0 6px; font-size: 34px; letter-spacing: -.045em; }
.login-card p { line-height: 1.5; }
.login-card .brand-mark { margin: 0 auto; width: 62px; height: 62px; border-radius: 22px; }
.login-card .brand-mark .icon { width: 30px; height: 30px; }
.login-card form { text-align: left; margin-top: 20px; }

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

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(310px, 84vw);
        transform: translateX(-105%);
        transition: .24s ease;
        box-shadow: 30px 0 80px rgba(0,0,0,.42);
    }
    .main { padding: 18px; }
    .mobile-menu { display: inline-flex; width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); border-radius: 14px; align-items: center; justify-content: center; }
    .topbar { align-items: flex-start; }
    .topbar-actions { margin-left: auto; }
    .user-chip { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .store-row { display: grid; }
    .store-row > div:last-child { text-align: left; }
    .table-card { overflow-x: auto; }
    table { min-width: 820px; }
    .card { padding: 16px; }
}

@media (max-width: 520px) {
    .main { padding: 14px; }
    .topbar { gap: 12px; }
    .topbar h1 { font-size: 28px; }
    .topbar p { display: none; }
    .page-actions, .form-actions { justify-content: stretch; }
    .page-actions .btn, .form-actions .btn, .form-actions button { flex: 1; }
    .login-card { padding: 22px; }
}

.code-panel, .agent-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
}
.code-panel strong, .agent-card strong { display:block; margin-bottom: 6px; }
.code-panel code, .agent-card code, code {
    display: block;
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(3, 7, 18, .72);
    border: 1px solid rgba(110,231,255,.16);
    color: #dff8ff;
    overflow-x: auto;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    cursor: copy;
}
code.copied { outline: 2px solid rgba(54,229,156,.45); }
.agent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.agent-card { margin-top: 0; }
.agent-card span, .agent-card small { display:block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.agent-card p { margin: 12px 0 0; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.field-hint {
    padding: 14px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
    align-self: end;
}
.agent-check-info {
    align-self: stretch;
    display: grid;
    gap: 8px;
    margin: 2px 0 4px;
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(124, 236, 255, .075), rgba(159, 124, 255, .065)),
        rgba(255, 255, 255, .035);
    border: 1px solid rgba(124, 236, 255, .18);
}

.agent-check-info strong {
    color: #f8fafc;
    font-size: 14px;
}

.agent-check-info span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
@media (max-width: 780px) {
    .agent-grid { grid-template-columns: 1fr; }
    .code-panel code, .agent-card code, code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* v0.2.4: account management, global site filters, cleanup panels */
.topbar-title { min-width: 0; }
.site-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 210px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
}
.site-switcher .icon { width: 17px; height: 17px; color: var(--brand); }
.site-switcher select {
    min-height: 34px;
    padding: 7px 28px 7px 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.user-chip { display: inline-flex; flex-direction: column; line-height: 1.05; gap: 3px; }
.user-chip small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.context-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 16px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(110,231,255,.18);
    background: rgba(110,231,255,.07);
    color: #dff8ff;
}
.context-banner a { margin-left: auto; color: var(--brand); font-weight: 800; font-size: 13px; }
.filter-card { margin-bottom: 16px; }
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
.filter-actions { display: flex; align-items: end; }
.filter-actions .btn { width: 100%; }
.count-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: var(--muted);
    border: 1px solid var(--line);
    font-size: 12px;
    vertical-align: middle;
}
.btn-danger {
    background: linear-gradient(135deg, rgba(255,93,125,.95), rgba(255,144,102,.95));
    color: #1a0610;
    border: none;
    font-weight: 900;
}
.danger-zone {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
    align-items: start;
    border-color: rgba(255,93,125,.20);
    background: linear-gradient(180deg, rgba(75, 24, 38, .55), rgba(20, 23, 42, .84));
}
.danger-zone h2 { margin: 0 0 8px; }
.danger-zone p { margin: 0; color: var(--muted); line-height: 1.5; }
.danger-actions { display: grid; gap: 10px; }
.danger-actions form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid rgba(255,255,255,.12);
    color: #dce7ff;
    background: rgba(255,255,255,.055);
}
.role-owner, .role-admin { color: var(--brand); background: rgba(110,231,255,.09); border-color: rgba(110,231,255,.20); }
.role-manager { color: var(--brand2); background: rgba(155,124,255,.10); border-color: rgba(155,124,255,.20); }
.role-operator { color: var(--warn); background: rgba(255,204,102,.09); border-color: rgba(255,204,102,.20); }
.role-viewer { color: var(--muted); }
.info-card { margin-top: 16px; }
.info-card h2 { margin: 0 0 14px; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.role-grid > div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
}
.role-grid p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }
@media (max-width: 1080px) {
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .danger-zone { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .topbar { flex-wrap: wrap; }
    .topbar-actions { width: 100%; justify-content: space-between; }
    .site-switcher { flex: 1; min-width: 0; }
}
@media (max-width: 620px) {
    .filter-grid, .role-grid { grid-template-columns: 1fr; }
    .danger-actions form { grid-template-columns: 1fr; }
    .context-banner { align-items: flex-start; flex-wrap: wrap; }
    .context-banner a { margin-left: 0; width: 100%; }
}

/* v0.2.5 polish + JS agent UI */
.btn,
.icon-btn,
button.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 15px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.13);
    background: linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
    color: #eef6ff;
    font-weight: 750;
    letter-spacing: -.015em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 28px rgba(0,0,0,.18);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover,
.icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(110,231,255,.34);
    background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 18px 38px rgba(0,0,0,.24);
}
.btn:active,
.icon-btn:active { transform: translateY(0); }
.btn-primary {
    border-color: rgba(110,231,255,.42);
    color: #06101f;
    background: linear-gradient(135deg, #7eeeff, #a78bfa 55%, #8fffd0);
    box-shadow: 0 18px 45px rgba(110,231,255,.18), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { color: #06101f; box-shadow: 0 22px 52px rgba(110,231,255,.25); }
.btn-danger {
    border-color: rgba(255,93,125,.44);
    background: linear-gradient(135deg, rgba(255,93,125,.96), rgba(255,143,111,.88));
    color: #26040a;
}
.btn.ghost {
    background: rgba(255,255,255,.035);
    color: #c6d4f3;
}
.icon-btn {
    width: 40px;
    min-height: 40px;
    padding: 0;
}
.icon-btn.danger { color: #ff8da3; border-color: rgba(255,93,125,.22); }

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin: 8px 0 14px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.09);
    background: linear-gradient(135deg, rgba(110,231,255,.09), rgba(155,124,255,.07));
}
.section-title.compact { margin-top: 18px; }
.section-title h2 { margin: 0 0 5px; font-size: 17px; }
.section-title p { margin: 0; color: var(--muted); line-height: 1.45; }
.agent-section-title { margin-top: 20px; }
.agent-settings-grid,
.warning-level-grid,
.toggle-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.agent-settings-grid label,
.warning-level-grid label,
.toggle-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
}
.agent-settings-grid small,
.field-help,
.toggle-card small { color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 6px; display: block; }
.toggle-card {

    gap: 10px;
    min-height: 52px;
    cursor: pointer;
}
.toggle-card input { width: 18px; height: 18px; accent-color: var(--brand); }
.warning-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.warning-level-grid label span { display: block; margin-bottom: 7px; color: #dce8ff; font-weight: 700; }
.compact-metrics { margin-bottom: 16px; }
.agent-mini-settings {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 8px 0 10px;
}
.agent-mini-settings span,
.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.055);
    color: #bfcae3;
}
.signal-badge.signal-ok {
    color: #8dffd1;
    background: rgba(54,229,156,.10);
    border-color: rgba(54,229,156,.22);
}
.signal-badge.signal-bad {
    color: #ffc1cb;
    background: rgba(255,93,125,.10);
    border-color: rgba(255,93,125,.24);
}
.agent-signal-cell { min-width: 260px; }
.agent-signal-cell .signal-badge { margin: 0 5px 6px 0; }
.detail-stack p { margin: 7px 0; overflow-wrap: anywhere; }
.reason-list,
.error-list { margin: 10px 0 0; padding-left: 18px; }
.reason-list li,
.error-list li { margin: 8px 0; }
.error-list small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.agent-events-card td { vertical-align: top; }
.danger-zone {
    border-color: rgba(255,93,125,.23);
    background: linear-gradient(135deg, rgba(255,93,125,.065), rgba(255,255,255,.035));
}
.danger-zone p { max-width: 860px; line-height: 1.55; }
.danger-actions form {
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(0,0,0,.14);
    border-radius: 18px;
    padding: 12px;
}
.danger-actions input { min-width: 150px; }

@media (max-width: 1180px) {
    .agent-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .warning-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .agent-settings-grid,
    .warning-level-grid,
    .toggle-grid { grid-template-columns: 1fr; }
    .section-title { padding: 14px; border-radius: 16px; }
    .btn { width: 100%; }
    .actions .btn,
    .actions .icon-btn { width: auto; }
    .danger-actions form { display: grid; gap: 8px; }
}

/* v0.2.6 UI refinement + cleanup controls */
.card-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.btn,
.icon-btn,
button.btn {
    border-radius: 16px;
    border-color: rgba(255,255,255,.15);
    background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 34px rgba(0,0,0,.22);
}
.btn::after,
.icon-btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 42%);
    opacity: .55;
}
.btn-primary {
    background: linear-gradient(135deg, #74edff 0%, #a78bfa 52%, #7cffc1 100%);
    border-color: rgba(255,255,255,.18);
}
.btn-danger {
    background: linear-gradient(135deg, #ff6b8a 0%, #ff9b6b 100%);
    border-color: rgba(255,137,137,.35);
}
.btn.ghost {
    border-color: rgba(110,231,255,.18);
    background: rgba(110,231,255,.055);
}
.filter-card .filter-grid {
    align-items: end;
}
.cleanup-zone {
    margin-top: 18px;
}
.cleanup-zone .danger-actions,
.stacked-actions {
    display: grid;
    gap: 12px;
}
.cleanup-zone .danger-actions form,
.stacked-actions form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.cleanup-zone .danger-actions form label,
.stacked-actions form label {
    margin: 0;
}
.cleanup-zone .danger-actions form label input,
.stacked-actions form label input {
    margin-top: 7px;
}
.agent-events-card table {
    min-width: 1160px;
}
.agent-events-card .td-url {
    max-width: 420px;
}
.agent-signal-cell details summary,
.td-error details summary {
    cursor: pointer;
    color: #d9e6ff;
    font-weight: 750;
}
.reason-list .type-chip.severity-info { color: #a9d5ff; border-color: rgba(110,231,255,.22); background: rgba(110,231,255,.08); }
.reason-list .type-chip.severity-warning { color: #ffdc8a; border-color: rgba(255,204,102,.25); background: rgba(255,204,102,.09); }
.reason-list .type-chip.severity-fail { color: #ff9caf; border-color: rgba(255,93,125,.28); background: rgba(255,93,125,.10); }
.agent-mini-settings span {
    letter-spacing: -.01em;
}
@media (max-width: 720px) {
    .cleanup-zone .danger-actions form,
    .stacked-actions form {
        grid-template-columns: 1fr;
    }
}



/* Better premium button hover states */
.btn,
.icon-btn,
button.btn {
    text-decoration: none;
}

.btn-primary {
    color: #07111f !important;
    background: linear-gradient(135deg, #7cecff 0%, #9f7cff 52%, #5eead4 100%) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow:
        0 14px 34px rgba(110, 231, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 48%, #0f172a 100%) !important;
    border-color: rgba(124, 236, 255, .55) !important;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, .28),
        0 0 0 1px rgba(124, 236, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .12) !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, .25),
        inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

/* Secondary buttons */
.btn:not(.btn-primary):not(.btn-danger):hover,
.icon-btn:not(.danger):hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(124,236,255,.08)) !important;
    border-color: rgba(124, 236, 255, .35) !important;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .20),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* Danger buttons */
.btn-danger:hover,
.btn-danger:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    box-shadow:
        0 16px 34px rgba(239, 68, 68, .24),
        inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

/* Disabled buttons should not look hoverable */
.btn:disabled,
button:disabled,
.btn[disabled] {
    opacity: .48;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover,
button:disabled:hover,
.btn[disabled]:hover {
    color: inherit !important;
    transform: none !important;
}
/* v0.2.7 health model + button polish */
.btn,
.icon-btn,
button.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn > *,
.icon-btn > * {
    position: relative;
    z-index: 1;
}
.btn-primary {
    color: #07111f !important;
    background: linear-gradient(135deg, #7cecff 0%, #9f7cff 52%, #5eead4 100%) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow: 0 14px 34px rgba(110, 231, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}
.btn-primary:hover,
.btn-primary:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 48%, #0f172a 100%) !important;
    border-color: rgba(124, 236, 255, .55) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 0 1px rgba(124,236,255,.18), inset 0 1px 0 rgba(255,255,255,.12) !important;
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn:not(.btn-primary):not(.btn-danger):hover,
.icon-btn:not(.danger):hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(124,236,255,.08)) !important;
    border-color: rgba(124,236,255,.35) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-danger:hover,
.btn-danger:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
    border-color: rgba(255,255,255,.16) !important;
    box-shadow: 0 16px 34px rgba(239,68,68,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
}
.btn:disabled,
button:disabled,
.btn[disabled] {
    opacity: .48;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn:disabled:hover,
button:disabled:hover,
.btn[disabled]:hover {
    color: inherit !important;
    transform: none !important;
}
.health-meta {
    display: block;
    margin-top: 6px;
    color: var(--muted2) !important;
    font-size: 12px !important;
    line-height: 1.35;
}
.store-health-row {
    align-items: center;
}
.impact-chip,
.quality-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.055);
    color: #cbd7ef;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
    white-space: nowrap;
}
.impact-critical {
    color: #8dffd1;
    border-color: rgba(54,229,156,.24);
    background: rgba(54,229,156,.10);
}
.impact-quality,
.quality-count.is-warning {
    color: #ffdc8a;
    border-color: rgba(255,204,102,.26);
    background: rgba(255,204,102,.10);
}
.impact-info {
    color: #a9d5ff;
    border-color: rgba(110,231,255,.24);
    background: rgba(110,231,255,.08);
}
.impact-muted {
    color: #a7b0c5;
    border-color: rgba(167,176,197,.18);
    background: rgba(167,176,197,.07);
}
.quality-count {
    color: #8dffd1;
    border-color: rgba(54,229,156,.22);
    background: rgba(54,229,156,.08);
}
.status-muted:before,
.status-paused:before {
    background: #94a3b8;
    box-shadow: none;
}
.status-muted,
.status-paused {
    color: #cbd5e1;
    background: rgba(148,163,184,.10);
    border-color: rgba(148,163,184,.20);
}
.error-list strong {
    line-height: 1.35;
}
.error-list small + small {
    margin-top: 2px;
}
@media (max-width: 920px) {
    .store-health-row {
        align-items: flex-start;
    }
    .quality-count,
    .impact-chip {
        white-space: normal;
        text-align: center;
    }
}


/* v0.2.8 pagination and saved view settings */
.split-actions {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-settings {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}

.inline-settings label {
    min-width: 180px;
    display: flex;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(110,231,255,.035));
}

.card-head + .pagination-bar {
    margin-top: -2px;
}

.pagination-summary {
    color: var(--muted);
    font-size: 13px;
}

.pagination-summary strong {
    color: var(--text);
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.page-btn,
.page-ellipsis {
    min-width: 36px;
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dce7ff;
    background: rgba(255,255,255,.055);
    font-size: 13px;
    font-weight: 800;
}

.page-btn:hover {
    color: #ffffff;
    border-color: rgba(124, 236, 255, .36);
    background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(124,236,255,.09));
    transform: translateY(-1px);
}

.page-btn.active {
    color: #07111f;
    background: linear-gradient(135deg, #7cecff 0%, #9f7cff 52%, #5eead4 100%);
    border-color: rgba(255,255,255,.20);
    box-shadow: 0 12px 28px rgba(110,231,255,.16);
}

.page-btn.disabled {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}

.page-ellipsis {
    min-width: 26px;
    border-color: transparent;
    background: transparent;
    color: var(--muted2);
}

/* Stronger premium button hover states */
.btn,
.icon-btn,
button.btn {
    text-decoration: none;
}

.btn-primary {
    color: #07111f !important;
    background: linear-gradient(135deg, #7cecff 0%, #9f7cff 52%, #5eead4 100%) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow:
        0 14px 34px rgba(110, 231, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 48%, #0f172a 100%) !important;
    border-color: rgba(124, 236, 255, .55) !important;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, .28),
        0 0 0 1px rgba(124, 236, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .12) !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, .25),
        inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.btn:not(.btn-primary):not(.btn-danger):hover,
.icon-btn:not(.danger):hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(124,236,255,.08)) !important;
    border-color: rgba(124, 236, 255, .35) !important;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .20),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    box-shadow:
        0 16px 34px rgba(239, 68, 68, .24),
        inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

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

.btn:disabled:hover,
button:disabled:hover,
.btn[disabled]:hover {
    color: inherit !important;
    transform: none !important;
}

@media (max-width: 900px) {
    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-nav {
        justify-content: flex-start;
    }

    .inline-settings {
        width: 100%;
    }

    .inline-settings label {
        flex: 1 1 180px;
    }
}

/* v0.3.0 - Finding mute UX */
.finding-cell { min-width: 320px; }
.finding-group { display: grid; gap: 8px; }
.finding-group > strong { display: block; color: var(--text); margin-bottom: 2px; }
.finding-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.finding-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.14); border-radius: 16px; background: rgba(15,23,42,.38); }
.finding-list li strong { color: #e8efff; }
.finding-list li small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.muted-findings { margin-top: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid rgba(148,163,184,.14); background: rgba(148,163,184,.06); }
.muted-findings summary { cursor: pointer; color: #a9b8d7; font-weight: 800; }
.muted-list li { opacity: .78; border-style: dashed; }
.inline-mute-form { flex: 0 0 auto; }
.btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(148,163,184,.28); color: #cfe7ff; box-shadow: none; }
.btn-ghost:hover,
.btn-ghost:focus-visible { color: #07111f !important; background: linear-gradient(135deg, #7cecff 0%, #9f7cff 55%, #5eead4 100%) !important; border-color: rgba(255,255,255,.24) !important; box-shadow: 0 14px 34px rgba(110,231,255,.18) !important; }
.nav a[href*="muted_findings"] { font-size: .94rem; }

@media (max-width: 760px) {
  .finding-list li { flex-direction: column; }
  .inline-mute-form { width: 100%; }
  .inline-mute-form .btn { width: 100%; justify-content: center; }
}

/* v0.3.0 multi-account polish */
.workspace-chip,
.access-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(124, 236, 255, .22);
    background: rgba(124, 236, 255, .08);
    color: #d9f7ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}
.access-chip.site-access {
    border-color: rgba(167, 139, 250, .28);
    background: rgba(167, 139, 250, .10);
    color: #eee8ff;
}
.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.access-grid label {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: rgba(15, 23, 42, .40);
}
.access-grid label > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 850;
}
.access-grid label small {
    color: var(--muted);
    font-weight: 600;
}
.role-badge.role-owner,
.role-badge.role-admin,
.role-badge.role-manager,
.role-badge.role-operator,
.role-badge.role-viewer {
    text-transform: uppercase;
}
.role-badge.role-owner {
    border-color: rgba(251, 191, 36, .45);
    background: rgba(251, 191, 36, .13);
    color: #fde68a;
}

/* v0.3.0.1: Sites table action visibility + long agent URL protection */
.sites-card {
    overflow-x: auto;
}

.sites-table {
    min-width: 1380px;
    table-layout: fixed;
}

.sites-table th:nth-child(1),
.sites-table td:nth-child(1) { width: 9%; }
.sites-table th:nth-child(2),
.sites-table td:nth-child(2) { width: 10%; }
.sites-table th:nth-child(3),
.sites-table td:nth-child(3) { width: 14%; }
.sites-table th:nth-child(4),
.sites-table td:nth-child(4) { width: 7%; }
.sites-table th:nth-child(5),
.sites-table td:nth-child(5) { width: 8%; }
.sites-table th:nth-child(6),
.sites-table td:nth-child(6) { width: 8%; }
.sites-table th:nth-child(7),
.sites-table td:nth-child(7) { width: 8%; }
.sites-table th:nth-child(8),
.sites-table td:nth-child(8) { width: 8%; }
.sites-table th:nth-child(9),
.sites-table td:nth-child(9) { width: 16%; }
.sites-table th:nth-child(10),
.sites-table td:nth-child(10) { width: 6%; }
.sites-table th:nth-child(11),
.sites-table td:nth-child(11) { width: 6%; }

.sites-table .agent-cell,
.sites-table .td-url,
.sites-table td {
    min-width: 0;
}

.sites-table .agent-url {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sites-table .interval-cell {
    white-space: nowrap;
}

.sites-table .row-actions {
    min-width: 92px;
    width: 92px;
    justify-content: flex-end;
}

.sites-table .action-muted {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sites-table {
        min-width: 1180px;
    }
}


/* v0.3.0.1 hotfix — keep site row actions visible and aligned */
.table-card table,
.data-table,
.monitor-table {
    table-layout: auto;
}

.table-card td:last-child,
.table-card th:last-child,
.data-table td:last-child,
.data-table th:last-child,
.monitor-table td:last-child,
.monitor-table th:last-child {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    overflow: visible !important;
    white-space: nowrap;
}

.row-actions,
.table-actions,
.site-actions,
.action-buttons {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 96px;
    overflow: visible !important;
    white-space: nowrap;
}

.icon-btn,
button.icon-btn,
a.icon-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 42px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: visible !important;
    line-height: 1 !important;
}

.icon-btn svg,
button.icon-btn svg,
a.icon-btn svg {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    display: block !important;
    flex: 0 0 auto !important;
    stroke-width: 2.2;
}

/* Prevent long agent URLs from pushing action buttons outside the table */
.agent-cell,
.site-agent-cell,
td.agent-cell,
td.site-agent-cell {
    max-width: 360px;
    overflow: hidden;
}

.agent-cell small,
.site-agent-cell small,
.agent-last-url,
.site-agent-url {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* v0.3.1 — archive/restore and safer site deletion UX */
.view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.view-switcher .btn.is-active {
    color: #07111f !important;
    background: linear-gradient(135deg, #7cecff 0%, #9f7cff 52%, #5eead4 100%) !important;
    border-color: rgba(255,255,255,.22) !important;
    box-shadow: 0 14px 34px rgba(124,236,255,.16), inset 0 1px 0 rgba(255,255,255,.35) !important;
}

.is-archived-row {
    opacity: .82;
}

.is-archived-row td {
   /* background: linear-gradient(90deg, rgba(148, 163, 184, .035), rgba(15, 23, 42, 0));*/
}

.icon-btn.warning {
    border-color: rgba(251, 191, 36, .24) !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(255,255,255,.05)) !important;
    color: #fde68a !important;
}

.icon-btn.warning:hover {
    border-color: rgba(251, 191, 36, .45) !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, .20), rgba(255,255,255,.08)) !important;
    color: #fff7d6 !important;
}

.icon-btn.success {
    border-color: rgba(52, 211, 153, .25) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, .14), rgba(255,255,255,.05)) !important;
    color: #6ee7b7 !important;
}

.icon-btn.success:hover {
    border-color: rgba(52, 211, 153, .48) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, .24), rgba(255,255,255,.08)) !important;
    color: #d1fae5 !important;
}

.site-row-actions {
    min-width: 116px;
}

.delete-confirm-card h2 {
    color: #fecdd3;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.impact-card {
    padding: 16px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(15, 23, 42, .58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.impact-card span {
    display: block;
    color: var(--muted);
    font-size: .84rem;
    margin-bottom: 8px;
}

.impact-card strong {
    display: block;
    font-size: 1.55rem;
    color: #fff;
}

/* v0.3.3 field help / platform-aware settings */
.toggle-card.is-disabled-setting {
    opacity: .52;
    filter: grayscale(.18);
}
.toggle-card.is-disabled-setting small::after {
    content: " Disabled for generic websites.";
    color: #9fb3d9;
}
.toggle-row .field-help {
    flex-basis: 100%;
    margin-left: 35px;
}


/* Settings toggle cards — clean responsive grid */
.toggle-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: center;
}

.toggle-card {
    display: grid !important;
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
    min-height: 148px;
    padding: 18px;
    border-radius: 18px;
}

.toggle-card input[type="checkbox"] {
    grid-column: 1;
    grid-row: 1;
    margin-top: 2px;
}

.toggle-card span {
    grid-column: 2;
    grid-row: 1;
    line-height: 1.2;
}

.toggle-card small {
    grid-column: 2;
    grid-row: 2;
    display: block;
    line-height: 1.45;
    margin-top: 4px;
}
/* v0.3.4 language switcher */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.language-switcher .icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.language-switcher select {
    width: auto;
    min-width: 116px;
    height: 40px;
    padding: 0 30px 0 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 800;
    outline: none;
}

.language-switcher.compact {
    width: fit-content;
    margin-left: auto;
    margin-bottom: 16px;
}

.login-language {
    display: flex;
    justify-content: flex-end;
}

.topbar-language {
    min-width: 132px;
}

.toggle-card.is-disabled-setting small::after {
    content: "";
}

@media (max-width: 780px) {
    .topbar-actions {
        gap: 8px;
    }
    .topbar-language {
        order: 4;
        width: 100%;
    }
    .topbar-language select {
        min-width: 0;
        width: 100%;
    }
}

select option {
    color: #000000;
        background: #ffffff;
}
/* v0.3.5 — Checks active state and quick toggle */
.checks-table tr.is-check-paused td {
/*    background: linear-gradient(90deg, rgba(148, 163, 184, .045), rgba(15, 23, 42, 0));*/
    color: rgba(226, 234, 248, .74);
}

.checks-table tr.is-check-paused td strong,
.checks-table tr.is-check-paused .td-url {
    color: rgba(226, 234, 248, .72);
}

.checks-table tr.is-check-paused td small {
    color: rgba(143, 155, 184, .72);
}

.check-toggle-form {
    display: inline-flex;
    margin: 0;
}

.check-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 78px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    cursor: pointer;
    transition: .18s ease;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 26px rgba(0, 0, 0, .12);
}

.check-toggle.is-on {
    color: #cffff0;
    background: linear-gradient(135deg, rgba(54, 229, 156, .22), rgba(20, 184, 166, .14));
    border-color: rgba(54, 229, 156, .32);
}

.check-toggle.is-off {
    color: #cbd5e1;
    background: linear-gradient(135deg, rgba(148, 163, 184, .14), rgba(51, 65, 85, .12));
    border-color: rgba(148, 163, 184, .22);
    justify-content: flex-end;
}

.check-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(110, 231, 255, .38);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .20), inset 0 1px 0 rgba(255, 255, 255, .10);
}

.check-toggle-knob {
    position: absolute;
    top: 5px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
    transition: .18s ease;
}

.check-toggle.is-on .check-toggle-knob {
    left: 47px;
    background: linear-gradient(135deg, #36e59c, #6ee7ff);
}

.check-toggle.is-off .check-toggle-knob {
    left: 5px;
    background: linear-gradient(135deg, #94a3b8, #e2e8f0);
}

.check-toggle-text {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.check-toggle.is-on .check-toggle-text {
    margin-right: 30px;
}

.check-toggle.is-off .check-toggle-text {
    margin-left: 30px;
}

@media (max-width: 900px) {
    .check-toggle {
        width: 68px;
        height: 34px;
    }
    .check-toggle.is-on .check-toggle-knob {
        left: 39px;
    }
}


/* Fix table row border alignment in action columns */
.table-card table {
    border-collapse: collapse;
}

.table-card tr {
    border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.table-card th,
.table-card td {
    border-bottom: 0 !important;
}

.table-card tbody tr:last-child {
    border-bottom: 0;
}

.table-card td:last-child,
.table-card th:last-child {
    vertical-align: middle;
}

.row-actions,
.table-actions,
.site-actions,
.action-buttons {
    border-bottom: 0 !important;
}



/* v0.3.6 — Workspace suspension state */
.is-suspended-workspace-row {
    opacity: .78;
}



.workspace-chip.is-disabled {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(148, 163, 184, .10);
    color: #cbd5e1;
}

.status-pill.status-muted + small,
.workspace-chip + small.muted {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}
