.muted { color: var(--muted); }
.bar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar-in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tab { background: none; border: 0; padding: 8px 14px; border-radius: 10px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); font-weight: 600; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.pane > h2 { margin: 0 0 14px; font-size: 1.2rem; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.row-head h2 { margin: 0; font-size: 1.2rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat .k { color: var(--muted); font-size: 0.85rem; }
.stat .v { font-size: 1.55rem; font-weight: 700; margin-top: 2px; }
.stat .s { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

.sec-title { font-weight: 700; margin: 22px 0 10px; }
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.site-card { display: flex; flex-direction: column; gap: 8px; }
.site-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.site-card .name { font-weight: 600; }
.site-card a { color: var(--accent); text-decoration: none; direction: ltr; unicode-bidi: embed; font-size: 0.9rem; word-break: break-all; }
.site-card a:hover { text-decoration: underline; }
.site-card .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }

.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.8rem; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: background 0.15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.15s; }
.switch input:checked + span { background: var(--ok); }
[dir="rtl"] .switch input:checked + span::before { transform: translateX(-18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar-fill { width: 100%; max-width: 34px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar-lbl { font-size: 0.7rem; color: var(--muted); margin-top: 4px; direction: ltr; }
.bar-val { font-size: 0.72rem; color: var(--muted); }

table.t { width: 100%; border-collapse: collapse; }
.t th, .t td { text-align: start; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.t td.url { direction: ltr; text-align: left; word-break: break-all; }
.t-wrap { overflow-x: auto; }
.t-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
textarea.tall { min-height: 150px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.err { color: var(--bad); min-height: 1.3em; margin-top: 8px; font-size: 0.92rem; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); margin-top: 14px; }
.check input { width: auto; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ic { flex: none; width: 22px; text-align: center; font-weight: 700; }
.ic.ok { color: var(--ok); } .ic.warn { color: var(--warn); }
.mono { font-family: ui-monospace, Consolas, monospace; direction: ltr; unicode-bidi: embed; font-size: 0.85rem; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 22px; width: min(520px, 94vw); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog h2 { margin: 0 0 6px; font-size: 1.15rem; }
.sub-row { display: flex; align-items: center; gap: 6px; }
.sub-row input { flex: 1; }
.dlg-actions { display: flex; gap: 8px; margin-top: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#conv-dialog { width: min(720px, 94vw); }
.conv-body { max-height: 65vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cm { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm.user { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.cm .who { font-size: 0.78rem; color: var(--muted); margin-bottom: 2px; }
