/* ============================================================
   ui-refresh.css — Clean Professional theme: login, client portal, mobile
   Loaded AFTER style.css. Only adds / overrides; style.css is untouched.
   ============================================================ */

:root {
  --brand-navy: #0B2545;
  --brand-blue: #1D4ED8;
  --brand-blue-dark: #1E40AF;
  --brand-tint: #EFF4FF;
}

/* ---------- LOGIN (staff + client) ---------- */
.lg-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(340px, 46%) 1fr; background: #fff; }
.lg-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 56px 40px;
  background: linear-gradient(160deg, var(--brand-navy) 0%, #12356B 60%, #1D4ED8 130%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.lg-brand::after { /* soft geometric accent */
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.14), rgba(255,255,255,0) 70%);
}
.lg-mark { width: 52px; height: 52px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.lg-firm { font-size: 26px; font-weight: 800; line-height: 1.25; margin-top: 22px; }
.lg-firm-sub { font-size: 13px; opacity: .8; margin-top: 6px; letter-spacing: .3px; }
.lg-points { list-style: none; margin-top: 36px; display: grid; gap: 14px; position: relative; z-index: 1; }
.lg-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; opacity: .92; line-height: 1.45; }
.lg-points li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.lg-brand-foot { font-size: 12px; opacity: .65; position: relative; z-index: 1; }

.lg-side { display: flex; align-items: center; justify-content: center; padding: 32px 24px; background: #F8FAFC; }
.lg-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 36px 32px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.lg-title { font-size: 22px; font-weight: 800; color: #0F172A; }
.lg-sub { font-size: 13px; color: #64748B; margin: 4px 0 20px; }

.lg-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #EEF2F7; padding: 4px; border-radius: 10px; margin-bottom: 22px; }
.lg-seg button { border: 0; background: transparent; padding: 10px 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; min-height: 40px; }
.lg-seg button.active { background: #fff; color: var(--brand-blue); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.lg-card .form-control { height: 46px; border-radius: 10px; font-size: 15px; }
.lg-card .form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(29,78,216,.15); outline: none; }
.lg-pw { position: relative; }
.lg-pw .form-control { padding-right: 64px; }
.lg-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand-blue); font-size: 12px; font-weight: 700; cursor: pointer; padding: 10px; min-height: 40px; }
.lg-card .btn-primary { background: var(--brand-blue); border-color: var(--brand-blue); height: 48px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.lg-card .btn-primary:hover { background: var(--brand-blue-dark); }
.lg-note { background: var(--brand-tint); color: #1E3A8A; border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5; margin-bottom: 16px; }
.lg-help { margin-top: 18px; text-align: center; font-size: 12px; color: #64748B; line-height: 1.6; }
.lg-foot { margin-top: 22px; text-align: center; font-size: 11px; color: #94A3B8; }

@media (max-width: 860px) {
  .lg-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lg-brand { padding: 22px 20px 26px; flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
  .lg-brand::after, .lg-points, .lg-brand-foot { display: none; }
  .lg-mark { width: 44px; height: 44px; font-size: 17px; flex: none; }
  .lg-firm { font-size: 17px; margin-top: 0; }
  .lg-firm-sub { font-size: 11px; margin-top: 2px; }
  .lg-side { padding: 20px 14px calc(24px + env(safe-area-inset-bottom)); align-items: flex-start; }
  .lg-card { padding: 26px 20px; border-radius: 14px; margin-top: -10px; }
}

/* ---------- CLIENT PORTAL ---------- */
.client-portal-app .cp-topbar { background: linear-gradient(135deg, var(--brand-navy) 0%, #12356B 100%); }
.client-portal-app .cp-tabs { position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--border,#E2E8F0); scrollbar-width: none; }
.client-portal-app .cp-tabs::-webkit-scrollbar { display: none; }
.client-portal-app .cp-tab.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.client-portal-app .cp-main { padding: 24px 20px; }
@media (max-width: 700px) {
  .client-portal-app .cp-topbar { padding: 10px 14px; gap: 10px; }
  .client-portal-app .cp-brand { gap: 10px; min-width: 0; }
  .client-portal-app .cp-brand-logo { font-size: 22px; }
  .client-portal-app .cp-brand-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .client-portal-app .cp-brand-sub { display: none; }
  .client-portal-app .cp-user { align-items: flex-end; flex: none; }
  .client-portal-app .cp-user-role { display: none; }
  .client-portal-app .cp-user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .client-portal-app .cp-tab { padding: 13px 14px; min-height: 46px; }
  .client-portal-app .cp-tab-icon { font-size: 15px; }
  .client-portal-app .cp-main { padding: 14px 12px; }
  .client-portal-app .cp-msg { max-width: 88%; }
  .client-portal-app .cp-footer { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- MOBILE: whole app ---------- */
@media (max-width: 767px) {
  /* thumb-friendly controls */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .form-control, select.form-control { min-height: 44px; font-size: 16px; }   /* 16px stops iOS auto-zoom */
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar .search-bar { display: none; }                                      /* search lives in the menu on phones */
  .topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-content { padding: 12px 12px calc(76px + env(safe-area-inset-bottom)); }

  /* bottom navigation respects the home-indicator area */
  .mobile-nav { height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav-item { font-size: 10px; min-width: 0; }

  /* pop-ups become full-width bottom sheets with a pinned footer */
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal, .modal-lg { width: 100% !important; max-width: 100% !important; margin: 0 !important; max-height: 92dvh; border-radius: 16px 16px 0 0 !important; display: flex; flex-direction: column; }
  .modal-body { flex: 1; overflow-y: auto; max-height: none !important; -webkit-overflow-scrolling: touch; }
  .modal-footer { position: sticky; bottom: 0; background: inherit; padding-bottom: calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  .modal-footer .btn { flex: 1; }

  /* tables: keep columns readable, scroll sideways inside the card */
  .table-wrap { margin: 0 -2px; border-radius: 8px; }
  table { min-width: 560px; }
  th, td { font-size: 12px; padding: 8px 10px; white-space: nowrap; }
  td:first-child, th:first-child { position: sticky; left: 0; background: var(--card-bg, #fff); z-index: 1; }

  /* headers & actions */
  .page-header .btn { width: auto; }
  .page-header > div:last-child { width: auto; }
  .stats-grid { gap: 10px; }
  .tabs { gap: 0; padding-bottom: 2px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .toast-container { left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* ---------- MOBILE: stop wide content stretching the page ---------- */
@media (max-width: 767px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .main-content, .page-content, .cp-main, .card, .card-body { min-width: 0; max-width: 100%; }
  .table-wrap { overflow-x: auto; max-width: 100%; }
  /* small key/value tables (account snapshot etc.) should wrap, not force a 560px width */
  .card-body table, table[style*="width:100%"] { min-width: 0; }
  .card-body table td, table[style*="width:100%"] td { white-space: normal; position: static; }
}

/* ---------- MOBILE: side menu must sit ABOVE its dim overlay ---------- */
@media (max-width: 767px) {
  .sidebar { z-index: 310 !important; width: min(82vw, 300px) !important; }
  .sidebar.open { box-shadow: 8px 0 24px rgba(0,0,0,.25); }
  .sidebar-overlay { z-index: 300; }
  .sidebar .nav-item { min-height: 46px; display: flex; align-items: center; }
  .sidebar-toggle { font-size: 24px; padding: 8px 10px; min-width: 44px; min-height: 44px; }
}

/* ---------- MOBILE: list tables become cards (labels added by mobile-ui.js) ---------- */
@media (max-width: 767px) {
  table.stack-mobile { min-width: 0 !important; width: 100%; border-collapse: separate; border-spacing: 0; }
  table.stack-mobile thead { display: none; }
  table.stack-mobile tbody, table.stack-mobile tr, table.stack-mobile td { display: block; width: 100%; }
  table.stack-mobile tr { border: 1px solid var(--border, #E2E8F0); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: var(--card-bg, #fff); }
  table.stack-mobile td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right;
    padding: 6px 0 !important; border: 0 !important; white-space: normal !important; position: static !important;
    font-size: 13px !important; background: transparent !important;
  }
  table.stack-mobile td::before {
    content: attr(data-label); flex: none; max-width: 42%; text-align: left;
    color: var(--text-muted, #64748B); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
  }
  table.stack-mobile td[data-label=""]::before, table.stack-mobile td:first-child::before { display: none; }
  table.stack-mobile td:first-child { display: block; text-align: left; font-size: 15px !important; font-weight: 700;
    padding-bottom: 8px !important; margin-bottom: 4px; border-bottom: 1px solid var(--border, #E2E8F0) !important; }
  table.stack-mobile td[data-label=""] { justify-content: flex-end; flex-wrap: wrap; }
  table.stack-mobile td > * { max-width: 100%; }
  table.stack-mobile td .btn { min-height: 36px; }
  .table-wrap:has(> table.stack-mobile) { overflow: visible; }
  .card:has(> .table-wrap > table.stack-mobile) { background: transparent; border: 0; box-shadow: none; padding: 0; }
}

/* ============================================================
   PARTNER / ADMIN DASHBOARD
   ============================================================ */
.dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; appearance: none; -webkit-appearance: none; }
.stat-card-btn:hover { box-shadow: var(--shadow-md); }
.stat-card-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-card.purple::before { background: #7C3AED; }
/* value colours chosen to pass 3:1 on white at this size (amber #F59E0B does not) */
.stat-card.red .stat-value    { color: #B91C1C; }
.stat-card.orange .stat-value { color: #B45309; }
.stat-card.purple .stat-value { color: #6D28D9; }
.stat-card.blue .stat-value   { color: #1D4ED8; }
.dark-mode .stat-card.red .stat-value    { color: #F87171; }
.dark-mode .stat-card.orange .stat-value { color: #FBBF24; }
.dark-mode .stat-card.purple .stat-value { color: #A78BFA; }
.dark-mode .stat-card.blue .stat-value   { color: #60A5FA; }

.dash-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.dash-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.dash-extra:empty { display: none; }
.dash-extra .dash-wide { grid-column: 1 / -1; }

.dash-link { font-size: 12.5px; font-weight: 600; color: var(--accent-dark); text-decoration: none; white-space: nowrap; }
.dash-link:hover { text-decoration: underline; }
.dark-mode .dash-link, .dark-mode .dash-more { color: #60A5FA; }

.dash-group { display: flex; justify-content: space-between; gap: 8px; padding: 12px 4px 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.dash-group span { font-weight: 600; letter-spacing: 0; text-transform: none; }

.dash-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px;
  padding: 10px 4px; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; color: inherit;
  text-align: left; text-decoration: none; cursor: pointer; }
a.dash-row:hover, button.dash-row:hover { background: rgba(59,130,246,.06); }
.dash-row:focus-visible, .dash-more:focus-visible, .dash-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dash-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dash-row-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-sub { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-sub .text-danger { color: #B91C1C; font-weight: 600; }
.dark-mode .dash-row-sub .text-danger { color: #F87171; }
.dash-row-date { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dash-row-date small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.dash-tag { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 999px; background: #EDE9FE; color: #5B21B6;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dark-mode .dash-tag { background: #3B2A6B; color: #DDD6FE; }
.dash-more { display: block; padding: 12px 0 2px; border-top: 1px solid var(--border); text-align: center; font-size: 13px;
  font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.dash-bar { flex: none; width: 90px; height: 8px; border-radius: 4px; background: var(--border); }
.dash-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

@media (max-width: 1100px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .dash-extra { grid-template-columns: minmax(0, 1fr); }
  .dash-row { min-height: 56px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 24px; }
  .stat-card-btn .stat-sub { font-size: 11px; }
}

/* ============================================================
   SIDEBAR: collapsible groups
   ============================================================ */
.nav-group-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 20px; border: 0; border-left: 3px solid transparent;
  background: none; color: var(--sidebar-text); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
  transition: var(--transition); }
.nav-group-head:hover { background: var(--sidebar-hover); color: #fff; }
.nav-group-head:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-group-head .nav-icon { width: 16px; text-align: center; flex-shrink: 0; }
.nav-group-head .nav-chev { margin-left: auto; font-size: 11px; transition: transform .15s; }
.nav-group.open > .nav-group-head .nav-chev { transform: rotate(180deg); }
.nav-group.has-active > .nav-group-head { color: #fff; border-left-color: rgba(59,130,246,.5); }
.nav-children { display: none; padding: 2px 0 8px; }
.nav-group.open > .nav-children { display: block; }
.nav-children .nav-item { padding: 8px 20px 8px 49px; font-size: 12.5px; }
.sidebar .nav-item, .sidebar .nav-group-head { min-height: 40px; }
@media (max-width: 767px) {
  .sidebar .nav-item, .sidebar .nav-group-head { min-height: 46px; }
  .nav-group-head { font-size: 14px; }
}

/* dashboard: card headers stay on one row (title left, link right) on every width */
.dash-main .card-header, .dash-extra .card-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 12px; }
.dash-d-red   { color: #B91C1C; }
.dash-d-amber { color: #B45309; }
.dark-mode .dash-d-red   { color: #F87171; }
.dark-mode .dash-d-amber { color: #FBBF24; }

/* ============================================================
   DASHBOARD CALENDAR  (blue ring = issue date, red ring = due date, orange = both)
   ============================================================ */
.dash-cal { padding: 18px 20px; }
.dash-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-cal-title { font-size: 17px; font-weight: 700; }
.dash-cal-nav { display: flex; gap: 6px; }
.dash-cal-nav button { width: 44px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg);
  color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.dash-cal-nav button:hover { background: rgba(59,130,246,.08); }
.dash-cal-nav button:focus-visible, .dash-cal-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dash-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.dash-cal-dow { padding: 6px 0; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.dash-cal-cell { appearance: none; -webkit-appearance: none; display: flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 2px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.dash-cal-cell.other { color: #94A3B8; cursor: default; }
.dash-cal-cell.today { background: #FEF9C3; }
.dash-cal-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.dash-cal-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 13px; font-weight: 500; }
.dash-cal-num.issue { box-shadow: inset 0 0 0 2px #2563EB; color: #1D4ED8; font-weight: 700; }
.dash-cal-num.due   { box-shadow: inset 0 0 0 2px #DC2626; color: #B91C1C; font-weight: 700; }
.dash-cal-num.both  { background: #FED7AA; box-shadow: inset 0 0 0 2px #EA580C; color: #7C2D12; font-weight: 700; }
.dash-cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.dash-cal-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.dash-cal-legend .lg-issue { background: #2563EB; }
.dash-cal-legend .lg-due   { background: #DC2626; }
.dash-cal-legend .lg-both  { background: #FB923C; }
.dash-cal-list { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.dash-cal-day-head { margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.dash-cal-empty { padding: 8px 0; font-size: 12.5px; color: var(--text-muted); }
.dash-tag.tag-due   { background: #FEE2E2; color: #991B1B; }
.dash-tag.tag-issue { background: #DBEAFE; color: #1E40AF; }
.dark-mode .dash-cal-cell.today { background: rgba(250,204,21,.18); }
.dark-mode .dash-cal-cell.other { color: #64748B; }
.dark-mode .dash-cal-num.issue { color: #93C5FD; box-shadow: inset 0 0 0 2px #60A5FA; }
.dark-mode .dash-cal-num.due   { color: #FCA5A5; box-shadow: inset 0 0 0 2px #F87171; }
.dark-mode .dash-cal-num.both  { background: #7C2D12; color: #FED7AA; box-shadow: inset 0 0 0 2px #FB923C; }
.dark-mode .dash-tag.tag-due   { background: #7F1D1D; color: #FECACA; }
.dark-mode .dash-tag.tag-issue { background: #1E3A8A; color: #BFDBFE; }
@media (max-width: 767px) {
  .dash-cal { padding: 14px 12px; }
  .dash-cal-num { width: 32px; height: 32px; }
}

/* ============================================================
   RUNNING-TIMER CHIP (top bar, every page)
   ============================================================ */
.timer-chip { display: flex; align-items: center; gap: 8px; max-width: 540px; padding: 3px 4px 3px 12px; border: 1px solid #6EE7B7;
  border-radius: 999px; background: #ECFDF5; color: #065F46; font-size: 12.5px; }
.timer-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #059669; animation: timerpulse 1.4s ease-in-out infinite; }
.timer-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.timer-label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-btn { min-height: 34px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.timer-stop { background: #F59E0B; color: #1F2937; }
.timer-done { background: #15803D; color: #FFFFFF; }
.timer-btn:focus-visible { outline: 2px solid #065F46; outline-offset: 2px; }
.dark-mode .timer-chip { background: #064E3B; border-color: #047857; color: #D1FAE5; }
@keyframes timerpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .timer-dot { animation: none; } }
@media (max-width: 767px) {
  .timer-label, .timer-btn .tb-txt { display: none; }
  .timer-chip { padding: 2px 3px 2px 10px; gap: 6px; }
  .timer-btn { min-width: 44px; min-height: 36px; padding: 0 8px; font-size: 14px; }
}

/* ============================================================
   TASK LIST (monthly view) — row actions + mobile cards
   ============================================================ */
.main-content, .page-content { min-width: 0; }            /* wide tables scroll inside their card instead of stretching the page */
.tm-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.tm-actions select { max-width: 120px; }
@media (max-width: 767px) {
  .tm-actions { flex-wrap: wrap; justify-content: flex-end; white-space: normal; }
  .tm-actions button, .tm-actions select { min-height: 40px; padding-left: 12px; padding-right: 12px; font-size: 13px !important; }
  table.stack-mobile td:first-child { max-width: none !important; white-space: normal !important; overflow: visible !important; }
  table.stack-mobile td { min-width: 0; max-width: 100%; }
}
.timer-chip { max-width: 400px; }
.timer-label { max-width: 130px; }

/* ============================================================
   CLIENT PORTAL HOME — account snapshot, CA team, service request
   ============================================================ */
.cp-snap { width: 100%; font-size: 13px; border-collapse: collapse; }
.cp-snap td { padding: 7px 0; border-bottom: 1px solid var(--border, #E2E8F0); vertical-align: top; }
.cp-snap tr:last-child td { border-bottom: 0; }
.cp-snap td:first-child { color: var(--text-muted, #64748B); padding-right: 16px; white-space: nowrap; }
.cp-snap td:last-child { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.cp-snap-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border, #E2E8F0); }
.cp-snap-h { margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #64748B); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-checks { display: grid; gap: 4px; }
.cp-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border, #E2E8F0); border-radius: 8px; cursor: pointer; }
.cp-check:hover { background: rgba(59,130,246,.06); }
.cp-check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: #2563EB; }
.cp-check-t { display: block; font-size: 13px; font-weight: 600; }
.cp-check-h { display: block; font-size: 12px; color: var(--text-muted, #64748B); }
.cp-req { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border, #E2E8F0); }
.cp-req:last-child { border-bottom: 0; }
.cp-req-t { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; }
.cp-req-t small { font-size: 11px; font-weight: 400; color: var(--text-muted, #64748B); }
.cp-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cp-home-grid { align-items: start; }
@media (max-width: 767px) { .cp-quick .btn { flex: 1 1 calc(50% - 8px); } }

.cp-home-grid .card-header { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; }

/* OTP / password switch on the login card */
.lg-method { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 14px; border-bottom: 1px solid #E2E8F0; }
.lg-method button { border: 0; background: transparent; padding: 9px 4px; font-size: 13px; font-weight: 600; color: #64748B; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 40px; }
.lg-method button.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }

/* Follow-up reminder block in the "pending for documents" dialog */
.pd-rem { border: 1px solid #E2E8F0; border-radius: 10px; padding: 12px; background: #F8FAFC; }
.pd-rem-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
.pd-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; margin: 10px 0; }
.pd-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.pd-days label { cursor: pointer; }
.pd-days input { position: absolute; opacity: 0; pointer-events: none; }
.pd-days span { display: inline-block; min-width: 42px; text-align: center; padding: 8px 6px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 12px; font-weight: 600; background: #fff; color: #475569; }
.pd-days input:checked + span { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
