/* CW Pulse — painel. Para mudar a cor de destaque, altere apenas --accent. */

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

:root {
	--bg: #0d0d0d;
	--surface: #141414;
	--surface2: #1c1c1c;
	--border: #252525;
	--border2: #2e2e2e;
	--text: #e8e8e8;
	--muted: #7a7a7a;
	--accent: #4fd1c5;
	--accent-ink: #00201d;
	--red: #e05252;
	--green: #52c78a;
	--blue: #5299e0;
	--mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
	font-family: var(--sans);
	font-size: 14px;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	line-height: 1.5;
}

a { color: var(--accent); }
h1 { font-size: 22px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.3px; }
.muted { color: var(--muted); }

/* ── Marca ─────────────────────────────────────────────── */
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.5px; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand small {
	display: block;
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 400;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* ── Topo e menu ───────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-inner {
	max-width: 1200px;
	margin: auto;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}
.menu { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.menu a {
	color: var(--muted);
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 4px;
	font-weight: 600;
	transition: color .15s, background .15s;
}
.menu a:hover { color: var(--text); background: var(--surface2); }
.menu a.active { color: var(--accent); background: var(--surface2); }

.container { max-width: 1200px; margin: auto; padding: 28px 16px 48px; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 20px 24px;
	margin-bottom: 20px;
}
.placeholder p + p { margin-top: 8px; }

/* ── Formulários e botões ──────────────────────────────── */
label {
	display: block;
	font-size: 11px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="email"], input[type="date"], select, textarea {
	width: 100%;
	background: var(--surface2);
	border: 1px solid var(--border2);
	border-radius: 4px;
	padding: 10px 12px;
	color: var(--text);
	font: 14px var(--sans);
	outline: none;
	transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

button { font: inherit; cursor: pointer; }
.btn-primary {
	background: var(--accent);
	color: var(--accent-ink);
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	font-weight: 700;
	transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-block { width: 100%; margin-top: 16px; }
.btn-ghost {
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--border2);
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 12px;
	transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--red); border-color: var(--red); }

/* ── Mensagens ─────────────────────────────────────────── */
.msg {
	padding: 10px 14px;
	border-radius: 4px;
	margin-bottom: 16px;
	border-left: 3px solid var(--accent);
	background: rgba(79, 209, 197, .07);
}
.msg-error   { border-left-color: var(--red);   background: rgba(224, 82, 82, .08); color: #f0a0a0; }
.msg-success { border-left-color: var(--green); background: rgba(82, 199, 138, .08); }

/* ── Login ─────────────────────────────────────────────── */
body.guest { display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box {
	width: 100%;
	max-width: 360px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 40px 32px;
	box-shadow: 0 0 60px rgba(0, 0, 0, .7);
}
.login-box .brand { font-size: 24px; }
.login-box .subtitle {
	font-family: var(--mono);
	font-size: 10px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .1em;
	margin: 4px 0 28px;
}

@media (max-width: 640px) {
	.topbar-inner { gap: 12px; }
	.menu { order: 3; flex-basis: 100%; }
	.logout { margin-left: auto; }
}

/* ── Menu Tokens ───────────────────────────────────────── */
h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.link-muted { color: var(--muted); text-decoration: none; font-size: 13px; }
.link-muted:hover { color: var(--text); }
.strong-link { color: var(--text); font-weight: 600; text-decoration: none; }
.strong-link:hover { color: var(--accent); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin-bottom: 0; }
a.btn-primary { text-decoration: none; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 14px 18px; }
.stat-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat-value { display: block; font-size: 26px; font-weight: 800; }
.stat-value.ok { color: var(--green); }
.stat-value.bad { color: var(--red); }
.stat-value.warn { color: #e0b252; }
.stat-value.accent { color: var(--accent); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filters a { color: var(--muted); text-decoration: none; padding: 6px 12px; border: 1px solid var(--border2); border-radius: 20px; font-size: 12px; }
.filters a:hover { color: var(--text); }
.filters a.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.search { display: flex; gap: 6px; align-items: center; }
.search input[type="search"] { width: 260px; max-width: 60vw; }
input[type="search"] {
	background: var(--surface2); border: 1px solid var(--border2); border-radius: 4px;
	padding: 9px 12px; color: var(--text); font: 14px var(--sans); outline: none;
}

.table-wrap { overflow-x: auto; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--border2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: var(--surface2); }
td.empty { text-align: center; color: var(--muted); padding: 28px; }
.col-actions { width: 1%; white-space: nowrap; }

code { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--surface2); border: 1px solid var(--border2); padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.domain { font-family: var(--mono); font-size: 12px; color: var(--blue); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.badge-ok   { background: rgba(82, 199, 138, .12); color: var(--green); }
.badge-bad  { background: rgba(224, 82, 82, .12); color: var(--red); }
.badge-warn { background: rgba(224, 178, 82, .12); color: #e0b252; }

.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn-secondary, .btn-danger, .btn-success {
	display: inline-block; border-radius: 4px; padding: 9px 16px; font-weight: 600; font-size: 13px;
	text-decoration: none; border: 1px solid; background: transparent; transition: opacity .15s, background .15s;
}
.btn-secondary { color: var(--text); border-color: var(--border2); background: var(--surface2); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-danger { color: var(--red); border-color: rgba(224, 82, 82, .35); background: rgba(224, 82, 82, .08); }
.btn-danger:hover { background: rgba(224, 82, 82, .18); }
.btn-success { color: var(--green); border-color: rgba(82, 199, 138, .35); background: rgba(82, 199, 138, .08); }
.btn-success:hover { background: rgba(82, 199, 138, .18); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-copy { margin-left: 4px; background: none; border: none; color: var(--muted); font-size: 11px; text-decoration: underline; padding: 2px; }
.btn-copy:hover { color: var(--accent); }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--border2); border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 13px; }
.pagination a:hover { color: var(--text); border-color: var(--text); }
.pagination .current { color: var(--accent); border-color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.field-full { grid-column: 1 / -1; }
textarea { resize: vertical; }

.token-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.token-big { font-size: 18px; padding: 6px 12px; letter-spacing: .05em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin-bottom: 18px; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin-top: 2px; }

.danger-zone { border-color: rgba(224, 82, 82, .3); }
.danger-form { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
label.checkbox { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); margin: 0; }

/* ── Menu Logs ─────────────────────────────────────────── */
.tabs { margin-bottom: 16px; }
.log-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; padding: 16px 18px; }
.filter-buttons { display: flex; gap: 10px; align-items: center; }
input[type="date"] { color-scheme: dark; }

/* ── Menu Instruções ───────────────────────────────────── */
.site-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 16px 0 8px; }
.site-form .field { flex: 1; min-width: 240px; }
.cmd-row { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 10px; }
.cmd {
	flex: 1; min-width: 0; margin: 0;
	font-family: var(--mono); font-size: 12px; color: var(--accent);
	background: var(--surface2); border: 1px solid var(--border2); border-radius: 4px;
	padding: 10px 12px; white-space: pre-wrap; word-break: break-all;
}
.cmd.prompt { color: var(--text); word-break: normal; max-height: 340px; overflow: auto; margin-bottom: 10px; }
.steps { padding-left: 20px; display: grid; gap: 10px; }
.cron-table { width: auto; margin-top: 8px; }
.cron-table th, .cron-table td { padding: 4px 14px 4px 0; border: none; text-transform: none; letter-spacing: 0; font-size: 13px; }
.cron-table tr:hover { background: none; }
