/* Subtwine styles — the sign-in dialog, feedback, deleting the account and
   the admin overview (T016, T024). Shown only when the service requires an
   account; the app bar and the account popover are in styles-app.css.
   Loaded from index.html in the order web_manifest.py declares. */
.account-dialog .otp-input {
  font-size:20px;
  letter-spacing:.3em;
  text-align:center;
  font-variant-numeric:tabular-nums;
}
.account-note {
  line-height:1.7;
}
.account-warning,
.account-status.error {
  color:var(--fail);
}
.account-status {
  font-size:12.5px;
  margin:0;
}
.account-note {
  margin:0;
  font-size:12.5px;
}
.admin-dialog {
  width:min(1100px, calc(100vw - 24px));
}
.admin-dialog label {
  display:grid;
  gap:4px;
  font-size:12.5px;
}
/* A check box beside its words, as everywhere else (T036, T033 re-review). */
.admin-dialog label.account-check {
  display:flex;
  gap:8px;
}
.admin-scroll {
  overflow:auto;
  max-height:50vh;
  border:1px solid var(--line);
  border-radius:10px;
}
.admin-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.admin-table th,
.admin-table td {
  padding:7px 9px;
  text-align:start;
  white-space:nowrap;
  border-bottom:1px solid var(--line-soft);
}
.admin-table th {
  position:sticky;
  top:0;
  background:var(--surface-2);
  color:var(--muted);
  font-weight:500;
}
.admin-subtitle {
  font-size:14px;
  font-weight:500;
  margin:18px 0 4px;
}
#admin-payments {
  white-space:pre-line;
}
.admin-adjust {
  border:1px solid var(--line);
  border-radius:10px;
  margin-top:14px;
  padding:4px 14px 12px;
}
.admin-adjust legend {
  font-size:13px;
  padding:0 6px;
}
/* T037: the search and plan filter over the accounts, the tick boxes, and
   the batch of the ticked accounts. Rows wrap: nothing scrolls sideways at
   375 px but the table itself, inside its own frame. */
.admin-filters,
.admin-batch-row {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px 14px;
  margin-bottom:10px;
}
.admin-filters label,
.admin-batch-row label {
  margin:0;
  min-width:0;
}
.admin-filters input[type=search] {
  width:min(260px, 100%);
}
.admin-selected {
  font-size:12.5px;
  color:var(--muted);
  margin-inline-start:auto;
}
.admin-table .admin-pick {
  width:1%;
  padding-inline-end:0;
}
.admin-batch {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:8px;
  margin:12px 0 0;
  min-width:0;
}
/* A long label (Greek, say) wraps rather than widening the batch at 375 px
   (T037 review M-2). */
.admin-batch > *,
.admin-batch-row > * {
  min-width:0;
  max-width:100%;
}
.admin-batch .btn {
  white-space:normal;
  text-align:center;
}
.admin-batch-status {
  margin-top:8px;
}
.admin-batch .admin-batch-row {
  margin:0;
}
.admin-batch textarea {
  width:100%;
  box-sizing:border-box;
}
.admin-batch-confirm {
  margin:0;
  font-size:13px;
  font-weight:500;
}
/* T021: the month's usage and estimated cost, and one account's jobs. */
.admin-table [data-jobs] {
  margin-inline-end:6px;
}
.admin-cost-controls {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px 14px;
}
.admin-cost-controls label {
  margin:0;
}
.admin-note {
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
  margin:8px 0 10px;
}
.admin-table tfoot td {
  position:sticky;
  bottom:0;
  background:var(--surface-2);
  font-weight:500;
  border-top:1px solid var(--line);
}
.admin-jobs .admin-scroll {
  max-height:40vh;
}
/* T024: feedback, deleting the account, and the admin's feedback list. */
.account-count {
  margin:4px 0 10px;
  font-size:11px;
  color:var(--muted);
  text-align:end;
}
.account-check {
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 2px;
  font-size:13px;
}
.account-check input {
  width:auto;
  margin:0;
}
.account-preview {
  margin:8px 0 0;
  padding:8px 10px;
  max-height:120px;
  overflow:auto;
  font-size:11px;
  white-space:pre-wrap;
  word-break:break-word;
  color:var(--muted);
  background:var(--surface-2);
  border-radius:8px;
}
.account-danger {
  margin-top:16px;
  padding-top:10px;
  border-top:1px solid var(--line-soft);
}
.account-delete-link {
  padding:0;
  border:0;
  background:none;
  color:var(--fail);
  font-size:12px;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}
.account-delete-button:disabled {
  opacity:.45;
}
.admin-feedback .admin-scroll {
  max-height:40vh;
}
.admin-table .admin-feedback-body {
  white-space:pre-wrap;
  min-width:260px;
  max-width:520px;
  word-break:break-word;
}
.admin-table .admin-feedback-body code {
  display:block;
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}
.admin-table tr.admin-feedback-done td {
  color:var(--muted);
}

/* ---- T032: payments — the plan in the account popover, the offers, the
   plans and top-up dialogs (after the prototype), and the learn step's lock. */
.plan-badge {
  justify-self:start;
  margin-top:3px;
  font-size:11.5px;
  padding:1px 8px;
  border-radius:99px;
  background:var(--accent-soft);
  color:var(--accent-ink);
  font-weight:600;
}
.ap-plan-note {
  margin:8px 0 0;
  font-size:12.5px;
  color:var(--muted);
}
.ap-plan-note.account-warning {
  color:var(--fail);
}
.ap-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 10px;
}
.banner-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  flex:none;
}
.banner-actions .btn:not(.primary) {
  color:var(--ink);
}
.lock-tag {
  display:inline-flex;
  align-items:center;
  gap:3px;
  margin-inline-start:6px;
  font-size:10.5px;
  font-weight:650;
  padding:1px 6px;
  border-radius:99px;
  background:var(--accent-soft);
  color:var(--accent-ink);
}
.workbench {
  position:relative;
}
.learn-locked .workbench > :not(.learn-lock) {
  filter:blur(5px);
  opacity:.6;
  pointer-events:none;
  user-select:none;
}
.learn-lock {
  position:absolute;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:48px 16px;
  z-index:5;
}
.lock-card {
  width:min(480px,100%);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow-dialog);
  padding:28px;
  text-align:center;
}
.lock-icon {
  width:52px;
  height:52px;
  border-radius:14px;
  display:inline-grid;
  place-items:center;
  background:var(--accent-soft);
  color:var(--accent-ink);
  margin-bottom:12px;
}
.lock-card h2 {
  font-size:20px;
  margin:0 0 6px;
}
.lock-card p {
  color:var(--ink-2);
  margin:0 0 14px;
}
.lock-card .ticks {
  list-style:none;
  padding:0;
  margin:0 0 18px;
  display:grid;
  gap:6px;
  text-align:start;
  font-size:13.5px;
  color:var(--ink-2);
}
.lock-card .ticks li::before {
  content:"✓ ";
  color:var(--ok);
}
.lock-actions {
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
}
/* The head holds the title, the monthly/yearly switch and the close button.
   The switch's labels are long in some languages (T033 review H1), so it may
   shrink and its labels wrap rather than push the dialog sideways; on a
   narrow screen it takes a row of its own under the title and the close
   button, which stay together on the first row. */
.plans-dialog .dlg-head {
  flex-wrap:wrap;
  row-gap:8px;
}
.plans-dialog .dlg-head .icon-btn {
  order:2;
}
#plans-cycle {
  order:1;
  min-width:0;
}
#plans-cycle button {
  min-width:0;
  white-space:normal;
  line-height:1.25;
  padding-block:3px;
}
@media (max-width:760px) {
  #plans-cycle {
    order:3;
    flex:1 1 100%;
    display:flex;
  }
  #plans-cycle button {
    flex:1 1 0;
  }
}
.plan-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.plan {
  position:relative;
  border:1.5px solid var(--line);
  border-radius:14px;
  padding:18px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.plan.best {
  border-color:var(--accent);
}
.plan.current {
  background:var(--sidebar);
}
.plan .flag,
.tu-opt .flag {
  font-size:11px;
  font-weight:700;
  padding:2px 9px;
  border-radius:99px;
  background:var(--accent);
  color:var(--on-accent);
}
.plan .flag {
  position:absolute;
  top:-11px;
  inset-inline-start:16px;
}
.plan h3 {
  font-size:16px;
  margin:0;
}
.plan .price {
  font-size:28px;
  font-weight:700;
  letter-spacing:-.02em;
}
.plan .price small,
.tu-opt .p small {
  font-size:13px;
  font-weight:500;
  color:var(--muted);
  letter-spacing:0;
}
.plan .per {
  font-size:12.5px;
  color:var(--muted);
  margin-top:-8px;
}
.plan ul {
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:6px;
  font-size:13px;
  color:var(--ink-2);
  flex:1;
}
.plan li {
  display:flex;
  gap:7px;
}
.plan li.yes .i {
  color:var(--ok);
}
.plan li.no {
  color:var(--faint);
}
.btn.full {
  width:100%;
  justify-content:center;
}
.tu-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.tu-grid.one {
  grid-template-columns:1fr;
}
.tu-opt {
  position:relative;
  display:grid;
  gap:6px;
  text-align:start;
  border:1.5px solid var(--line);
  border-radius:14px;
  padding:16px;
  background:var(--surface);
  color:var(--ink);
  min-width:0;
  font:inherit;
  cursor:pointer;
}
.tu-opt:hover {
  border-color:var(--line-strong);
}
.tu-opt[aria-checked=true] {
  border-color:var(--accent);
  background:var(--row-active);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent);
}
.tu-opt .radio {
  position:absolute;
  inset-inline-end:14px;
  top:14px;
  width:18px;
  height:18px;
  border-radius:50%;
  border:1.5px solid var(--line-strong);
}
.tu-opt[aria-checked=true] .radio {
  border:5px solid var(--accent);
}
.tu-opt .flag {
  justify-self:start;
}
.tu-opt .k {
  font-size:13px;
  color:var(--muted);
  font-weight:600;
}
.tu-opt .p {
  font-size:26px;
  font-weight:700;
  letter-spacing:-.02em;
}
.tu-opt .m {
  font-size:15px;
  font-weight:600;
}
.tu-opt ul {
  list-style:none;
  padding:0;
  margin:4px 0 0;
  display:grid;
  gap:4px;
  font-size:12.5px;
  color:var(--ink-2);
}
.tu-opt li::before {
  content:"· ";
  color:var(--faint);
}
.tu-opt .cmp {
  font-size:12px;
  color:var(--muted);
  border-top:1px dashed var(--line);
  padding-top:8px;
  margin-top:4px;
}
.admin-lines {
  white-space:pre-line;
  font-size:12.5px;
}
@media (max-width:760px) {
  .plan-grid,
  .tu-grid {
    grid-template-columns:minmax(0,1fr);
  }
  .learn-lock {
    padding:24px 12px;
  }
  .banner {
    flex-wrap:wrap;
  }
}
