:root { --ink: #14212e; --muted: #556270; --line: #d9dee4; --soft: #f4f6f8; --green: #1D9E75; --green-ink: #0f6e51; --red: #b42318; --bg: #ffffff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/22px "Figtree", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.corner { position: fixed; top: 20px; left: 24px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.corner img { height: 34px; }
.wordmark { font-family: "Fraunces", Georgia, serif; letter-spacing: .28em; font-size: 18px; }
.agency-corner { position: fixed; top: 14px; right: 20px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; display: none; align-items: center; gap: 8px; max-width: 46vw; }
.agency-corner.on { display: flex; }
.agency-corner img { height: 36px; max-width: 160px; object-fit: contain; }
.agency-corner span { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 88px 16px 32px; }
.card { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.card.wide { max-width: 760px; }
h1 { font-size: 22px; margin: 0; text-align: center; }
.sub { color: var(--muted); font-size: 14px; text-align: center; margin: 0; }
button, .btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 11px 14px; font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
button:hover { background: var(--soft); }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-ink); }
button.link { border: 0; background: none; color: #1f5fa8; font-weight: 500; padding: 4px; width: auto; justify-self: center; }
button:disabled { opacity: .55; cursor: default; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
input, select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { font-size: 13px; text-align: center; min-height: 18px; color: var(--muted); }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green-ink); }
.hidden { display: none !important; }
.qr { display: grid; justify-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.qr code { font-size: 12px; word-break: break-all; background: var(--soft); padding: 6px 8px; border-radius: 6px; }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.agency { text-align: left; display: grid; gap: 4px; justify-items: start; padding: 14px; }
.agency img { height: 40px; max-width: 160px; object-fit: contain; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: #334155; }
.badge.live { background: #e3f5ee; color: var(--green-ink); }
.badge.sandbox { background: #fdf0e9; color: #9a3d16; }
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar button { width: auto; }
section.box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
h2 { font-size: 16px; margin: 0; }
@media (max-width: 520px) { .corner { top: 12px; left: 16px; } .wordmark { font-size: 15px; } .agency-corner { top: 8px; right: 12px; } main { padding-top: 76px; } }
.agency-wrap { display: grid; gap: 4px; }
button.link.danger { color: #b42318; font-size: 13px; justify-self: start; }
.sp { position: relative; }
.sp-btn { justify-content: space-between; font-weight: 500; text-align: left; }
.sp-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(20,33,46,.12); padding: 8px; display: grid; gap: 6px; min-width: 260px; }
.sp-list { max-height: 280px; overflow-y: auto; display: grid; }
.sp-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 4px; font-weight: 500; font-size: 14px; border-radius: 8px; cursor: pointer; }
.sp-row:hover { background: var(--soft); }
.sp-row input { width: auto; }
.row-links { display: flex; gap: 12px; }
.st-edit { display: grid; gap: 8px; padding: 8px 0; }
.lbl { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.grid { align-items: start; }
.row-links button { white-space: nowrap; }

h1 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-variation-settings: 'opsz' 32; }
