:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f5f7f9;
  color: #17212b;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f5f7f9; }
button, input { font: inherit; letter-spacing: 0; }
button { min-height: 36px; border: 1px solid #176b55; border-radius: 5px; padding: 0 14px; background: #176b55; color: #fff; cursor: pointer; }
button:hover { background: #115641; }
button:disabled { cursor: wait; opacity: .65; }
button.secondary { border-color: #cad2d9; background: #fff; color: #263442; }
button.secondary:hover { background: #edf1f4; }
button.danger { border-color: #d7b6b6; background: #fff; color: #9e2d2d; }
input { width: 100%; height: 38px; border: 1px solid #c6cfd7; border-radius: 5px; padding: 0 10px; background: #fff; color: #17212b; }
input:focus { outline: 2px solid #8bc7b8; outline-offset: 1px; border-color: #176b55; }
input[readonly] { background: #eef2f4; color: #5b6873; }
label { display: grid; gap: 6px; color: #50606e; font-size: 13px; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf1f4; }
.login-panel { width: min(390px, 100%); padding: 30px; border: 1px solid #d6dde2; border-radius: 7px; background: #fff; box-shadow: 0 14px 38px rgba(26, 44, 59, .09); }
.login-panel h1 { margin: 16px 0 6px; font-size: 23px; letter-spacing: 0; }
.login-panel p { margin: 0 0 24px; color: #667581; }
.login-panel button { width: 100%; margin-top: 18px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; background: #17212b; color: #fff; font-weight: 700; }
.brand-mark.small { width: 30px; height: 30px; margin-right: 10px; font-size: 12px; vertical-align: middle; }
.form-error { min-height: 20px; margin-top: 12px; color: #a92f2f; font-size: 13px; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid #d7dee4; background: #fff; position: sticky; top: 0; z-index: 2; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.state { display: inline-flex; align-items: center; gap: 7px; color: #52616d; font-size: 13px; white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #929da5; }
.state.good::before { background: #17875f; }
.content { width: min(1280px, calc(100% - 32px)); margin: 0 auto 56px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #d7dee4; background: #fff; }
.metrics div { min-height: 94px; padding: 19px 22px; border-right: 1px solid #e2e7eb; }
.metrics div:last-child { border-right: 0; }
.metrics span { display: block; color: #6a7781; font-size: 12px; text-transform: uppercase; }
.metrics strong { display: block; margin-top: 8px; font-size: 27px; font-variant-numeric: tabular-nums; }
.section { padding: 28px 4px; border-bottom: 1px solid #d7dee4; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head p { margin: 5px 0 0; color: #6a7781; font-size: 13px; }
.section-head > button { flex-shrink: 0; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 220px auto auto auto; align-items: end; gap: 12px; padding: 16px; border: 1px solid #d7dee4; background: #fff; margin-bottom: 16px; }
.check { display: flex; align-items: center; height: 38px; gap: 8px; }
.check input { width: 16px; height: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid #d7dee4; background: #fff; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #e4e8eb; text-align: left; vertical-align: middle; }
th { background: #f0f3f5; color: #5b6873; font-size: 11px; text-transform: uppercase; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-block; border-radius: 999px; padding: 3px 8px; background: #e9edef; color: #596873; font-size: 12px; white-space: nowrap; }
.status-pill.online { background: #dff3eb; color: #116648; }
.status-pill.disabled { background: #f5e5e5; color: #962f2f; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.table-actions button { min-height: 30px; padding: 0 9px; font-size: 12px; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Consolas, monospace; color: #4f5d68; }
.empty { padding: 24px !important; text-align: center; color: #79858e; }
.audit-list { border: 1px solid #d7dee4; background: #fff; }
.audit-row { display: grid; grid-template-columns: 155px 150px 130px 1fr; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e4e8eb; font-size: 12px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row time, .audit-row span { color: #697681; }
.notice { position: fixed; right: 18px; bottom: 18px; max-width: min(430px, calc(100% - 36px)); padding: 11px 14px; border-radius: 5px; background: #17212b; color: #fff; box-shadow: 0 8px 22px rgba(20, 31, 40, .18); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; }
.notice.show { opacity: 1; transform: translateY(0); }
@media (max-width: 800px) {
  .topbar { height: auto; min-height: 58px; padding: 10px 14px; align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .state { width: 100%; justify-content: flex-end; }
  .content { width: calc(100% - 20px); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid #e2e7eb; }
  .settings-grid, .inline-form { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; }
  .audit-row { grid-template-columns: 1fr 1fr; }
}
