/* Cyber Central — @_CyberRick */
:root {
	--bg: #f4f5f7; --card: #fff; --line: #e3e5e9; --line2: #eef0f3; --text: #1d2130; --muted: #6b7183;
	--brand: #e5484d; --brand-d: #cf3a3f; --brand-soft: #fdecec; --ok: #1a9a5a; --ok-soft: #e6f6ee;
	--err: #d33b3b; --err-soft: #fdecec; --warn: #b7791f; --warn-soft: #fdf5e6; --blue: #2f6fde; --blue-soft: #e8f0fe;
	--r: 12px; --rs: 8px; --sh: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
	--dark: #171a26;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #c7363b; text-decoration: none; }
a:hover { color: var(--brand); }
code { background: var(--line2); padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }
h1, h2, h3 { letter-spacing: -.01em; margin: 0; }
.mut { color: var(--muted); }
.hidden, [hidden] { display: none !important; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: var(--rs); font: 600 13px Inter, sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; text-decoration: none; }
.btn:hover { background: #f8f9fb; border-color: #cfd3da; color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn--danger { color: var(--err); border-color: #f3c4c4; }
.btn--danger:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn--block { width: 100%; }
.btn .ic { width: 15px; height: 15px; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn--primary.is-busy::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formulários */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=search], input:not([type]), select, textarea {
	width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--rs); padding: 0 11px; font: 14px Inter, sans-serif; color: var(--text); background: #fff;
}
textarea { height: auto; padding: 10px 11px; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 13.5px; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { color: var(--muted); font-size: 12px; font-weight: 400; }

/* Login / instalação */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 80% 0%, rgba(229,72,77,.28), transparent 45%), linear-gradient(135deg, #171a26, #262b40 60%, #2f2236); }
.auth-box { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.auth-box h1 { font-size: 19px; margin: 18px 0 4px; }
.auth-box p { margin: 0 0 16px; font-size: 13px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand strong { display: block; font-size: 17px; }
.auth-brand small { color: var(--muted); font-size: 12.5px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0 !important; }
.qr { display: grid; place-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); margin: 6px 0 10px; min-height: 220px; }
.secret code { font-size: 12px; word-break: break-all; }
.alert { background: var(--err-soft); color: var(--err); border-radius: var(--rs); padding: 10px 12px; margin-top: 14px; font-size: 13px; font-weight: 500; }
.logo { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 18px rgba(229,72,77,.45); }
.logo svg { width: 21px; height: 21px; }

/* Topo */
.top { background: linear-gradient(135deg, #171a26 0%, #262b40 60%, #2f2236 100%); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.top__in { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { color: #fff; }
.brand strong { display: block; font-size: 16px; line-height: 1.2; }
.brand small { color: #b6bbcc; font-size: 11.5px; }
.brand .logo { width: 36px; height: 36px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #b6bbcc; font-weight: 600; font-size: 13.5px; padding: 8px 13px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a.is-active { color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 -2px 0 var(--brand); }
.top__user { display: flex; gap: 4px; align-items: center; }
.top__user form { margin: 0; }
.top .btn--ghost { color: #b6bbcc; }
.top .btn--ghost:hover { color: #fff; background: rgba(255,255,255,.08); }

.main { max-width: 1320px; margin: 0 auto; padding: 22px 20px 10px; min-height: calc(100vh - 140px); }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
.loading { color: var(--muted); padding: 40px; text-align: center; }

/* Cabeçalho de página */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h1 { font-size: 22px; }
.ph p { margin: 2px 0 0; color: var(--muted); }
.ph__act { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 20px; margin-bottom: 14px; }
.card > h2, .card__h h2 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card__h h2 { margin: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--flush > .card__h { padding: 14px 18px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); min-width: 0; }
.stat span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b small { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat em { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 1px; }
.stat.is-warn { border-color: #f3dcb0; background: #fffcf5; }
.stat.is-bad { border-color: #f3c4c4; background: #fffafa; }
.stat.is-bad b { color: var(--err); }

/* Pílulas */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--line2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.purple { background: #efe9fe; color: #6d28d9; }
.pill.orange { background: #fff1e6; color: #c2410c; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c3c7d0; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.dot.load { background: #c3c7d0; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Barras */
.meter { height: 7px; background: var(--line2); border-radius: 20px; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; border-radius: 20px; background: var(--ok); transition: width .4s; }
.meter.warn i { background: #e0a32e; }
.meter.bad i { background: var(--err); }
.mcell { display: grid; gap: 4px; min-width: 120px; }
.mcell small { color: var(--muted); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--line2); border-radius: 20px; overflow: hidden; margin: 12px 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #f07a5f); border-radius: 20px; transition: width .3s; }

/* Tabelas */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; background: #fafbfc; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line2); vertical-align: middle; }
.tbl tr:first-child td { border-top: 0; }
.tbl tbody tr:hover td { background: #fbfbfc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl .act .btn { margin-left: 4px; }
.tbl .name { font-weight: 600; }
.tbl .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tbl tr.is-off td { opacity: .55; }
.empty { color: var(--muted); text-align: center; padding: 26px; }

/* Sites */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.site { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 16px 18px; display: grid; gap: 12px; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.site:hover { border-color: #cfd3da; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.08); color: var(--text); }
.site__h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site__h strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site__h .pill { margin-left: auto; }
.site__url { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -8px; }
.site__kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.site__kv div { background: #fafbfc; border: 1px solid var(--line2); border-radius: var(--rs); padding: 7px 9px; min-width: 0; }
.site__kv b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site__kv span { color: var(--muted); font-size: 11px; }
.site__err { color: var(--err); font-size: 12.5px; }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 20px 0 10px; }

/* Detalhe do site */
.sh { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.sh h1 { font-size: 22px; }
.sh__url { color: var(--muted); font-size: 13px; }
.sh__act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs a .pill { margin-left: 4px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--brand-soft); color: #a8282c; white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 34px; height: 19px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd3da; border-radius: 20px; transition: background .18s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(15px); }
.log { max-height: 420px; overflow: auto; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--line2); border-radius: var(--rs); }
.log div { display: flex; gap: 12px; padding: 6px 12px; border-left: 3px solid transparent; }
.log div + div { border-top: 1px solid var(--line2); }
.log time { color: #a3a8b5; white-space: nowrap; }
.log .ok { border-left-color: var(--ok); }
.log .err { border-left-color: var(--err); color: var(--err); background: #fffafa; }
.callout { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--rs); background: #f3f6fb; color: #3b4a63; font-size: 13px; margin: 0 0 12px; }
.callout.warn { background: var(--warn-soft); color: #8a5a14; }
.thumb { width: 52px; height: 36px; object-fit: cover; border-radius: 5px; background: var(--line2); display: block; }
.results { display: grid; gap: 6px; margin-top: 12px; }
.res { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line2); border-radius: var(--rs); font-size: 13px; background: #fff; }
.res .dot { margin-right: 2px; }
.res strong { min-width: 160px; }
.res span { color: var(--muted); }
.res.err span { color: var(--err); }
.crumbs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.pb { position: relative; height: 16px; background: var(--line2); border-radius: 20px; overflow: hidden; min-width: 120px; }
.pb i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #f6a5a7, var(--brand)); border-radius: 20px; }
.pb span { position: absolute; right: 7px; top: 0; font-size: 10.5px; line-height: 16px; font-weight: 600; }
.sitecheck { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.sitecheck label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--rs); color: var(--text); font-weight: 500; cursor: pointer; }
.sitecheck label:has(input:checked) { border-color: var(--brand); background: #fffafa; }

/* Modal e avisos */
.modal { position: fixed; inset: 0; background: rgba(15,18,30,.55); z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal__box { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: up .18s ease-out; }
.modal__box h2 { font-size: 17px; margin-bottom: 4px; }
.modal__box > div > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 300; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #1d2130; color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 13px; box-shadow: 0 12px 32px rgba(16,24,40,.25); animation: up .2s ease-out; white-space: pre-line; }
.toast.err { background: #8f1d21; }
.toast.ok { background: #135c38; }
.pw { display: flex; gap: 6px; }
.pw input { font-family: ui-monospace, Menlo, Consolas, monospace; }

@media (max-width: 960px) {
	.grid2, .grid3 { grid-template-columns: 1fr; }
	.top__in { flex-wrap: wrap; gap: 10px; }
	.nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) {
	.main { padding: 16px 12px; }
	.row2 { grid-template-columns: 1fr; }
	.kv { grid-template-columns: 1fr; }
	.site__kv { grid-template-columns: 1fr 1fr; }
	.brand small { display: none; }
}
