@font-face { font-family: Poppins; src: url(fonts/Poppins-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Bricolage; src: url(fonts/BricolageGrotesque.ttf); font-weight: 200 800; font-display: swap; }

:root {
  --teal: #0b5e57; --teal-2: #12857a; --teal-50: #e3f1ef;
  --coral: #ff6b3d; --coral-50: #ffeee6;
  --cream: #fff8f0; --card: #ffffff; --line: #f0e6da;
  --ink: #13201e; --ink-2: #44524f; --muted: #8a9592;
  --good: #1f8a4c; --warn: #b26a00; --bad: #c2362b;
  --r: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 400 14px/1.5 Poppins, system-ui, sans-serif; }
button, input { font: inherit; color: inherit; }
h1, h2, .display { font-family: Bricolage, Poppins, sans-serif; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }

/* Top bar */
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: Bricolage, sans-serif; font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; }
.pill { font: 600 11px Poppins; letter-spacing: .06em; text-transform: uppercase; background: var(--teal-50); color: var(--teal); padding: 4px 10px; border-radius: 99px; }
.top .spacer { flex: 1; }
.who { color: var(--ink-2); font-size: 13px; }

/* Buttons */
.btn { border: 0; border-radius: 99px; padding: 10px 18px; font-weight: 500; cursor: pointer; background: var(--ink); color: #fff; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.teal { background: var(--teal); }
.btn.coral { background: linear-gradient(90deg, #ff6b3d, #ff9a5c); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1px #f3d0cc; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn:focus-visible, input:focus-visible, .switch:focus-visible, .tab:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

/* Hero */
.hero { background: var(--teal); color: #fff; border-radius: 28px; padding: 24px; position: relative; overflow: hidden; display: grid; gap: 18px; grid-template-columns: 1fr auto; align-items: center; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 240px; height: 240px; border-radius: 50%; background: var(--teal-2); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: #ffffffb0; font-size: 13px; }
.hero h1 { font-size: 30px; margin-top: 2px; }
.hero p { margin: 6px 0 0; color: #ffffffd0; max-width: 520px; }
.switch { width: 64px; height: 36px; border-radius: 99px; border: 0; background: #ffffff40; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--coral); }
.switch[aria-checked="true"]::after { transform: translateX(28px); }
.switch-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 12px Poppins; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 22px; }
.stat { background: var(--card); border-radius: var(--r); padding: 16px 18px; }
.stat .n { font-family: Bricolage, sans-serif; font-weight: 700; font-size: 28px; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.stat.hot { background: var(--coral-50); }
.stat.hot .n { color: var(--coral); }

/* Tabs */
.tabs { display: flex; gap: 6px; background: #f3eadf; padding: 5px; border-radius: 99px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: transparent; padding: 8px 16px; border-radius: 99px; cursor: pointer; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #0000000f; }
.tab .c { margin-left: 6px; font-size: 11.5px; background: var(--coral); color: #fff; border-radius: 99px; padding: 1px 7px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin: 16px 0 10px; flex-wrap: wrap; }
.search { flex: 1; min-width: 200px; border: 0; background: #fff; border-radius: 99px; padding: 11px 18px; box-shadow: inset 0 0 0 1px var(--line); }
.hint { color: var(--muted); font-size: 13px; }
.chips { display: flex; gap: 6px; }
.chip { border: 0; background: #fff; border-radius: 99px; padding: 7px 13px; cursor: pointer; font-size: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }

/* List */
.list { background: var(--card); border-radius: var(--r); overflow: hidden; }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: var(--coral-50); color: #c2410c; }
.av.teal { background: var(--teal-50); color: var(--teal); }
.status { font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.waiting { color: var(--warn); }
.status.approved { color: var(--good); }
.status.blocked { color: var(--bad); }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
.more { display: block; margin: 12px auto 0; }

/* Empty */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty img { width: 120px; opacity: .9; }
.empty h2 { font-size: 20px; margin: 10px 0 4px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { background: #fff; border-radius: 28px; padding: 32px 28px; width: 100%; max-width: 400px; display: grid; gap: 14px; }
.login h1 { font-size: 28px; }
.login p { margin: 0; color: var(--ink-2); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input { border: 0; border-radius: 14px; padding: 14px 16px; background: var(--cream); font-size: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.prefix { display: flex; align-items: center; background: var(--cream); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.prefix span { padding-left: 16px; color: var(--ink-2); }
.prefix input { flex: 1; min-width: 0; box-shadow: none; background: transparent; padding-left: 8px; }
.prefix input:focus-visible { outline: none; }
.prefix:focus-within { outline: 3px solid var(--coral); outline-offset: 2px; }
.err { color: var(--bad); font-size: 13px; min-height: 1em; }
.link { background: none; border: 0; color: var(--teal); cursor: pointer; padding: 0; font-weight: 500; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 500 12px Poppins; color: var(--muted); padding: 12px 18px; background: #fbf6ef; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody tr:hover { background: #fffcf8; }
.tbl .doc { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.tbl .av, .tbl .ic { flex: none; }
.nw, .tbl td[data-l] { white-space: nowrap; }
.tbl .t { font-weight: 500; }
.tbl .s { color: var(--muted); font-size: 12.5px; }
.tbl time { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.tbl td.actions { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.resend { font-size: 13px; color: var(--muted); text-align: center; min-height: 1.5em; }

/* Activity */
.log .ic.bad { background: #fbe4e1; color: var(--bad); }
.log .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal); font-weight: 700; }

/* Toast and dialog */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: min(440px, calc(100% - 32px)); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: 0 10px 30px #0003; }
dialog { border: 0; border-radius: 24px; padding: 24px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: #13201e66; }
dialog h2 { font-size: 22px; }
dialog p { color: var(--ink-2); }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .hero h1 { font-size: 24px; }
  .switch-wrap { flex-direction: row; justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .tbl tbody tr:first-child { border-top: 0; }
  .tbl td { border: 0; padding: 3px 0 3px 52px; display: flex; gap: 8px; align-items: center; }
  .tbl td:first-child { padding-left: 0; }
  .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; min-width: 70px; }
  .tbl td.actions { padding-top: 8px; }
  .tbl .av { width: 40px; height: 40px; }
  .who { display: none; }
}
