
:root {
    --bg: #f5f5f7;
    --bg-elevated: rgba(255,255,255,0.78);
    --surface: rgba(255,255,255,0.72);
    --surface-strong: rgba(255,255,255,0.92);
    --surface-soft: rgba(248,248,250,0.9);
    --text: #111827;
    --muted: #6b7280;
    --muted-2: #9ca3af;
    --line: rgba(15,23,42,0.08);
    --line-strong: rgba(15,23,42,0.12);
    --shadow: 0 16px 42px rgba(15,23,42,0.08);
    --shadow-soft: 0 8px 24px rgba(15,23,42,0.06);
    --accent: #2563eb;
    --accent-soft: rgba(37,99,235,0.1);
    --success: #15803d;
    --success-soft: rgba(21,128,61,0.1);
    --warning: #b45309;
    --warning-soft: rgba(180,83,9,0.11);
    --danger: #dc2626;
    --danger-soft: rgba(220,38,38,0.1);
    --sidebar: rgba(255,255,255,0.62);
}

html[data-theme="dark"] {
    --bg: #0b0b0f;
    --bg-elevated: rgba(20,20,24,0.82);
    --surface: rgba(22,22,27,0.75);
    --surface-strong: rgba(24,24,30,0.93);
    --surface-soft: rgba(18,18,23,0.96);
    --text: #f5f5f7;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --line: rgba(255,255,255,0.08);
    --line-strong: rgba(255,255,255,0.12);
    --shadow: 0 16px 42px rgba(0,0,0,0.35);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.26);
    --accent: #60a5fa;
    --accent-soft: rgba(96,165,250,0.16);
    --success: #4ade80;
    --success-soft: rgba(74,222,128,0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251,191,36,0.14);
    --danger: #f87171;
    --danger-soft: rgba(248,113,113,0.14);
    --sidebar: rgba(20,20,24,0.64);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(59,130,246,0.09), transparent 34%), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }
code, pre, .mono-textarea, .code-block { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 24px;
    min-height: 100vh;
    padding: 22px;
}

.sidebar {
    position: sticky;
    top: 22px;
    align-self: start;
    min-height: calc(100vh - 44px);
    background: var(--sidebar);
    backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-glow { display:none; }
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, #2f6df6, #0f4ad8);
    box-shadow: 0 12px 26px rgba(37,99,235,0.24);
}
.sidebar-brand h1 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.sidebar-brand p {
    margin: 2px 0 0;
    font-size: 0.87rem;
    color: var(--muted);
}

.nav {
    display: grid;
    gap: 8px;
}
.nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--text);
    font-weight: 600;
    border: 1px solid transparent;
}
.nav a:hover {
    text-decoration: none;
    background: var(--surface-soft);
}
.nav a.is-active {
    background: var(--surface-strong);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}
.sidebar-note {
    display: grid;
    gap: 4px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 0.9rem;
}
.sidebar-note strong { font-size: 0.92rem; }
.sidebar-note span { color: var(--muted); }

.content {
    display: grid;
    align-content: start;
    gap: 20px;
    padding-bottom: 24px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    background: var(--bg-elevated);
    backdrop-filter: blur(22px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.topbar h2 {
    margin: 2px 0 6px;
    font-size: 1.75rem;
    letter-spacing: -0.03em;
}
.topbar p { margin: 0; color: var(--muted); }
.topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.card-grid,
.card-stack {
    display: grid;
    gap: 20px;
}
.card-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0,1fr));
}
.card {
    background: var(--bg-elevated);
    backdrop-filter: blur(22px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.card-accent, .gradient-card { background: var(--bg-elevated); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.card-header-wrap { flex-wrap: wrap; }
.card-header h3, .card-header h4 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.card-header p { margin: 6px 0 0; color: var(--muted); }
.card-subsection {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 18px;
}
.soft-surface, .soft-info { background: var(--surface-soft); border: 1px solid var(--line); }
.no-margin { margin-bottom: 0; }

.metrics-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.compact-metrics { gap: 14px; }
.form-grid .full-span { grid-column: 1 / -1; }
label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.94rem;
    font-weight: 650;
}
input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    padding: 0 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
textarea {
    min-height: 140px;
    resize: vertical;
    padding: 14px;
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(37,99,235,0.42);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.compact-input input { min-height: 42px; }
.metric-field input { text-align: center; font-weight: 600; }
.metric-field small { display:block; margin-top:6px; }

small, .muted, .small-text { color: var(--muted); }
.small-text { font-size: 0.88rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: all .18s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
    background: #111827;
    color: #fff;
    box-shadow: 0 14px 28px rgba(17,24,39,0.16);
}
html[data-theme="dark"] .btn-primary { background: #f5f5f7; color: #0b0b0f; box-shadow: none; }
.btn-secondary { background: var(--surface-soft); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.form-actions, .toolbar-actions, .table-actions, .stack-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.stack-actions { margin-top: 16px; }

.status-pill, .summary-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 0.88rem;
    font-weight: 650;
}
.status-pill-primary { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.status-pill-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.status-pill-muted { color: var(--muted); }
.summary-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.alert {
    padding: 15px 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-weight: 600;
}
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }

.toolbar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.toolbar-grid.compact-toolbar-inline { grid-template-columns: 1.4fr 0.6fr auto; align-items: end; }
.toolbar-grid.compact-toolbar { grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.6fr auto; align-items: end; }
.toolbar-grid.filters-toolbar { grid-template-columns: repeat(6, minmax(0,1fr)); }
.filter-rail {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0,1fr));
    margin-top: 14px;
}
.range-box {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
}
.range-box .range-inputs { display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-box h5 { margin: 0 0 10px; font-size: 0.9rem; }

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-soft);
}
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 980px; }
.table-wrap th, .table-wrap td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: normal;
}
.table-wrap th { font-size: 0.86rem; color: var(--muted); font-weight: 700; background: rgba(127,127,127,0.03); }
.table-wrap tr:last-child td { border-bottom: 0; }

.metric-chip, .metric-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 700;
}
.metric-chip.metric-low, .metric-badge.metric-low {
    background: rgba(148,163,184,0.12);
    color: #64748b;
}
.metric-chip.metric-mid, .metric-badge.metric-mid {
    background: var(--warning-soft);
    color: var(--warning);
}
.metric-chip.metric-high, .metric-badge.metric-high {
    background: var(--success-soft);
    color: var(--success);
}
.metric-chip.metric-empty, .metric-badge.metric-empty {
    color: var(--muted);
}
.badge-row { display:flex; gap:8px; flex-wrap: wrap; margin-top: 10px; }
.metric-grid-inline { display:flex; gap:8px; flex-wrap: wrap; }

.checkbox-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.toolbar-search { max-width: 280px; }
.mode-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0,1fr));
}
.mode-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 108px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
    cursor: pointer;
}
.mode-card input { margin-top: 4px; }
.mode-card strong { display:block; margin-bottom:4px; }
.mode-card span { display:block; color: var(--muted); font-size: .92rem; }
.target-panel.is-hidden { display: none; }
.checkbox-list {
    display: grid;
    gap: 10px;
    max-height: 820px;
    overflow: auto;
}
.checkbox-card {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.checkbox-card.clean-card {
    align-items: start;
}
.domain-row {
    display:flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.domain-name {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.domain-file {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.9rem;
}
.domain-url {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    word-break: break-all;
}
.domain-state {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:.85rem;
    color: var(--muted);
}
.empty-box, .hint-box {
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.prose { color: var(--muted); }
.prose p, .prose ol { margin: 0 0 10px; }
.code-block {
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text);
    overflow:auto;
}
.table-search {
    margin-bottom: 16px;
    display:grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}
.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-page-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(59,130,246,0.12), transparent 34%), var(--bg);
}
.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 28px;
    backdrop-filter: blur(24px);
}
.auth-card-wide { width: min(100%, 780px); }
.auth-brand h1 { margin: 0 0 8px; font-size: 1.9rem; letter-spacing: -0.03em; }
.auth-brand p { margin: 0 0 18px; color: var(--muted); }
.auth-form { display:grid; gap:16px; }

.inline-check.align-end { align-self: end; }
.checkbox {
    display:inline-flex;
    align-items:center;
    gap:10px;
    min-height:46px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.stats-grid {
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
}
.stat-card {
    padding: 18px;
    border-radius: 22px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.stat-card h3 { margin:0; font-size:1.6rem; letter-spacing:-0.03em; }
.stat-card p { margin:4px 0 0; color: var(--muted); }

.activity-list { display:grid; gap: 10px; }
.activity-item {
    display:flex;
    justify-content:space-between;
    gap:14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

@media (max-width: 1180px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; min-height: auto; }
    .card-grid.two-cols, .stats-grid, .metrics-grid, .mode-grid, .filter-rail, .toolbar-grid.filters-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
    .topbar { flex-direction: column; }
    .form-grid, .toolbar-grid, .toolbar-grid.compact-toolbar, .toolbar-grid.compact-toolbar-inline, .table-search, .card-grid.two-cols, .stats-grid, .metrics-grid, .mode-grid, .filter-rail, .toolbar-grid.filters-toolbar {
        grid-template-columns: 1fr;
    }
    .checkbox-toolbar, .form-actions, .toolbar-actions, .table-actions { align-items: stretch; }
    .toolbar-search { max-width: none; }
}


/* v1.3 layout refinement */
body,
.auth-page-bg {
    background: var(--bg);
}
body {
    background-image: none;
}
.topbar,
.card,
.sidebar,
.auth-card,
.stat-card,
.activity-item,
.table-wrap,
.checkbox-card,
.empty-box,
.hint-box,
.mode-card,
.range-box,
.sidebar-note {
    box-shadow: none;
}
.brand-badge {
    background: #111827;
    box-shadow: none;
}
.btn-primary {
    background: #111827;
    border-color: #111827;
}
html[data-theme="dark"] .btn-primary {
    background: #f5f5f7;
    color: #111827;
    border-color: #f5f5f7;
}
.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}
.metric-col-head { width: 88px; }
.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}
.sort-link:hover {
    color: var(--text);
    text-decoration: none;
}
.sort-link.is-active {
    color: var(--text);
}
.sort-indicator {
    min-width: 10px;
    text-align: center;
    color: var(--muted);
}
.url-cell {
    min-width: 220px;
    max-width: 260px;
}
.ellipsis-link {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}
.table-actions {
    flex-wrap: nowrap;
}
.table-actions .btn {
    white-space: nowrap;
}
.actions-col {
    min-width: 220px;
}
.checkbox-card.compact-clean-card {
    padding: 14px 16px;
}
.domain-inline {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(230px, 1.15fr) auto;
    gap: 16px;
    align-items: center;
}
.domain-main {
    min-width: 0;
}
.domain-file {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compact-badge-row {
    margin-top: 0;
    gap: 6px;
}
.compact-badge-row .metric-chip {
    min-height: 28px;
    padding: 0 9px;
}
.domain-url {
    margin-top: 0;
    display: inline-block;
}
.table-wrap table {
    min-width: 1180px;
}
.table-wrap th,
.table-wrap td {
    white-space: nowrap;
}
.table-wrap td:nth-child(2) {
    white-space: normal;
}
html[data-theme="dark"] .metric-chip.metric-low,
html[data-theme="dark"] .metric-badge.metric-low {
    background: rgba(113, 113, 122, 0.18);
    color: #d4d4d8;
}
html[data-theme="dark"] .metric-chip.metric-mid,
html[data-theme="dark"] .metric-badge.metric-mid {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}
html[data-theme="dark"] .metric-chip.metric-high,
html[data-theme="dark"] .metric-badge.metric-high {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}
.metric-chip.metric-empty,
.metric-badge.metric-empty {
    background: transparent;
    color: var(--muted);
}
@media (max-width: 1180px) {
    .domain-inline {
        grid-template-columns: minmax(0,1fr);
        align-items: start;
    }
    .table-actions {
        flex-wrap: wrap;
    }
}

.public-page {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}
.public-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 56px;
    display: grid;
    gap: 22px;
}
.public-hero,
.public-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
}
.public-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
    max-width: 900px;
}
.public-hero p,
.public-card p,
.public-card ul {
    margin: 0;
    color: var(--muted);
}
.public-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.public-card h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.public-card ul {
    margin-top: 10px;
    padding-left: 18px;
}
.public-token-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.public-token {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 0.9rem;
    font-weight: 650;
}
.public-card-wide {
    grid-column: 1 / -1;
}
.public-footer-line {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}
.selected-url-link {
    display: inline-block;
    max-width: 100%;
    min-height: 46px;
    line-height: 46px;
    padding: 0 14px;
    background: var(--surface-strong);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
}
.selected-url-link:hover {
    text-decoration: none;
}
.scripts-stack {
    display: grid;
    gap: 18px;
}
.snippet-card .code-block {
    margin-top: 0;
    white-space: pre-wrap;
}
@media (max-width: 860px) {
    .public-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UX refresh ===== */
.soft-card-accent {
    border: 1px solid rgba(73, 120, 255, .18);
    box-shadow: 0 14px 32px rgba(73, 120, 255, .08);
}

.action-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.action-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    text-decoration: none;
    color: inherit;
}

.action-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0,0,0,.06);
}

.feature-checklist {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.feature-checklist li { line-height: 1.45; }
.activity-list { display: grid; gap: 12px; }
.activity-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}
.small-text { font-size: 12px; }
.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.note-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    line-height: 1.45;
    max-width: 260px;
}
.url-cell { min-width: 180px; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar-grid.compact-toolbar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}
.toolbar-grid.compact-toolbar-inline {
    display: grid;
    grid-template-columns: 1.3fr 1.8fr auto;
    gap: 14px;
    align-items: end;
}
.summary-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.inline-form.two-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}
.inline-checkbox { margin: 0; }
.selected-url-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}
.scripts-stack { display: grid; gap: 18px; }
.snippet-card .code-block { margin-top: 8px; }
.anchor-builder {
    display: grid;
    gap: 12px;
}
.anchor-builder-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 130px;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}
.builder-row-action { display: flex; flex-direction: column; }
.card-header.no-margin { margin-bottom: 0; }
.metric-col-head a { text-decoration: none; color: inherit; }
.metric-col-head .sort-indicator { opacity: .5; }
@media (max-width: 960px) {
    .toolbar-grid.compact-toolbar,
    .toolbar-grid.compact-toolbar-inline,
    .anchor-builder-row,
    .activity-item {
        grid-template-columns: 1fr;
    }
    .activity-item { align-items: flex-start; }
    .note-clamp-2 { max-width: none; }
}

/* ===== v1.6.1 UI adjustments ===== */
.domain-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.note-under-domain {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 340px;
}

.note-under-domain.is-empty {
    opacity: .8;
}

.action-dropdown {
    position: relative;
    display: inline-block;
}

.action-dropdown summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    font-size: 13px;
    font-weight: 600;
}

.action-dropdown summary::-webkit-details-marker { display: none; }
.action-dropdown[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.action-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% - 1px);
    z-index: 20;
    min-width: 160px;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    background: var(--panel);
    box-shadow: 0 12px 24px rgba(0,0,0,.10);
    overflow: hidden;
}

.action-dropdown-menu a,
.action-dropdown-menu button {
    width: 100%;
    display: block;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.action-dropdown-menu a:hover,
.action-dropdown-menu button:hover {
    background: var(--panel-soft);
}

.anchor-top-filter {
    display: grid;
    grid-template-columns: 2fr 180px 220px auto;
    gap: 14px;
    align-items: end;
}

.compact-only-actions {
    justify-content: flex-start;
}

.power-filter-rail {
    margin-top: 14px;
}

@media (max-width: 960px) {
    .anchor-top-filter {
        grid-template-columns: 1fr;
    }
    .action-dropdown-menu {
        right: auto;
        left: 0;
    }
}

/* ===== v1.6.2 refinements ===== */
.row-action-wrap { min-width: 140px; }
.row-action-select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: inherit;
    font: inherit;
}

.metric-chip.metric-danger,
.metric-badge.metric-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}
html[data-theme="dark"] .metric-chip.metric-danger,
html[data-theme="dark"] .metric-badge.metric-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.mode-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-inline-filter {
    display: grid;
    grid-template-columns: 1.8fr 180px 220px auto;
    gap: 14px;
    align-items: end;
}

.list-toolbar-bar {
    margin-top: 4px;
}

.toolbar-actions-right {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: end;
}

@media (max-width: 960px) {
    .mode-grid-3,
    .compact-inline-filter {
        grid-template-columns: 1fr;
    }
    .toolbar-actions-right {
        justify-content: flex-start;
    }
}

/* ===== v1.6.3 anchor layout ===== */
.is-hidden {
    display: none !important;
}

.filter-injector-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: end;
}

.filter-section {
    padding-right: 10px;
    border-right: 1px solid var(--line);
}

.injector-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.injector-run-wrap {
    min-width: 0;
}

.action-select-wide {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: inherit;
    font: inherit;
}

.compact-inline-filter-left {
    grid-template-columns: minmax(220px, 1.8fr) 170px 210px auto;
}

.toolbar-actions-left {
    display: flex;
    align-items: end;
}

@media (max-width: 1100px) {
    .filter-injector-bar {
        grid-template-columns: 1fr;
    }

    .filter-section {
        border-right: 0;
        padding-right: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 960px) {
    .injector-section,
    .compact-inline-filter-left {
        grid-template-columns: 1fr;
    }
}

/* ===== v1.7.0 access control ===== */
.permission-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.permission-group {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: var(--panel-soft, var(--surface-soft));
}
.permission-group h4 {
    margin: 0 0 10px;
    font-size: 0.96rem;
}
.permission-check {
    margin: 8px 0;
    font-size: 0.9rem;
}
.admin-cards {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}
.admin-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-soft);
    padding: 18px;
}
.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.admin-card-header h4 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}
.admin-edit-form {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.danger-text {
    color: var(--danger);
    font-weight: 700;
}
.category-inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 160px 160px auto;
    gap: 12px;
    align-items: center;
}
.category-delete-form {
    margin-top: 10px;
}
@media (max-width: 960px) {
    .admin-card-header,
    .category-inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.8.0 COLORFUL SAAS THEME
   Applied globally across dashboard, domains, injector,
   files, safe integration, settings, and access control.
   ========================================================= */

:root {
    --bg: #f6f8ff;
    --bg-elevated: rgba(255,255,255,0.86);
    --surface: rgba(255,255,255,0.88);
    --surface-strong: #ffffff;
    --surface-soft: #f8faff;
    --panel: #ffffff;
    --panel-soft: #f7f9ff;
    --text: #111827;
    --muted: #697386;
    --muted-2: #98a2b3;
    --line: rgba(15,23,42,0.08);
    --line-strong: rgba(15,23,42,0.13);
    --shadow: 0 20px 55px rgba(44, 70, 140, 0.10);
    --shadow-soft: 0 10px 28px rgba(44, 70, 140, 0.08);
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --accent-soft: rgba(37,99,235,0.10);
    --success: #10b981;
    --success-soft: rgba(16,185,129,0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245,158,11,0.13);
    --danger: #ef4444;
    --danger-soft: rgba(239,68,68,0.12);
    --sidebar: rgba(255,255,255,0.86);
}

html[data-theme="dark"] {
    --bg: #070b18;
    --bg-elevated: rgba(16,23,42,0.88);
    --surface: rgba(17,24,39,0.86);
    --surface-strong: #111827;
    --surface-soft: rgba(30,41,59,0.78);
    --panel: #111827;
    --panel-soft: rgba(30,41,59,0.78);
    --text: #f8fafc;
    --muted: #a4afc4;
    --muted-2: #667085;
    --line: rgba(255,255,255,0.09);
    --line-strong: rgba(255,255,255,0.14);
    --shadow: 0 20px 55px rgba(0,0,0,0.34);
    --shadow-soft: 0 10px 28px rgba(0,0,0,0.24);
    --accent: #60a5fa;
    --accent-2: #a78bfa;
    --accent-soft: rgba(96,165,250,0.14);
    --success: #34d399;
    --success-soft: rgba(52,211,153,0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251,191,36,0.14);
    --danger: #fb7185;
    --danger-soft: rgba(251,113,133,0.14);
    --sidebar: rgba(15,23,42,0.82);
}

body {
    background:
        radial-gradient(circle at 7% 0%, rgba(37,99,235,0.16), transparent 32%),
        radial-gradient(circle at 92% 4%, rgba(236,72,153,0.12), transparent 28%),
        radial-gradient(circle at 56% 0%, rgba(124,58,237,0.10), transparent 22%),
        var(--bg);
    color: var(--text);
}

.app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

.sidebar {
    border-radius: 24px;
    background: var(--sidebar);
    border: 1px solid rgba(255,255,255,0.58);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar::before {
    content: "";
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899, #10b981);
    display: block;
    margin: -22px -18px 18px;
}

.brand-badge {
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 14px 28px rgba(37,99,235,0.23);
    font-size: 1.2rem;
}

.sidebar-brand h1 {
    font-size: 1.02rem;
    font-weight: 800;
}

.nav {
    gap: 7px;
}

.nav a {
    position: relative;
    border-radius: 14px;
    font-weight: 700;
    color: var(--muted);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.nav a:hover {
    transform: translateX(2px);
    background: rgba(37,99,235,0.07);
    color: var(--accent);
}

.nav a.is-active {
    color: #1251d9;
    background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(124,58,237,0.09));
    border-color: rgba(37,99,235,0.12);
    box-shadow: none;
}

.nav a::before {
    content: "•";
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    margin-right: 8px;
    border-radius: 9px;
    background: rgba(37,99,235,0.08);
    color: var(--accent);
}

.sidebar-note {
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(124,58,237,0.07));
}

.content {
    gap: 18px;
}

.topbar {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.62);
    background: rgba(255,255,255,0.75);
    box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .topbar {
    background: rgba(15,23,42,0.72);
}

.topbar h2 {
    font-size: 1.62rem;
    font-weight: 800;
}

.eyebrow {
    background: linear-gradient(135deg, rgba(37,99,235,0.13), rgba(124,58,237,0.12));
    color: var(--accent);
    border: 1px solid rgba(37,99,235,0.10);
}

.card,
.stat-card,
.admin-card,
.permission-group,
.action-tile,
.mode-card,
.checkbox-card,
.range-box,
.hint-box,
.card-subsection {
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,0.075);
    background: rgba(255,255,255,0.86);
    box-shadow: 0 12px 32px rgba(44,70,140,0.07);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .permission-group,
html[data-theme="dark"] .action-tile,
html[data-theme="dark"] .mode-card,
html[data-theme="dark"] .checkbox-card,
html[data-theme="dark"] .range-box,
html[data-theme="dark"] .hint-box,
html[data-theme="dark"] .card-subsection {
    background: rgba(15,23,42,0.82);
    border-color: rgba(255,255,255,0.09);
}

.btn {
    min-height: 42px;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgba(37,99,235,0.20);
}

.btn-secondary {
    background: rgba(255,255,255,0.72);
    border-color: rgba(15,23,42,0.10);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: transparent;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea,
.row-action-select,
.action-select-wide {
    border-radius: 15px;
    border: 1px solid rgba(15,23,42,0.10);
    background: rgba(255,255,255,0.84);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .row-action-select,
html[data-theme="dark"] .action-select-wide {
    background: rgba(15,23,42,0.86);
    border-color: rgba(255,255,255,0.12);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.66);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.86), rgba(255,255,255,0.68)),
        radial-gradient(circle at 18% 10%, rgba(37,99,235,0.18), transparent 30%),
        radial-gradient(circle at 95% 5%, rgba(236,72,153,0.12), transparent 30%);
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .dashboard-hero {
    background:
        linear-gradient(135deg, rgba(15,23,42,0.88), rgba(17,24,39,0.72)),
        radial-gradient(circle at 18% 10%, rgba(96,165,250,0.18), transparent 30%),
        radial-gradient(circle at 95% 5%, rgba(236,72,153,0.15), transparent 30%);
}

.dashboard-hero h3 {
    margin: 8px 0 6px;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    min-height: 142px;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -42px auto;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    opacity: .11;
    background: currentColor;
}

.stat-card h3 {
    margin: 20px 0 4px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.stat-card p {
    font-weight: 800;
    color: var(--text);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

.stat-tone-blue { color: #2563eb; }
.stat-tone-green { color: #10b981; }
.stat-tone-orange { color: #f97316; }
.stat-tone-purple { color: #7c3aed; }
.stat-tone-pink { color: #ec4899; }

.dashboard-grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 18px;
}

.dashboard-card-large {
    min-height: 260px;
}

.colorful-actions .action-tile {
    min-height: 150px;
    align-items: flex-start;
    transition: transform .18s ease, box-shadow .18s ease;
}

.colorful-actions .action-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(44,70,140,0.11);
}

.action-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.action-blue .action-icon { background: rgba(37,99,235,0.13); color: #2563eb; }
.action-teal .action-icon { background: rgba(20,184,166,0.13); color: #0d9488; }
.action-purple .action-icon { background: rgba(124,58,237,0.13); color: #7c3aed; }
.action-green .action-icon { background: rgba(16,185,129,0.13); color: #10b981; }

.pretty-activity .activity-item {
    grid-template-columns: 18px minmax(0,1fr) auto;
    align-items: center;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #2563eb);
}

.health-bar {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148,163,184,0.24);
    margin: 12px 0 18px;
}

.health-active {
    display: block;
    background: linear-gradient(90deg, #10b981, #22c55e);
}

.health-inactive {
    display: block;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.health-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.health-legend span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
}

.health-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.legend-green { background: #10b981; }
.legend-orange { background: #f59e0b; }
.legend-blue { background: #2563eb; }

.security-list {
    display: grid;
    gap: 10px;
}

.security-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.security-list div:last-child {
    border-bottom: 0;
}

.success-text {
    color: var(--success);
}

.colorful-category-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.category-mini-card {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: var(--surface-soft);
}

.category-mini-card i {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #ec4899);
}

.category-mini-card small {
    color: var(--muted);
}

.table-wrap table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-wrap th {
    background: linear-gradient(180deg, rgba(37,99,235,0.055), rgba(255,255,255,0.02));
    color: #475569;
}

.table-wrap td {
    border-bottom: 1px solid rgba(15,23,42,0.065);
}

.status-pill,
.summary-pill,
.metric-chip,
.metric-badge {
    border-radius: 999px;
}

.status-pill-success {
    background: rgba(16,185,129,0.12);
    color: #059669;
}

.status-pill-primary {
    background: rgba(37,99,235,0.11);
    color: #2563eb;
}

.status-pill-muted {
    background: rgba(148,163,184,0.13);
    color: #64748b;
}

.metric-chip.metric-high,
.metric-badge.metric-high {
    background: rgba(16,185,129,0.12);
    color: #059669;
}

.metric-chip.metric-mid,
.metric-badge.metric-mid {
    background: rgba(245,158,11,0.14);
    color: #d97706;
}

.metric-chip.metric-danger,
.metric-badge.metric-danger {
    background: rgba(239,68,68,0.13);
    color: #dc2626;
}

.mode-card:has(input:checked) {
    background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.08));
    border-color: rgba(37,99,235,0.28);
}

.permission-group:nth-child(6n+1) { background: linear-gradient(135deg, rgba(37,99,235,0.07), rgba(255,255,255,0.78)); }
.permission-group:nth-child(6n+2) { background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(255,255,255,0.78)); }
.permission-group:nth-child(6n+3) { background: linear-gradient(135deg, rgba(124,58,237,0.07), rgba(255,255,255,0.78)); }
.permission-group:nth-child(6n+4) { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(255,255,255,0.78)); }
.permission-group:nth-child(6n+5) { background: linear-gradient(135deg, rgba(236,72,153,0.07), rgba(255,255,255,0.78)); }

.filter-injector-bar,
.anchor-builder-row,
.admin-card,
.category-inline-form {
    background: rgba(255,255,255,0.62);
    border-radius: 20px;
}

.alert {
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

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

@media (max-width: 720px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    .sidebar {
        position: relative;
        min-height: auto;
        top: auto;
    }
    .dashboard-hero {
        display: grid;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .topbar {
        display: grid;
    }
}

/* v1.8.1 users & roles split */
.users-role-shell {
    display: grid;
    gap: 22px;
}

.role-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.role-tab {
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: inherit;
    border-radius: 12px;
    min-height: 40px;
    padding: 0 16px;
    font: inherit;
    font-weight: 600;
}

.role-tab.is-active {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #fff;
    border-color: transparent;
}

.users-role-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 22px;
}

.soft-panel {
    border: 1px solid var(--line);
    background: var(--panel-soft);
    border-radius: 22px;
    padding: 20px;
}

.role-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.6);
}

.role-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.role-item-super {
    box-shadow: inset 3px 0 0 #4f46e5;
}

.role-item-admin {
    box-shadow: inset 3px 0 0 #22c55e;
}

.soft-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(99,102,241,.08);
    color: var(--text);
}

.soft-note p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.role-form .hint-box {
    margin: 0;
}

@media (max-width: 1100px) {
    .users-role-layout {
        grid-template-columns: 1fr;
    }
}

/* v1.8.3 safe integration editor */
.snippet-editor {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.snippet-editor summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary, #2563eb);
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.snippet-editor-form {
    margin-top: 14px;
}

.scripts-stack .empty-box {
    padding: 20px;
}
