/* ============================================================ tokens */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #ea580c;
  --brand-soft: #fff1e7;
  --zalo: #0068ff;
  --zalo-soft: #e8f1ff;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fff5e1;
  --err: #dc2626;
  --err-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 6px 20px rgb(16 24 40 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13;
    --surface: #161a20;
    --surface-2: #1e232b;
    --text: #e8eaef;
    --muted: #9aa3af;
    --border: #2a303a;
    --brand: #fb7a2c;
    --brand-soft: #2b1a0f;
    --zalo: #3d8bff;
    --zalo-soft: #0f203b;
    --ok: #4ade80;
    --ok-soft: #102618;
    --warn: #fbbf24;
    --warn-soft: #2a2110;
    --err: #f87171;
    --err-soft: #2c1515;
    --info: #60a5fa;
    --info-soft: #11203a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

/* ============================================================ base */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a {
  color: inherit;
}
h1 {
  font-size: 22px;
  line-height: 1.25;
  margin: 4px 0 8px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 16px;
  margin: 0 0 12px;
}
p {
  margin: 6px 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.center {
  text-align: center;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.error-text {
  color: var(--err);
  font-size: 14px;
}
.icon {
  display: inline-flex;
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}
.icon svg {
  width: 100%;
  height: 100%;
}

/* ============================================================ layout */
.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.appbar img {
  border-radius: 9px;
}
.appbar .titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.appbar .titles span {
  color: var(--muted);
  font-size: 12.5px;
}
.page {
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 40px);
  display: grid;
  gap: 14px;
}
.page.wide {
  max-width: 1200px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-head h2 {
  margin: 0;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.row.split > * {
  flex: 1 1 0;
  white-space: nowrap;
}
.stack {
  display: grid;
  gap: 10px;
}
.grid-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

/* ============================================================ buttons, chips, forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition:
    transform 0.06s,
    opacity 0.15s,
    background 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.zalo {
  background: var(--zalo);
  border-color: var(--zalo);
  color: #fff;
}
.btn.danger {
  background: var(--err);
  border-color: var(--err);
  color: #fff;
}
.btn.ghost {
  background: transparent;
}
.btn.small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 9px;
}
.btn.block {
  width: 100%;
}
.btn.link {
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  color: var(--info);
  font-weight: 600;
}
.danger-text {
  color: var(--err);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.err {
  background: var(--err-soft);
  color: var(--err);
}
.chip.info {
  background: var(--info-soft);
  color: var(--info);
}
.chip.brand {
  background: var(--brand-soft);
  color: var(--brand);
}
.chip.zalo {
  background: var(--zalo-soft);
  color: var(--zalo);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.field {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  min-width: 0;
  flex: 1 1 160px;
  border: 0;
  padding: 0;
}
.field > span,
.field > legend {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding: 0;
  margin-bottom: 5px;
}
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  width: 100%;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--info) 55%, transparent);
  outline-offset: 2px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 3px;
  gap: 3px;
}
.segmented button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

/* ============================================================ shared blocks */
.hero {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}
.hero .icon {
  width: 32px;
  height: 32px;
}
.hero.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.hero.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.hero.zalo {
  background: var(--zalo-soft);
  color: var(--zalo);
}
.hero.err {
  background: var(--err-soft);
  color: var(--err);
}
.hero.ring .icon {
  animation: ring 2s ease-in-out infinite;
  transform-origin: 50% 10%;
}
@keyframes ring {
  0%,
  55%,
  100% {
    transform: rotate(0);
  }
  10% {
    transform: rotate(16deg);
  }
  20% {
    transform: rotate(-13deg);
  }
  30% {
    transform: rotate(9deg);
  }
  40% {
    transform: rotate(-5deg);
  }
}
.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 500;
}
.banner .icon {
  margin-top: 2px;
}
.banner.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.banner.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.banner p {
  margin: 2px 0 0;
}
.note {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 11px;
  padding: 10px 12px;
  margin: 12px 0 0;
}
.note .icon {
  margin-top: 1px;
}
.note.info {
  color: var(--info);
  background: var(--info-soft);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
}
.list > li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.list > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.list-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.list-main strong {
  word-break: break-word;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  padding: 22px 8px;
  font-size: 14px;
}
.empty .icon {
  width: 28px;
  height: 28px;
}
details summary {
  cursor: pointer;
  color: var(--info);
  font-size: 14px;
  font-weight: 600;
}
details[open] summary {
  margin-bottom: 8px;
}
.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  font-size: 14px;
  margin: 12px 0;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  word-break: break-word;
}
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  margin: 24px auto 10px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
  font-size: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.ok .icon {
  color: #4ade80;
}
.toast.warn .icon {
  color: #fbbf24;
}
.toast.err .icon {
  color: #f87171;
}

/* ============================================================ web app Chuông báo */
.stepper {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.stepper li {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  position: relative;
}
.stepper li::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.stepper li:first-child::before {
  display: none;
}
.stepper li.done::before,
.stepper li.active::before {
  background: var(--brand);
}
.stepper-dot {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}
.stepper-dot .icon {
  width: 14px;
  height: 14px;
}
.stepper li.done .stepper-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.stepper li.active .stepper-dot {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.stepper li.active {
  color: var(--text);
  font-weight: 600;
}
.guide {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.guide li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
}
.guide-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.guide-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--info);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.guide-icon .icon {
  width: 22px;
  height: 22px;
}
.guide small {
  display: block;
  color: var(--muted);
}
.benefits {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  display: grid;
  gap: 9px;
}
.benefits li {
  display: flex;
  gap: 10px;
}
.benefits .icon {
  color: var(--ok);
  margin-top: 2px;
}
.code {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 4px;
}
.digit {
  width: 44px;
  height: 56px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font: 700 28px/1 ui-monospace, Consolas, monospace;
}
.digit.gap {
  margin-left: 12px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  margin: 18px 0 6px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
}
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.3s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent);
  }
  80%,
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}
.progress-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 11px;
}
.progress-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.progress-list li.done {
  color: var(--text);
}
.check-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.check-dot .icon {
  width: 13px;
  height: 13px;
}
.progress-list li.done .check-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.progress-list li.current .check-dot {
  border-color: var(--brand);
  animation: pulse 1.3s ease-out infinite;
}
.status-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.status-head h1 {
  margin: 0;
  font-size: 19px;
}
.status-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--ok-soft);
  color: var(--ok);
  position: relative;
  flex-shrink: 0;
}
.status-icon .icon {
  width: 26px;
  height: 26px;
}
.status-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--surface);
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin: 16px 0;
}
.facts dt {
  font-size: 12px;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  justify-self: start;
}
.notice h1 {
  font-size: 21px;
}
.summary {
  font-size: 16px;
  white-space: pre-line;
}
.locked {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 11px;
  padding: 10px 12px;
}

/* ---------- thanh nút ở đáy, trang cầu nối, màn chính ---------- */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--border);
}
.action-bar > * {
  max-width: 468px;
  margin: 0 auto;
}
.page.with-bar {
  padding-bottom: calc(env(safe-area-inset-bottom) + 112px);
}
.btn.big {
  min-height: 54px;
  font-size: 17px;
  border-radius: 15px;
}
.btn[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}
.notice {
  display: grid;
  gap: 8px;
}
.notice h1 {
  font-size: 23px;
  margin: 2px 0 0;
}
.others {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--zalo-soft);
  color: var(--zalo);
  font-weight: 600;
  font-size: 14px;
}
details.help {
  padding: 14px 16px;
}
details.help summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.help summary::-webkit-details-marker {
  display: none;
}
details.help summary::after {
  content: "›";
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s;
}
details.help[open] summary::after {
  transform: rotate(90deg);
}
details.help[open] {
  display: grid;
  gap: 10px;
}
.help-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.rows {
  display: grid;
}
.row-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.row-link:first-child {
  border-top: 0;
  padding-top: 2px;
}
.row-link > .icon {
  color: var(--muted);
}
.row-link.unread strong {
  font-weight: 750;
}

/* ---------- danh sách việc (màn chính Chuông báo): biểu tượng theo loại, chấm chưa xem ---------- */
.type-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--muted);
}
.type-icon .icon {
  width: 20px;
  height: 20px;
}
.type-approval {
  background: var(--brand-soft);
  color: var(--brand);
}
.type-reminder {
  background: var(--warn-soft);
  color: var(--warn);
}
.type-info {
  background: var(--zalo-soft);
  color: var(--zalo);
}
.type-security {
  background: var(--err-soft);
  color: var(--err);
}
.type-test {
  background: var(--ok-soft);
  color: var(--ok);
}
.unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--zalo);
  flex-shrink: 0;
}

/* ============================================================ bảng điều khiển */
.admin .appbar {
  flex-wrap: wrap;
}
.bar-chips {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 820px) {
  .kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
}
.kpi-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.kpi-value {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi-sub {
  font-size: 12px;
  color: var(--muted);
}
.kpi.warn .kpi-value {
  color: var(--warn);
}
.kpi.err .kpi-value {
  color: var(--err);
}
.kpi.ok .kpi-value {
  color: var(--ok);
}
.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.4s;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
th {
  border-top: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pipeline {
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
}
.pipeline .step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.pipeline .step.on {
  background: var(--ok);
}
.pipeline .step.fail {
  background: var(--err);
}
.pipeline .step.wait {
  background: var(--warn);
}
.pipeline .link {
  width: 14px;
  height: 2px;
  background: var(--border);
}
.pipeline .link.on {
  background: var(--ok);
}
.funnel {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.funnel-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.funnel-head span:first-child {
  flex: 1;
}
.funnel-head strong {
  font-variant-numeric: tabular-nums;
}
.funnel .bar {
  height: 10px;
  border-radius: 5px;
  margin-top: 5px;
}
.funnel .bar > span {
  border-radius: 5px;
}
.funnel-drop {
  font-size: 12px;
  color: var(--err);
  margin-top: 3px;
}
.recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.recipient {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  font-size: 13px;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
}
.recipient:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.recipient input {
  margin: 0;
}
.recipient.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.hdot.ok {
  background: var(--ok);
}
.hdot.warn {
  background: var(--warn);
}
.hdot.err {
  background: var(--err);
}
.hdot.info {
  background: var(--info);
}
.lock-preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(140deg, #334155, #0f172a);
  color: #f8fafc;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.lock-preview img {
  border-radius: 8px;
}
.lock-preview .lp {
  flex: 1;
  min-width: 0;
}
.lock-preview .lp-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  opacity: 0.7;
}
.lock-preview strong {
  display: block;
  font-size: 14px;
}
.lock-preview p {
  margin: 1px 0 0;
  font-size: 13.5px;
  opacity: 0.92;
}
.attention-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.attention-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.att-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.att-escalation {
  background: var(--err-soft);
  color: var(--err);
}
.att-silent {
  background: var(--warn-soft);
  color: var(--warn);
}
.att-no-device,
.att-unsupported {
  background: var(--surface-2);
  color: var(--muted);
}
.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px 4px 3px 9px;
  font-size: 12.5px;
  margin: 0 6px 6px 0;
  background: var(--surface-2);
}
.device-chip .btn.small {
  min-height: 24px;
  padding: 2px 7px;
  font-size: 12px;
}
.copy-line {
  display: flex;
  gap: 8px;
  align-items: center;
}
.copy-line code {
  flex: 1;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  word-break: break-all;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
