@font-face { font-family: "Signature"; src: url("/vendor/fonts/dancing/dancing-script-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Signature"; src: url("/vendor/fonts/dancing/dancing-script-latin-ext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Signature"; src: url("/vendor/fonts/dancing/dancing-script-vietnamese-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }

:root {
  --cream: #F6F5F1;
  --paper: #FFFFFF;
  --ink: #1A1610;
  --ink-2: #3D3830;
  --muted: #6B655B;
  --faint: #8A8478;
  --line: rgba(26, 22, 16, 0.08);
  --line-2: #D9D4CA;
  --fill: #ECE9E2;
  --fill-2: #F3F1EC;
  --honey: #F5AC26;
  --honey-strong: #E89A0C;
  --honey-rim: #C9820F;
  --honey-soft: #FFF4DE;
  --honey-wash: #FFF9EC;
  --honey-ink: #9A5B00;
  --amber: #B9790F;
  --wing: #F6CC7B;
  --ok: #1E9E57;
  --ok-soft: #E4F6EB;
  --bad: #E0352B;
  --bad-soft: #FDECEB;
  --info: #0A72E8;
  --info-soft: #E6F0FD;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(26, 22, 16, 0.05);
  --shadow: 0 1px 2px rgba(26, 22, 16, 0.04), 0 8px 24px rgba(26, 22, 16, 0.06);
  --shadow-lg: 0 2px 6px rgba(26, 22, 16, 0.05), 0 22px 56px rgba(26, 22, 16, 0.14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 15px/1.47 var(--font);
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(245, 172, 38, 0.32); }
a { color: var(--honey-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; font-family: var(--font-display); }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
code { background: var(--fill-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(245, 172, 38, 0.55); outline-offset: 2px; border-radius: 6px; }

/* logo */
body { --bee-surface: var(--cream); }
.card { --bee-surface: var(--paper); }
.topbar { --bee-surface: #FDFDFB; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 26px;
  padding: 9px max(20px, env(safe-area-inset-left));
  min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .bee-logo { width: auto; height: 42px; flex: none; }
.brand b { color: var(--amber); font-weight: 700; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-2); font-weight: 500; font-size: 14px;
  padding: 7px 13px; border-radius: 999px;
  transition: background-color 150ms ease, color 150ms ease;
}
.nav a svg { width: 16px; height: 16px; flex: none; }
.nav a:hover { background: var(--fill-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--ink); color: #fff; }
.nav a.plus { color: var(--honey-ink); }
.nav a.plus.on { background: linear-gradient(180deg, #F8BC48, var(--honey)); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.who-name { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.who-name strong { color: var(--ink); font-weight: 600; font-size: 13px; }

.impersonate-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 9px 16px; background: var(--ink); color: #F4F1EA; font-size: 13.5px;
}
.impersonate-bar strong { color: var(--honey); }
.impersonate-bar .btn { --face: var(--honey); --hover: #FFC14F; --text: var(--ink); padding: 7px 14px; font-size: 13px; }
.impersonate-bar + .topbar { top: 47px; }

.page { max-width: 1180px; margin: 0 auto; padding: 40px max(20px, env(safe-area-inset-left)) 80px; animation: rise 420ms var(--ease) both; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head p { margin-top: 6px; font-size: 16px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--honey-ink); text-transform: uppercase; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* buttons */
.btn {
  --face: var(--fill); --text: var(--ink); --hover: #E2DED5;
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 500 14px/1 var(--font); letter-spacing: -0.01em; text-decoration: none;
  color: var(--text); background: var(--face);
  border: 0; border-radius: 999px;
  padding: 11px 20px; min-height: 40px;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background-color 160ms ease, transform 140ms var(--ease), box-shadow 160ms ease, opacity 150ms ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn.disabled { opacity: 0.4; pointer-events: none; }
.btn-honey {
  --face: linear-gradient(180deg, #F8BA43 0%, #F5AC26 55%, #EFA015 100%); --hover: linear-gradient(180deg, #FAC253 0%, #F6B030 55%, #F0A41B 100%); --text: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(150, 90, 0, 0.25), 0 6px 18px -6px rgba(232, 154, 12, 0.6);
}
.btn-honey:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 4px rgba(150, 90, 0, 0.25), 0 10px 24px -8px rgba(232, 154, 12, 0.7); transform: translateY(-1px); }
.btn-honey:active { transform: scale(0.97); }
.btn-dark { --face: var(--ink); --hover: #000; --text: #fff; }
.btn-danger { --face: var(--bad-soft); --hover: #FADAD8; --text: var(--bad); }
.btn-ok { --face: var(--ok); --hover: #188A4B; --text: #fff; }
.btn-line { --face: var(--paper); --hover: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-sm { font-size: 13px; padding: 8px 14px; min-height: 34px; }
.btn-lg { font-size: 16px; padding: 15px 28px; min-height: 52px; }
.btn-block { width: 100%; padding-top: 13px; padding-bottom: 13px; font-size: 15px; }
.btn-ghost {
  background: none; border: 0; color: var(--honey-ink); font: 500 13.5px var(--font);
  padding: 6px 8px; cursor: pointer; border-radius: 8px;
}
.btn-ghost:hover { background: var(--honey-soft); }
form.inline { display: inline; margin: 0; }

/* cards */
.card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.card-tight { padding: 18px 20px; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; color: var(--ink-2); }
label.field .hint { font-weight: 400; color: var(--faint); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=url], input[type=tel], select, textarea {
  font: 400 16px var(--font); color: var(--ink); letter-spacing: -0.01em;
  background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 11px 14px; width: 100%;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 4px rgba(245, 172, 38, 0.2); }
textarea { resize: vertical; min-height: 96px; }
input[readonly] { background: var(--fill-2); color: var(--muted); border-color: transparent; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B655B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--honey); margin: 1px 0 0; flex: none; }

.segmented { align-self: flex-start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); flex-wrap: wrap; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background-color 150ms, box-shadow 150ms; }
.segmented input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(26, 22, 16, 0.14); }
.segmented input:focus-visible + span { outline: 3px solid rgba(245, 172, 38, 0.55); }

/* alerts & pills */
.alert { position: relative; border-radius: 14px; padding: 13px 16px 13px 44px; font-size: 14px; animation: rise 300ms var(--ease) both; }
.alert::before { content: ""; position: absolute; left: 16px; top: 14px; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--alert-icon) center / 18px no-repeat; mask: var(--alert-icon) center / 18px no-repeat; }
.alert-ok { background: var(--ok-soft); color: #11663A; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23000'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.alert-bad { background: var(--bad-soft); color: #A1241C; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23000'/%3E%3Cpath d='M12 7v6M12 16.5v.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.alert-honey { background: var(--honey-soft); color: #7A4800; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l9.5 5.5v10L12 22.5 2.5 17V7z' fill='%23000'/%3E%3Cpath d='M12 7.5v5.5M12 16v.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.alert-info { background: var(--info-soft); color: #0B4D9C; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23000'/%3E%3Cpath d='M12 11v6M12 7.5v.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; letter-spacing: 0; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.tone-neutral { background: var(--fill-2); color: var(--muted); }
.tone-honey { background: var(--honey-soft); color: var(--honey-ink); }
.tone-ok { background: var(--ok-soft); color: #137043; }
.tone-bad { background: var(--bad-soft); color: #B42A21; }
.tone-info { background: var(--info-soft); color: #0B4D9C; }

.role-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; letter-spacing: .01em; white-space: nowrap; }
.role-badge svg { width: 12px; height: 12px; }
.role-superadmin { background: var(--ink); color: var(--honey); }
.role-admin { background: var(--honey-soft); color: var(--honey-ink); box-shadow: inset 0 0 0 1px rgba(201, 130, 15, 0.25); }
.role-user { background: var(--fill-2); color: var(--muted); }

/* hex avatars */
.hex {
  --size: 36px;
  width: var(--size); height: var(--size); flex: none;
  display: grid; place-items: center;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  background: var(--hex-bg, var(--ink)); color: var(--hex-ink, #fff);
  font-size: calc(var(--size) * 0.34); font-weight: 700; letter-spacing: .02em;
}
.hex.honey { --hex-bg: linear-gradient(160deg, #F8BC48, #EFA015); --hex-ink: var(--ink); }
.hex.soft { --hex-bg: var(--honey-soft); --hex-ink: var(--honey-ink); }
.hex.grey { --hex-bg: var(--fill); --hex-ink: var(--ink-2); }
.hex-wrap { position: relative; display: inline-flex; }
.online-dot { position: absolute; right: -1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2.5px var(--paper); }
.online-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }

/* meters */
.meter { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F8BC48, var(--honey)); transition: width 600ms var(--ease); }
.meter.near > span { background: linear-gradient(90deg, #F5AC26, #E8720C); }
.meter.full > span { background: linear-gradient(90deg, #E8720C, var(--bad)); }
.meter.unlimited > span { background: repeating-linear-gradient(-45deg, #F8BC48 0 8px, #F5AC26 8px 16px); width: 100% !important; }
.usage-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 24px; }
.usage-card .big { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.usage-card .big span { font-size: 15px; font-weight: 500; color: var(--faint); }

/* dashboard */
.tabs {
  display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 20px;
  background: var(--fill); padding: 3px; border-radius: 12px;
}
.tabs a {
  color: var(--ink-2); font-weight: 500; font-size: 13px;
  padding: 6px 14px; border-radius: 9px; transition: background-color 150ms, color 150ms;
}
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a .n { font-variant-numeric: tabular-nums; color: var(--faint); margin-left: 5px; }
.tabs a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(26, 22, 16, 0.14); }
.doc-list {
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.doc-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 16px; align-items: center;
  padding: 14px 20px; color: inherit; position: relative;
  transition: background-color 140ms ease;
}
.doc-row + .doc-row::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--line); }
.doc-row:hover { background: var(--honey-wash); text-decoration: none; }
.doc-row:hover .doc-icon { transform: rotate(-4deg); }
.doc-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--honey-soft); display: grid; place-items: center; transition: transform 250ms var(--ease); }
.doc-icon svg { width: 20px; height: 20px; }
.doc-icon svg path { stroke: var(--honey-ink); }
.doc-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: 13px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatars { display: flex; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: #fff; border: 2px solid var(--paper); margin-left: -7px;
}
.avatar:first-child { margin-left: 0; }
.avatar.done { box-shadow: 0 0 0 2px var(--ok); }
.empty { text-align: center; padding: 56px 20px; }
.empty .bee-logo { width: auto; height: 76px; margin-bottom: 14px; }
.dropzone {
  display: block; position: relative; overflow: hidden;
  border: 1.5px dashed #CFC8BB; border-radius: var(--radius-lg); background: var(--paper);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color 160ms, background 160ms, transform 160ms var(--ease);
}
.dropzone:hover { border-color: var(--honey); background: var(--honey-wash); }
.dropzone.over { border-color: var(--honey); background: var(--honey-soft); transform: scale(1.01); }
.dropzone input { display: none; }
.dropzone strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.dropzone strong::before {
  content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
  background: var(--honey-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V5M7 9.5L12 4.5 17 9.5M5 19.5h14' fill='none' stroke='%239A5B00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
  transition: transform 300ms var(--ease);
}
.dropzone:hover strong::before { transform: translateY(-3px); }

/* document detail */
.signer-list { display: flex; flex-direction: column; gap: 10px; }
.signer {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; align-items: start;
  background: var(--fill-2); border-radius: 14px; padding: 13px 14px;
}
.signer .avatar { margin: 0; border: 0; }
.signer-actions { grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.signer-actions:empty { display: none; }
.signer .btn { background: var(--paper); }
.signer .btn:hover { background: #fff; box-shadow: 0 1px 3px rgba(26, 22, 16, 0.1); }
.signer .btn-dark { background: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: var(--mono); font-size: 12.5px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.detail-col { display: flex; flex-direction: column; gap: 20px; }
.detail-grid .card + .card { margin-top: 0; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 410px; padding: 34px; border-radius: 28px; box-shadow: var(--shadow-lg); animation: rise 500ms var(--ease) both; }
.auth-card .brand { margin-bottom: 14px; }
.auth-card .brand .bee-logo { height: 52px; }
.auth-by { font-size: 11.5px; color: var(--faint); text-align: center; padding-top: 12px; border-top: 1px solid var(--line); }
.auth-card h1 { font-size: 26px; }
.honeycomb-bg {
  background-color: var(--cream);
  background-image:
    radial-gradient(900px 520px at 50% -12%, rgba(245, 172, 38, 0.2), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16z M28 64l28 16v32 M28 64L0 80v32' fill='none' stroke='%231A1610' stroke-opacity='0.045' stroke-width='1.2'/%3E%3C/svg%3E");
}

/* landing */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); letter-spacing: -0.038em; line-height: 1.02; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #E59A12, #C98410 55%, #9A5F0E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 20px 0 30px; max-width: 32em; line-height: 1.45; }
.hero .btn { padding: 14px 26px; font-size: 15px; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art .bee-loader { --mark: 320px; }
.paper-sheet { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 30px 30px 34px; transform: rotate(1deg); }
.paper-sheet .l { height: 8px; border-radius: 4px; background: var(--fill-2); margin-bottom: 11px; }
.paper-sheet .sig-box { margin-top: 24px; border: 1.5px dashed var(--honey); background: var(--honey-soft); border-radius: 12px; height: 92px; position: relative; }
.paper-sheet .sig-box svg { position: absolute; inset: 6px 10px; width: calc(100% - 20px); height: calc(100% - 12px); }
.sig-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s ease-in-out 0.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.stamp { position: absolute; right: -8px; bottom: -16px; transform: rotate(-8deg); background: var(--ink); color: var(--honey); font-weight: 600; letter-spacing: 0.08em; font-size: 11px; padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; animation: stamp .35s ease-out 3.7s forwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.4); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 48px; }
.steps .card { padding: 22px; transition: transform 250ms var(--ease), box-shadow 250ms; }
.steps .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.steps .k { font-family: var(--mono); font-size: 11.5px; color: var(--honey-ink); margin-bottom: 10px; letter-spacing: 0; }

.foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 18px; color: var(--faint); font-size: 12px; padding: 8px 20px 30px; margin-top: 12px; }
.foot a { color: var(--muted); }
.foot-brand { display: inline-flex; }
.foot-links { display: inline-flex; gap: 14px; }
.legal h2 { font-size: 17px; margin-top: 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* animated logo loader */
.bee-loader { --mark: 120px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.bee-loader .bee-logo { width: auto; height: var(--mark); }
.bee-loader .bl-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.bee-loader.inline { --mark: 84px; padding: 70px 0; }
.page-loader:not(.on) { display: none; }
.page-loader:not(.is-done) { animation: page-loader-in 220ms ease both; }
.page-loader .bee-splash__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.page-loader .bl-label { padding: 4px 12px; border-radius: 999px; background: var(--bee-surface); font-size: 14px; font-weight: 500; color: var(--muted); transition: opacity .3s; }
.page-loader.is-done .bl-label { opacity: 0; }
@keyframes page-loader-in { from { opacity: 0; } }

/* console (Admin+) */
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.console-head h1 { display: flex; align-items: center; gap: 12px; }
.crown { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); background: var(--ink); color: var(--honey); }
.crown svg { width: 20px; height: 20px; }
.subnav { display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--fill); margin-bottom: 26px; flex-wrap: wrap; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.subnav a svg { width: 15px; height: 15px; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(26, 22, 16, 0.14); }
.subnav a .n { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--faint); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; transition: transform 250ms var(--ease), box-shadow 250ms; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.stat .val { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .sub { font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.stat.dark { background: var(--ink); color: #F4F1EA; }
.stat.dark .lbl { color: #CFC8BA; }
.stat.dark .sub { color: #A39C8E; }
.stat.dark::after {
  content: ""; position: absolute; right: -20px; bottom: -30px; width: 130px; height: 130px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16z M28 64l28 16v32 M28 64L0 80v32' fill='none' stroke='%23F5AC26' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 40px auto;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; display: inline-block; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.8s ease-out infinite; }

.console-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.console-grid .card + .card { margin-top: 0; }
.col { display: flex; flex-direction: column; gap: 20px; }

.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; padding-top: 10px; }
.bars .bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar span.b { width: 100%; max-width: 26px; min-height: 4px; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, #F8BC48, var(--honey)); transform-origin: bottom; animation: grow 700ms var(--ease) both; }
.bars .bar.zero span.b { background: var(--fill); }
.bars .bar small { font-size: 11px; color: var(--faint); }
.bars .bar em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-2); min-height: 14px; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; }
.person:first-child { border-top: 0; padding-top: 0; }
a.person:hover { text-decoration: none; }
a.person:hover .person-name { color: var(--honey-ink); }
.person-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 150ms; }
.person-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-note { font-size: 13.5px; color: var(--faint); padding: 8px 0; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.feed .ico::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.feed .what { font-weight: 600; }
.feed .meta { font-size: 12.5px; color: var(--faint); margin-top: 2px; overflow-wrap: anywhere; }

.tbl-wrap { overflow-x: auto; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color 120ms; }
.tbl tbody tr:hover { background: var(--honey-wash); }
.tbl .user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tbl .user-cell a { color: var(--ink); font-weight: 600; }
.tbl .meter-cell { min-width: 150px; }
.tbl .meter-cell .num { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; display: block; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar input[type=search] { max-width: 300px; padding: 9px 14px; font-size: 14px; border-radius: 999px; }
.toolbar select { width: auto; padding: 9px 38px 9px 14px; font-size: 14px; border-radius: 999px; }

.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head .hex { --size: 72px; }
.profile-head h1 { font-size: 30px; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.action-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--fill-2); }
.action-tile h3 { display: flex; align-items: center; gap: 8px; }
.action-tile p { font-size: 13px; color: var(--muted); }
.action-tile .btn { align-self: flex-start; }
.danger-tile { background: var(--bad-soft); }
.link-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--honey-wash); box-shadow: inset 0 0 0 1px rgba(201, 130, 15, 0.25); margin-bottom: 20px; animation: rise 300ms var(--ease) both; }
.sessions { display: flex; flex-direction: column; gap: 8px; }
.session { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 14px; background: var(--fill-2); border-radius: 14px; font-size: 13px; }
.session.revoked { opacity: .55; }
.session strong { font-size: 13.5px; }

/* paywall */
.hive-full { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 20px; }
.hive-card { position: relative; max-width: 560px; width: 100%; text-align: center; padding: 44px 36px 38px; border-radius: 32px; background: var(--paper); box-shadow: var(--shadow-lg); overflow: hidden; animation: rise 500ms var(--ease) both; }
.hive-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 220px; z-index: 0;
  background:
    radial-gradient(420px 200px at 50% 0, rgba(245, 172, 38, 0.24), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16z M28 64l28 16v32 M28 64L0 80v32' fill='none' stroke='%23C9820F' stroke-opacity='0.12' stroke-width='1.4'/%3E%3C/svg%3E");
  -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent);
}
.hive-card > * { position: relative; z-index: 1; }
.hive-stage { position: relative; width: 260px; height: 200px; margin: 0 auto 10px; }
.hive-jar { position: absolute; left: 50%; top: 52%; width: 116px; height: 128px; transform: translate(-50%, -50%); }
.hive-jar .fill { transform-box: fill-box; transform-origin: 50% 100%; animation: fill-up 1.8s var(--ease) both; }
.hive-jar .count { font: 800 22px var(--font-display); fill: var(--ink); letter-spacing: -0.02em; }
@keyframes fill-up { from { transform: scaleY(0.08); } to { transform: scaleY(1); } }
.hive-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hive-path path { stroke-dasharray: 0.1 9; animation: dots 2.4s linear infinite; }
@keyframes dots { to { stroke-dashoffset: -18; } }
.hive-bee { position: absolute; top: 0; left: 0; width: 48px; height: 48px; offset-path: path('M130 30 C 220 30, 240 120, 170 150 C 110 176, 40 150, 30 96 C 22 48, 70 28, 130 30'); offset-rotate: auto; animation: orbit 5.5s linear infinite; }
.hive-bee svg { width: 48px; height: 48px; transform: rotate(90deg); filter: drop-shadow(0 4px 6px rgba(26, 22, 16, 0.18)); }
.hive-bee .wing { transform-box: fill-box; transform-origin: 50% 100%; animation: hive-flap .14s ease-in-out infinite alternate; }
@keyframes hive-flap { from { transform: scaleY(1); } to { transform: scaleY(.72); } }
@keyframes orbit { to { offset-distance: 100%; } }
.bubble { position: absolute; right: -6px; top: -4px; background: var(--ink); color: #F4F1EA; font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow); animation: bob 2.6s ease-in-out infinite; white-space: nowrap; }
.bubble b { color: var(--honey); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.hive-card h1 { font-size: 30px; margin-top: 6px; }
.hive-card .lead { font-size: 16px; color: var(--muted); margin: 12px auto 0; max-width: 30em; line-height: 1.5; }
.plan { margin: 26px auto 0; text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; padding: 18px 20px; border-radius: 20px; background: var(--ink); color: #F4F1EA; max-width: 420px; }
.plan .hex { --size: 46px; }
.plan strong { display: block; font-size: 16px; }
.plan span { font-size: 13px; color: #CFC8BA; }
.hive-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 1000px) { .console-grid { grid-template-columns: 1fr; } }
@media (max-width: 1180px) { .topbar .who-name { display: none; } }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  h1 { font-size: 28px; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-art .bee-loader { --mark: 220px; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 16px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -6px; }
  .nav a { white-space: nowrap; }
  .who { margin-left: auto; }
  .who-name { display: none; }
  .hide-sm { display: none !important; }
  .doc-row { grid-template-columns: 40px minmax(0, 1fr); padding: 13px 16px; }
  .doc-row .avatars, .doc-row .pill { grid-column: 2; justify-self: start; }
  .doc-row + .doc-row::before { left: 72px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 20px; }
  .usage-card { grid-template-columns: 1fr; }
  .bars { gap: 4px; }
  .impersonate-bar + .topbar { top: 0; position: relative; }
  .hive-card { padding: 34px 22px 28px; }
}

/* reminder sheet */
.sheet {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: var(--radius-xl);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-in 260ms var(--ease) both; }
.sheet.closing { animation: sheet-out 160ms ease-in both; }
.sheet::backdrop { background: rgba(26, 22, 16, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open]::backdrop { animation: fade-in 260ms ease both; }
.sheet.closing::backdrop { animation: fade-in 160ms ease reverse both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-body { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.sheet-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; gap: 14px; align-items: center; }
.sheet-head h2 { overflow-wrap: anywhere; }
.sheet-head p { margin-top: 3px; overflow-wrap: anywhere; }
.sheet-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(180deg, #FFE7B3, var(--honey-soft)); color: var(--honey-ink);
  box-shadow: inset 0 0 0 1px rgba(201, 130, 15, 0.18);
}
.sheet-icon svg { width: 22px; height: 22px; transform-origin: 50% 10%; animation: ring 1.4s var(--ease) 300ms 1; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.sheet-close {
  width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--fill-2); color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease;
}
.sheet-close:hover { background: var(--fill); color: var(--ink); }
.sheet-close svg { width: 15px; height: 15px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.tone-picker { display: flex; gap: 4px; padding: 4px; background: var(--fill-2); border-radius: 999px; }
.tone-chip {
  flex: 1; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  font: 500 13px/1 var(--font); letter-spacing: -0.01em; color: var(--ink-2);
  padding: 9px 10px; border-radius: 999px;
  transition: background-color 180ms var(--ease), color 180ms ease, box-shadow 180ms ease;
}
.tone-chip:hover { color: var(--ink); }
.tone-chip.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(26, 22, 16, 0.08), 0 3px 10px rgba(26, 22, 16, 0.06); }
.sheet textarea { min-height: 120px; line-height: 1.5; }
.shake { animation: shake 360ms ease; border-color: var(--bad) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.mail-preview { background: var(--cream); border-radius: 16px; padding: 12px 14px 16px; }
.mail-preview-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 10px; }
.mail-preview-card {
  background: var(--paper); border-radius: 14px; padding: 16px 18px; font-size: 13.5px; line-height: 1.5;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px;
}
.mail-preview-subject { font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.mail-preview-note {
  white-space: pre-line; overflow-wrap: anywhere; background: var(--honey-wash);
  border-left: 3px solid var(--honey); border-radius: 10px; padding: 10px 12px;
}
.mail-preview-note.is-default { background: none; border-left: 0; padding: 0; color: var(--ink-2); }
.mail-preview-btn {
  align-self: flex-start; background: var(--honey); color: var(--ink); font-weight: 600; font-size: 12.5px;
  padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@media (max-width: 560px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .sheet-body { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .tone-picker { overflow-x: auto; scrollbar-width: none; }
  .tone-chip { flex: none; }
  .sheet-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sig-path { stroke-dashoffset: 0; }
  .stamp { opacity: 1; }
  .hive-bee { offset-distance: 20%; }
}

/* layout fixes */
.stack > .card + .card { margin-top: 0; }
.danger-tile .btn-danger { --face: var(--bad); --hover: #C42A21; --text: #fff; }
.field-label { display: inline-flex; gap: 6px; align-items: baseline; }

/* branding */
.branded .btn-honey { --face: var(--brand); --hover: color-mix(in srgb, var(--brand) 88%, black); --text: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.code-input { font: 600 22px/1 var(--mono); letter-spacing: 0.3em; text-align: center; }

/* send form */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.extra-block + .extra-block { padding-top: 18px; border-top: 1px solid var(--line); }
.extra-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.extra-head p { margin-top: 3px; }
.extra-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.extra-rows:empty { display: none; }
.extra-row { display: grid; grid-template-columns: 1.15fr 1.5fr 1fr 0.95fr 34px; gap: 8px; align-items: center; }
.extra-row.viewer { grid-template-columns: 1fr 1.4fr 34px; }
.extra-row input, .extra-row select { font-size: 14px; padding: 9px 12px; }
.extra-row select { padding-right: 34px; }
.row-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--muted); font-size: 18px; cursor: pointer; }
.row-x:hover { background: var(--bad-soft); color: var(--bad); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 150ms, background-color 150ms; }
.choice small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.choice input:checked + span { background: var(--honey-wash); box-shadow: inset 0 0 0 1.5px var(--honey); }
.choice input:focus-visible + span { outline: 3px solid rgba(245, 172, 38, 0.55); }
.choice.off { opacity: 0.5; cursor: not-allowed; }
.sign-now { padding: 12px 14px; border-radius: 14px; background: var(--honey-wash); }

/* dashboard */
.doc-filters input[type=search] { max-width: 380px; flex: 1 1 260px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.tag-chip span { color: var(--faint); font-variant-numeric: tabular-nums; }
.tag-chip:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--honey); }
.tag-chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.tag-chip.on span { color: #CFC8BA; }
.mini-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--fill-2); color: var(--muted); font-size: 11.5px; line-height: 18px; }
.inbox-card { margin-bottom: 20px; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(245, 172, 38, 0.45); }
.inbox-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 4px var(--honey-soft); }
.inbox-list { display: flex; flex-direction: column; }
.inbox-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; }
.inbox-row:first-child { border-top: 0; padding-top: 0; }
.inbox-row:hover { text-decoration: none; }
.inbox-row:hover strong { color: var(--honey-ink); }
.avatar.kind-approver { border-radius: 9px; }

/* document detail */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 250px; padding: 6px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: rise 180ms var(--ease) both; }
.menu-list form { margin: 0; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 14px var(--font); cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--fill-2); text-decoration: none; }
.proof-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.proof-badges:empty { display: none; }
.proof { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: 12px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2); }
.proof.ok { background: var(--ok-soft); color: #137043; box-shadow: none; }
.proof a { color: inherit; text-decoration: underline; }
.signer.is-delegated { opacity: 0.7; }
.avatar.kind-viewer { font-size: 13px; }
.edit-signer > summary { list-style: none; }
.edit-signer > summary::-webkit-details-marker { display: none; }
.edit-signer[open] { flex-basis: 100%; }
.edit-signer-form { margin-top: 10px; padding: 14px; border-radius: 14px; background: var(--paper); gap: 10px; }
.inline-form { align-items: flex-end; gap: 10px; margin-top: 14px; }

/* templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tpl-grid .card + .card { margin-top: 0; }
.tpl-card { display: flex; flex-direction: column; gap: 14px; }
.tpl-head { display: flex; gap: 12px; align-items: flex-start; }
.tpl-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 12%, white); color: color-mix(in srgb, var(--rc) 55%, black); font-size: 12.5px; font-weight: 600; }
.role-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rc); }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.mono-area { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }

/* organisations */
.org-logo-sm { height: 26px; max-width: 90px; object-fit: contain; }
.org-logo-lg { max-height: 56px; max-width: 180px; object-fit: contain; }
.org-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.brand-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.logo-slot { width: 140px; height: 84px; border-radius: 14px; border: 1.5px dashed #CFC8BB; display: grid; place-items: center; padding: 10px; background: var(--paper); }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.color-field input[type=color] { width: 72px; height: 46px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; }

/* settings & developers */
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 18px; }
.recovery-grid code { font-size: 14px; background: var(--paper); padding: 4px 8px; }
.totp-setup { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.totp-qr svg { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; margin-top: 12px; }
pre.code { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--ink); color: #F4F1EA; font: 12.5px/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.api-doc h3 { margin-top: 6px; }

/* public form */
.public-form .form-logo { max-height: 52px; max-width: 220px; object-fit: contain; align-self: flex-start; }
.public-form .form-org { font-weight: 700; font-size: 18px; }

@media (max-width: 820px) {
  .extra-row, .extra-row.viewer { grid-template-columns: 1fr 34px; }
  .extra-row > :not(.row-x) { grid-column: 1; }
  .extra-row .row-x { grid-column: 2; grid-row: 1; }
  .totp-setup { grid-template-columns: 1fr; }
  .totp-qr { max-width: 220px; }
  .menu-list { left: 0; right: auto; }
}
.page section[id], .page [id].card { scroll-margin-top: 92px; }
