/* Agency dashboard: the same neutral system as the site editor's panels (plain, no theme). */
:root { --ink: #16181d; --ink-2: #3b4250; --muted: #6b7280; --bg: #f6f7f9; --panel: #fff; --line: #e3e6ea; --line-2: #cfd4db; --blue: #2f6fed; --blue-2: #275fcc; --blue-bg: #eef3ff; --green: #1f9d55; --amber: #b45309; --amber-bg: #fff4d6; --red: #c2410c; --red-bg: #fee2e2; --radius: 0.7rem; --shadow: 0 10px 40px rgba(16, 24, 40, 0.1); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--red); font-weight: 600; }

.top { background: var(--ink); color: #f3f4f6; }
.top__inner { max-width: 80rem; margin: 0 auto; padding: 0.7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 800; letter-spacing: 0.02em; }
.brand__sub { font-weight: 500; color: #9aa3b2; margin-left: 0.4rem; }
.top__actions { display: flex; align-items: center; gap: 0.6rem; }
.top .muted { color: #9aa3b2; }
.main { max-width: 80rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.btn { appearance: none; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 0.45rem 0.9rem; font: 600 14px/1.2 system-ui, sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.1rem; white-space: nowrap; }
.btn:hover { background: #eef0f3; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-2); }
.btn--quiet { background: transparent; border-color: #3a3f4a; color: #c7cdd8; }
.btn--quiet:hover { background: #2d313b; }
.btn--small { padding: 0.3rem 0.65rem; min-height: 1.8rem; font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.login { display: grid; place-items: center; min-height: 60vh; }
.login__card { width: min(100%, 24rem); display: grid; gap: 0.6rem; padding: 1.5rem; box-shadow: var(--shadow); }
.login__card h1 { font-size: 20px; font-weight: 800; }
.login__card label { font-weight: 700; font-size: 13px; color: var(--ink-2); margin-top: 0.4rem; }
.login__card input { border: 1px solid var(--line-2); border-radius: 0.5rem; padding: 0.6rem 0.7rem; font: inherit; }
.login__card input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; display: grid; gap: 0.1rem; }
.tile strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.tile span { font-size: 12px; color: var(--muted); }
.tile.is-bad strong { color: var(--red); }
.tile.is-warn strong { color: var(--amber); }
.tile.is-good strong { color: var(--green); }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.tabs { display: flex; gap: 0.2rem; overflow-x: auto; }
.tab { appearance: none; border: 0; background: transparent; padding: 0.5rem 0.8rem; font: 700 14px system-ui, sans-serif; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.is-on { color: var(--blue); border-color: var(--blue); }
.search { border: 1px solid var(--line-2); border-radius: 0.5rem; padding: 0.5rem 0.7rem; font: inherit; min-width: 14rem; }

.sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)) auto; gap: 0.8rem; align-items: center; }
.site.is-down { border-color: var(--red); }
.site__name { font-weight: 800; font-size: 15px; display: grid; gap: 0.15rem; min-width: 0; }
.site__name a { color: var(--muted); font-weight: 500; font-size: 12px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site__name a:hover { color: var(--blue); text-decoration: underline; }
.cell { display: grid; gap: 0.15rem; min-width: 0; }
.cell__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cell__value { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; background: #eef0f3; color: #374151; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.pill--good { background: #dcfce7; color: #166534; }
.pill--warn { background: var(--amber-bg); color: #92400e; }
.pill--bad { background: var(--red-bg); color: #991b1b; }
.pill--info { background: #dbeafe; color: #1e40af; }
.site__pending { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 13px; color: var(--ink-2); padding-top: 0.5rem; border-top: 1px dashed var(--line); }

@media (max-width: 900px) {
  .site { grid-template-columns: 1fr 1fr; }
  .site__name { grid-column: 1 / -1; }
  .site__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
