:root { --bg: #f4f6f9; --panel: #fff; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --brand: #2563eb; --bad: #dc2626; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); }
.top { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 12px 16px; background: #111827; color: #fff; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.top nav a { color: #cbd5e1; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: #1f2937; color: #fff; }
.top .me { font-size: 13px; color: #9ca3af; } .top .me a { color: #9ca3af; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 16px; } h2 { font-size: 17px; margin: 24px 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
label { display: block; margin: 10px 0; font-weight: 500; }
label small { font-weight: 400; color: var(--muted); }
label.inline { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
textarea.code, input.code, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
input[type=color] { display: block; width: 100%; height: 36px; margin-top: 4px; border: 1px solid #d1d5db; border-radius: 6px; padding: 2px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; padding: 8px 12px; }
.btn, button { background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.small { padding: 4px 10px; font-size: 13px; font-weight: 500; }
.btn.danger { background: var(--bad); }
.flash { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f9fafb; font-weight: 600; }
td.num, th.num { text-align: right; }
.scroll { overflow-x: auto; }
td.actions { display: flex; gap: 6px; }
table.kv th { width: 45%; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stats b { display: block; font-size: 28px; } .stats span { color: var(--muted); font-size: 13px; }
.stats .bad b { color: var(--bad); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
.preview { position: sticky; top: 12px; padding: 0; overflow: hidden; }
.preview .ph { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; }
.preview .ph a { margin-left: auto; font-size: 13px; }
.preview iframe { width: 100%; height: 720px; border: 0; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; align-items: center; }
.colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0 12px; }
.thumb { max-height: 48px; max-width: 140px; display: block; }
body.login { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
body.login .box { background: #fff; width: calc(100% - 32px); max-width: 360px; padding: 24px; border-radius: 12px; border: 1px solid var(--line); }
body.login button { width: 100%; margin-top: 8px; }
.err { background: #fee2e2; color: #991b1b; padding: 8px 12px; border-radius: 6px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .preview { position: static; } .grid2 { grid-template-columns: 1fr; } }
.tenant-pick select { width: auto; margin: 0; padding: 5px 8px; background: #1f2937; color: #fff; border: 1px solid #374151; }
.tenant-name { background: #1f2937; padding: 4px 10px; border-radius: 6px; }
