/* NU:MO CRM telefono „Klientai“ (/greitai/, crm/quick_work.py). Perkelta iš patvirtinto pavyzdžio
   (docs/sujungimas/telefono-ekranu-pavyzdys.html), kuris pats paimtas iš apžiūrų programėlės v49 public/styles.css:
   spalvos, dydžiai (mygtukai ≥ 48 px, mažiausias tekstas 13 px) ir tamsus režimas. */
/* ---------- Spalvos: programėlės tokenai (styles.css:1-14) + tamsus režimas ---------- */
:root {
  color-scheme: light;
  --bg: #e8e1d6; --card: #fcfaf6; --ink: #2b2723; --muted: #665f55; --line: #dbd2c4;
  --ph: #7a7368; --muted-soft: #5a534a;
  --accent: #2b2723; --accent-ink: #f6f1e9; --accent-soft: #ddd3c4;
  --danger: #b3402a; --danger-soft: #fbe9e5; --danger-line: #e6b0aa;
  --danger-text: #9c3520; /* klaidos tekstas ir ant „Kas toliau?“ fono: AA ≥ 4.5 (g24.1 D4) */
  --ok: #1f6f5c; --ok-soft: #e1eee8; --ok-ink: #ffffff;
  --field: #ffffff; --rc: #ffffff; --info: #e8e1d6;
  --badge-ink: #ffffff;
  --topbar: rgba(232,225,214,.88);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --tap: 52px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171513; --card: #221f1b; --ink: #eee7dc; --muted: #a39a8b; --line: #3a342d;
    --ph: #9a9183; --muted-soft: #b3aa9b;
    --accent: #eee7dc; --accent-ink: #1c1916; --accent-soft: #3a332a;
    --danger: #ef8b72; --danger-soft: #3a211a; --danger-line: #7a3b2d; --danger-text: #ef8b72;
    --ok: #5cc3a3; --ok-soft: #173028; --ok-ink: #0e201a;
    --field: #1b1815; --rc: #2a2622; --info: #1f1c19;
    --badge-ink: #1c1916;
    --topbar: rgba(23,21,19,.88);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171513; --card: #221f1b; --ink: #eee7dc; --muted: #a39a8b; --line: #3a342d;
  --ph: #9a9183; --muted-soft: #b3aa9b;
  --accent: #eee7dc; --accent-ink: #1c1916; --accent-soft: #3a332a;
  --danger: #ef8b72; --danger-soft: #3a211a; --danger-line: #7a3b2d; --danger-text: #ef8b72;
  --ok: #5cc3a3; --ok-soft: #173028; --ok-ink: #0e201a;
  --field: #1b1815; --rc: #2a2622; --info: #1f1c19;
  --badge-ink: #1c1916;
  --topbar: rgba(23,21,19,.88);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico-inline { width: 1.05em; height: 1.05em; vertical-align: -0.17em; margin-right: .3em; flex: 0 0 auto; }
.action .ico-inline, .seg .ico-inline, .primary .ico-inline, .secondary .ico-inline { margin-right: 0; }

/* ---------- Viršutinė juosta (styles.css:30-46) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: var(--topbar);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .5px; font-size: 20px; white-space: nowrap; }
.brand small { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .4px; margin-left: 4px; }
.top-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.broker-chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px;
  background: var(--card); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--ink); cursor: pointer;
}
.broker-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broker-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.icon-btn { width: 48px; height: 48px; flex: 0 0 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; position: relative; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.spin svg { animation: spin .6s linear; }
.topbar .icon-btn { border-color: transparent; background: transparent; }

.wrap { max-width: 560px; margin: 0 auto; padding: 10px 16px calc(120px + env(safe-area-inset-bottom)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; }
.list-card { padding: 14px 14px 16px; }
.title { font-size: 22px; margin: 2px 0 18px; }

.field { display: block; margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.muted { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.hint { display: block; font-size: 13px; margin-top: 6px; }

input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time],
input[type=datetime-local], textarea, .select {
  width: 100%; min-height: var(--tap);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 17px; font-family: inherit; color: var(--ink);
  background: var(--field); outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
input[type=datetime-local], input[type=date], input[type=time] { display: block; min-width: 0; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%237a7d77' stroke-width='2'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
::placeholder { color: var(--ph); opacity: 1; }
.select:disabled, input:disabled { opacity: .6; background-color: var(--info); cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Paieška + filtras vienoje eilutėje (kritikų pastaba: pirmas klientas ekrano viršuje) */
.rc-tools { display: flex; gap: 8px; align-items: center; position: relative; }
.search { position: relative; flex: 1; min-width: 0; }
.search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; }
.filter-btn { width: 52px; height: 52px; flex-basis: 52px; }
.filter-dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--field); }
.rc-chips { display: flex; align-items: center; gap: 6px; margin: 6px -14px 0; padding: 0 14px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rc-chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 48px; padding: 4px 0; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink); display: inline-flex; align-items: center; }
.chip-in { display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; border-radius: 999px; background: var(--rc); border: 1px solid var(--line); font-size: 14px; font-weight: 700; line-height: 1.1; }
.chip-in b { font-weight: 800; }
.chip-red .chip-in { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.chip-dark .chip-in { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-filter .chip-in { background: var(--accent-soft); border-color: var(--accent-soft); }
.chip-filter .chip-x { font-size: 18px; line-height: 1; margin-left: 2px; }
.chip-txt { flex: 0 0 auto; font-size: 13px; color: var(--muted); padding: 0 4px; min-height: 48px; display: inline-flex; align-items: center; }

/* Segmentai (styles.css:79-87) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segmented.wrap-cols { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg { min-height: var(--tap); border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.seg[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }


.checkrow { display: flex; align-items: center; gap: 12px; min-height: var(--tap); font-weight: 600; cursor: pointer; }
.checkrow input { width: 24px; height: 24px; accent-color: var(--accent); flex: 0 0 auto; }


.primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; border: none; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); text-decoration: none; text-align: center; padding: 8px 14px; line-height: 1.2; }
.primary svg { width: 20px; height: 20px; flex: 0 0 auto; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; }
.primary.danger { background: var(--danger); color: var(--badge-ink); }
.primary.sm { min-height: 52px; font-size: 16px; box-shadow: none; }
.primary.okfill, .call-primary { background: var(--ok); color: var(--ok-ink); }
.call-primary { justify-content: flex-start; padding: 8px 16px; min-height: 60px; }
.call-primary .cp-t { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.call-primary small { font-size: 14px; font-weight: 600; opacity: .9; }
.secondary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 10px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; padding: 8px 14px; }
.text-link { display: block; width: 100%; min-height: 48px; margin-top: 4px; border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px; }
.save-row { margin-top: 12px; }


/* Juosta (styles.css:132-139) */
.banner { padding: 14px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; position: relative; }
.banner.info { --muted: var(--muted-soft); background: var(--accent-soft); color: var(--accent); }
.banner.error { background: var(--danger-soft); color: var(--danger); }
.banner.okb { background: var(--ok-soft); color: var(--ok); }
.banner-veiksmas { display: block; margin-top: 10px; min-height: 48px; padding: 10px 16px; border: 1.5px solid currentColor; border-radius: 10px; background: var(--field); color: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.banner-x { position: absolute; top: 0; right: 0; width: 48px; height: 48px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 22px; line-height: 1; border-radius: 50%; }
.banner.has-x { padding-right: 48px; }
.banner small { display: block; font-weight: 500; font-size: 13px; margin-top: 4px; }


.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.action { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; padding: 8px; text-align: center; line-height: 1.2; }
.action:active { background: var(--accent-soft); }
.action svg { width: 18px; height: 18px; flex: 0 0 auto; }
.action:disabled { opacity: .45; cursor: default; }
.action-ok { border-color: var(--accent); background: var(--accent-soft); }
.action.okfill { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); font-weight: 700; }
.action-danger { border-color: var(--danger); color: var(--danger); }
.action-danger:active { background: var(--danger-soft); }
.action.wide { grid-column: 1 / -1; }
.cal-btns .actions { margin: 10px 0 0; }
.cal-note { font-size: 13px; color: var(--muted); margin-top: 2px; }


/* Klientų sąrašas */
#rcStatus { margin: 6px 0 4px; font-size: 14px; }
#rcStatus:empty { display: none; }
.rc-group { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 4px 6px; display: flex; align-items: center; scroll-margin-top: 76px; }
.rc-group-nauja { color: var(--danger); }
.rc-group-mark { color: var(--ink); }
.rc { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--rc); scroll-margin: 80px; }
.rc-nauja { border-left: 4px solid var(--danger); }
.rc-mark { border-left: 4px solid var(--accent); }
.rc-flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--ok); } 100% { box-shadow: 0 0 0 0 transparent; } }
.rc-top { display: flex; align-items: flex-start; gap: 4px; }
.rc-head { flex: 1; min-width: 0; display: flex; align-items: flex-start; padding: 12px 6px 12px 14px; border: none; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.rc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-name { font-weight: 700; font-size: 17px; line-height: 1.3; }
.rc-sub { font-size: 14px; color: var(--muted); }
.rc-sub-viewing { color: var(--accent); font-weight: 700; }
.rc-deadline { font-weight: 700; color: var(--ink); }
.rc-late { color: var(--danger) !important; }
.rc-callbtn { flex: 0 0 48px; width: 48px; height: 48px; margin: 10px 10px 0 0; border-radius: 50%; border: 1.5px solid var(--ok); background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.rc-callbtn svg { width: 21px; height: 21px; }
.rc-status { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.rc-status-nauja { background: var(--danger-soft); color: var(--danger); }
.rc-status-mute { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.rc-status-old { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.rc-status-deal { background: var(--ok-soft); color: var(--ok); }
.rc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.rc-tag { font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.rc-tag-ok { background: var(--ok-soft); color: var(--ok); }
.rc-tag-old { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.rc-tag-assign { background: var(--danger-soft); color: var(--danger-text); }
.rc-daugiau { display: block; width: 100%; margin: 12px 0 4px; padding: 12px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.rc-quick { padding: 0 14px 14px; }
.rc-quick .actions { margin: 0; }
.rc-caloffer { padding: 0 14px 12px; }
.rc-caloffer .action { width: 100%; }
.rc-body { padding: 0 14px 14px; }
.rc-info { background: var(--info); border-radius: 10px; padding: 6px 12px; margin-bottom: 12px; }
.rc-line { font-size: 15px; padding: 2px 0; overflow-wrap: anywhere; }
.rc-link { display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--ink); font-weight: 700; text-decoration: none; }
.rc-link svg { width: 18px; height: 18px; color: var(--ok); flex: 0 0 auto; }
.rc-came { color: var(--muted); font-size: 14px; padding: 6px 0 4px; }
.rc-muted { color: var(--muted); font-style: italic; }
.rc-cal { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.rc-calline { font-weight: 700; font-size: 15px; }
.rc-edit, .rc-plan { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; scroll-margin-top: 76px; }
.rc-edit .label, .rc-plan .label, .rc-toliau-forma .label { font-size: 13px; margin: 12px 0 6px; }
.plan-now { font-size: 14px; font-weight: 700; color: var(--muted); margin: 8px 0 0; }
.rc-field { width: 100%; }
textarea.rc-field { min-height: 64px; font-size: 16px; }
.rc-err { color: var(--danger-text); font-size: 14px; font-weight: 700; margin: 10px 0 0; }
.rc-ghost-danger { margin-top: 10px; min-height: 48px; border: 1.5px dashed var(--danger); background: transparent; color: var(--danger); border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; }
.old-note { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.rc-notice { position: relative; background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 46px 10px 12px; margin-bottom: 12px; font-weight: 700; font-size: 15px; }
.rc-notice small { display: block; font-weight: 500; font-size: 14px; margin-top: 2px; }


/* Bandymai, „Kas toliau?", žurnalas */
.rc-nauja-veiksmai { margin-bottom: 12px; }
.rc-nauja-veiksmai .actions { margin: 8px 0; }
.rc-bandymai { font-size: 13px; font-weight: 700; color: var(--muted); margin: 10px 0 0; }
.rc-bandymu-hint { font-size: 13px; margin-top: 6px; }
.rc-toliau { --muted: var(--muted-soft); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 12px; scroll-margin-top: 76px; }
.rc-toliau .actions { margin: 8px 0 0; }
.rc-toliau-txt { font-weight: 700; }
.rc-toliau-forma { margin-top: 4px; scroll-margin-top: 76px; }
.rc-toliau .action { background: var(--field); }
.rc-toliau .action-ok { background: var(--accent-soft); }
.rc-toliau .action.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rc-toliau .action-danger.sel { background: var(--danger); border-color: var(--danger); color: var(--badge-ink); }
.rc-zurnalas { margin: 10px 0; border-left: 2px solid var(--line); padding-left: 10px; }
.rc-z-irasas { margin-bottom: 8px; }
.rc-z-antraste { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.rc-z-tekstas { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-z-auto .rc-z-tekstas { color: var(--muted); font-size: 14px; }
.rc-z-pradinis { color: var(--muted); font-size: 14px; }
.rc-z-daugiau { display: block; width: 100%; min-height: 48px; background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 15px; padding: 10px 0; cursor: pointer; text-decoration: underline; text-align: left; }
.rc-komentaras-naujas { margin: 10px 0; }
.rc-kom-btn { margin-top: 8px; }
.rc-draft { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Greitas dienos ir laiko pasirinkimas (vietoj sistemos kalendoriaus) */
.qp { display: flex; flex-direction: column; gap: 6px; }
.qp-sum { font-weight: 800; font-size: 16px; margin-top: 4px; }
.qp-days { display: flex; flex-wrap: wrap; gap: 6px; }
.qp-days .qp-chip { flex: 1 1 auto; min-width: 64px; padding: 4px 10px; }
.qp-hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.qp-chip { min-height: 48px; border: 1.5px solid var(--line); background: var(--field); color: var(--ink); border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; font-variant-numeric: tabular-nums; }
.qp-chip small { font-size: 13px; font-weight: 600; color: var(--muted); }
.qp-chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qp-chip[aria-pressed=true] small { color: var(--accent-ink); }
.qp-chip:disabled { opacity: .4; cursor: default; }
.qp-chip.qp-wide { grid-column: span 2; }
.qp-day { min-height: 52px; }
/* „Kita data…“ / „Kitas…“: nematomas sistemos laukas ant mygtuko – bakstelėjus atsidaro telefono rinkiklis */
.qp-other { position: relative; text-align: center; }
.qp-other.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qp-other.on small { color: var(--accent-ink); }
.qp .qp-native { position: absolute; inset: -1.5px; width: calc(100% + 3px); height: calc(100% + 3px); min-height: 0; min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; box-shadow: none; }


/* Apatinis meniu – programėlės skirtukų tokenai (styles.css:165-168) */
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.bb-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.bb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: 0; background: transparent; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 5px 2px; white-space: nowrap; }
.bb svg { width: 22px; height: 22px; }
.bb[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
.bb .tab-badge { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
.tab-badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--danger); color: var(--badge-ink); font-size: 12px; font-weight: 800; text-align: center; line-height: 17px; }

/* Atnaujinimo mygtukas (styles.css:242-251) */
.update-btn { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; background: #1f6f5c; color: #fff; border: none; border-radius: 999px; padding: 14px 22px; font-size: 15px; font-weight: 700; box-shadow: 0 6px 20px rgba(31,111,92,.35); cursor: pointer; white-space: nowrap; }
.update-btn svg { width: 18px; height: 18px; }
.ver-note { font-size: 13px; color: var(--muted); text-align: center; margin: -4px 0 16px; }

/* Toast (styles.css:233-239) – nebegaudo bakstelėjimų; iškyla virš „Atnaujinti programėlę" */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 90; pointer-events: none; background: #1f6f5c; color: #fff; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); max-width: 90%; width: max-content; text-align: center; }
.toast.err { background: #b3402a; }
body.upd-on .toast { bottom: calc(144px + env(safe-area-inset-bottom)); }

/* Lapai / modalai (styles.css:256-279) */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,20,18,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal-card { background: var(--card); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; }
.modal-card h2 { margin: 0 0 6px; font-size: 21px; }
.sheet-text { white-space: pre-line; margin: 0 0 16px; }
.sheet-body { margin: 0 0 14px; }
.sheet-btns { display: flex; flex-direction: column; gap: 10px; }
.sheet-btns .secondary { margin-top: 0; }
.sheet-btns .sheet-big { min-height: 56px; font-size: 17px; }
.sheet-btns .text-link { margin-top: 0; }
.sheet-note { font-size: 13px; color: var(--muted); margin: 4px 0 0; text-align: center; }
.sheet-list .label { margin: 10px 0 6px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 10px 14px; margin-bottom: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.sheet-row span:last-child { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sheet-row[aria-pressed=true] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.sheet-row[aria-pressed=true] span:last-child { color: var(--accent-ink); }
@media (min-width: 600px) { .modal { align-items: center; } .modal-card { border-radius: 20px; } }

/* Pranešimai */
.nt-list .rc-group { padding-left: 2px; }
.nt { display: flex; flex-wrap: wrap; align-items: flex-start; background: var(--rc); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.nt.unread { border-left: 4px solid var(--danger); }
.nt-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: transparent; border: 0; padding: 12px 8px 12px 14px; cursor: pointer; color: var(--ink); font: inherit; }
.nt .rc-callbtn { margin: 12px 12px 0 0; }
.nt-actions { flex: 1 0 100%; padding: 0 14px 12px 62px; }
.nt-actions .action { width: 100%; }
.nt-ico { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.nt-main { flex: 1; min-width: 0; }
.nt-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nt-kind { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nt-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.nt-title { font-weight: 700; font-size: 16px; line-height: 1.3; margin-top: 2px; }
.nt-body { font-size: 14px; color: var(--muted); margin-top: 2px; }
.nt.unread .nt-title::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 6px; vertical-align: middle; }
.nt-foot { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
/* M2 (g25): pranešimų įjungimas – juosta sąraše ir „Pranešimai“ skirtuke, kaip pavyzdyje (setupNodes) */
.setup:empty { display: none; }
.setup .banner { margin-bottom: 10px; }
.push-btn { display: block; width: 100%; min-height: 48px; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; text-align: center; }
.push-btn:disabled { opacity: .6; cursor: progress; }
.push-on { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.push-on button { min-height: 48px; border: 1.5px solid currentColor; background: var(--field); color: inherit; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.push-denied { position: relative; margin: 0 0 12px; padding: 12px 46px 12px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.push-denied small, .push-note small { display: block; font-weight: 500; font-size: 13px; margin-top: 2px; }
.push-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; min-height: 48px; padding: 12px 8px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.recent-head .title { margin: 0; }

/* Daugiau */
.menu { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--rc); margin-bottom: 16px; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-row > svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--muted); }
.menu-row .mr-t { flex: 1; min-width: 0; }
.menu-row .sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.menu-row .chev { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.menu-row.danger { color: var(--danger); }
.menu-row.danger > svg { color: var(--danger); }
.menu-block { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.menu-block:last-child { border-bottom: 0; }
.menu-block .label { margin-bottom: 8px; }
.segmented.small .seg { min-height: 48px; font-size: 14px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-weight: 600; font-size: 15px; cursor: pointer; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- CRM priedai (ne iš pavyzdžio) ---------- */
body.booting .bottombar { visibility: hidden; }
.view-as { position: sticky; top: 0; z-index: 50; background: #8f2d1c; color: #fff; padding: 10px 16px; font-weight: 700; font-size: 15px; line-height: 1.35; }
.view-as small { display: block; font-weight: 500; font-size: 13px; margin-top: 2px; }
.view-as button { margin-top: 8px; min-height: 48px; border: 1.5px solid #fff; background: transparent; color: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; }
body.view-as-on .topbar { top: 0; }
.rc-caloffer .text-link { margin-top: 0; }
.cal-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rc-loading { color: var(--muted); font-size: 14px; padding: 6px 0; }
.rc-inquiry { background: var(--info); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-inquiry b { display: block; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.menu a.menu-row { text-decoration: none; }
.rc-readonly { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.sheet-body textarea { width: 100%; }
.sr-live { position: absolute; left: -9999px; }

#viewingList .viewing-row { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 380px) { .bb { font-size: 11px; } }

.rc-project-choice { display: grid; gap: 6px; min-height: 44px; padding: 12px 0; border-bottom: 1px solid var(--line, #ddd); }
.rc-project-choice > label:first-child { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rc-project-choice select { width: 100%; min-height: 44px; }
