/* DragGo Dashboard — one admin, all properties. Zero-build, framework-free. */
:root {
	--blue: #296DD8; --blue-600: #2360c0; --blue-050: #eef4fd;
	--bg: #f6f7f9; --panel: #ffffff; --ink: #14181f; --muted: #667085;
	--line: #e6e8ec; --line-2: #eef0f3; --good: #128a5a; --warn: #b7791f; --bad: #d23b3b;
	--radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
	--sidebar: 232px;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1216; --panel: #171b21; --ink: #e8ebef; --muted: #99a2ad;
		--line: #262c34; --line-2: #20252c; --blue-050: #14243d;
		--shadow: 0 1px 2px rgba(0,0,0,.4);
	}
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
	width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
	border-radius: 16px; box-shadow: var(--shadow); padding: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--blue); display: grid; place-items: center; }
.brand .mark svg { width: 18px; height: 18px; }
.login h1 { font-size: 20px; margin: 18px 0 4px; font-weight: 600; }
.login p.sub { color: var(--muted); margin: 0 0 20px; }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input, textarea, select {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
	background: var(--panel); color: var(--ink); font: inherit; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-050); }
textarea { resize: vertical; min-height: 90px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
	background: var(--blue); color: #fff; font-weight: 500;
}
.btn:hover { background: var(--blue-600); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.full { width: 100%; }
.err { color: var(--bad); font-size: 13px; margin: 8px 0 0; min-height: 18px; }

/* ---- app shell ---- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
	background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px;
	display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 6px 8px 14px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 10px 4px; }
.nav-item {
	display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
	color: var(--ink); font-weight: 500; border: 1px solid transparent;
}
.nav-item:hover { background: var(--line-2); }
.nav-item.active { background: var(--blue-050); color: var(--blue); }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.nav-item .pill { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.side .spacer { flex: 1; }
.side .who { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.who .meta { min-width: 0; }
.who .meta b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .meta small { color: var(--muted); }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); z-index: 5; }
.topbar h2 { font-size: 17px; margin: 0; font-weight: 600; }
.topbar .grow { flex: 1; }
.content { padding: 24px; max-width: 980px; }

/* cards + tables */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card .k { color: var(--muted); font-size: 12px; font-weight: 500; }
.card .v { font-size: 26px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; overflow: hidden; }
.section > h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.section .body { padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 600; }
.row small { color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.tag.blue { background: var(--blue-050); color: var(--blue); }
.tag.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.tag.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: grid; gap: 14px; }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.empty { color: var(--muted); text-align: center; padding: 30px; }
/* row ⋯ action menu */
.menuwrap { position: relative; }
.iconbtn { font-size: 18px; line-height: 1; padding: 4px 10px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; z-index: 20; }
.menu-item { display: block; width: 100%; text-align: left; padding: 10px 14px; background: transparent; border: 0; color: var(--ink); font: inherit; cursor: pointer; }
.menu-item:hover { background: var(--line-2); }
.menu-item.danger { color: var(--bad); }
/* settings top tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 9px 14px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
/* announcement composer + history */
.announce-card { background: linear-gradient(180deg, var(--blue-050), var(--panel)); border: 1px solid var(--blue); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.announce-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 4px; }
.announce-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 18px; flex: none; }
.announce-compose { padding: 8px 18px 16px; }
.announce-compose textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; resize: vertical; outline: none; }
.announce-compose textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-050); }
.announce-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.near { color: var(--warn); font-weight: 600; }
.ann-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.ann-item:last-child { border-bottom: none; }
.ann-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-050); color: var(--blue); display: grid; place-items: center; flex: none; }
.ann-body { font-weight: 500; }
.ann-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.pager:empty { display: none; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: sp .7s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
	.shell { grid-template-columns: 1fr; }
	.side { position: fixed; z-index: 30; transform: translateX(-100%); transition: transform .2s; width: var(--sidebar); }
	.side.open { transform: none; }
	.grid2 { grid-template-columns: 1fr; }
	.content { padding: 16px; }
	.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
}
.menu-btn { display: none; }
@media (max-width: 720px) { .menu-btn { display: inline-flex; } }
