/* Reusable components: the same set as the app (lib/ui/components.dart). */

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--radius-control);
  border: 1px solid transparent; font-weight: 600; font-size: var(--fs-md); line-height: 1.2;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s;
  /* one line when there is room; a label longer than the screen wraps inside the button instead of running out of it */
  max-width: 100%; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.filled { background: var(--primary); color: #fff; }
.btn.filled:hover:not(:disabled) { background: var(--primary-dark); }
.btn.tonal { background: var(--primary-soft); color: var(--primary); }
.btn.tonal:hover:not(:disabled) { background: #d4e9e1; }
.btn.outlined { background: var(--surface); color: var(--primary); border-color: var(--border-strong); }
.btn.outlined:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--primary); }
.btn.text { background: transparent; color: var(--primary); padding-inline: 10px; }
.btn.text:hover:not(:disabled) { background: var(--primary-soft); }
.btn.danger { color: var(--tone-danger-fg); }
.btn.filled.danger { background: var(--danger); color: #fff; }
.btn.block { width: 100%; min-height: 48px; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: var(--fs-sm); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text); position: relative;
}
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn.bordered { border: 1px solid var(--border); background: var(--surface); }
.icon-btn.filled { background: var(--primary); color: #fff; }
.icon-btn.tonal { background: var(--primary-soft); color: var(--primary); }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.fab {
  position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 25; box-shadow: var(--shadow-raised);
  min-height: 52px; padding: 12px 20px; border-radius: 16px;
}
@media (max-width: 719.98px) { .fab { bottom: calc(var(--bottombar-h) + 16px); inset-inline-end: 16px; } }
.dot-badge { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.dot-badge.small { min-width: 8px; height: 8px; padding: 0; background: var(--accent); top: 8px; inset-inline-end: 8px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.card.pad { padding: var(--space-md); }
.card.lg-pad { padding: var(--space-xl); }
.card.clickable { cursor: pointer; transition: background .15s; }
.card.clickable:hover { background: #fbfdfc; }
.section-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-md) var(--space-sm); flex-wrap: wrap; }
.section-head .titles { flex: 1; min-width: 160px; }
.section-head h3 { font-size: var(--fs-lg); }
.section-head .sub { font-size: var(--fs-sm); color: var(--text-muted); }
.section-body { padding: 0 var(--space-md) var(--space-md); }
.list-body { padding-bottom: var(--space-xxs); }
.card.list { padding: var(--space-xxs) 0; }

/* list rows */
.row {
  display: flex; align-items: center; gap: var(--space-sm); padding: 12px var(--space-md);
  color: var(--text); text-decoration: none; width: 100%; border: 0; background: transparent; text-align: start;
}
.list-body > .row + .row, .card.list > .row + .row {
  /* inset divider that does not change the row's size */
  background-image: linear-gradient(var(--border), var(--border)); background-size: calc(100% - 2 * var(--space-md)) 1px;
  background-position: center top; background-repeat: no-repeat;
}
a.row:hover, button.row:hover, .row.clickable:hover { background-color: var(--surface-alt); text-decoration: none; cursor: pointer; }
.row.highlight { background-color: #f0faf6; }
.row .main-col { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow-wrap: anywhere; }
.row .subtitle { font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.row .chev { color: var(--text-subtle); }
[dir="rtl"] .row .chev { transform: scaleX(-1); }
.row .trail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 55%; }

/* icon box, avatar, badges */
.icon-box { display: grid; place-items: center; border-radius: 12px; flex: none; }
.icon-box .icon { width: 55%; height: 55%; }
.avatar {
  display: grid; place-items: center; border-radius: 50%; flex: none; font-weight: 700; font-family: var(--font-heading);
  user-select: none;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; max-width: 100%;
}
/* in tables a status stays on one line; the table scrolls sideways when it does not fit */
td .badge, th .badge { white-space: nowrap; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-success { color: var(--tone-success-fg); background: var(--tone-success-bg); }
.tone-info { color: var(--tone-info-fg); background: var(--tone-info-bg); }
.tone-warning { color: var(--tone-warning-fg); background: var(--tone-warning-bg); }
.tone-danger { color: var(--tone-danger-fg); background: var(--tone-danger-bg); }
.tone-primary { color: var(--tone-primary-fg); background: var(--tone-primary-bg); }
.tone-purple { color: var(--tone-purple-fg); background: var(--tone-purple-bg); }
.tone-neutral { color: var(--tone-neutral-fg); background: var(--tone-neutral-bg); }
.fg-success { color: var(--tone-success-fg); } .fg-info { color: var(--tone-info-fg); } .fg-warning { color: var(--tone-warning-fg); }
.fg-danger { color: var(--tone-danger-fg); } .fg-primary { color: var(--primary); } .fg-purple { color: var(--purple); } .fg-neutral { color: var(--text-muted); }

/* stats and tiles */
.grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.tile-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 160px), 100%), 1fr)); }
@media (max-width: 719.98px) { .grid { grid-template-columns: repeat(var(--cols-sm, 2), minmax(0, 1fr)); } }
.stat { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); }
.stat .value { font-size: var(--fs-xxl); font-weight: 700; font-family: var(--font-heading); line-height: 1.2; }
.stat .label { font-size: var(--fs-sm); color: var(--text-muted); }
.stat .hint { font-size: var(--fs-xs); color: var(--text-subtle); }
.quick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: var(--space-md); text-align: center; font-weight: 600; color: var(--text); text-decoration: none; position: relative; }
.quick:hover { text-decoration: none; background: var(--surface-alt); }
.two-col { display: grid; gap: var(--space-md); grid-template-columns: var(--cols-wide, minmax(0, 1fr) minmax(0, 1fr)); align-items: start; }
.two-col.wide-first { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 899.98px) { .two-col, .two-col.wide-first { grid-template-columns: minmax(0, 1fr); } }

/* info grid */
.info-grid { display: grid; gap: var(--space-sm) var(--space-md); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-grid.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 759.98px) { .info-grid { grid-template-columns: minmax(0, 1fr); } }
.info-grid .k { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.info-grid .v { white-space: pre-wrap; overflow-wrap: anywhere; }

/* hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--radius-card-lg);
  padding: var(--space-xl); display: flex; align-items: center; gap: var(--space-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: url('/assets/pattern.svg'); background-size: 56px 56px; }
.hero .greet { color: var(--accent); font-weight: 700; font-size: var(--fs-sm); }
.hero .name { font-size: var(--fs-xxl); font-weight: 700; font-family: var(--font-heading); }
.hero .sub { color: rgba(255, 255, 255, .8); }

/* toolbar, search, filters */
.toolbar { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-sm); }
.toolbar > .search { flex: 1 1 260px; }
.search { position: relative; }
.search input { padding-inline-start: 40px; }
.search .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); white-space: nowrap;
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* empty, loading, error states */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: var(--space-xxl) var(--space-md); text-align: center; color: var(--text-muted); }
.empty.compact { padding: var(--space-md); flex-direction: row; justify-content: flex-start; text-align: start; }
.empty .icon-box { background: var(--surface-alt); color: var(--text-subtle); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: var(--space-xxl); color: var(--text-muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; flex: none; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-control); border: 1px solid; font-size: var(--fs-sm); }
.banner.tone-danger { border-color: #fecaca; }
.banner.tone-warning { border-color: #fde68a; }
.banner.tone-info { border-color: #bae6fd; }
.banner.tone-success { border-color: #a7f3d0; }
.banner .grow { flex: 1; min-width: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th { text-align: start; font-weight: 700; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-alt); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-alt); }
@media (max-width: 719.98px) {
  table.data.stackable thead { display: none; }
  table.data.stackable tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  table.data.stackable td { display: flex; gap: 10px; border: 0; padding: 4px 12px; }
  table.data.stackable td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); min-width: 40%; }
  table.data.stackable td.num { text-align: start; }
}

/* progress ring, bars, donut */
.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; font-weight: 700; font-family: var(--font-heading); }
.bars { display: grid; gap: 10px; }
.bar-row .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); margin-bottom: 4px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-alt); border: 1px solid var(--border); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--secondary); border-radius: 4px; }
.donut { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; }
.legend { display: grid; gap: 6px; font-size: var(--fs-sm); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 6px; }
.juz-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 519.98px) { .juz-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.juz { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-size: var(--fs-xs); font-weight: 700; background: var(--surface-alt); color: var(--text-subtle); border: 1px solid var(--border); }
.juz.done { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.juz.part { background: var(--secondary-soft); color: var(--tone-success-fg); border-color: #a7f3d0; }

/* dialogs */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--radius-card-lg); box-shadow: 0 20px 60px rgba(17, 24, 39, .25);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--text); background: var(--surface);
}
dialog.modal.wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(17, 24, 39, .45); }
dialog.modal form, dialog.modal .dlg { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: var(--space-lg) var(--space-lg) var(--space-sm); }
.dlg-head h2 { font-size: var(--fs-lg); flex: 1; }
.dlg-body { padding: var(--space-xs) var(--space-lg) var(--space-md); overflow-y: auto; display: grid; gap: var(--space-sm); }
.dlg-foot { display: flex; justify-content: flex-end; gap: var(--space-xs); padding: var(--space-sm) var(--space-lg) var(--space-lg); border-top: 1px solid var(--border); flex-wrap: wrap; }
.help-item { display: flex; gap: 12px; align-items: flex-start; }
.help-item .t { font-weight: 600; }

/* toasts */
.toasts { position: fixed; z-index: 1000; inset-inline: 0; bottom: 24px; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
@media (max-width: 719.98px) { .toasts { bottom: calc(var(--bottombar-h) + 16px); } }
.toast {
  pointer-events: auto; max-width: 560px; display: flex; gap: 10px; align-items: center;
  background: #111827; color: #fff; padding: 12px 16px; border-radius: var(--radius-control); box-shadow: var(--shadow-raised);
  animation: toast-in .2s ease;
}
.toast.error { background: #991B1B; }
.toast.success { background: var(--primary); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* misc */
.divider { height: 1px; background: var(--border); margin: var(--space-sm) 0; border: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-sm); }
.stack.xs { gap: 4px; }
.hstack { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
/* the text part of a row keeps a readable width; what is next to it moves to the next line on a narrow screen */
.hstack > .grow { flex: 1 1 140px; }
.hstack.between { justify-content: space-between; }
.wrap-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.copy-field .k { font-size: var(--fs-sm); color: var(--text-muted); min-width: 140px; }
.copy-field .v { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; direction: ltr; unicode-bidi: isolate; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup.vertical { flex-direction: column; text-align: center; }
.brand-lockup .ar { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-xl); line-height: 1.2; }
.brand-lockup.vertical .ar { font-size: var(--fs-xxl); }
.brand-lockup .en { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .6px; color: var(--accent); }
.brand-lockup .tagline { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 6px; }
.on-dark .brand-lockup .ar, .brand-lockup.on-dark .ar { color: #fff; }
.brand-lockup:not(.on-dark) .ar { color: var(--primary); }
.lang-menu { position: relative; }
.menu-pop {
  position: absolute; z-index: 60; inset-inline-end: 0; top: calc(100% + 6px); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: var(--shadow-raised); padding: 6px;
}
.menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; text-align: start; }
.menu-pop button:hover, .menu-pop button[aria-checked="true"] { background: var(--primary-soft); color: var(--primary); }
.chat-list { display: flex; flex-direction: column; gap: 4px; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.bubble-row.mine .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.bubble .who { font-size: var(--fs-xs); color: var(--secondary); font-weight: 600; }
.bubble .when { font-size: 11px; opacity: .65; }
.bubble .voice { display: flex; align-items: center; gap: 8px; }
.bubble-row.mine .bubble .icon-btn { color: #fff; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: var(--space-sm); border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea { min-height: 44px; max-height: 140px; resize: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); flex: none; }
.tone-on-dark { background: rgba(255, 255, 255, .16); color: #fff; }
.chip.on-dark { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; cursor: default; }
.hero .main-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hstack.top { align-items: flex-start; }
.primary-text { color: var(--primary); }
.icon-btn.success { color: var(--secondary); }
.icon-btn.danger { color: var(--danger); }
.switch.compact { padding: 0; }
.score { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.contents { display: contents; }
.card.accent-card { background: var(--accent-soft); border-color: rgba(245, 158, 11, .4); color: #92400E; }
.center-box { display: grid; place-items: center; padding: var(--space-md) 0; }
.bar-progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 6px; background: var(--border); overflow: hidden; margin-top: 6px; display: block; }
.bar-progress::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
.bar-progress::-webkit-progress-value { background: var(--secondary); border-radius: 6px; }
.bar-progress::-moz-progress-bar { background: var(--secondary); border-radius: 6px; }
.stack.end { align-items: flex-end; }
.sheet-list { display: flex; flex-direction: column; margin: 0 calc(-1 * var(--space-sm)); }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 12px var(--space-sm); border: 0; background: transparent; font: inherit; color: inherit; text-align: start; border-radius: 10px; cursor: pointer; min-height: 48px; }
.sheet-item:hover, .sheet-item:focus-visible { background: var(--surface-alt); }
.sheet-item .icon { color: var(--text-muted); }
.sheet-item.danger-text .icon { color: inherit; }
.logo-frame { flex: none; }
.logo-row { flex-wrap: wrap; }
.fee-tile { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-md); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.fee-tile.overdue { border-color: rgba(220, 38, 38, .4); }
.bar-progress.primary::-webkit-progress-value { background: var(--primary); }
.bar-progress.primary::-moz-progress-bar { background: var(--primary); }
.accent-text { color: #B45309; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check-chip input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.bar-progress.purple { background: var(--tone-purple-bg, #EDE9FE); }
.bar-progress.purple::-webkit-progress-bar { background: var(--tone-purple-bg, #EDE9FE); }
.bar-progress.purple::-webkit-progress-value { background: #7C3AED; }
.bar-progress.purple::-moz-progress-bar { background: #7C3AED; }
.section-title { font-size: var(--fs-lg); font-weight: 700; margin: var(--space-xs) 0 0; }
.order-box { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; flex: none; }
.reorder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.reorder-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; }
.reorder-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; flex: none; font-size: var(--fs-sm); }
.btn.accent { background: var(--accent); color: var(--text); border-color: var(--accent); }
.btn.accent:hover { filter: brightness(.96); }
.time-box { min-width: 58px; padding: 8px 6px; border-radius: 10px; text-align: center; font-weight: 700; background: var(--surface-alt); border: 1px solid var(--border); flex: none; font-variant-numeric: tabular-nums; }
.time-box.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.now-card { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-card); color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); }
.now-icon { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: var(--accent); display: grid; place-items: center; }
.now-label { color: rgba(255, 255, 255, .75); }
.now-name { font-size: var(--fs-xl); font-weight: 700; }
.grade-box { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.next-slot { display: flex; flex-direction: column; gap: 6px; padding: var(--space-lg); border-radius: var(--radius-card); color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); }
.next-slot .chip, .next-slot .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.next-time { font-size: 32px; font-weight: 700; margin-top: var(--space-sm); text-align: start; font-variant-numeric: tabular-nums; }
[dir=rtl] .next-time { text-align: end; }
.next-count { color: var(--accent); font-weight: 700; }
.next-task { margin-top: var(--space-xs); padding: var(--space-sm); border-radius: 10px; background: rgba(255, 255, 255, .10); }
.plan-card { padding: 0; }
.plan-card > summary { list-style: none; cursor: pointer; padding: var(--space-md); }
.plan-card > summary::-webkit-details-marker { display: none; }
.plan-card[open] > summary { border-bottom: 1px solid var(--border); }
.plan-actions { padding: var(--space-xs) var(--space-md) var(--space-sm); }
.soft-box { padding: var(--space-sm); border-radius: var(--radius-control, 12px); background: var(--surface-alt); }
.chat-page { display: flex; flex-direction: column; overflow: hidden; height: calc(100dvh - 210px); min-height: 380px; }
.chat-page .chat-list { flex: 1; overflow-y: auto; padding: var(--space-sm) var(--space-md); overscroll-behavior: contain; }
.chat-page .composer .input { flex: 1; }
.chat-page .composer .grow { flex: 1; }
.bubble .meta { display: flex; gap: 10px; align-items: center; font-size: 11px; opacity: .7; margin-top: 2px; }
.bubble .deleted { font-style: italic; opacity: .7; }
.bubble .text { overflow-wrap: anywhere; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 719px) { .chat-page { height: calc(100dvh - 190px); } }
.bubble-row.mine .bubble .icon-btn:hover, .bubble-row.mine .bubble .icon-btn:focus-visible { background: rgba(255, 255, 255, .16); }
.composer textarea.input { min-height: 44px; height: 44px; padding-block: 10px; line-height: 1.4; }

/* The announcement bar above every page (platform administration → Announcement). Uses the .tone-* colours. */
.announcement-bar { display: flex; align-items: center; gap: 10px; padding: 9px var(--space-lg); font-size: var(--fs-sm); font-weight: 600;
  border-bottom: 1px solid currentColor; border-bottom-color: color-mix(in srgb, currentColor 25%, transparent); }
.announcement-bar .text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; text-align: center; }
.announcement-bar .text a { color: inherit; text-decoration: underline; white-space: nowrap; }
.announcement-bar .icon-btn { color: inherit; flex: none; }
