/* Daily Life Doc, round 13 (zone F1): the place Settings (js/settings/settings-page.js, settings-defaults.js): one
   card per part (Account, Defaults, Actions, Notify me, Telegram, Calls from zone B4, Usage, Payments, Bug reports),
   each with its small title; the fields tinted, not bordered; Defaults as rows of plain sentences with their label,
   Remove shown only while an own sentence is edited (round 13, FX-F2), then Never; Sign out at the foot. Round 26
   (zone D): Actions (.sa-*) and Bug reports (.bg-*) at the end of this file. */

.st-page { max-width: 640px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.st-card { padding: 14px 16px; border-radius: 16px; background: var(--card); }
.st-card[hidden] { display: none; }
/* Round 53 (D2): a Member reads Defaults, Permissions and prices: no Add and no Remove (DD.settings.lock). */
.st-ro [data-df="add"], .st-ro [data-sa="add"], .st-ro [data-sa="rm"], .st-ro [data-py="add"], .st-ro .df-x, .st-ro .py-x { display: none; }
.st-ro .sa-seg [data-v]:disabled, .st-ro .sa-chip:disabled { opacity: .75; cursor: default; } /* round 53 (C25): Invite an expert, the owner's practice only */
.st-card h3 { margin: 0 0 10px; font-size: var(--t-sm); font-weight: 600; color: var(--ink2); }
.st-card .ac-f:last-of-type { margin-bottom: 10px; }
.st-card .nt-row:first-child { padding-top: 0; }
.st-out { align-self: flex-start; }

/* Defaults: one sentence per row. */
.df-list { display: flex; flex-direction: column; margin-bottom: 10px; }
.df-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding: 8px 0; border-top: 1px solid var(--cardline); }
.df-row:first-child { border-top: 0; padding-top: 0; }
/* Round 38 (fixer FX-Z): the row that opens the Main instruction, its name and Open on one line. */
.df-main { align-items: center; margin-top: 12px; border-top: 1px solid var(--cardline); padding: 10px 0 0; }
.df-main b { font-size: var(--t-s); color: var(--ink); font-weight: 500; }
.df-main .pill { grid-column: 2; }
.df-row b { grid-column: 1; font-size: var(--t-xs); font-weight: 600; color: var(--ink3); }
.df-row textarea { grid-column: 1; width: 100%; min-height: 24px; padding: 2px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-s);
  line-height: 1.45; resize: none; outline: none; overflow: hidden; }
.df-row textarea:focus { background: var(--field); border-radius: 8px; padding: 2px 8px; margin: 0 -8px; width: calc(100% + 16px); }
.df-x { display: none; grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.df-row:focus-within .df-x { display: inline-flex; animation: dd-fade 160ms ease both; }
.df-row textarea::placeholder { color: var(--ink3); opacity: .8; }

/* Round 16 (16-E, U1): Usage (js/settings/settings-use.js): the month and its total, then the table Who · AI ·
   Speech · Texts · Total in tabular figures; a tapped row opens By kind and By day under itself. */
.us-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--t-s); font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.st-card .num, .us-head .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.us-tbl { margin: 0 -4px; }
.us-tbl table { width: 100%; border-collapse: collapse; font-size: var(--t-xs); }
.us-tbl th { padding: 6px 4px; font-weight: 500; color: var(--ink3); text-align: left; border-bottom: 1px solid var(--cardline); }
.us-tbl td { padding: 9px 4px; border-top: 1px solid var(--cardline); color: var(--ink); vertical-align: top; }
.us-tbl tbody tr:first-child td { border-top: 0; }
.us-row { cursor: pointer; transition: background-color var(--m-press) ease; }
.us-row:hover td, .us-row[aria-expanded="true"] td { background: var(--app2); }
.us-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.us-who { font-size: var(--t-s); overflow-wrap: anywhere; }
.us-tot { font-weight: 600; }
.us-more { color: var(--ink3); font-size: var(--t-xs); }
.us-what i { font-style: normal; }
.us-cap { margin: 12px 0 0; } /* round 53 (fixer FX3): "All use · AI cap" stands apart from the practice's own month */
.us-none { margin: 0; font-size: var(--t-xs); color: var(--ink3); }
.us-sub > td { border-top: 0; padding: 2px 4px 12px; background: var(--app2); }
.us-open { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; animation: dd-fade 160ms ease both; }
.us-part h4 { margin: 4px 0; font-size: var(--t-2xs); font-weight: 600; color: var(--ink3); }
.us-part ul { list-style: none; margin: 0; padding: 0; }
.us-part li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 3px 0; font-size: var(--t-xs); }
/* Round 28 (zone B, 18b): By call, across both columns: Call · Calls · Input · AI. */
.us-calls { grid-column: 1 / -1; }
.us-calls li { grid-template-columns: minmax(0, 1fr) 3.5em 4.5em 4.5em; }
.us-calls li > span:first-child { overflow-wrap: anywhere; }
.us-calls .us-th { color: var(--ink3); font-size: var(--t-2xs); font-weight: 600; }
@media (max-width: 520px) {
  .us-open { grid-template-columns: 1fr; }
  .us-tbl th, .us-tbl td { padding-left: 3px; padding-right: 3px; }
  /* The Total stands apart from the Texts column (W1 polish 7: "— $0.05" touched at 340 px). */
  .us-tbl th:last-child, .us-tbl td.us-tot { padding-left: 10px; }
  .us-what { display: block; }
  .us-what i { display: none; }
}

/* Round 16 (zone 16-D, P4): Settings → Payments (js/settings/settings-pay.js): "Test mode · On", one row per price
   (Name, $ Price, Monthly or Once, then the Description), tinted borderless fields, Remove while a row is edited. */
.py-mode { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; font-size: var(--t-s); }
.py-mode b { font-size: var(--t-xs); font-weight: 600; color: var(--good-d); }
.py-list { display: flex; flex-direction: column; }
.py-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 10px 0;
  border-top: 1px solid var(--cardline); }
.py-top { grid-column: 1; display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 6px; }
.py-row input, .py-row select, .py-row textarea { min-width: 0; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-s); outline: none; }
.py-row input:focus, .py-row select:focus, .py-row textarea:focus { box-shadow: inset 0 0 0 1.5px var(--sage); }
.py-name { font-weight: 500; }
.py-amt { display: flex; align-items: center; border-radius: 10px; background: var(--field); }
.py-amt span { padding-left: 10px; color: var(--ink3); font-size: var(--t-s); }
.py-amt input { width: 100%; padding-left: 3px; background: none; font-variant-numeric: tabular-nums; }
.py-amt:focus-within { box-shadow: inset 0 0 0 1.5px var(--sage); }
.py-amt input:focus { box-shadow: none; }
.py-covers { grid-column: 1; display: block; width: 100%; box-sizing: border-box; padding: 8px 10px !important; line-height: 1.35; resize: none; overflow: hidden; }
.py-x { display: none; grid-column: 2; grid-row: 1 / span 2; }
.py-row:focus-within .py-x { display: inline-flex; animation: dd-fade 160ms ease both; }
.py-acts { display: flex; gap: 8px; margin-top: 10px; }
.py-acts:empty { display: none; }
@media (max-width: 480px) {
  .py-top { grid-template-columns: minmax(0, 1fr) 84px; }
  .py-top select { grid-column: 1 / -1; }
}

/* Round 26 (zone D, D2): Actions (js/settings/settings-actions.js): Client chat, one row per action with a Yes ·
   Ask me · No switch (Yes green, Ask me amber, No red, as the page "Smart by Default"); Ask AI only and, under
   Defaults, Never as read-only sentences with a dot (red for Never, green for Ask AI only). */
.sa-h { display: flex; align-items: center; gap: 4px; margin: 22px 0 6px; font-size: var(--t-l); font-weight: 600; line-height: 1.25; color: var(--ink); }
.sa-h.sa-first { margin-top: 0; }
.sa-h .uinfo { margin-left: 0; }
.sa-h .sa-tag { margin-left: 6px; }
.sa-tag { padding: 2px 6px; border-radius: 6px; background: var(--app); color: var(--sage-d); font-size: var(--t-2xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.sa-list { display: flex; flex-direction: column; }
.sa-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--cardline); }
.sa-row:first-child { border-top: 0; }
.sa-t { display: block; line-height: 1.3; min-width: 0; }
.sa-t b { font-size: var(--t-s); font-weight: 600; color: var(--ink); }
.sa-nw { white-space: nowrap; }
.sa-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--field); }
.sa-seg button { min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: var(--t-xs); font-weight: 600; color: var(--ink3); white-space: nowrap;
  transition: background-color var(--m-press) ease, color var(--m-press) ease, transform var(--m-press) var(--ease-out); }
.sa-seg button:active { transform: scale(0.96); }
.sa-seg button.yes[aria-pressed="true"] { background: var(--good-bg); color: var(--good-d); }
.sa-seg button.ask[aria-pressed="true"] { background: var(--try-bg); color: var(--try-d); }
.sa-seg button.no[aria-pressed="true"] { background: var(--bad-bg); color: var(--bad-d); }
.sa-dots { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.sa-dots li { display: flex; gap: 10px; align-items: baseline; font-size: var(--t-s); line-height: 1.45; color: var(--ink); }
.sa-dots li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); transform: translateY(-1px); }
.sa-dots.ask li::before { background: var(--sage); }
/* Round 28 (zone P): with the lines behind ⓘ the switch stays beside the name down to 340 px; only the longest
   name ("Follow-up questions") may wrap to two lines there. */
@media (max-width: 400px) {
  .sa-row { gap: 6px 8px; }
  .sa-seg button { padding: 0 7px; }
}

/* Round 26 (zone D, D3): Bug reports (js/settings/settings-bugs.js): each title with its place and newest moment, the
   count and Delete; a tapped title opens its cases under it on a tint; "1–10 of 23" and Previous · Next. */
.bg-list { display: flex; flex-direction: column; }
.bg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--cardline);
  transition: opacity var(--m-remove) ease, transform var(--m-remove) var(--ease-out); }
.bg-row:first-child { border-top: 0; padding-top: 0; }
.bg-gone { opacity: 0; transform: translateX(10px); pointer-events: none; }
.bg-open { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; line-height: 1.3; }
.bg-open b { font-size: var(--t-s); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.bg-open small { font-size: var(--t-xs); color: var(--ink3); }
.bg-open:hover b, .bg-open[aria-expanded="true"] b { color: var(--sage-d); }
.bg-n { min-width: 28px; padding: 3px 9px; border-radius: 999px; background: var(--field); font-size: var(--t-xs); font-weight: 600; text-align: center; }
.bg-del { padding: 6px 2px; font-size: var(--t-xs); font-weight: 600; color: var(--bad); }
.bg-del:hover { color: var(--bad-d); }
.bg-cases { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--app2); animation: dd-fade 160ms ease both; }
.bg-cases.still { animation: none; }
.bg-case + .bg-case { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cardline); }
.bg-case small { font-size: var(--t-2xs); color: var(--ink3); }
.bg-w { margin: 2px 0 0; font-size: var(--t-s); line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.bg-s { margin: 2px 0 0; font-size: var(--t-xs); line-height: 1.4; color: var(--ink2); overflow-wrap: anywhere; }
.bg-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: var(--t-xs); color: var(--ink3); }
.bg-go { display: flex; align-items: center; gap: 6px; }
.bg-go button { padding: 4px 2px; font-size: var(--t-xs); font-weight: 600; color: var(--ink); }
.bg-go button:disabled { color: var(--ink3); opacity: .55; cursor: default; }
