:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2d35;
  background: #f5f7f7;
  line-height: 1.45;
  font-synthesis: none;
  --ink: #1d2d35;
  --muted: #546570;
  --border: #dce5e5;
  --green: #185644;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #46a586; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.top { background: #142e30; color: #f7fcfa; }
.bar { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand, .account, .hero, .source, .source-main { display: flex; align-items: center; }
.brand { gap: 12px; font-weight: 680; letter-spacing: .005em; }
.brand-divider { color: #92baa9; padding: 0 5px; }
.account { gap: 12px; font-size: .84rem; }
.account span { color: #dcf2e8; }
.account button { color: inherit; background: #294649; border-color: #567372; }
.hero { padding: 40px 0 23px; gap: 24px; justify-content: space-between; align-items: end; }
.kicker { color: var(--green); font-size: .69rem; font-weight: 760; letter-spacing: .13em; margin: 0 0 7px; }
.kicker span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 2px; background: #337e67; vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(2rem, 4.8vw, 3.2rem); letter-spacing: -.055em; line-height: 1.09; }
.intro { color: var(--muted); margin: 0; font-size: 1rem; }
button { color: var(--ink); background: white; border: 1px solid var(--border); border-radius: 7px; padding: 7px 12px; font-weight: 650; }
button:hover:not(:disabled) { background: #eaf3ef; }
.account button:hover:not(:disabled) { background: #36575a; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: white; border-color: #185644; background: #185644; padding: 9px 14px; white-space: nowrap; }
.primary:hover:not(:disabled) { background: #0f4838; }
.source { justify-content: space-between; gap: 10px 22px; padding: 12px 15px; border-radius: 9px; background: #f9f1dc; border: 1px solid #eddcb1; color: #62491b; font-size: .85rem; }
.source-main { gap: 10px; }
.badge { white-space: nowrap; background: #f0e1b9; padding: 3px 7px; border-radius: 4px; font-size: .66rem; letter-spacing: .075em; }
.sync-time { font-size: .8rem; flex-shrink: 0; }
#notice { margin: 10px 0 0; border: 1px solid #edbdb7; border-radius: 8px; color: #822c25; background: #fdf0ed; padding: 10px 14px; font-size: .88rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-block: 18px; }
.metric { background: white; border: 1px solid var(--border); border-radius: 10px; min-width: 0; padding: 14px 17px; }
.metric > span { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 670; }
.metric strong { display: block; margin: 1px 0 0; font-size: 1.9rem; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); font-size: .76rem; }
.dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; display: inline-block; }
.dot.ready { background: #2c8665; }
.dot.pending { background: #a46b18; }
.panel { background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.panel-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 17px; }
h2 { margin-bottom: 2px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.022em; }
.panel-top p, .muted { margin: 0; color: var(--muted); font-size: .82rem; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; }
.filters input, .filters select, .field-input { min-height: 38px; border-radius: 7px; border: 1px solid #cbd8d9; background: #fff; color: var(--ink); padding: 7px 10px; font-size: .85rem; }
.search { position: relative; }
.search svg { position: absolute; left: 9px; top: 11px; color: var(--muted); pointer-events: none; }
.filters input { padding-left: 32px; width: 190px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 11px 16px; border-top: 1px solid #e5ebeb; }
th { background: #f3f7f6; font-size: .72rem; letter-spacing: .058em; text-transform: uppercase; color: #43575c; white-space: nowrap; }
td:first-child { font-weight: 660; }
td:last-child { text-align: right; }
td:nth-child(2), td:nth-child(3), td:nth-child(4) { white-space: nowrap; }
td:nth-child(2) span { display: block; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
td button { font-size: .78rem; padding: 5px 10px; }
tr:hover td { background: #f9fbfa; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #f9efdb; color: #715019; border-radius: 99px; padding: 4px 8px; font-size: .75rem; font-weight: 670; }
.pill.ready { background: #e4f4ea; color: #185644; }
.empty { margin: 0; padding: 24px 17px; color: var(--muted); }
footer { display: flex; gap: 12px; justify-content: space-between; padding: 15px 0 26px; color: var(--muted); font-size: .75rem; }
dialog { width: min(480px, calc(100% - 24px)); max-height: 90vh; color: var(--ink); padding: 22px; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 20px 70px #10252a33; }
dialog::backdrop { background: #10252a8c; }
.detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.detail-head h2 { font-size: 1.4rem; }
.detail-head p:last-child { margin: 5px 0 16px; color: var(--muted); font-size: .9rem; }
.close { font-size: 1.35rem; line-height: 1; padding: 6px 9px; }
.editor { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.editor label { display: grid; gap: 4px; font-size: .86rem; font-weight: 650; }
.field-input { width: 110px; }
.history { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 13px; }
.history h3 { font-size: 1rem; margin-bottom: 5px; }
.history ul { margin: 0; padding-left: 18px; }
.history li { padding-block: 4px; }
.history small { display: block; color: var(--muted); overflow-wrap: anywhere; }
#detail-error { color: #822c25; margin: 9px 0 0; font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 30px); }
  .hero { align-items: start; flex-direction: column; gap: 13px; padding-top: 26px; }
  .source { align-items: start; flex-direction: column; }
  .source-main { align-items: start; }
  .metrics { gap: 7px; }
  .metric { padding: 8px; }
  .metric > span { font-size: .76rem; align-items: baseline; }
  .metric small { display: none; }
  .panel-top { padding: 13px; }
  th, td { padding: 9px; }
}
#detail-error.saved { color: var(--green); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.login-card .brand { margin-bottom: 28px; }
.login-card h1 { font-size: 2rem; }
.login-card > p { color: var(--muted); font-size: .9rem; }
.login-card form, .account-form { display: grid; gap: 12px; margin: 20px 0; }
.login-card label, .account-form label, #invite-result label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; }
.login-card input, .account-form input, .account-form select, #invite-link {
  width: 100%; min-height: 40px; border: 1px solid #cbd8d9; border-radius: 6px; padding: 8px 10px; font: inherit;
}
#auth-error, #accounts-error { color: #822c25; font-size: .88rem; margin: 0; }
.accounts-list { list-style: none; padding: 0; }
.accounts-list li { padding-block: 12px; border-bottom: 1px solid var(--border); }
.accounts-list small { display: block; margin-bottom: 8px; color: var(--muted); }
.accounts-list button { margin: 0 6px 4px 0; font-size: .8rem; }
#invite-result { background: #f3f7f6; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
#invite-result p { font-size: .85rem; }
#invite-copy { margin-top: 8px; }
@media (max-width: 620px) { .bar { flex-wrap: wrap; padding-block: 10px; } .account { flex-wrap: wrap; } }
