:root {
  --bg: #101114;
  --bg-2: #171a1f;
  --bg-3: #21252c;
  --line: rgba(243, 241, 236, 0.08);
  --text: #f4f1ea;
  --muted: #a39e94;
  --faint: #6f6a62;
  --accent: #d6f25c;
  --accent-ink: #172000;
  --ok: #8ee0ad;
  --warn: #f0c36a;
  --bad: #ff8f7a;
  --pend: #c9c2b4;
  --paypal: #9eb6ff;
  --yape: #d2b4ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
html { scroll-behavior: smooth; }
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 32%, transparent) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 32%, transparent);
  border: 2px solid transparent; border-radius: 99px; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 72%, transparent); background-clip: padding-box; }
*::-webkit-scrollbar-button, *::-webkit-scrollbar-corner { display: none; width: 0; height: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 100% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 50%),
    var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.05rem; font-weight: 650; }
h2 { font-size: 1.7rem; letter-spacing: -0.04em; }
h3 { font-size: 1rem; }

.shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.92);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 4px 8px 0; }
.brand-logo, .login-logo { display: block; height: 46px; width: auto; }
.brand-logo.blend, .login-logo.blend { mix-blend-mode: screen; }
.brand strong, .brand small { display: block; }
.brand small, .fine, .muted, .eyebrow { color: var(--muted); }
.brand small { font-size: 12px; }
.mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 750;
}
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; justify-content: flex-start; align-items: center; gap: 10px;
  text-decoration: none; padding: 10px 12px; border-radius: 12px; color: var(--muted);
}
.nav-link .ico { width: 18px; height: 18px; }
.nav-link.active, .nav-link:hover { background: var(--bg-3); color: var(--text); }
.nav-link em {
  margin-left: auto;
  min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 12px; font-weight: 700;
}
.side-foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.whoami { min-width: 0; }
.whoami strong, .whoami small { display: block; }
.whoami small { color: var(--faint); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.main { width: 100%; max-width: 100%; min-width: 0; padding: 32px 40px 88px; animation: rise .35s ease both; }
.topbar { display: none; }
.nav-toggle { display: none; }
.page-intro, .card-head, .actions, .toolbar, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-intro { margin-bottom: 18px; align-items: flex-end; }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat, .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat { padding: 16px 18px; }
a.stat { display: block; text-decoration: none; color: inherit; }
a.stat, .btn, .text-btn, .icon-btn, .back, .nav-link, .chips a {
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease, filter .4s ease, border-color .4s ease, background .4s ease, color .4s ease;
}
a.stat:hover {
  transform: scale(1.018);
  border-color: transparent;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 0 32px color-mix(in srgb, var(--accent) 16%, transparent);
}
a.stat:active { transform: scale(0.99); }
.stat-ico {
  width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 10px;
  border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.stat-ico .ico { width: 16px; height: 16px; }
.row-pill, .phone-only { display: none; }
.stat span, .money-row span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 2rem; letter-spacing: -0.05em; margin: 6px 0 2px; }
.stat small, .money-row small, small { color: var(--faint); display: block; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; margin: 16px 0; }
.card-head { padding: 16px 18px 0; }
.card-head a { color: var(--accent); text-decoration: none; font-size: 14px; }
.money-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 18px 0; }
.money-row strong { display: block; font-size: 1.6rem; margin-top: 4px; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; padding: 12px 18px 16px; }
.pad { padding: 16px 18px; }
.pad .fine, .pad h3 { padding: 0; }
.lead { color: var(--muted); margin-bottom: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 2px; }
.copies { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 4px; }
.copy {
  position: relative; display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%;
  margin: 0; padding: 1px 5px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font: inherit; font-size: 12px; line-height: 1.35; text-align: left; cursor: copy;
}
.copy i {
  flex: none; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint);
}
.copy span { overflow-wrap: anywhere; }
.copy:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.copy.copied { background: var(--accent); color: var(--accent-ink); }
.copy.copied i { color: var(--accent-ink); background: transparent; }
.client-open {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.client-open strong, .client-open small { display: block; }
.client-open:hover strong { color: var(--accent); }
.access-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.access-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.03); font-size: 14px;
}
.access-row span { color: var(--text); font-family: ui-monospace, "Cascadia Code", monospace; min-width: 0; overflow-wrap: anywhere; }
.access-row.copied span { color: var(--accent-ink); }
.sheet-text:empty { display: none; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(255,255,255,0.025); }
.end { text-align: right; }
.pager { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: center; width: 100%; gap: 6px; padding: 14px 16px 16px; }
.pager a {
  min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 13px;
}
.pager a.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.pager a.off { opacity: 0.35; pointer-events: none; }
.mono { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; }

.pill, .tag {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
}
.pill.ok { background: rgba(142, 224, 173, 0.16); color: var(--ok); }
.pill.warn { background: rgba(240, 195, 106, 0.16); color: var(--warn); }
.pill.bad { background: rgba(255, 143, 122, 0.16); color: var(--bad); }
.pill.pend { background: rgba(201, 194, 180, 0.12); color: var(--pend); }
.pill.row-pill { display: none; }
.tag.paypal { background: rgba(158, 182, 255, 0.14); color: var(--paypal); }
.tag.yape { background: rgba(210, 180, 255, 0.14); color: var(--yape); }

.btn, .text-btn {
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; text-decoration: none;
}
.btn:hover, .text-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 22%, transparent);
  filter: brightness(1.06);
}
.btn.ghost:hover, .icon-btn:hover {
  filter: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent), 0 8px 22px rgba(0, 0, 0, 0.2);
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn.phone-only { display: none; }
.btn .ico, .icon-btn .ico { width: 16px; height: 16px; }
.btn:active, .icon-btn:active, .nav-link:active, .field-face:active { transform: scale(0.97); }
.btn.pressed, .icon-btn.pressed { transform: scale(0.96); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(255,143,122,.4); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.text-btn { background: transparent; color: var(--muted); padding: 0; }
.actions { align-items: center; }
.actions form { margin: 0; }

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters input[type="search"], .filters select {
  height: 42px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.filters input[type="search"] { flex: 1 1 220px; min-width: 180px; width: auto; padding: 0 12px; }
.filters .picker { flex: 1 1 168px; min-width: 150px; max-width: 220px; }
.filters .btn { height: 42px; }
.filters .text-btn { padding: 0 8px; }
.toolbar { margin-bottom: 12px; }
.toolbar input, label input, label select, label textarea, .stack input, .stack select, .stack textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--text);
}
label textarea, .stack textarea { resize: none; height: 7.5rem; min-height: 7.5rem; max-height: 7.5rem; overflow: auto; line-height: 1.45; }
.toolbar input { max-width: none; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips a { text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.chips a.on { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.chips a.alert:not(.on) { color: var(--warn); border-color: rgba(240, 195, 106, 0.4); }
.chips a.ready:not(.on) { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.account-filters { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-filters .chips { margin: 0; flex: 1 1 auto; }
.account-filters .toolbar { margin: 0; flex: 1 1 auto; width: 280px; max-width: 360px; }

.flash, .banner {
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; line-height: 1.45;
}
.flash.ok, .banner { background: rgba(214, 242, 92, 0.1); color: var(--text); }
.flash.bad { background: rgba(255, 143, 122, 0.12); color: var(--bad); }
.banner.quiet { background: rgba(255,255,255,0.04); color: var(--muted); }
.banner a { color: var(--accent); }

.people { list-style: none; margin: 0; padding: 8px 10px 12px; }
.people li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px; }
.people a { display: block; flex: 1; min-width: 0; text-decoration: none; }
.people a strong, .people a span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people span { color: var(--muted); font-size: 13px; }
.people em { font-style: normal; color: var(--warn); font-weight: 700; }
.empty { color: var(--muted); padding: 8px 18px 16px; }

.detail { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 12px; align-items: start; }
.stack-cards, .stack, .pending-grid, .mother-grid { display: grid; gap: 12px; }
.pending-grid, .mother-grid { grid-template-columns: repeat(2, 1fr); }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-form .wide, .form-actions, .check { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 650; margin: 4px 0; }
.check input[type="checkbox"] {
  appearance: none; width: 22px; height: 22px; margin: 0; padding: 0; flex: none; cursor: pointer;
  border-radius: 7px; border: 1.5px solid color-mix(in srgb, var(--accent) 70%, var(--line));
  background: var(--bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.check input[type="checkbox"]:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 9.2 17 19 7' fill='none' stroke='%23172000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: transparent;
}
.back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: rgba(255,255,255,0.03);
}
.back .ico { width: 16px; height: 16px; }
.back:hover { box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 18%, transparent); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-card { padding: 16px 18px 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.subtabs { margin-top: 2px; }
.search-range { margin: 4px 0 12px; }
.pay-list { display: grid; gap: 0; margin-top: 8px; }
.pay-hit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.pay-hit span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pay-hit details { min-width: 220px; }
.pay-hit form { margin-top: 10px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.tabs button { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.tabs button.on { background: var(--text); color: #161616; border-color: transparent; }
.hidden { display: none; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0; }
.slot {
  min-height: 72px; border-radius: 12px; border: 1px dashed var(--line); padding: 8px;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--faint);
}
.slot span { font-size: 11px; }
.slot strong { font-size: 12px; font-weight: 650; }
.slot.busy { border-style: solid; background: var(--bg-3); color: var(--text); }
.mother.off { opacity: 0.62; }
.btn.tiny { padding: 7px 10px; font-size: 12px; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: nowrap; }
td.end { white-space: nowrap; width: 1%; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); background: var(--bg-3); }
.icon-btn.danger:hover { color: var(--bad); border-color: rgba(255, 143, 122, 0.45); }
.who { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 460px; }
.who a, .who span {
  font-size: 12px; color: var(--muted); text-decoration: none;
  background: var(--bg-3); border-radius: 999px; padding: 3px 8px;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.who span { background: transparent; border: 1px dashed var(--line); }
.new-account { position: relative; }
.new-account > summary { list-style: none; color: var(--accent-ink); }
.new-account > summary::-webkit-details-marker { display: none; }
.new-account > form {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5;
  width: min(560px, 78vw);
}
.sheet {
  border: 0; padding: 0; background: transparent; color: var(--text);
  width: min(560px, calc(100vw - 24px)); max-width: calc(100vw - 24px);
}
.sheet.is-mail { width: min(760px, calc(100vw - 24px)); }
.mail-subject { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.mail-preview {
  display: block; width: 100%; height: 420px; border: 0; border-radius: 14px; background: #fff;
}
#sheet-send-mail { justify-content: flex-end; }
.sheet-handle { display: none; }
.peek-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#access-actions.peek-actions {
  flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px;
}
.act-group { display: flex; align-items: center; gap: 6px; min-width: 0; }
#access-actions .sheet-act { height: 36px; padding: 0 12px; font-size: 13px; font-weight: 650; white-space: nowrap; }
#access-actions .icon-btn { width: 36px; height: 36px; border-radius: 999px; }
.act-tip { position: relative; }
.act-tip::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 3;
  transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none;
  padding: 5px 8px; border-radius: 8px; white-space: nowrap;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  font-size: 12px; font-weight: 650; letter-spacing: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.act-tip:hover::after, .act-tip:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.act-group .act-tip:last-child::after { left: auto; right: 0; transform: translateY(4px); }
.act-group .act-tip:last-child:hover::after, .act-group .act-tip:last-child:focus-visible::after { transform: translateY(0); }
.sheet::backdrop { background: rgba(5, 6, 8, 0.74); }
.sheet-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); overflow: auto;
}
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sheet-head h3 { font-size: 1.35rem; letter-spacing: -0.04em; }
.sheet-text { color: var(--muted); margin: 8px 0 14px; line-height: 1.45; }
.sheet .form-actions { margin-top: 8px; }
.btn.solid-danger { background: var(--bad); color: #2a0906; border: 0; }
.sheet textarea {
  width: 100%; min-height: 220px; resize: vertical; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; line-height: 1.45;
}
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mini-chips button {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 10px; cursor: pointer; font-size: 13px;
}
.mini-chips button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
td a strong { font-weight: 700; }
details summary { cursor: pointer; color: var(--muted); margin: 8px 0; }
.create-mother { margin-bottom: 12px; }
.guide ol { color: var(--muted); line-height: 1.55; padding-left: 18px; }
.guide li { margin: 8px 0; }
.settings { align-items: start; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.login-card { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.login-logo { height: 58px; margin-bottom: 6px; animation: rise .5s ease both; }
.login-card h1 { font-size: 1.8rem; letter-spacing: -0.04em; margin: 14px 0 8px; animation: rise .7s ease both; }
.login-card .stack > * { animation: rise .75s ease both; }
.login-card .muted { margin-bottom: 16px; }
.login-card .stack { margin-top: 8px; }

.settings-layout, .settings-guides { display: grid; gap: 16px; }
.settings-guides { grid-template-columns: 1fr 1fr; align-items: start; }
.settings .card { height: 100%; display: flex; flex-direction: column; gap: 14px; }
.settings .card form { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.settings .card form .btn { margin-top: auto; align-self: flex-start; }
.guide form { margin-top: 16px; }
.main > .banner,
.main > .card,
.main > section.card { margin-top: 16px; }
.actions { flex-wrap: wrap; justify-content: flex-end; }
.tabbar { display: none; }
.ico { width: 18px; height: 18px; flex: none; }

.picker { position: relative; }
select.is-enhanced, input.is-enhanced {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.field-face {
  width: 100%; height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  cursor: pointer; text-align: left;
}
.field-face::after {
  content: ""; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); flex: none;
}
.picker-panel {
  position: fixed; z-index: 80; min-width: 180px; max-width: min(320px, calc(100vw - 16px));
  max-height: 280px; overflow: auto; padding: 6px; border-radius: 16px;
  background: #14171c; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.picker-panel button {
  width: 100%; text-align: left; border: 0; background: transparent; color: var(--text);
  border-radius: 10px; padding: 9px 10px; cursor: pointer;
}
.picker-panel button.on, .picker-panel button:hover { background: var(--bg-3); }
.picker-panel button.on { color: var(--accent); }
.calendar { width: 280px; max-height: none; padding: 12px; }
.cal-head, .cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-head button, .cal-foot button {
  width: auto; background: var(--bg-3); border-radius: 10px; padding: 6px 10px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.cal-grid span, .cal-grid i { text-align: center; color: var(--faint); font-size: 11px; padding: 4px 0; }
.cal-grid button { text-align: center; padding: 8px 0; }
.cal-grid button.on { background: var(--accent); color: var(--accent-ink); }

.route-loader {
  position: fixed; inset: 0 auto auto 0; width: 100%; height: 3px; z-index: 90; opacity: 0; pointer-events: none;
}
.route-loader.on { opacity: 1; }
.route-loader span {
  display: block; height: 100%; width: 35%; background: var(--accent); animation: slide 1s ease infinite;
}
.inbox-back { display: none; }
@keyframes slide { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(28px); } to { transform: none; } }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 40; transform: translateX(-105%); width: min(300px, 86vw); transition: transform .22s ease;
    background: #101114;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .nav-toggle { display: none; }
  .main {
    padding:
      calc(36px + env(safe-area-inset-top, 0px))
      16px
      calc(136px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
  }
  .page-intro, .page-intro > div, .new-account, .chips, .toolbar, .card, .table-wrap { max-width: 100%; min-width: 0; }
  .page-intro .btn, .page-intro > details, summary.btn { width: 100%; max-width: 100%; }
  h2 { font-size: 1.45rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .split, .detail, .pending-grid, .mother-grid, .grid-form, .money-row, .settings-guides { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(5, minmax(52px, 1fr)); }
  .pay-hit { grid-template-columns: 1fr; }
  .page-intro, .actions { align-items: stretch; flex-direction: column; }
  .actions .btn, .page-intro .btn { width: 100%; }
  .filters .picker, .filters input[type="search"] { flex-basis: 100%; max-width: none; }
  .new-account > form { position: static; width: 100%; margin-top: 10px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 45;
    left: 0; right: 0; bottom: 0; gap: 2px; padding: 14px 8px calc(20px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 17, 20, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(16px);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: 0; background: transparent; color: var(--muted); text-decoration: none; font-size: 11px; padding: 4px 0;
  }
  .tabbar a.active, .tabbar button:hover { color: var(--accent); }
  .as-cards thead, .as-cards td[data-label], .as-cards td.end { display: none; }
  .as-cards, .as-cards tbody, .as-cards tr, .as-cards td.lead-cell { display: block; width: 100%; }
  .as-cards tr { border-top: 1px solid var(--line); }
  .as-cards td.lead-cell {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 0; padding: 14px 16px;
  }
  .lead-cell .client-open, .lead-cell a { min-width: 0; flex: 1; }
  .lead-cell strong, .lead-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pill.row-pill { display: inline-flex; flex: none; }
  dialog.sheet:modal {
    width: 100%; max-width: 100%; height: fit-content; max-height: 88dvh;
    margin: auto 0 0; inset: auto 0 0 0; border: 0; padding: 0; background: transparent;
  }
  .sheet-card {
    border-radius: 24px 24px 0 0;
    max-height: 88dvh;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    animation: sheetUp .34s cubic-bezier(.2, .8, .2, 1);
  }
  .access-row { grid-template-columns: 1fr; gap: 2px; align-items: start; }
  .access-row i { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
  #peek-actions { display: grid; grid-template-columns: 1fr 1fr; }
  #peek-actions, #access-actions {
    position: sticky; bottom: 0; z-index: 1; margin-top: 8px;
    padding: 12px 0 2px; background: var(--bg-2);
  }
  #access-actions.peek-actions { display: flex; flex-wrap: nowrap; }
  #peek-actions .btn { width: 100%; justify-content: center; }
  #access-actions .btn { width: auto; }
  .sheet-handle { display: block; width: 42px; height: 4px; border-radius: 99px; margin: 0 auto 12px; background: rgba(255,255,255,.22); }
  .inbox { display: block; gap: 0; }
  .inbox-col {
    border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 0;
  }
  .inbox-col.preview { display: none; }
  .inbox.is-reading .inbox-list-col { display: none; }
  .inbox.is-reading .inbox-col.preview {
    display: flex; position: fixed; inset: 0; z-index: 60; min-height: 100dvh;
    background: var(--bg); border-radius: 0;
  }
  body:has(.inbox.is-reading) .tabbar { display: none; }
  .inbox.is-reading .preview iframe { min-height: 0; background: #fff; }
  .inbox-back { display: inline-flex; }
  .preview .inbox-head { justify-content: flex-start; }
  .plan-tag.row-plan { display: inline-flex; }
  .plan-board { grid-template-columns: 1fr; }
  .plan-card.anual { order: -1; }
  .pick-icon span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); border: 0;
  }
  .pick-icon { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .phone-only.btn { display: inline-flex; width: 100%; }
  .desk-only { display: none; }
  .brand-drops { grid-template-columns: 1fr; }
}
#pending-meta { padding: 0 0 8px; }
.pending-activate { margin-top: 14px; }
.pending-activate .btn { width: 100%; }

.live-list { overflow: hidden; overflow-anchor: none; }
.live-list.leave-next, #inbox-list.leave-next { animation: leaveNext .22s ease forwards; }
.live-list.leave-prev, #inbox-list.leave-prev { animation: leavePrev .22s ease forwards; }
.live-list.enter-next, #inbox-list.enter-next { animation: enterNext .28s ease; }
.live-list.enter-prev, #inbox-list.enter-prev { animation: enterPrev .28s ease; }
.archive-extra { display: none; }
.archive-lead .account-line { display: block; margin-top: 6px; }
.fine a { color: var(--accent); }
@keyframes leaveNext { to { opacity: 0; transform: translateX(-28px); } }
@keyframes leavePrev { to { opacity: 0; transform: translateX(28px); } }
@keyframes enterNext { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes enterPrev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.color-line {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
}
.color-line input[type="color"] {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; flex: none;
}
.color-line input:not([type="color"]) {
  width: auto; flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; padding: 0 10px;
  font-family: ui-monospace, "Cascadia Code", monospace; letter-spacing: 0.04em; overflow: visible;
}
.brand-drops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drop {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px;
  border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--text) 18%, transparent);
  background: rgba(255,255,255,0.02);
  transition: border-color .35s ease, box-shadow .35s ease, background .35s ease, transform .35s ease;
}
.drop.is-over {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: translateY(-2px);
}
.drop-stage {
  height: 120px; border-radius: 14px; background:
    radial-gradient(80% 80% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    #0c0d10;
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.drop-stage img {
  width: auto; height: 78px; max-width: 88%; min-width: 0; min-height: 0;
  object-fit: contain; padding: 0;
}
.drop-stage img.blend { mix-blend-mode: screen; }
.drop-stage.icon img {
  width: 76px; height: 76px; max-width: none; object-fit: cover; border-radius: 50%;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.drop-copy strong { display: block; color: var(--text); font-size: 14px; }
.drop-copy small, .drop-file { display: block; color: var(--muted); font-size: 12px; }
.drop .btn { align-self: flex-start; }
.drop input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0; opacity: 0;
}
.hits { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.hits button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; border: 1px solid transparent; background: transparent; color: var(--text);
  border-radius: 12px; padding: 8px 10px; cursor: pointer;
}
.hits button span:first-child { min-width: 0; }
.hits button strong, .hits button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits button.on, .hits button:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.hits small { color: var(--muted); }
.who { color: var(--text); font-weight: 650; }
tbody tr[data-tone="ok"] { background: linear-gradient(100deg, color-mix(in srgb, var(--ok) 16%, transparent), transparent 52%); }
tbody tr[data-tone="warn"] { background: linear-gradient(100deg, color-mix(in srgb, var(--warn) 16%, transparent), transparent 52%); }
tbody tr[data-tone="bad"] { background: linear-gradient(100deg, color-mix(in srgb, var(--bad) 16%, transparent), transparent 52%); }
tbody tr[data-tone="pend"] { background: linear-gradient(100deg, color-mix(in srgb, var(--pend) 14%, transparent), transparent 52%); }
.sheet[data-glow="ok"] .sheet-card { background: radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--ok) 22%, transparent), transparent 62%), var(--bg-2); }
.sheet[data-glow="warn"] .sheet-card { background: radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--warn) 22%, transparent), transparent 62%), var(--bg-2); }
.sheet[data-glow="bad"] .sheet-card { background: radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--bad) 20%, transparent), transparent 62%), var(--bg-2); }
.sheet[data-glow="pend"] .sheet-card { background: radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--pend) 18%, transparent), transparent 62%), var(--bg-2); }
.sheet-act svg, .text-btn .ico { width: 16px; height: 16px; }
.inbox {
  display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  gap: 14px; align-items: stretch; height: auto; min-height: 0;
}
.inbox-col {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 28%), var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius); min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.inbox-filters {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  margin: 0; padding: 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.inbox-filters .picker, .inbox-filters select, .inbox-filters input { max-width: none; width: 100%; }
#compose-open.on { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 18%, transparent); }
#compose-sheet .stack { margin-top: 4px; }
.inbox-head {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.inbox-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-list-col { min-width: 0; }
.plan-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 750; letter-spacing: 0.04em; line-height: 1; white-space: nowrap;
}
.plan-tag.mensual { background: #143d28; color: #b6f3cc; }
.plan-tag.semestral { background: #3b1d6e; color: #e4d4ff; }
.plan-tag.anual {
  color: #f6eeff;
  background: linear-gradient(110deg, #7c3aed 0%, #2a1248 46%, #0c0c10 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.plan-tag.row-plan { display: none; margin-top: 6px; }
.account-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text);
  font-size: 12px; font-weight: 750; letter-spacing: 0.04em;
}
.client-open .account-line { display: none; color: var(--accent); font-weight: 700; }
.no-slot { color: var(--faint); }
td .account-tag + small { display: block; margin-top: 4px; color: var(--muted); }
td .plan-tag + small { display: block; margin-top: 4px; color: var(--muted); }
.plan-board { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; }
.plan-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin: 0; padding: 14px; border-radius: 18px; border: 1px solid var(--line);
}
.plan-card small, .plan-card em { color: var(--muted); font-size: 12px; font-style: normal; }
.plan-card.mensual { background: linear-gradient(180deg, rgba(31, 138, 76, .28), transparent 72%); }
.plan-card.semestral { background: linear-gradient(180deg, rgba(109, 40, 217, .32), transparent 72%); }
.plan-card.anual {
  background: linear-gradient(165deg, #6d28d9 0%, #241038 42%, #0c0c10 100%);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .4);
}
.plan-card.anual small, .plan-card.anual em { color: #eadcff; }
.inbox-scroll { flex: none; overflow: visible; scrollbar-width: none; }
.inbox-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
#inbox-list { overflow: hidden; overflow-anchor: none; }
.inbox-col .pager { flex: none; border-top: 1px solid var(--line); }
.inbox-item, .inbox-item.on {
  width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: inherit; text-align: left; cursor: pointer;
}
.inbox-item.on, .inbox-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.inbox-item[data-tone="ok"] { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 70%, transparent); }
.inbox-item[data-tone="warn"] { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--warn) 70%, transparent); }
.inbox-item[data-tone="bad"] { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bad) 70%, transparent); }
.inbox-item[data-tone="pend"] { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--pend) 70%, transparent); }
.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 700;
}
.inbox-copy { min-width: 0; }
.inbox-copy strong, .inbox-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-copy small { color: var(--muted); }
.preview { min-height: 640px; }
.preview iframe { flex: 1; width: 100%; border: 0; background: #fff; min-height: 560px; }
.preview .empty[hidden], .preview iframe[hidden] { display: none; }

@media (max-width: 980px) {
  .inbox { display: block; }
  .inbox-col { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .inbox-filters { padding-left: 0; padding-right: 0; }
  .inbox-col.preview { display: none; min-height: 0; }
  .inbox.is-reading .inbox-list-col { display: none; }
  .inbox.is-reading .inbox-col.preview {
    display: flex; position: fixed; inset: 0; z-index: 80; min-height: 100dvh; height: 100dvh;
    background: var(--bg); border-radius: 0;
  }
  .inbox.is-reading .preview iframe { min-height: 0; }
  body:has(.inbox.is-reading) .tabbar { display: none; }
  .inbox-back { display: inline-flex; }
  .plan-board { grid-template-columns: 1fr; }
  .plan-card.anual { order: -1; }
  .plan-tag.row-plan { display: inline-flex; }
  .account-filters { flex-direction: column; align-items: stretch; gap: 10px; }
  .account-filters .chips {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%;
  }
  .account-filters .chips a {
    display: flex; align-items: center; justify-content: center; grid-column: span 2;
    min-width: 0; padding: 8px 6px; text-align: center; white-space: nowrap;
  }
  .account-filters .chips a:nth-child(4),
  .account-filters .chips a:nth-child(5) { grid-column: span 3; }
  .account-filters .toolbar {
    flex: 0 0 auto; width: 100%; height: auto; min-height: 0; max-width: none; gap: 0; padding: 4px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  }
  .account-filters .toolbar input {
    min-width: 0; height: 40px; border: 0; background: transparent; padding: 0 12px;
  }
  .account-filters .toolbar .btn {
    flex: none; height: 40px; padding: 0 14px;
    background: var(--accent); color: var(--accent-ink); border: 0;
  }
  .client-open .account-line { display: block; }
  .archive-extra { display: block; margin-top: 6px; }
  .mail-preview { height: 280px; }
}
