/* =========================================================
   Shared theme. Default colours: navy + orange.
   Each company can set its own brand colour (overrides --orange-*).
   ========================================================= */
:root {
  --navy-900: #15134a;
  --navy-800: #1f1d5c;
  --navy-700: #2b2a75;
  --navy-100: #e8e8f6;
  --orange-500: #e8913a;
  --orange-600: #d27a22;
  --orange-100: #fdf0e3;

  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e5e7ef;
  --text: #1b1d2e;
  --text-2: #5b6075;
  --text-3: #8a8fa3;

  --green: #16a34a;  --green-bg: #e7f6ec;
  --amber: #b45309;  --amber-bg: #fdf3e1;
  --blue: #2563eb;   --blue-bg: #e8effd;
  --violet: #7c3aed; --violet-bg: #f1eafd;
  --red: #dc2626;    --red-bg: #fdecec;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 60, .05), 0 4px 16px rgba(20, 20, 60, .06);
  --shadow-lg: 0 20px 50px rgba(20, 20, 60, .18);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #d9daf0; display: flex; flex-direction: column; padding: 18px 14px;
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 4px; flex: none; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand strong { display: block; color: #fff; font-size: 15px; letter-spacing: .3px; }
.brand small { color: rgba(255,255,255,.65); font-size: 12px; font-weight: 500; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-shrink: 0; border-radius: 10px; font-weight: 500; color: #c9cae6; transition: background .15s, color .15s; }
.nav a i { width: 18px; text-align: center; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(232,145,58,.16); color: #fff; box-shadow: inset 3px 0 0 var(--orange-500); }
.nav a.active i { color: var(--orange-500); opacity: 1; }

.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 6px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.me small { font-size: 12px; color: #a3a5c9; }
/* round 30: Logout sits in the top bar next to the date */
.top-logout { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--red, #dc2626); background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.top-logout:hover { background: #fee2e2; color: #b91c1c; }
@media (max-width: 520px) { .top-logout span { display: none; } .top-logout { width: 36px; padding: 0; justify-content: center; } }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--orange-500); color: #fff; font-weight: 600; font-size: 12.5px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; background: var(--navy-100); color: var(--navy-700); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 28px; background: rgba(244,245,250,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.topbar p { color: var(--text-2); font-size: 13px; }
.topbar .title { flex: 1; min-width: 0; }
.topbar .date { display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; background: var(--surface); border: 1px solid var(--border); padding: 7px 12px; border-radius: 999px; }
.topbar .menu-btn { display: none; }
.content { padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.foot { padding: 18px 28px; color: var(--text-3); font-size: 12px; text-align: center; }
.scrim { display: none; }

/* ---------- Cards & stats ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-head h2 .count { background: var(--navy-100); color: var(--navy-700); font-size: 12px; padding: 2px 9px; border-radius: 999px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: none; }
.stat .num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .lbl { color: var(--text-2); font-size: 13px; }
.ic-navy { background: var(--navy-100); color: var(--navy-700); }
.ic-orange { background: var(--orange-100); color: var(--orange-600); }
.ic-blue { background: var(--blue-bg); color: var(--blue); }
.ic-violet { background: var(--violet-bg); color: var(--violet); }
.ic-green { background: var(--green-bg); color: var(--green); }

/* ---------- Toolbar (search + filters) ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }
.search input { padding: 9px 12px 9px 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); width: 240px; }
.search input:focus { outline: none; border-color: var(--navy-700); background: #fff; box-shadow: 0 0 0 3px rgba(43,42,117,.12); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { border: 1px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.filter.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Table (turns into cards on phone) ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.list td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.list tbody tr { transition: background .12s; }
.list tbody tr:hover { background: #fafbff; }
.list tbody tr:last-child td { border-bottom: none; }
.id { font-weight: 600; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.party strong { display: block; font-weight: 600; }
.party a { color: var(--text-2); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.party a:hover { color: var(--navy-700); }
.work-name { max-width: 320px; min-width: 190px; }
.list td[data-col="date"] { white-space: nowrap; }
.list td[data-col="date"] .muted { display: block; }
.muted { color: var(--text-3); font-size: 12.5px; }
.person { display: flex; align-items: center; gap: 8px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions.two-rows { flex-direction: column; align-items: flex-end; }
.row-actions .ra-line { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.row-actions .ra-line:empty { display: none; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-approval { background: var(--violet-bg); color: var(--violet); }
.badge-assigned { background: var(--blue-bg); color: var(--blue); }
.badge-progress { background: var(--navy-100); color: var(--navy-700); }
.badge-done { background: var(--green-bg); color: var(--green); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.chip i { color: var(--orange-600); font-size: 11px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-500); color: #fff; box-shadow: 0 4px 12px rgba(232,145,58,.3); }
.btn-primary:hover { background: var(--orange-600); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #128a3e; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 15px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; }
.btn-wa { background: #25d366; color: #fff; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--red); }
.input { position: relative; }
.input i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; pointer-events: none; }
.input input, .input select, .field textarea, .field select, .field input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input input, .input select { padding-left: 38px; }
.field textarea { min-height: 96px; resize: vertical; }
.input input:focus, .input select:focus, .field textarea:focus, .field select:focus, .field input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(43,42,117,.12); }
.toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 6px; pointer-events: auto; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.alert i { margin-top: 3px; }
.alert-success { background: var(--green-bg); color: #14532d; border-color: #bfe5cb; }
.alert-error { background: var(--red-bg); color: #7f1d1d; border-color: #f5c2c2; }
.alert-info { background: var(--blue-bg); color: #1e3a8a; border-color: #c8d8fb; }
.alert-warn { background: #fff7e6; color: #7c4a03; border-color: #f6d9a8; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--green-bg); color: var(--green); font-size: 26px; }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15,15,45,.5); backdrop-filter: blur(3px); }
.modal.open { display: flex; animation: fade .15s ease; }
.modal-box { width: 100%; max-width: 460px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s ease; overflow: hidden;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal-head, .modal-foot { flex-shrink: 0; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; display: flex; gap: 10px; align-items: center; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { padding: 14px 20px; display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); border-top: 1px solid var(--border); }
.summary { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; }
.note-wa { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #166534; background: #ecfbf1; border-radius: 10px; padding: 10px 12px; }
.note-wa i { color: #25d366; font-size: 16px; }
.check-line { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 8px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* =========================================================
   Login / customer ticket page
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  background: radial-gradient(1200px 600px at -10% -10%, rgba(232,145,58,.35), transparent 60%),
              linear-gradient(160deg, var(--navy-700), var(--navy-900));
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(232,145,58,.18); }
.hero-logo { background: #fff; border-radius: 18px; padding: 14px 18px; width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.auth-hero h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.6px; margin: 36px 0 12px; max-width: 460px; }
.auth-hero h1 span { color: var(--orange-500); }
.auth-hero p.lead { color: #c9cae6; font-size: 16px; max-width: 440px; }
.services { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; max-width: 480px; }
.services span { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.services i { color: var(--orange-500); }
.contact { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #d9daf0; position: relative; z-index: 1; }
.contact a { display: inline-flex; gap: 10px; align-items: center; }
.contact i { width: 18px; color: var(--orange-500); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .mobile-logo { display: none; }
.auth-card h2 { font-size: 24px; letter-spacing: -.3px; }
.auth-card .sub { color: var(--text-2); margin: 4px 0 20px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: #e9eaf3; border-radius: 12px; margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 10px 8px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; display: flex; gap: 8px; align-items: center; justify-content: center; }
.tabs button.active { background: #fff; color: var(--navy-800); box-shadow: 0 1px 3px rgba(20,20,60,.12); }
.pane { display: none; }
.pane.active { display: block; animation: fade .2s ease; }
.ticket-ok { text-align: center; padding: 8px 0 4px; }
.ticket-ok .big { font-size: 34px; font-weight: 700; color: var(--navy-800); letter-spacing: 1px; }
.small-print { text-align: center; color: var(--text-3); font-size: 12.5px; margin-top: 18px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-card .mobile-logo { display: block; width: 170px; margin: 0 auto 18px; }
  .auth-card h2, .auth-card .sub { text-align: center; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(15,15,45,.45); z-index: 30; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 17px; }
  .topbar .date { display: none; }
  .content { padding: 16px 16px 32px; gap: 16px; }
  .search input { width: 100%; }
  .search { flex: 1; min-width: 180px; }

  /* table rows become cards */
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
  .list td { padding: 0; border: 0; }
  .list td[data-col="id"] { grid-column: 1; }
  .list td[data-col="status"] { grid-column: 2; grid-row: 1; justify-self: end; }
  .list td[data-col="party"], .list td[data-col="work"] { grid-column: 1 / -1; }
  .list td[data-col="type"], .list td[data-col="staff"], .list td[data-col="date"] { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
  .list td[data-col="action"] { grid-column: 1 / -1; margin-top: 6px; }
  .list td[data-col="action"] .row-actions { justify-content: stretch; }
  .list td[data-col="action"] .btn { flex: 1; padding: 10px; }
  .work-name { max-width: none; min-width: 0; }
  .list td[data-col="date"] .muted { display: inline; }
}
@media (max-width: 520px) {
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .ic { width: 38px; height: 38px; font-size: 15px; }
  .stat .num { font-size: 21px; }
  .tabs button span { display: none; }
  .tabs button i { font-size: 16px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 18px 18px 0 0; max-width: none; }
}

/* =========================================================
   Multi-company panel additions
   ========================================================= */
.pad { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 13px; }
.sec-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sec-title i { color: var(--orange-600); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.small { font-size: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal-box.wide { max-width: 640px; }
.badge-cancelled { background: #eef0f4; color: var(--text-3); }
.badge-urgent { background: var(--red-bg); color: var(--red); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy-700); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* layouts */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.form-grid { display: flex; flex-direction: column; gap: 20px; max-width: 900px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.report-filter { align-items: flex-end; }
.report-filter .field { margin-bottom: 0; }
.filter-bar { justify-content: flex-start; }
.filter-bar select, .filter-bar input[type=date] { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font: inherit; color: var(--text); }
a.filter { text-decoration: none; display: inline-block; }

/* work details */
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.desc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; white-space: normal; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 20px; margin-bottom: 18px; }
.facts-grid dt { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.facts-grid dd { font-weight: 500; margin-top: 2px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.timeline { list-style: none; max-height: 560px; overflow: auto; }
.timeline li { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.tl-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; font-size: 12px; flex: none; }
.timeline p { margin-bottom: 2px; word-break: break-word; }
.timeline .muted { font-size: 12px; }

/* staff workload */
.load-list { padding: 6px 0; }
.load-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 20px; }
.load-nums { display: flex; gap: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* report bars */
.bars { list-style: none; padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--orange-500); border-radius: 999px; }
.bar.small { display: inline-block; width: 70px; height: 8px; vertical-align: middle; }
.bar-num { text-align: right; font-weight: 600; }

/* logo + colour + copy */
.logo-edit { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.logo-box { width: 96px; height: 96px; border-radius: 16px; border: 1px dashed var(--border); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-box img { max-width: 86px; max-height: 86px; object-fit: contain; }
.logo-edit .muted { font-size: 12.5px; margin: 8px 0; }
.logo-pick { display: flex; align-items: center; gap: 12px; }
.logo-pick img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 4px; }
.color-pick { display: flex; align-items: center; gap: 10px; }
.color-pick input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font: inherit; font-size: 13px; color: var(--text); }

@media (max-width: 1100px) {
  .dash-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .report-grid { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 96px minmax(0, 1fr) 34px; }
  .filter-bar select, .filter-bar input[type=date] { flex: 1; min-width: 130px; }
  .detail-head { flex-direction: column; }
  .form-actions .btn { flex: 1; justify-content: center; }
}
.auth-card .mobile-logo { max-height: 110px; width: auto; max-width: 170px; object-fit: contain; }
.action-row:not(:has(*)) { display: none; }
.icon-btn.sm { width: 30px; height: 30px; font-size: 12px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.order-btns { display: flex; gap: 4px; }
.pay-list { list-style: none; }
.pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 20px; border-top: 1px solid var(--border); }
.stat .num small { font-size: 15px; font-weight: 600; }
.auth-hero .eyebrow { margin-top: 30px; color: var(--orange-500); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.auth-hero .eyebrow + h1 { margin-top: 8px; }
.feature-list { list-style: none; display: grid; gap: 14px; margin-top: 26px; max-width: 480px; position: relative; z-index: 1; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list i { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: var(--orange-500); display: grid; place-items: center; flex: none; }
.feature-list b { display: block; color: #fff; font-size: 15px; }
.feature-list span { color: #c9cae6; font-size: 13.5px; line-height: 1.45; }
.contact a { color: inherit; }
.mobile-brand { display: none; text-align: center; margin: -8px 0 18px; }
.mobile-brand strong { display: block; font-size: 18px; color: var(--navy-800); }
.mobile-brand span { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 900px) { .mobile-brand { display: block; } }
.due { font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 3px; }
.due.today { color: var(--amber); }
.due.late { color: var(--red); }
@media (max-width: 860px) { .hide-sm { display: none; } .list td[data-col="action"] .btn.btn-ghost { flex: 0 0 auto; padding: 10px 14px; } .list td[data-col="action"] .row-actions.two-rows { align-items: stretch; } }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat.link { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.stat.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat.alert-stat { border-color: #f5c2c2; background: linear-gradient(180deg, #fff, var(--red-bg)); }
.ic-red { background: var(--red-bg); color: var(--red); }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.today-grid div { background: var(--surface); padding: 14px 20px; }
.today-grid div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.today-grid b { display: block; font-size: 22px; line-height: 1.1; }
.today-grid span { font-size: 12.5px; color: var(--text-2); }
.timeline.compact li { padding: 11px 20px; }
.timeline.compact p { font-size: 13.5px; }
.bars a.bar-label { color: var(--text-2); text-decoration: none; }
.bars a.bar-label:hover { color: var(--navy-700); text-decoration: underline; }
@media (max-width: 1100px) { .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-actions .btn { flex: 1; justify-content: center; } }
.steps { padding-left: 20px; margin-bottom: 14px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; }
.dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
@media (min-width: 861px) {
  .list td, .list th { padding-left: 9px; padding-right: 9px; }
  .list:not(.dense) td[data-col="type"] .chip { white-space: normal; }
  .list td[data-col="action"] .row-actions { flex-wrap: wrap; max-width: 250px; margin-left: auto; }
  .work-name { min-width: 130px; }
}
/* dense dashboard list */
.list.dense td { padding-top: 9px; padding-bottom: 9px; font-size: 13.5px; }
.list.dense .one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.list.dense td[data-col="work"].one-line { max-width: 340px; }
.list.dense td[data-col="party"] a { color: inherit; text-decoration: none; }
.list.dense .due { margin-top: 0; white-space: nowrap; }
.list.dense .badge { padding: 3px 8px; font-size: 11.5px; }
.list.dense tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--red); }
@media (min-width: 861px) {
  .list.dense td { padding-top: 6px; padding-bottom: 6px; line-height: 1.3; }
  .list.dense th { padding-top: 8px; padding-bottom: 8px; font-size: 11px; }
  .list.dense td[data-col="action"] { white-space: nowrap; overflow: visible; }
  .list.dense td { padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
  /* fixed columns: long text is cut with ... so the action buttons always stay on screen */
  .list.dense { width: 100%; table-layout: fixed; }
  .list.dense .one-line { max-width: none; }
  .list.dense th:nth-child(1) { width: 54px; }
  .list.dense th:nth-child(2) { width: 18%; }
  .list.dense th:nth-child(4) { width: 11%; }
  .list.dense th:nth-child(5) { width: 196px; }
  .list.dense th:nth-child(6) { width: 124px; }
  .list.dense th:nth-child(7) { width: 150px; }
  .list.dense td { overflow: hidden; text-overflow: ellipsis; }
  .list.dense td[data-col="date"], .list.dense td[data-col="status"] { white-space: nowrap; }
  .list.dense td[data-col="action"] .row-actions { flex-wrap: nowrap; max-width: none; gap: 4px; }
  .list.dense .icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
  .list.dense .badge { padding: 2px 8px; }
  .list.dense .prio { padding: 1px 6px; font-size: 10.5px; }
}
.icon-btn.navy { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.icon-btn.green { background: var(--green); color: #fff; border-color: var(--green); }
.work-when { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
@media (max-width: 860px) {
  .list.dense tr { padding: 8px 12px; display: grid; gap: 2px 8px; align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "id party status" "work work staff" "date date action"; }
  .list.dense td { width: auto; min-width: 0; font-size: 13px; padding: 0; }
  .list.dense td[data-col="id"] { grid-area: id; }
  .list.dense td[data-col="party"] { grid-area: party; }
  .list.dense td[data-col="status"] { grid-area: status; justify-self: end; }
  .list.dense td[data-col="work"] { grid-area: work; color: var(--text-2); }
  .list.dense td[data-col="date"] { grid-area: date; display: block; }
  .list.dense td[data-col="staff"] { grid-area: staff; display: block; font-size: 12px; color: var(--text-3); text-align: right; max-width: 120px; }
  .list.dense td[data-col="action"] { grid-area: action; margin: 0; }
  .list.dense .one-line { max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .list.dense td[data-col="action"] .row-actions { justify-content: flex-end; flex-wrap: nowrap; gap: 4px; }
  .list.dense td[data-col="action"] .icon-btn { flex: 0 0 auto; width: 32px; height: 32px; }
  .list.dense tr.is-late td:first-child { box-shadow: none; }
  .list.dense tr.is-late { box-shadow: inset 3px 0 0 var(--red); }
}

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(.95); }
.btn.danger { color: var(--red); }
.qr-box { display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; }
.qr-box img { width: 260px; max-width: 100%; height: auto; image-rendering: pixelated; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.kv th { text-align: left; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); width: 40%; word-break: break-all; }
.kv td { padding: 6px 8px; border-bottom: 1px solid var(--border); word-break: break-all; }
.raw { white-space: pre-wrap; word-break: break-all; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 12px; margin-top: 10px; max-height: 200px; overflow: auto; }

/* compact numbers on the dashboard so more work rows fit on screen */
.stats-5 .stat { padding: 12px 14px; }
.stats-5 .stat .ic { width: 38px; height: 38px; font-size: 15px; }
.stats-5 .stat .num { font-size: 22px; }
.dash-card .card-head { padding-top: 12px; padding-bottom: 12px; }
.pay-setup { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.qr-box.small { width: 150px; height: 150px; padding: 8px; margin: 0; }
.qr-box.small img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.view-as { align-items: center; }
.view-as .btn { margin-left: auto; }
/* renew + help pages (no sidebar) */
body.plain-page { background: var(--bg, #f4f5fa); min-height: 100vh; }
.renew-wrap { max-width: 920px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.renew-head { display: flex; align-items: center; gap: 12px; }
.renew-head img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.renew-head div { flex: 1; min-width: 0; }
.renew-head strong { display: block; font-size: 17px; }
.renew-head small { color: var(--text-3); }
.renew-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; margin-top: 16px; align-items: start; }
.renew-qr { display: grid; gap: 10px; }
.renew-qr { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.renew-qr .copy-row input { width: 100%; }
.renew-qr .qr-box img { width: 240px; max-width: 100%; image-rendering: auto; }
.pay-amount { text-align: center; font-size: 18px; }
.pay-amount b { font-size: 24px; color: var(--navy-800); }
@media (max-width: 720px) { .renew-grid { grid-template-columns: 1fr; } }
.thread { display: grid; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); max-width: 86%; }
.msg.owner { background: var(--blue-bg); border-color: #c8d8fb; margin-left: auto; }
.msg .meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.msg p { white-space: pre-wrap; margin: 0; }
.proof-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.text-red { color: var(--red); font-weight: 600; font-size: 12.5px; }
@media (min-width: 1100px) { .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; gap: 16px 20px; } }
.feature-list i { width: 34px; height: 34px; }
.due-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.due-quick button { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.due-quick button:hover, .due-quick button.on { border-color: var(--navy-700); color: var(--navy-800); background: var(--blue-bg); }
.note-line { font-size: 12.5px; line-height: 1.4; margin-top: 2px; } .list.history td { vertical-align: top; }
.list.dense .sub { font-size: 12px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list.dense .sub i { font-size: 11px; }
.wa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wa-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #eef0f4; color: var(--text-2); }
.wa-status[data-state="connected"] { background: var(--green-bg); color: var(--green); }
.wa-status[data-state="disconnected"] { background: #fdecec; color: var(--red); }
.wa-connect { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; margin-bottom: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.wa-done { text-align: center; padding: 20px 10px; }
.wa-done i { font-size: 54px; color: var(--green); }
.wa-done h3 { margin: 10px 0 4px; font-size: 20px; }
.auto-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.small { font-size: 12px; }
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.qr-preview { display: grid; place-items: center; }
.qr-preview canvas { width: 100%; max-width: 340px; height: auto; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
@media (max-width: 900px) { .qr-layout { grid-template-columns: 1fr; } }
/* main page: work from mobile */
.mobile-work { display: flex; gap: 22px; align-items: center; margin-top: 30px; padding: 20px; max-width: 640px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.mw-phone { flex: none; width: 150px; padding: 18px 10px 14px; border-radius: 26px; background: #0f0e33; border: 3px solid rgba(255,255,255,.18); box-shadow: 0 14px 30px rgba(0,0,0,.35); display: grid; gap: 7px; }
.mw-notch { width: 46px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.2); margin: -6px auto 4px; }
.mw-widget { background: var(--orange-500); color: #fff; border-radius: 12px; padding: 9px 10px; }
.mw-widget small { display: block; font-size: 10px; opacity: .9; }
.mw-widget b { font-size: 24px; line-height: 1.1; display: block; }
.mw-widget span { font-size: 9.5px; } .mw-widget em { font-style: normal; font-weight: 700; }
.mw-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; font-size: 10px; color: #e7e8ff; background: rgba(255,255,255,.07); border-radius: 8px; padding: 6px 7px; }
.mw-row i { font-size: 7px; color: #8fd19e; } .mw-row i.fa-qrcode { font-size: 10px; color: #fff; } .mw-row i.text-red { color: #ff7b7b; }
.mw-row small { margin-left: auto; font-size: 9px; color: #b5b6da; }
.mw-text { min-width: 0; }
.mw-tag { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--orange-500); background: rgba(255,255,255,.08); padding: 4px 10px; border-radius: 999px; }
.mw-text h3 { color: #fff; font-size: 18px; margin: 8px 0 8px; }
.mw-text ul { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.mw-text li { display: flex; gap: 8px; font-size: 13px; color: #c9cae6; line-height: 1.4; }
.mw-text li i { color: var(--orange-500); width: 14px; flex: none; margin-top: 3px; font-size: 12px; }
.mw-note { font-size: 12px; color: #a9aad0; margin-top: 10px; }
@media (max-width: 1200px) { .mw-phone { display: none; } }
.mobile-strip { display: none; gap: 10px; align-items: flex-start; text-align: left; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--blue-bg); font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.mobile-strip i { color: var(--navy-700); font-size: 18px; margin-top: 2px; }
.mobile-strip b { display: block; color: var(--navy-800); font-size: 13.5px; }
@media (max-width: 900px) { .mobile-strip { display: flex; } }
.key-saved { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 600; } .key-saved i { margin-right: 3px; }
input.secret { -webkit-text-security: disc; font-family: monospace; } input.secret:focus { -webkit-text-security: none; }
.upi-mini { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.upi-mini li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.upi-mini i { color: var(--orange-600); } .upi-mini code { font-size: 12.5px; }
.qr-pay-to { background: var(--blue-bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.qr-pay-to label { font-weight: 700; color: var(--navy-800); }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg, #f4f5fb); margin: 0; }
.logout-box { max-width: 420px; text-align: center; }
.logout-box .ic { font-size: 44px; color: var(--amber); margin-bottom: 6px; } .logout-box .ic.ok { color: var(--green); }
.logout-box h2 { margin: 0 0 6px; } .logout-box p { margin: 8px 0; word-break: break-all; }
/* main page (company login): everything on one screen */
@media (min-width: 901px) {
  .auth.home { grid-template-columns: minmax(0, 1.75fr) minmax(380px, 1fr); height: 100vh; min-height: 640px; }
  .auth.home .auth-hero { padding: 26px 36px 20px; overflow: hidden; }
  .auth.home .auth-panel { padding: 24px; overflow-y: auto; }
  .home-head { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
  .home-logo { background: #fff; border-radius: 14px; padding: 6px 10px; box-shadow: 0 8px 22px rgba(0,0,0,.25); display: grid; place-items: center; }
  .home-logo img { max-height: 46px; max-width: 150px; object-fit: contain; display: block; }
  .auth.home .auth-hero .eyebrow { margin: 0; }
  .auth.home .auth-hero h1 { font-size: 30px; margin: 16px 0 6px; max-width: none; }
  .auth.home .auth-hero p.lead { font-size: 14.5px; max-width: 640px; line-height: 1.5; }
  .auth.home .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: 12px 16px; margin-top: 16px; }
  .auth.home .feature-list li { gap: 10px; }
  .auth.home .feature-list i { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
  .auth.home .feature-list b { font-size: 13.5px; }
  .auth.home .feature-list span { font-size: 12px; line-height: 1.4; }
  .auth.home .mobile-work { max-width: none; margin-top: 16px; padding: 14px 16px; gap: 18px; }
  .auth.home .mw-phone { display: grid; width: 132px; padding: 14px 8px 10px; border-radius: 22px; gap: 5px; }
  .auth.home .mw-widget b { font-size: 20px; }
  .auth.home .mw-text h3 { font-size: 16px; margin: 6px 0; }
  .auth.home .mw-text ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; }
  .auth.home .mw-text li { font-size: 12.5px; }
  .auth.home .mw-note { margin-top: 6px; font-size: 11.5px; }
  .contact-row { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; margin-top: 14px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .auth.home .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth.home .mw-phone { display: none; }
  .auth.home { height: auto; min-height: 100vh; }
}
@media (min-width: 901px) and (max-height: 700px) { .auth.home .mw-phone { display: none; } .auth.home .feature-list span { display: none; } .auth.home .feature-list b { margin-top: 6px; } }
.wa-test { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.wa-test h3 { font-size: 14px; margin: 0 0 10px; } .wa-test input[type=file] { font-size: 13px; }
.wa-last { margin-top: 10px; word-break: break-all; } .wa-last code { font-size: 11.5px; }

/* plan renewal reminder on the company dashboard */
.renew-banner { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid #f6d9a8; background: #fffaf0; margin-bottom: 16px; }
.renew-banner .rb-qr { flex: 0 0 auto; width: 120px; height: 120px; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px; font-size: 40px; color: var(--orange-600); }
.renew-banner .rb-qr canvas, .renew-banner .rb-qr img { width: 100%; height: 100%; object-fit: contain; }
.renew-banner h2 { font-size: 17px; margin-bottom: 4px; color: #7c4a03; }
.renew-banner p { margin-bottom: 8px; }
.renew-banner .rb-amt { font-size: 18px; color: var(--navy-800); }
.renew-qr canvas { width: 240px; max-width: 100%; height: auto; }
.other-qr summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
@media (max-width: 560px) { .renew-banner { flex-direction: column; align-items: flex-start; } }

/* app download buttons on the login page */
.app-dl { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; }
.app-dl-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 10px; }
.app-dl-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.app-badge { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; padding: 9px 16px; border-radius: 12px; color: #fff; text-decoration: none; text-align: left; line-height: 1.15; font-weight: 700; font-size: 16px; }
.app-badge i { font-size: 26px; }
.app-badge small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.app-badge:hover { filter: brightness(1.1); color: #fff; }
.app-android { background: #1f8f4e; }
.app-apple { background: #111; }

/* ===== My notes ===== */
.pnotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 16px; }
.pnote { background: #fffbea; border: 1px solid #f3e3a1; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 130px; }
.pnote h3 { margin: 0; font-size: 15px; color: var(--text-1, #111827); word-break: break-word; }
.pnote p { margin: 0; font-size: 13px; color: var(--text-2); white-space: normal; word-break: break-word; }
.pnote.is-done { background: var(--surface-2); border-color: var(--border); opacity: .8; }
.pnote.is-done h3 { text-decoration: line-through; }
.pnote.is-late { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.pnote-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-top: auto; }
.pnote-rem { color: var(--orange-600); font-weight: 600; }
.pnote.is-late .pnote-rem { color: var(--red); }
.pnote-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-head .row-actions .btn.active { background: var(--navy-700, #10214F); color: #fff; }

/* ===== Voice notes ===== */
.voice-box .voice-ui { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; }
.voice-box .voice-ui audio, audio.voice-play { height: 36px; max-width: 100%; }
audio.voice-play { display: block; margin-top: 6px; width: 260px; }
.voice-box .voice-file { margin-top: 6px; }
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: vpulse 1s infinite; }
.voice-time { font-variant-numeric: tabular-nums; }
.voice-stop { background: var(--red); color: #fff; border-color: var(--red); }
@keyframes vpulse { 50% { opacity: .25; } }

/* ===== Alert popups (new work, due, reminders) ===== */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto; }
body:has(.aw-actions) .toasts { bottom: 92px; }
body:has(.modal.open) .toasts { display: none; }
.toasts:empty { display: none; }
.toast-all { align-self: flex-end; background: #fff; box-shadow: 0 4px 14px rgba(16,33,79,.15); }
@media (max-width: 640px) { .toasts { right: 12px; width: calc(100vw - 24px); max-height: 55vh; } }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--orange-600); border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(16, 33, 79, .18); animation: tin .25s ease-out; }
.toast.urgent { border-left-color: var(--red); }
.toast-done { border-left-color: var(--green); }
.toast-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-50, #fff1ea); color: var(--orange-600); flex: none; }
.toast.urgent .toast-ic { background: var(--red-bg); color: var(--red); }
.toast-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.toast-txt b { font-size: 14px; }
.toast-txt span { color: var(--text-2); word-break: break-word; }
.toast-txt a { font-weight: 600; color: var(--orange-600); align-self: flex-start; }
#alertBell { color: var(--orange-600); animation: vpulse 1.6s 3; }
@keyframes tin { from { transform: translateY(14px); opacity: 0; } }

/* attached files (PDF, Excel, photo) + location */
.file-box .file-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.file-box .file-btns label { cursor: pointer; margin: 0; }
.file-box .file-list { list-style: none; margin: 0 0 4px; padding: 0; }
.file-box .file-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 4px; font-size: 13px; word-break: break-all; }
.att-wrap { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.att-list { list-style: none; margin: 0 0 12px; padding: 0; }
.att-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.att-list .att-ic { font-size: 22px; width: 24px; text-align: center; color: var(--text-2); }
.att-list .att-pdf { color: #d93025; } .att-list .att-xls, .att-list .att-xlsx, .att-list .att-csv { color: #188038; } .att-list .att-jpg, .att-list .att-png { color: #1a73e8; }
.att-list .att-name { font-weight: 600; word-break: break-all; }
.att-list .muted { font-size: 12px; flex-basis: 100%; padding-left: 34px; order: 5; }
.att-list .att-acts { margin-left: auto; display: flex; gap: 4px; }
.att-add .file-box { margin-bottom: 8px; }
.loc-btn i { color: #d93025; }
.loc-mini { margin-left: 6px; color: #d93025; }
.loc-inline { font-weight: 600; }
.voice-wrap { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.voice-wrap audio.voice-play { margin-top: 0; }
.voice-dl { font-size: 13px; }
.voice-msg { color: var(--red); font-size: 12px; flex-basis: 100%; }
.voice-msg:empty { display: none; }
/* Add work: two columns on a laptop, one on a phone */
.aw-form { max-width: 1180px; }
.aw-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.aw-col { display: flex; flex-direction: column; gap: 18px; }
.aw-card .sec-title { margin-bottom: 12px; }
.aw-card .field { margin-bottom: 12px; }
.aw-card textarea { min-height: 64px; }
.aw-known { font-size: 13px; font-weight: 600; color: var(--blue, #2563eb); margin: -4px 0 10px; }
.aw-known.ok { color: var(--green); }
.aw-loc .gps-fill { margin-top: 6px; }
.aw-who { margin-top: 12px; }
.aw-extras .voice-box, .aw-extras .file-box { margin-bottom: 10px; }
.aw-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; padding: 12px 0; background: linear-gradient(to top, var(--bg, #f4f5fa) 75%, rgba(244,245,250,0)); }
@media (max-width: 960px) { .aw-grid { grid-template-columns: 1fr; } }
.gps-fill { margin-top: 6px; }
.toast-at { display: block; font-size: 11px; color: var(--text-3); }

.aw-now { margin-right: auto; font-size: 13px; align-self: center; }
@media (max-width: 640px) { .aw-now { width: 100%; } }

/* round 16: messages to all */
.notice-bar { display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fdba74; border-left: 4px solid var(--orange-600); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.notice-bar > i { color: var(--orange-600); font-size: 18px; margin-top: 2px; }
.notice-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notice-bar span { color: var(--text-2); word-break: break-word; }
.notice-bar a { font-weight: 600; color: var(--orange-600); align-self: flex-start; }
.notice-bar small { color: var(--muted, #6b7280); font-size: 12px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: #fff; }
.seg label:has(input:checked) { border-color: var(--orange-600); background: #fff7ed; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.limit-box { display: flex; flex-direction: column; gap: 8px; }

/* ---- round 18: proof on Done, rating, attendance, trial, features ---- */
.proof-box { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.sign-pad { position: relative; }
.sign-pad canvas { width: 100%; height: 150px; background: #fff; border: 1px solid var(--border); border-radius: 10px; touch-action: none; cursor: crosshair; display: block; }
.sign-pad .sign-clear { position: absolute; right: 6px; top: 6px; }
.proof-preview { max-width: 160px; max-height: 120px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); }
.proof-list { display: flex; flex-wrap: wrap; gap: 12px; }
.proof-item { display: flex; flex-direction: column; gap: 4px; width: 180px; font-size: 12px; color: var(--text-2); text-decoration: none; }
.proof-item img { width: 180px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.stars { color: #f5a623; letter-spacing: 1px; }
.rate-big .stars { font-size: 30px; }
.rate-stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; margin: 6px 0 16px; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { font-size: 40px; color: #d6d9e0; cursor: pointer; transition: transform .1s; }
.rate-stars label:hover, .rate-stars label:hover ~ label, .rate-stars input:checked ~ label { color: #f5a623; }
.rate-stars input:focus-visible + label { outline: 2px solid var(--orange-500); border-radius: 6px; }
.att-today { display: flex; flex-direction: column; gap: 10px; }
.att-times { display: flex; gap: 10px; flex-wrap: wrap; }
.att-times div { flex: 1; min-width: 90px; background: var(--bg, #f6f7fb); border-radius: 10px; padding: 8px 12px; }
.att-times small { display: block; color: var(--text-2); font-size: 12px; }
.att-times b { font-size: 18px; }
.att-btn { min-height: 44px; font-size: 15px; }
.att-strip { margin-bottom: 16px; }
.icon-link { font-size: 12px; margin-left: 4px; }
.wa-open, .trial-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wa-open span, .trial-bar span { flex: 1; min-width: 200px; }
.feat-form .feat-group { border-top: 1px solid var(--border); padding: 12px 0; display: flex; flex-direction: column; gap: 2px; }
.feat-form .feat-group:first-of-type { border-top: 0; padding-top: 0; }
.trial-btn { margin-top: 10px; }
/* round 19: owner company page - free trial days */
.trial-box { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line, #e5e7eb); border-radius: 12px; }
.trial-box .trial-days { margin: 10px 0 0; }
/* round 20: manager ticks (Staff > Add / Edit) and Settings > Add work & Done options */
.perms-box{border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:10px 14px 12px;margin:6px 0 10px}
.perms-box legend{font-weight:600;padding:0 6px}
.perms-grid,.opts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:6px 18px;margin:4px 0 8px}
.opts-col h3{font-size:14px;margin:6px 0 4px}

/* ---------- round 21: settings pages in one tidy column + section chips ---------- */
.settings-grid { display: flex; flex-direction: column; gap: 20px; max-width: 980px; margin: 0 auto; width: 100%; }
.settings-grid > .stack { width: 100%; }
.settings-grid .card { scroll-margin-top: 70px; }
.set-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; margin: -6px 0 -6px; background: var(--bg); scrollbar-width: thin; }
.set-nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.set-nav a:hover, .set-nav a.on { border-color: var(--navy-700); color: var(--navy-700); background: var(--surface-2); }
.set-nav a i { font-size: 12px; opacity: .8; }
.sec-title { display: flex; align-items: center; gap: 8px; }
.feat-form .feat-group > b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.feat-form .feat-group > b i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--navy-700); font-size: 13px; flex: none; }
.feat-form .check, .opts-col .check, #workopts .check { align-items: flex-start; margin-bottom: 8px; line-height: 1.4; }
.feat-form .check input, .opts-col .check input, #workopts .check input { margin-top: 2px; flex: none; }
.feat-form > .btn { margin-top: 6px; }
@media (min-width: 900px) { .feat-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; } .feat-form .feat-group:nth-of-type(2) { border-top: 0; padding-top: 0; } .feat-form > .btn, .feat-form > input { grid-column: 1 / -1; justify-self: start; } }

/* company lists: small icon buttons with a tooltip (no text) */
.icon-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.icon-acts .ia { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; font-size: 14px; padding: 0; position: relative; }
.icon-acts .ia:hover { background: var(--surface-2); }
.icon-acts .ia.open { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.icon-acts .ia.go { color: var(--green); }
.icon-acts .ia.warn { color: var(--orange-600); }
.icon-acts .ia.del { color: #dc2626; }
.icon-acts form { display: inline; margin: 0; }
.icon-acts .ia[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); right: 0; background: var(--navy-900); color: #fff; font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 20; }

/* round 21: pay with a UPI app (phone) or the QR (computer) */
.upi-pay { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.upi-apps { display: none; grid-template-columns: 1fr 1fr; gap: 8px; }
.upi-app { justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.upi-app:hover { background: var(--surface-2); }
.upi-qr-toggle { display: none; align-self: center; }
.upi-pay.is-phone .upi-apps { display: grid; }
.upi-pay.is-phone .upi-qr-toggle { display: inline-flex; }
.upi-pay.is-phone .upi-qr { display: none; }
.upi-pay.is-phone.show-qr .upi-qr { display: block; }
.upi-apps .upi-app:last-child { grid-column: 1 / -1; }
.modal-box.nudge { animation: nudge .3s ease; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* website language: English | ગુજરાતી (core/i18n.php) */
html[lang="gu"] body { font-family: 'Inter', 'Noto Sans Gujarati', 'Nirmala UI', 'Shruti', 'Segoe UI', system-ui, sans-serif; }
[lang="gu"] { font-family: 'Inter', 'Noto Sans Gujarati', 'Nirmala UI', 'Shruti', 'Segoe UI', system-ui, sans-serif; }
html[lang="hi"] body, [lang="hi"] { font-family: 'Inter', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', 'Segoe UI', system-ui, sans-serif; }   /* round 39 */
.lang-switch { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; line-height: 1.2; }
.lang-switch a { text-decoration: underline; text-underline-offset: 3px; }
.lang-switch b { font-weight: 700; }
.lang-switch .sep { opacity: .45; }
.side-lang { padding: 10px 6px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.08); color: #c9cae6; justify-content: flex-start; }
.side-lang i { width: 18px; text-align: center; opacity: .85; }
.side-lang a { color: #c9cae6; } .side-lang a:hover { color: #fff; } .side-lang b { color: #fff; }
.auth-lang { justify-content: flex-end; margin-bottom: 10px; color: var(--text-2); }
.auth-lang a { color: var(--navy-700, inherit); }
html[lang="gu"] .nav a { padding-top: 9px; padding-bottom: 9px; line-height: 1.35; }
html[lang="gu"] .btn { line-height: 1.35; }

/* round 21: 🎤 voice typing */
.vt-row { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; position: relative; }
.vt-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--navy-700); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.vt-btn { width: 34px; height: 30px; justify-content: center; padding: 0; font-size: 14px; }
.vt-cfg { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface-2, #f8fafc); color: var(--muted, #6b7280); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; }
.vt-btn.on { background: #dc2626; border-color: #dc2626; color: #fff; animation: vtpulse 1s infinite; }
.vt-btn.busy { opacity: .6; }
@keyframes vtpulse { 50% { box-shadow: 0 0 0 6px rgba(220,38,38,.18); } }
.vt-menu { position: absolute; right: 0; top: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 210px; font-size: 13px; }
.vt-menu label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vt-menu select { padding: 4px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }

/* round 22: two moving lines on top of every page (owner / reseller messages) */
.ticker { width: 100%; overflow: hidden; font-size: 13.5px; line-height: 1; position: relative; z-index: 5; }
.tk-row { overflow: hidden; white-space: nowrap; padding: 7px 0; }
.tk-row.tk1 { background: var(--navy-800, #1e1b4b); color: #fff; font-weight: 600; }
.tk-row.tk2 { background: #fff4e5; color: #9a3412; border-bottom: 1px solid #fed7aa; }
.tk-move { display: inline-flex; animation: tk-left var(--tk-dur, 30s) linear infinite; will-change: transform; }
.tk-row.tk2 .tk-move { animation-name: tk-right; }
.tk-item { display: inline-block; min-width: 100vw; padding-right: 80px; box-sizing: border-box; }
.tk-item i { margin-right: 6px; opacity: .85; }
.tk-row.tk1 .tk-item i { color: #fbbf24; }
.ticker:hover .tk-move, .ticker:focus-within .tk-move { animation-play-state: paused; }
@keyframes tk-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tk-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
body > .ticker { position: relative; }

/* round 23: settings menu on the left, one section at a time */
.settings-grid.tabbed { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 24px; row-gap: 0; max-width: 1240px; align-items: start; }
.settings-grid.tabbed > *:not(.set-menu) { grid-column: 2; }
.settings-grid.tabbed > .stack { gap: 0; }
.settings-grid.tabbed .card[hidden] { display: none !important; }
.set-menu { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.set-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; border-left: 3px solid transparent; }
.set-menu a i { width: 18px; text-align: center; color: var(--text-3); font-size: 14px; flex: none; }
.set-menu a:hover { background: var(--surface-2); }
.set-menu a.on { background: var(--surface-2); color: var(--navy-700); border-left-color: var(--orange-600); }
.set-menu a.on i { color: var(--orange-600); }
.set-menu a.set-all { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; font-weight: 500; color: var(--text-3); font-size: 13px; }
.set-menu a.warn span::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 6px; vertical-align: middle; }
@media (max-width: 900px) {
  .settings-grid.tabbed { display: flex; flex-direction: column; gap: 14px; }
  .set-menu { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: thin; }
  .set-menu a { flex: none; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
  .set-menu a.on { border-bottom-color: var(--orange-600); }
}
/* round 23: owner "Email backups" panel */
.mail-panel .mail-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mail-step h3, .mail-head-row h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 10px; color: var(--navy-700); }
.step-no { width: 24px; height: 24px; border-radius: 50%; background: var(--orange-600); color: #fff; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.mail-more { margin: 6px 0 10px; } .mail-more summary { cursor: pointer; font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 8px; flex-wrap: wrap; }
.seg-opt { cursor: pointer; position: relative; } .seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; border-right: 1px solid var(--border); }
.seg-opt:last-child span { border-right: 0; }
.seg-opt input:checked + span { background: var(--navy-700); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--orange-600); outline-offset: -2px; }
.mail-actions { margin-top: 12px; flex-wrap: wrap; }
.mail-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.mail-head-row h3 { margin: 0; }
.mail-list input[type=email] { min-width: 200px; width: 100%; padding: 7px 10px; font-size: 14px; }
.mail-list select { padding: 7px 8px; font-size: 14px; }
.mail-list tr.row-warn td { background: rgba(220, 38, 38, .05); }
.mail-why { color: var(--red); margin-top: 3px; max-width: 260px; }
@media (max-width: 900px) { .mail-panel .mail-steps { grid-template-columns: 1fr; } }
/* round 23: big tick for the moving lines */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; margin-bottom: 14px; font-weight: 600; font-size: 15px; user-select: none; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--orange-600); cursor: pointer; flex: none; margin: 0; }

/* round 25: functions per company (Company rules, New / Edit company), WhatsApp send */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; margin-bottom: 10px; }
.policy-col { display: flex; flex-direction: column; gap: 2px; }
.policy-col > b { font-size: 13px; color: var(--navy-700, #10214f); margin: 6px 0 2px; }
.policy-col .check.muted { opacity: .6; }
.policy-h { font-size: 14px; margin: 14px 0 6px; }
.policy-set { margin-bottom: 10px; }
.policy-more { margin-top: 6px; }
.policy-more summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--green, #16a34a); cursor: pointer; font: inherit; }
.linkish:hover { text-decoration: underline; }
.aw-wa { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #ecfdf3; }
.wa-what { margin-bottom: 12px; }
.def-staff { margin-left: 6px; }
.policy-col .check { margin-bottom: 4px; }
.text-green { color: var(--green); font-weight: 600; }
/* round 27: WhatsApp message example in Settings */
.wm-example { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; background: #e7fbe9; border: 1px solid #b7e4bd; border-radius: 10px; padding: 10px 12px; font: 13px/1.45 system-ui, sans-serif; color: #12301a; max-height: 360px; overflow: auto; }
.wamsg-grid .feat-group input[type=text] { font-size: 13px; }
.wamsg-grid > *, #wamsg .grid-2 > * { min-width: 0; }
@media (max-width: 900px) { .settings-grid.tabbed > * { min-width: 0; max-width: 100%; } }
/* round 28: tick lists (groups, show to) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.check-grid .check { margin-bottom: 8px; min-width: 0; overflow-wrap: anywhere; }

/* ---------- round 29: quick buttons, requests on the dashboard, per-person ticks, chat ---------- */
.quick-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.quick-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid var(--border); font-weight: 600; font-size: 15px; transition: transform .12s ease, box-shadow .12s ease; min-height: 58px; }
.quick-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.quick-btn i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; flex: none; }
.quick-btn.q-add i { background: var(--orange-100); color: var(--orange-600); }
.quick-btn.q-send i { background: var(--navy-100); color: var(--navy-700); }
.quick-btn.q-works i { background: var(--blue-bg); color: var(--blue); }
.quick-btn.q-chat i { background: var(--green-bg); color: var(--green); }
.quick-btn.q-req i { background: var(--violet-bg); color: var(--violet); }
.quick-btn .chat-badge { margin-left: 4px; }
.dash-req { margin-bottom: 16px; }
.req-list { list-style: none; }
.req-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.req-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--orange-100); color: var(--orange-600); display: grid; place-items: center; flex: none; }
.req-item[data-kind="approval"] .req-ic { background: var(--violet-bg); color: var(--violet); }
.req-item[data-kind="accept"] .req-ic { background: var(--blue-bg); color: var(--blue); }
.req-txt { flex: 1; min-width: 200px; }
.req-act { display: flex; gap: 6px; flex-wrap: wrap; }
.rights-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: var(--surface-2); }
.rights-box legend { padding: 0 6px; font-weight: 600; }
.rights-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }
.rights-col { display: flex; flex-direction: column; gap: 4px; }
.rights-col b { font-size: 13px; color: var(--navy-700); margin-bottom: 2px; }
.check-line { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 2px 0; }
.wa-way { margin: 8px 0 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--navy-100); color: var(--navy-800); font-size: 13.5px; }
.wa-own { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; }
.wa-own legend { padding: 0 6px; font-weight: 600; }

.chat-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; }
.chat-dock { position: fixed; right: 18px; bottom: 18px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-fab { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 18px; border-radius: 999px; background: var(--navy-800); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); }
.chat-fab:hover { background: var(--navy-700); }
body:has(.modal.open) .chat-dock:not(.open) { display: none; }
body:has(.aw-actions) .chat-dock { bottom: 88px; }
.chat-panel { width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 110px); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-panel-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: linear-gradient(90deg, var(--navy-800), var(--navy-700)); color: #fff; }
.chat-panel-head b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-panel-head .icon-btn { color: #fff; background: transparent; }
.chat-panel-head small { color: rgba(255,255,255,.75); }
.chat-panel-head .btn { padding: 2px 8px; color: #fff; border-color: rgba(255,255,255,.4); }
.chat-panel-foot { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chat-panel-foot .btn { flex: 1; justify-content: center; }
.chat-rooms { flex: 1; overflow-y: auto; }
.chat-room { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.chat-room:hover, .chat-room.active { background: var(--surface-2); }
.chat-room.unread b { color: var(--navy-900); }
.chat-room-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-room-txt small, .chat-room-meta small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.chat-msgs[hidden] { display: none; }
.chat-msg { max-width: 82%; align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 7px 11px; }
.chat-msg b { display: block; font-size: 12px; color: var(--orange-600); }
.chat-msg small { display: block; font-size: 11px; color: var(--text-3); text-align: right; }
.chat-msg.mine { align-self: flex-end; background: var(--navy-100); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.chat-body { white-space: normal; word-wrap: break-word; }
.chat-body a { color: var(--blue); text-decoration: underline; }
.chat-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-form[hidden] { display: none; }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; min-height: 40px; max-height: 120px; }
.chat-empty { text-align: center; padding: 30px 16px; color: var(--text-2); }
.chat-empty i { font-size: 30px; color: var(--text-3); margin-bottom: 8px; }
.chat-page { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 170px); min-height: 460px; overflow: hidden; }
.chat-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-height: 0; }
.chat-side-head { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.chat-pick { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pad { padding: 12px 16px; }
@media (max-width: 760px) {
  .chat-page { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; height: auto; }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .chat-main { min-height: 420px; }
  .chat-dock { right: 12px; bottom: 12px; }
  .chat-fab span:not(.chat-badge) { display: none; }
  .quick-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.policy-sub{grid-column:1/-1;font-size:13px;color:var(--navy-700);margin:10px 0 2px}
/* round 30: login with mobile number (pairing code) */
.pair-code { font: 700 34px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 6px; text-align: center; padding: 18px 10px; margin: 6px 0 12px;
  background: var(--surface-2, #f4f5fb); border: 2px dashed var(--green, #16a34a); border-radius: 14px; color: var(--text); }
.wa-pair { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .wa-pair .field { flex: 1 1 200px; margin: 0; }
/* round 30: files in chat */
.chat-attach { flex: none; cursor: pointer; align-self: center; }
.chat-file-pick { position: absolute; left: 8px; right: 8px; bottom: 100%; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 8px; box-shadow: var(--shadow); }
.chat-file-pick[hidden] { display: none; }
.chat-form { position: relative; }
.chat-img img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; margin: 4px 0; }
.chat-file { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.chat-file audio { max-width: 220px; height: 34px; }
.chat-file.gone { color: var(--text-3); font-style: italic; }
.chat-file small { color: var(--text-3); }
/* round 30: chat report */
.chat-report td.msg { max-width: 420px; white-space: normal; word-wrap: break-word; }
/* round 30: tap-to-pay page */
.pay-card { max-width: 420px; }
.pay-big { text-align: center; font-size: 38px; font-weight: 800; color: var(--navy-900); margin: 6px 0 4px; }
.pay-card .upi-qr canvas { display: block; margin: 8px auto; max-width: 100%; }

/* round 30: group question + transfer button */
.gmode-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gmode-opt{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:14px;border:2px solid var(--border);border-radius:12px;background:var(--card,#fff);cursor:pointer;font:inherit;color:inherit}
.gmode-opt i{font-size:22px;color:var(--navy-700)}
.gmode-opt span{font-size:13px;color:var(--muted,#667)}
.gmode-opt:hover,.gmode-opt.on{border-color:var(--orange-500)}
@media (max-width:520px){.gmode-pick{grid-template-columns:1fr}}
.tr-btn{margin:6px 0 10px}
/* round 30: 🖥 Website / 📱 App ticks next to every tick */
.pl-ticks{display:inline-flex;gap:6px;margin:0 0 8px 24px;flex-wrap:wrap}
.pl-ticks label{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:2px 8px;border:1px solid var(--border);border-radius:999px;cursor:pointer;color:var(--muted,#667);background:var(--card,#fff)}
.pl-ticks label:has(input:checked){border-color:var(--navy-700);color:var(--navy-700);background:rgba(16,33,79,.06)}
.pl-ticks input{margin:0}
.pl-ticks i{font-size:11px}
.rights-col .pl-ticks,.opts-col .pl-ticks{margin:-2px 0 8px 22px}
.pl-row{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:3px 0;border-bottom:1px dashed var(--border)}
.pl-row .pl-ticks{margin:0}
.pl-row .pl-name{font-size:14px}
.plan-pick{max-width:420px}
/* round 31: all rules in lines (Plans, Company rules, New company, ⚙ Rules of a company, admin Rules for staff) */
.rules-box{display:flex;flex-direction:column;gap:10px;margin:6px 0 10px}
.rule-line{border:1px solid var(--border);border-radius:12px;background:var(--card,#fff);overflow:hidden}
.rule-line>summary{display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;background:rgba(16,33,79,.04);font-size:15px;list-style:none}
.rule-line>summary::-webkit-details-marker{display:none}
.rule-line>summary::after{content:"\f078";font-family:"Font Awesome 6 Free";font-weight:900;font-size:11px;margin-left:8px;color:var(--muted,#667)}
.rule-line[open]>summary::after{content:"\f077"}
.rule-line>summary>i{width:18px;text-align:center;color:var(--orange-600)}
.rl-legend{margin-left:auto;font-size:11px;color:var(--muted,#667);font-weight:400}
.rl-body{padding:6px 14px 10px}
.rl-row{display:flex;justify-content:space-between;align-items:center;gap:8px 14px;flex-wrap:wrap;padding:6px 0;border-bottom:1px dashed var(--border)}
.rl-row:last-child{border-bottom:0}
.rl-row .check{margin:0;flex:1 1 260px}
.rl-row .pl-ticks{margin:0}
.rl-row.muted{opacity:.55}
.rl-row.rl-off{opacity:.45}
.rl-fn .check{font-weight:600}
.rl-sets{margin-top:6px;padding:4px 0 0 14px;border-left:3px solid rgba(16,33,79,.12)}
.rl-sub{display:block;color:var(--muted,#667);font-size:12px;margin:2px 0 2px}
.rl-set .pl-name,.rl-lab{font-size:14px;flex:1 1 240px;margin:0}
.rl-set select{max-width:340px;flex:1 1 220px}
.rl-num{max-width:110px}
.set-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.set-tabs a{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--border);border-radius:999px;font-size:13px;color:var(--text,#222);background:var(--card,#fff);text-decoration:none}
.set-tabs a.on{background:var(--navy-700,#10214f);border-color:var(--navy-700,#10214f);color:#fff}
.set-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.set-links a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--border);border-radius:12px;text-decoration:none;color:var(--text,#222);background:var(--card,#fff)}
.set-links a i{color:var(--orange-600);width:18px;text-align:center}
.set-links a small{display:block;color:var(--muted,#667);font-size:12px}
.tr-mark{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:1px 8px;border-radius:999px;background:rgba(16,33,79,.07);color:var(--navy-700,#10214f)}
.tr-mark.done{background:rgba(22,163,74,.12);color:#15803d}
@media (max-width:640px){.rl-legend{display:none}.rl-sets{padding-left:8px}}

/* ---------- round 32: Add work = kind first, boxes with own size / order, many places, small GPS ---------- */
.wk-form { max-width: 1100px; display: flex; flex-direction: column; gap: 16px; }
.wk-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wk-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy-900, #10214F); font-weight: 600; text-decoration: none; font-size: 14px; }
.wk-chip:hover { border-color: var(--navy-700, #1d3a8a); }
.wk-chip.on { background: var(--navy-800, #13285f); border-color: var(--navy-800, #13285f); color: #fff; }
.wk-set { margin-left: auto; font-size: 13px; color: var(--muted, #667); text-decoration: none; }
.wk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; align-items: start; }
.wk-box { min-width: 0; }
.wk-box.sz-s { grid-column: span 1; }
.wk-box.sz-m { grid-column: span 2; }
.wk-box.sz-l { grid-column: 1 / -1; }
.wk-box.wk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.wk-box .field { margin-bottom: 12px; }
@media (max-width: 760px) { .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wk-box.sz-m, .wk-box.wk-two { grid-column: 1 / -1; } .wk-box.wk-two { grid-template-columns: 1fr; } }
.wk-multi { margin: 0 0 8px; }
.stops-edit { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; margin-bottom: 12px; }
.stops-edit ol { margin: 0 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.stop-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.2fr) auto; gap: 6px; align-items: center; }
.stop-row.done input { background: #f1f5f9; color: var(--muted, #667); }
@media (max-width: 760px) { .stop-row { grid-template-columns: 1fr auto; } .stop-row .stop-loc, .stop-row .stop-at { grid-column: 1 / 2; } }
.loc-mini input[data-gps] { max-width: 100%; padding-right: 8px; font-size: 13px; }
.loc-mini .gps-mini-row { display: flex; gap: 6px; align-items: center; }
.loc-mini .gps-mini-row input { flex: 1; min-width: 0; height: 36px; }
.loc-mini .gps-fill { margin: 0; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.loc-mini small { font-size: 12px; }
/* places on the work page */
.stops { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stop { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.stop.done { background: #f0fdf4; border-color: #bbf7d0; }
.stop.done .stop-main b { text-decoration: line-through; color: var(--muted, #667); }
.stop-did { color: var(--green, #15803d); margin-top: 2px; }
.stop-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stop-note { width: 170px; height: 34px; font-size: 13px; }
.stop-time summary { list-style: none; cursor: pointer; display: inline-flex; }
.stop-time[open] { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wk-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.wk-boxes td, .wk-boxes th { vertical-align: middle; }
.wk-boxes .wk-def { max-width: 210px; height: 34px; }
.wk-num { width: 80px; height: 34px; }
.wk-boxes .wk-size { height: 34px; }
.kind-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.kind-row.on-edit { border-color: var(--navy-700, #1d3a8a); box-shadow: 0 0 0 2px #e0e7ff; }
.kind-row .field { margin: 0; }
@media (max-width: 760px) { .kind-row { grid-template-columns: 1fr; } }
/* 24-hour date & time box */
.t24-wrap { display: flex; gap: 6px; align-items: center; }
.t24-wrap input[data-t24] { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.t24-cal { position: relative; display: inline-flex; }
.t24-cal input[type=date] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.stop-row input, .stop-note, .stop-time input, .wk-boxes input:not([type=checkbox]), .wk-boxes select, .kind-row select {
  width: 100%; height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: inherit; }
.stop-row input:focus, .stop-note:focus, .stop-time input:focus, .wk-boxes input:focus, .wk-boxes select:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(43,42,117,.12); }
.stop-row .t24-wrap { min-width: 0; }
.stop-note { width: 170px; }
.stop-time input { width: auto; }
/* round 32: chat edit + storage */
.chat-msg .chat-edit{float:right;margin:-2px -4px 0 6px;opacity:.55;padding:2px 4px}
.chat-msg .chat-edit:hover{opacity:1}
.chat-edited{font-style:italic}
.wv-all{max-width:560px;margin-bottom:10px}
/* round 32: Add work in two columns on a laptop (Customer + Work | When & who + files) */
.aw-cols { display: flex; flex-direction: column; gap: 16px; }
.aw-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1180px) {
  .aw-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .aw-cols .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aw-cols .wk-box.sz-m, .aw-cols .wk-box.sz-l { grid-column: 1 / -1; }
  .aw-cols .stop-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .aw-cols .stop-row .stop-title { grid-column: 1 / 3; grid-row: 1; }
  .aw-cols .stop-row .stop-del, .aw-cols .stop-row .chip { grid-column: 3; grid-row: 1; }
  .aw-cols .stop-row .stop-loc { grid-column: 1; grid-row: 2; }
  .aw-cols .stop-row .stop-at, .aw-cols .stop-row .t24-wrap { grid-column: 2 / 4; grid-row: 2; }
}
/* round 33: kind as a list / popup, multi work route, transfer work, kind settings */
.wk-pick-sel { gap: 10px; }
.wk-pick-sel select { min-width: 220px; max-width: 100%; }
.wk-ask-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.wk-ask-btn { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 700; text-decoration: none; color: var(--navy-900, #10214F); background: #fff; }
.wk-ask-btn:hover { border-color: var(--navy-700, #1d3a8a); background: #f5f7ff; }
.wk-ask-btn i { font-size: 20px; color: var(--red-600, #c8102e); }
.stop-first { margin: 0 0 6px 4px; }
.route-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.route-line span { padding: 3px 10px; border-radius: 999px; background: #f1f5f9; }
.route-line .r-done { background: #dcfce7; color: #166534; }
.route-line .r-now { background: #fee2e2; color: #991b1b; font-weight: 700; }
.stops .stop.now { border-left: 4px solid #dc2626; padding-left: 8px; }
.chip-now { background: #dc2626 !important; color: #fff !important; }
.stop-now { margin-top: 2px; }
.stop-now b { color: #b91c1c; }
.kind-pick-set { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; padding: 10px 12px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.kind-pick-set .field { margin: 0; min-width: 260px; }
.kind-users { margin-top: 4px; }
.kind-users .check { display: flex; margin: 2px 0; }
.tr-form { max-width: 900px; }
.kind-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.kind-row > .toolbar { grid-column: 1 / -1; }
@media (max-width: 760px) { .kind-row { grid-template-columns: 1fr; } }

/* round 34: kind of work as a normal drop-down box (like Type), default kind in the popup, bell that warns */
.wk-pick-sel { align-items: flex-end; }
.wk-pick-sel .wk-sel-field { margin: 0; min-width: 240px; max-width: 320px; flex: 0 1 320px; }
.wk-pick-sel .wk-sel-field select { width: 100%; min-width: 0; }
.wk-ask-btn.on { border-color: var(--red-600, #c8102e); background: #fff6f6; }
.wk-ask-btn small { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--red-600, #c8102e); text-transform: uppercase; letter-spacing: .04em; }
.wk-ask-btn:focus-visible { outline: 3px solid var(--red-600, #c8102e); outline-offset: 2px; }
#alertBell { position: relative; }
#alertBell[hidden] { display: none; }
#alertBell.bell-warn::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e0a100; box-shadow: 0 0 0 2px #fff; }
.wa-rule .grid-2 { margin-bottom: 6px; }
#waRuleOk { display: flex; flex-wrap: wrap; gap: 6px 16px; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--red-600, #c8102e); outline-offset: 2px; }

/* round 35: own words of each box, ↑ ↓ order, multi work settings, "which place is done?" popup, directions */
.wk-words { min-width: 260px; }
.wk-words input { display: block; width: 100%; margin: 2px 0; padding: 6px 8px; font-size: 13px; }
.wk-words .wk-w-l { font-weight: 600; }
.wk-ord { white-space: nowrap; }
.wk-ord .wk-num { width: 64px; }
.wk-ord .icon-btn { margin-left: 2px; vertical-align: middle; }
#wkBoxes tr.wk-moved { background: #fff6e5; transition: background .6s; }
.wk-under { display: block; margin-top: 4px; }
.stop-set { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.stop-set legend { font-weight: 700; padding: 0 6px; }
.stop-picks { display: grid; gap: 8px; margin-bottom: 12px; }
.stop-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.stop-pick.on { border-color: var(--green-600, #16a34a); background: #f2fbf5; }
.stop-pick.muted { cursor: not-allowed; opacity: .6; }
.stop-wait { margin-left: 6px; }
.stop-note-w { display: inline-flex; align-items: center; gap: 4px; }
.stop-dir { white-space: nowrap; }
#routeAll { margin-left: auto; }
.wk-boxes .wk-size { min-width: 120px; }
.wk-boxes .wk-def { min-width: 120px; }

/* ---------- round 36 ---------- */
/* multi work: small customer box, a note box per place (what to do there), 🎤 on both */
.stop-row, .aw-cols .stop-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stop-row .stop-title-w { flex: 0 1 200px; min-width: 140px; }
.stop-row .stop-task-w { flex: 2 1 240px; min-width: 180px; }
.stop-row .stop-loc { flex: 1 1 170px; min-width: 140px; width: auto; }
.stop-row .stop-at, .stop-row .t24-wrap { flex: 0 1 190px; min-width: 150px; }
.stop-title-w, .stop-task-w { display: flex; align-items: center; gap: 4px; }
.stop-title-w input, .stop-task-w input { flex: 1; min-width: 0; width: auto; }
.stop-title-w .vt-row, .stop-task-w .vt-row { flex: none; margin: 0; }
.stop-task-show { color: var(--navy-700, #2b2a75); margin-top: 2px; }
.stop-pick-task { font-weight: 400; }
.stop-asked { display: inline-block; padding: 4px 0; }
.stop-ask-open { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stop-ask-open[open] input { min-width: 180px; }
/* dashboard: the whole route 1 -> N (wraps when the work has many places) */
.dash-route { margin: 4px 0 2px; white-space: normal; gap: 4px; }
.one-line .dash-route, .one-line .stop-now { white-space: normal; }
.dash-route span { padding: 2px 8px; font-size: .78rem; }
.dash-route .fa-angle-right { color: var(--muted, #8a8fa3); font-size: .7rem; }
.wa-open-list { flex-wrap: wrap; }
.wa-open-btns { display: flex; flex-wrap: wrap; gap: 6px; }
/* 🔔 list */
.notif-wrap { position: relative; }
#notifBell { position: relative; }
.notif-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.notif-count[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); z-index: 80; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border, #e5e7eb); position: sticky; top: 0; background: inherit; }
.notif-tools { display: flex; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy-700, #2b2a75); font-size: .8rem; cursor: pointer; text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; align-items: flex-start; gap: 6px; padding: 9px 10px 9px 12px; border-bottom: 1px solid var(--border, #eef0f4); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: #eef4ff; }
.notif-item.unread .notif-txt b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; margin-right: 6px; vertical-align: middle; }
.notif-item.read { opacity: .62; }
.notif-item.read .notif-txt b { font-weight: 500; }
.notif-go { flex: 1; min-width: 0; display: flex; gap: 10px; color: inherit; text-decoration: none; }
.notif-ic { margin-top: 3px; color: var(--orange-500, #f97316); width: 16px; text-align: center; }
.notif-txt { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; }
.notif-txt span { color: var(--text-2, #475569); overflow-wrap: anywhere; }
.notif-acts { display: flex; gap: 4px; }
.notif-acts .icon-btn.sm { width: 28px; height: 28px; }
.notif-empty { padding: 16px 12px; margin: 0; }
@media (prefers-color-scheme: dark) { .notif-item.unread { background: rgba(37, 99, 235, .14); } }
/* 🎤: language per box */
.vt-menu .vt-only { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.vt-cfg.vt-own { border-color: var(--orange-500, #f97316); color: var(--orange-600, #ea580c); }
.vt-box-table select { min-width: 140px; }
.vt-mine > summary { cursor: pointer; }

/* round 37: 🎤 sits inside the box (bottom right), the language is a small icon next to it (no big GU→GU button) */
.vt-row { display: block; position: relative; height: 0; margin: 0; gap: 0; }
.vt-row > .vt-btn, .vt-row > .vt-cfg { position: absolute; z-index: 2; }
.vt-row > .vt-btn { right: 6px; bottom: 7px; width: 28px; height: 28px; font-size: 13px; border-radius: 50%; }
.vt-row > .vt-cfg { right: 38px; bottom: 10px; width: 22px; height: 22px; padding: 0; justify-content: center; border-radius: 50%; font-size: 12px; background: transparent; border-color: transparent; }
.vt-row > .vt-cfg:hover, .vt-row > .vt-cfg:focus-visible { background: var(--surface-2, #f1f5f9); border-color: var(--border); }
.vt-cfg .vt-lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vt-cfg.vt-own { color: var(--orange-600, #ea580c); }
.vt-cfg.vt-own::after { content: ''; position: absolute; top: 1px; right: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange-500, #f97316); }
input.vt-has, textarea.vt-has { padding-right: 70px !important; }
.vt-menu { top: 4px; }
.vt-menu .vt-all { color: var(--navy-700); font-weight: 600; text-decoration: none; }
.stop-title-w .vt-row, .stop-task-w .vt-row { width: 0; height: auto; align-self: stretch; margin-left: -4px; }
/* round 37: multi work place: customer name readable (about 40%), note next to it (about 60%); on a narrow card each takes its own line */
.stop-row .stop-title-w { flex: 2 1 210px; min-width: 190px; }
.stop-row .stop-task-w { flex: 3 1 260px; min-width: 200px; }
.stop-row .stop-title, .stop-row .stop-task { height: 40px; }
.stop-row .stop-del { flex: none; }
.stop-done-btn { white-space: nowrap; }
/* round 37: My profile (top bar, next to Logout) */
.top-profile { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--navy-700); font-weight: 600; font-size: 13px; text-decoration: none; }
.top-profile:hover, .top-profile.active { border-color: var(--navy-700); }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.me-link { text-decoration: none; color: inherit; border-radius: 10px; }
.me-link:hover { background: rgba(255,255,255,.08); }
@media (max-width: 700px) { .top-profile span:last-child { display: none; } .top-profile { padding: 4px; } }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-grid #me, .profile-grid #rights, .profile-grid #voice { grid-column: 1 / -1; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.prof-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.prof-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.prof-row .field select { min-width: 200px; }
.prof-pass > summary { list-style: none; display: inline-flex; }
.pf-pl { display: inline-flex; gap: 8px; }
.pf-pl .on { color: var(--green, #16a34a); }
.pf-pl .off { color: #cbd5e1; }
.prof-rights .pl-row.muted .pl-name { text-decoration: line-through; }
/* round 37: Add work "one list in my order" (Settings > Forms): every box in one card, in the admin's numbers */
.wk-list-only { display: none; }
.wk-list .aw-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow, none); }
.wk-list .aw-col, .wk-list .aw-card, .wk-list .wk-grid { display: contents; }
.wk-list .aw-card > .sec-title { display: none; }
.wk-list .wk-list-only { display: block; margin-bottom: 6px; }
.wk-list .aw-cols .wk-box.sz-s { grid-column: span 1; }
.wk-list .aw-cols .wk-box.sz-m { grid-column: span 2; }
.wk-list .aw-cols .wk-box.sz-l { grid-column: 1 / -1; }
.wk-list .tr-btn { grid-column: 1 / -1; order: 9999; justify-self: start; margin-bottom: 10px; }
@media (max-width: 760px) { .wk-list .aw-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; } .wk-list .aw-cols .wk-box.sz-m { grid-column: 1 / -1; } }
.wk-no { color: var(--muted, #667); font-weight: 600; }
/* round 38: multi work Done: tick many places / All */
.stop-pick.stop-all { border-style: dashed; font-weight: 600; }
.stop-finish { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.stop-finish[hidden] { display: none; }
/* round 38: box widths in 12 parts (¼ ⅓ ½ ⅔ ¾ full) and heights in lines (Settings > Forms > Size) */
.wk-grid, .wk-list .aw-cols { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.wk-box.sz-s, .wk-list .aw-cols .wk-box.sz-s { grid-column: span 3; }
.wk-box.sz-t, .wk-list .aw-cols .wk-box.sz-t { grid-column: span 4; }
.wk-box.sz-m, .wk-list .aw-cols .wk-box.sz-m { grid-column: span 6; }
.wk-box.sz-u, .wk-list .aw-cols .wk-box.sz-u { grid-column: span 8; }
.wk-box.sz-v, .wk-list .aw-cols .wk-box.sz-v { grid-column: span 9; }
.wk-box.sz-l, .wk-list .aw-cols .wk-box.sz-l { grid-column: 1 / -1; }
@media (min-width: 1180px) {   /* two cards side by side: each card is narrow, so ¼ / ⅓ = half of the card, the rest = full */
  .aw-cols .wk-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .aw-cols .wk-box.sz-s, .aw-cols .wk-box.sz-t { grid-column: span 6; }
  .aw-cols .wk-box.sz-m, .aw-cols .wk-box.sz-u, .aw-cols .wk-box.sz-v, .aw-cols .wk-box.sz-l { grid-column: 1 / -1; }
  .wk-list .aw-cols .wk-box.sz-s { grid-column: span 3; } .wk-list .aw-cols .wk-box.sz-t { grid-column: span 4; } .wk-list .aw-cols .wk-box.sz-m { grid-column: span 6; }
  .wk-list .aw-cols .wk-box.sz-u { grid-column: span 8; } .wk-list .aw-cols .wk-box.sz-v { grid-column: span 9; }
}
@media (max-width: 760px) {
  .wk-grid, .wk-list .aw-cols { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .wk-box.sz-s, .wk-box.sz-t, .wk-list .aw-cols .wk-box.sz-s, .wk-list .aw-cols .wk-box.sz-t { grid-column: span 6; }
  .wk-box.sz-m, .wk-box.sz-u, .wk-box.sz-v, .wk-box.wk-two, .wk-list .aw-cols .wk-box.sz-m, .wk-list .aw-cols .wk-box.sz-u, .wk-list .aw-cols .wk-box.sz-v { grid-column: 1 / -1; }
}
.wk-box[data-h] textarea, .wk-box[data-h] .field > input:not([type=checkbox]):not([type=radio]), .wk-box[data-h] select:not([multiple]) { min-height: calc(var(--wk-h, 1) * 1.55em + 18px); }
.wk-box[data-h] textarea { height: calc(var(--wk-h, 1) * 1.55em + 18px); }
.wk-box[data-h="1"] textarea { resize: vertical; }
.wk-boxes .wk-height { margin-top: 4px; }

/* round 39: mobile of each place (multi work) */
.stop-row .stop-mob { flex: 0 1 150px; min-width: 130px; width: auto; }
/* round 39: page design mode */
.aw-form { position: relative; }
.design-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--border, #d6d9e0); background: transparent; color: var(--muted, #667); font-size: .75rem; padding: 3px 8px; border-radius: 8px; cursor: pointer; margin-left: auto; margin-right: 6px; }
.design-btn:hover { color: var(--navy-700, #2b2a75); border-color: var(--navy-700, #2b2a75); }
.aw-form > .design-btn { position: absolute; top: -34px; right: 0; z-index: 2; }
.designing .wk-box[data-box] { outline: 2px dashed #a5b4fc; outline-offset: 2px; border-radius: 8px; position: relative; padding-top: 30px; cursor: move; background: rgba(238, 242, 255, .35); }
.designing .wk-box.dz-over { outline-color: #16a34a; background: rgba(220, 252, 231, .6); }
.designing .wk-box.dz-moving { opacity: .45; }
.dz-bar { position: absolute; top: 2px; left: 2px; right: 2px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; z-index: 3; }
.dz-bar button { border: 1px solid #c7d2fe; background: #fff; color: var(--navy-700, #2b2a75); border-radius: 6px; width: 26px; height: 24px; padding: 0; cursor: pointer; font-size: .72rem; }
.dz-bar button:hover { background: #eef2ff; }
.dz-grip { color: #818cf8; padding: 0 4px; cursor: grab; }
.dz-size { font-size: .72rem; color: var(--muted, #667); margin-left: auto; }
.dz-panel { grid-column: 1 / -1; order: -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #c7d2fe; background: #eef2ff; border-radius: 10px; position: sticky; top: 64px; z-index: 5; }
.dz-acts { margin-left: auto; display: flex; gap: 6px; }
.dz-saved { grid-column: 1 / -1; order: -2; }
.design-pw { z-index: 200; }
.wk-box:has(> .aw-known[hidden]) { display: none; }   /* round 39: the empty "known customer" line does not push the next box down */
/* round 40: design mode: small icons that show on the box under the mouse, drag with mouse or finger, corner to resize */
.designing .wk-box[data-box] { padding-top: 26px; }
.dz-bar { opacity: .25; transition: opacity .15s; }
.designing .wk-box[data-box]:hover > .dz-bar, .designing .wk-box[data-box]:focus-within > .dz-bar, .designing .wk-box.dz-moving > .dz-bar { opacity: 1; }
@media (hover: none) { .dz-bar { opacity: 1; } }
.dz-bar button { width: 22px; height: 20px; font-size: .62rem; border-radius: 5px; }
.dz-grip { touch-action: none; cursor: grab; padding: 2px 6px; border-radius: 5px; background: #eef2ff; }
.dz-grip:active { cursor: grabbing; }
.dz-resize { position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; display: grid; place-items: center; font-size: .62rem; color: #4f46e5; background: #fff; border: 1px solid #c7d2fe; border-radius: 6px; cursor: nwse-resize; touch-action: none; z-index: 4; }
.dz-ghost { position: fixed; z-index: 300; pointer-events: none; opacity: .85; overflow: hidden; background: #fff; border: 2px solid #6366f1; border-radius: 10px; box-shadow: 0 16px 40px rgba(15, 23, 42, .25); }
.designing .wk-box.dz-over { box-shadow: inset 4px 0 0 #16a34a; }
.designing .wk-box.dz-over-a { box-shadow: inset -4px 0 0 #16a34a; }
.dz-dragging, .dz-dragging * { user-select: none !important; -webkit-user-select: none !important; }

/* ---------- round 41: Setup page by department ---------- */
.setup { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.setup-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); max-height: calc(100vh - 24px); overflow: auto; }
.setup-nav a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.setup-nav a i { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--navy-100); color: var(--navy-700); font-size: 14px; }
.setup-nav a b { display: block; font-size: 14px; font-weight: 600; }
.setup-nav a small { display: block; color: var(--text-3); font-size: 11.5px; line-height: 1.3; }
.setup-nav a:hover { background: var(--surface-2); }
.setup-nav a.active { background: var(--orange-100); border-color: var(--orange-500); }
.setup-nav a.active i { background: var(--orange-500); color: #fff; }
.setup-nav .setup-help { margin-top: 6px; border-top: 1px dashed var(--border); border-radius: 0 0 10px 10px; padding-top: 12px; }
.setup-body { min-width: 0; }
.dept { display: flex; flex-direction: column; gap: 16px; }
.dept[hidden] { display: none; }
.dept-title { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0; }
.dept-title i { color: var(--orange-500); }
.dept-sub { color: var(--text-2); margin: -8px 0 0; }
.dept .settings-grid { max-width: none; margin: 0; }
.dept .stack { display: flex; flex-direction: column; gap: 16px; }
.rules-card .rules-box { margin: 0; }
.rules-card .rule-line > summary { pointer-events: none; }
.rules-card .rule-line > summary::-webkit-details-marker { display: none; }
.rules-save { position: sticky; bottom: 10px; z-index: 30; margin: 16px 0 0 270px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--navy-800); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); }
.rules-save[hidden] { display: none; }
.rules-save span { font-size: 13px; opacity: .9; }
.ctl-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); }
.ctl-row:last-of-type { margin-bottom: 10px; }
.ctl-name { font-weight: 600; }
.ctl-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; background: var(--surface-2); }
.ctl-opt:has(input:checked) { border-color: var(--orange-500); background: var(--orange-100); }
.ctl-opt small { color: var(--text-3); }
.mx-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mx-find { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--surface); flex: 1; max-width: 380px; }
.mx-find input { border: 0; outline: 0; padding: 9px 0; width: 100%; background: transparent; font: inherit; }
.mx-legend { color: var(--text-3); font-size: 12.5px; }
.mx-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.mx-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.mx-table th, .mx-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface); text-align: center; }
.mx-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); vertical-align: bottom; }
.mx-table .mx-first { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 500; min-width: 220px; max-width: 280px; border-right: 1px solid var(--border); }
.mx-table thead .mx-first { z-index: 3; }
.mx-col .mx-name { display: block; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 auto; }
.mx-col small { display: block; color: var(--text-3); font-weight: 400; }
.mx-colbtn { display: inline-flex; gap: 2px; margin-top: 3px; }
.mx-colbtn button, .mx-rowbtn { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; font-size: 11px; padding: 1px 6px; cursor: pointer; color: var(--text-2); }
.mx-rowbtn { float: right; margin-left: 6px; opacity: .5; }
.mx-table tr:hover .mx-rowbtn { opacity: 1; }
.mx-grp th { background: var(--navy-100) !important; color: var(--navy-700); text-align: left; font-weight: 700; position: sticky; left: 0; }
.mx-cell { display: inline-flex; gap: 4px; }
.mx-cell label { display: inline-flex; align-items: center; gap: 2px; padding: 3px 5px; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; color: var(--text-3); }
.mx-cell label:has(input:checked) { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.mx-cell input { width: 14px; height: 14px; margin: 0; }
@media (max-width: 900px) {
  .setup { grid-template-columns: 1fr; }
  .setup-nav { position: sticky; top: 0; z-index: 20; flex-direction: row; overflow-x: auto; padding: 6px; max-height: none; border-radius: 12px; }
  .setup-nav a { flex: none; align-items: center; padding: 7px 10px; }
  .setup-nav a small { display: none; }
  .setup-nav a i { width: 26px; height: 26px; font-size: 12px; }
  .setup-nav .setup-help { margin: 0; border: 0; padding-top: 7px; }
  .rules-save { margin-left: 0; }
  .mx-table .mx-first { min-width: 150px; max-width: 170px; }
}
/* round 41: My profile menu + guide */
.prof-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.prof-nav a { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--text); font-size: 13px; }
.prof-nav a:hover { border-color: var(--orange-500); }
#about { grid-column: 1 / -1; }
.guide [data-gl] { display: none; }
.guide[data-lang="hi"] [data-gl="hi"], .guide[data-lang="gu"] [data-gl="gu"], .guide[data-lang="en"] [data-gl="en"], .guide .guide-lang[data-gl] { display: revert; }
.guide-langs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; margin-bottom: 12px; }
.guide-lang { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font: inherit; cursor: pointer; color: var(--text-2); }
.guide-lang.on { background: var(--orange-500); color: #fff; font-weight: 600; }
.guide-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-bottom: 16px; }
.guide-toc a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13px; }
.guide-toc a i { color: var(--orange-500); width: 18px; text-align: center; }
.guide-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--border); align-items: start; scroll-margin-top: 12px; }
.guide-sec h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.guide-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy-700); color: #fff; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.guide-sec ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.guide-img img { width: 100%; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }
.guide-sec:not(:has(.guide-img)) { grid-template-columns: 1fr; }
@media (max-width: 760px) { .guide-sec { grid-template-columns: 1fr; } }
.setup-nav .setup-all { margin-top: 6px; border-top: 1px dashed var(--border); border-radius: 0 0 10px 10px; padding-top: 12px; }
.setup-nav .setup-all + .setup-help { margin-top: 0; border-top: 0; padding-top: 9px; }
@media (max-width: 900px) { .setup-nav .setup-all { margin: 0; border: 0; padding-top: 7px; } }
body:has(#rulesSave:not([hidden])) .chat-dock { bottom: 84px; }   /* round 41: the chat button stays above the Save rules bar */

/* round 42: exact size typed in Setup (width % of the line, height px) and shift (px) */
@media (min-width: 761px) {
  .wk-box[data-w], .wk-list .aw-cols .wk-box[data-w], .dn-grid .wk-box[data-w] { grid-column: span var(--wk-span, 12) !important; }
}
.wk-box[data-px] textarea, .wk-box[data-px] input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .wk-box[data-px] select { min-height: var(--wk-px); }
.wk-box[data-px] textarea { height: var(--wk-px); }
.wk-box[data-off] { position: relative; left: var(--wk-dx, 0); top: var(--wk-dy, 0); }
.wk-exact { display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); gap: 4px 6px; min-width: 170px; }
.wk-ex { display: flex; flex-direction: column; font-size: 11px; color: var(--muted, #667); gap: 2px; }
.wk-ex input { width: 100%; padding: 4px 6px; font-size: 13px; }
.wk-boxes td.wk-ord input { width: 56px; text-align: center; font-weight: 700; }
/* round 42: the part titles (Customer, Work, When & who) are boxes too: in "one list" / design they take their own line and can be moved */
.aw-form.wk-list .aw-card > .sec-title.wk-head { display: flex; grid-column: 1 / -1; margin: 6px 0 10px; }
.aw-form .aw-card > .sec-title.wk-head[data-hide] { display: none; }
.aw-form.designing .aw-card > .sec-title.wk-head[data-hide] { display: flex; opacity: .45; }
.aw-form.wk-list .aw-extras > .sec-title { display: none; }
.designing .wk-head .dz-name { outline: 1px dashed var(--orange-500, #e8913a); padding: 0 4px; border-radius: 4px; cursor: text; }
.dz-panel .dz-saves { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; width: 100%; }
.dz-panel .dz-saves select { max-width: 220px; padding: 4px 8px; }

/* round 43: help videos (▶ Video next to the page title, list in My profile) + Setup patterns */
.vid-help { display: inline-block; position: relative; margin-left: 10px; vertical-align: middle; font-size: .8rem; font-weight: 600; }
.vid-help > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.vid-help > summary::-webkit-details-marker { display: none; }
.vid-help > summary b { background: #dc2626; color: #fff; border-radius: 999px; padding: 0 6px; font-size: .7rem; }
.vid-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: min(340px, 86vw); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 8px; display: grid; gap: 6px; }
.vid-card { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.vid-card:hover { border-color: #fca5a5; background: #fff7f7; }
.vid-card img { width: 112px; height: 63px; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.vid-card .vid-ic { width: 112px; height: 63px; border-radius: 8px; flex: none; display: grid; place-items: center; background: #fee2e2; color: #dc2626; font-size: 1.6rem; }
.vid-card b { display: block; font-size: .85rem; font-weight: 600; line-height: 1.3; }
.vid-card small { display: block; color: var(--text-2); font-size: .72rem; font-weight: 400; margin-top: 2px; }
.vid-list { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.vid-h { font-size: .8rem; color: var(--text-2); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.vid-row { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.vid-row .vid-card { flex: 1 1 280px; border: 0; padding: 0; }
.vid-row .vid-acts { display: flex; gap: 4px; align-items: center; }
.vid-row .vid-acts form { margin: 0; }
.pat-steps { margin: 10px 0 6px 20px; display: grid; gap: 4px; }
.pat-row { padding: 12px 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.pat-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pat-acts form { display: flex; gap: 4px; align-items: center; margin: 0; flex-wrap: wrap; }
.pat-many { width: 100%; } .pat-many > summary { list-style: none; display: inline-flex; } .pat-many > summary::-webkit-details-marker { display: none; }
.pat-many-form { display: block !important; margin-top: 8px !important; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2, #f8f9fc); }
.pat-co-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; margin: 6px 0; }
.pat-acts select, .pat-acts input { max-width: 200px; padding: 5px 8px; font-size: .8rem; }
.pat-undo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; margin: 0; }
@media (max-width: 760px) { .vid-help > summary span { display: none; } .vid-card img, .vid-card .vid-ic { width: 88px; height: 50px; } }
/* round 43: website inside the Android app */
.k-pick { border: 1px solid var(--border); background: var(--surface-2); color: var(--orange-600); border-radius: 8px; width: 38px; min-height: 38px; margin-left: 6px; flex: none; cursor: pointer; vertical-align: middle; }
.in-app #alertBell, .in-app .pwa-install, .in-app .app-dl-banner { display: none !important; }
.in-app .topbar { padding-top: max(8px, env(safe-area-inset-top)); }
.k-pick-wrap { display: flex; align-items: stretch; width: 100%; } .k-pick-wrap > input { flex: 1 1 auto; min-width: 0; }
/* round 48: who sees a box + location way per role */
.wk-who{display:block;margin-top:4px;font-size:12px;min-width:122px;padding:4px 6px}
.wk-locway{display:flex;gap:6px;align-items:center;margin-top:4px}
.wk-locway small{min-width:44px}
.wk-locway select{font-size:12px}
.mx-table td.mx-adm{background:rgba(234,179,8,.08)}
.mx-table th.mx-adm{background:#fdf6dc}
.wa-lock{margin:8px 0;color:var(--muted,#64748b);font-size:14px}

/* round 49: owner's marketing popup (core/marketing.php), locked WhatsApp keys, UPI ID list, promo box */
.mpop { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mpop[hidden] { display: none; }
.mpop-box { position: relative; max-width: min(92vw, 640px); max-height: 92vh; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; }
.mpop-img { display: block; overflow: hidden; }
.mpop-img img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; object-fit: contain; }
.mpop-text { padding: 12px 16px; }
.mpop-text p { margin: 4px 0 0; color: var(--muted, #555); }
.mpop-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; cursor: pointer; z-index: 1; }
.mpop-x:hover { background: #000; }
input.key-locked { background: #f1f5f9; cursor: not-allowed; }
.key-lock-hint { display: block; margin-top: 4px; }
.upi-list .upi-row { margin-bottom: 6px; }
.promo-box { margin-top: 14px; }
.pay-to { text-align: center; margin-bottom: 8px; font-size: 15px; }
[data-keylock-hide][hidden] { display: none !important; }
/* round 49: Staff & access in a plan */
.plan-access [hidden] { display: none !important; }
.plan-access { margin-top: 6px; }
.plan-access .mx-wrap { margin: 6px 0; max-height: 60vh; }
