:root {
  --bg: #f6f4fb;
  --card: #ffffff;
  --text: #1c1830;
  --muted: #6b6785;
  --line: #e6e2f1;
  --pink: #f0147f;
  --pink-soft: #fde6f1;
  --indigo: #3a2fc8;
  --violet: #6a1fd0;
  --violet-soft: #ece6fb;
  --blue-soft: #e4e8fb;
  --lilac: #8b5fbf;
  --lilac-soft: #f1eaf8;
  --grey: #77738f;
  --amber: #b45309;
  --amber-soft: #fdf0dc;
  --good: #16885a;
  --good-soft: #def3e9;
  --bad: #b3261e;
  --brand: linear-gradient(135deg, #ff1493 0%, #6a1fd0 60%, #3a2fc8 100%);
  --shadow: 0 1px 2px rgba(40, 20, 90, .06), 0 6px 16px rgba(40, 20, 90, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Hindi and Marathi: Hind (Indian Type Foundry, SIL Open Font License), added 2026-11-26 to match the Gujarati font */
@font-face { font-family: "Coolma Hindi"; src: url("/fonts/hindi-400.woff2") format("woff2"); font-weight: 100 500; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Coolma Hindi"; src: url("/fonts/hindi-600.woff2") format("woff2"); font-weight: 501 900; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
/* Gujarati: Hind Vadodara (Indian Type Foundry, SIL Open Font License), chosen by the owner 2026-11-26 */
@font-face { font-family: "Coolma Gujarati"; src: url("/fonts/gujarati-400.woff2") format("woff2"); font-weight: 100 500; font-style: normal; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "Coolma Gujarati"; src: url("/fonts/gujarati-600.woff2") format("woff2"); font-weight: 501 900; font-style: normal; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Inter", "Coolma Gujarati", "Coolma Hindi", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif; font-feature-settings: "cv11", "ss01"; }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: 1.45rem; margin: 0; }
h3 { font-size: 1rem; margin: .25rem 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.empty { padding: 1rem; background: var(--card); border: 1px dashed var(--line); border-radius: 12px; margin: 0; }

/* the round logo: always a circle */
.logo-img { border-radius: 50%; object-fit: cover; display: block; background: #fff; }
.side-logo { width: 44px; height: 44px; flex: none; box-shadow: var(--shadow); }
.login-logo { width: 110px; height: 110px; margin: 0 auto; box-shadow: var(--shadow); }

/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; align-self: start; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; line-height: 1.15; }
.brand small { font-weight: 500; color: var(--muted); }
.tabs { display: grid; gap: .25rem; }
.tab { display: flex; justify-content: space-between; align-items: center; text-align: left; border: 0; background: none; border-radius: 10px; padding: .55rem .75rem; min-height: 44px; font-weight: 600; color: var(--text); }
.tab:hover { background: var(--bg); }
.tab.active { background: var(--brand); color: #fff; }
.pill { background: var(--bg); color: var(--muted); border-radius: 999px; padding: 0 .55rem; font-size: .8rem; font-weight: 700; }
.pill.hot { background: var(--pink-soft); color: var(--pink); }
.tab.active .pill { background: rgba(255, 255, 255, .25); color: #fff; }
.who { margin-top: auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.who form { margin-left: auto; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; font-weight: 700; }
main { padding: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; width: 100%; }
.panel { display: grid; gap: 1rem; min-width: 0; }
.page-head { display: grid; gap: .15rem; }
.page-head p { margin: 0; }
.notice { margin: 0; padding: .5rem .75rem; border-left: 4px solid var(--violet); background: var(--violet-soft); border-radius: 6px; font-size: .9rem; }
.alert { margin: 0; padding: .75rem; border-left: 4px solid var(--bad); background: #fbe9e7; border-radius: 6px; }

/* summary tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.tile { background: var(--card); border-radius: 14px; padding: .7rem 1rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: .7rem; border-top: 4px solid var(--line); line-height: 1.2; font-weight: 600; font-size: .9rem; }
.tile-n { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile.tr { border-top-color: var(--bad); } .tile.tr .tile-n { color: var(--bad); }
.tile.td { border-top-color: var(--violet); } .tile.td .tile-n { color: var(--violet); }
.tile.t1 { border-top-color: var(--pink); } .tile.t1 .tile-n { color: var(--pink); }
.tile.t2 { border-top-color: var(--violet); } .tile.t2 .tile-n { color: var(--violet); }
.tile.t3 { border-top-color: var(--indigo); } .tile.t3 .tile-n { color: var(--indigo); }
.tile.t4 { border-top-color: var(--lilac); } .tile.t4 .tile-n { color: var(--lilac); }
.tile.t5 { border-top-color: var(--grey); } .tile.t5 .tile-n { color: var(--grey); }
.tile.t6 { border-top-color: var(--amber); } .tile.t6 .tile-n { color: var(--amber); }

.filters { display: grid; grid-template-columns: 1fr 180px 240px; gap: .5rem; }
.chip { display: inline-block; padding: .1rem .6rem; border-radius: 8px; font-size: .82rem; font-weight: 600; }
.c-born { background: var(--good-soft); color: var(--good); }
.c-exp { background: var(--violet-soft); color: var(--violet); }
.c-back { background: var(--blue-soft); color: var(--indigo); }
.c-unk { background: #efeff4; color: var(--muted); }
.note { background: #fff8e1; border-radius: 8px; padding: .35rem .6rem; font-size: .9rem; }
.who-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.who-row h3 { margin: 0; }
.need { font-size: .82rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: .1rem .5rem; }

/* address in clear lines */
.address { background: var(--bg); border-radius: 10px; padding: .5rem .7rem; }
.address-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.address-head .copy { margin-left: auto; }
.address dl { display: grid; grid-template-columns: 7.5rem 1fr; gap: .1rem .6rem; margin: .35rem 0 0; font-size: .9rem; }
.address dt { color: var(--muted); }
.address dd { margin: 0; font-weight: 600; }
.no-address { margin: 0; padding: .3rem .6rem; border: 1px dashed var(--line); border-radius: 10px; }

/* notes: type, text, who and when */
.notes-list { margin: .3rem 0 0; gap: .35rem; }
.note-item { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; align-items: start; background: #fffaf0; border: 1px solid #f6e7c1; border-radius: 10px; padding: .4rem .6rem; }
.note-item .muted { grid-column: 2; }
.note-text { font-size: .92rem; }
.kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: .1rem .4rem; background: #efeff4; color: var(--muted); align-self: center; }
.k-call { background: var(--violet-soft); color: var(--violet); }
.k-request { background: var(--pink-soft); color: var(--pink); }
.k-address { background: var(--blue-soft); color: var(--indigo); }
.k-payment, .k-delivery { background: var(--good-soft); color: var(--good); }

.b-attempt { background: #fff1e0; color: #a35200; }
.star { color: #c77700; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.avatar.sm { width: 26px; height: 26px; font-size: .8rem; display: inline-grid; vertical-align: middle; margin-right: .3rem; }
table.work td strong { margin-right: .5rem; }
progress.bar { width: 90px; height: 8px; vertical-align: middle; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-form input { width: 12rem; }
.steps { margin: .3rem 0; padding-left: 1.3rem; display: grid; gap: .35rem; font-size: .92rem; }
.steps code { font-size: 1rem; background: var(--bg); padding: .1rem .4rem; border-radius: 6px; letter-spacing: .05em; }
.field textarea { width: 100%; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.team-list li > span:last-child { display: flex; gap: .4rem; flex-wrap: wrap; }
.try-plan { margin: 0; padding: .75rem 1rem .75rem 2.2rem; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); display: grid; gap: .3rem; font-size: .92rem; }
.try-plan strong { display: inline-block; min-width: 9.5rem; color: var(--violet); }
.enquired { margin: -.15rem 0 0; }
.tile.tr { border-top-color: var(--bad); } .tile.tr .tile-n { color: var(--bad); }
.call.gr { border-left-color: var(--bad); }
.gr .why { background: #fbe9e7; }
.open-later, .open-note { color: var(--violet); }

/* pop-ups: add note, call later */
dialog.sheet { border: 0; border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 2rem)); box-shadow: 0 20px 60px rgba(30, 10, 70, .3); color: var(--text); }
dialog.sheet::backdrop { background: rgba(28, 24, 48, .45); }
.sheet-body { padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .7rem; }
.sheet-body h3 { margin: 0; font-size: 1.1rem; }
.sheet-body p { margin: 0; }
.sheet-buttons { display: flex; justify-content: flex-end; gap: .5rem; }
.note-fields { display: grid; gap: .35rem; }
.note-fields label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.note-fields textarea { width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.later-note { display: grid; gap: .35rem; }
.later-note textarea { width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }

/* calendar */
.calendar { border: 1px solid var(--line); border-radius: 14px; padding: .6rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.cal-nav { min-height: 38px; width: 38px; padding: 0; font-size: 1.3rem; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; text-align: center; }
.cal-wd { font-size: .75rem; color: var(--muted); font-weight: 700; padding: .2rem 0; }
.cal-day { min-height: 40px; padding: 0; border-radius: 10px; border: 1px solid transparent; background: var(--bg); font-weight: 600; }
.cal-day:hover:not(:disabled) { border-color: var(--violet); }
.cal-day:disabled { background: none; color: #c7c4d6; cursor: default; }
.cal-day.today { border-color: var(--pink); }
.cal-day.picked { background: var(--brand); color: #fff; }
.cal-picked { font-weight: 700; color: var(--violet); text-align: center; }

/* the opened card */
.detail-grid { display: grid; gap: .9rem; margin-top: .5rem; }
.detail-grid h4 { margin: 0 0 .3rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.detail-grid > * { border-top: 1px solid var(--line); padding-top: .6rem; }
.profile-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.quick { display: flex; flex-wrap: wrap; gap: .3rem; flex-basis: 100%; }
.quick-note { min-height: 30px; padding: .1rem .55rem; font-size: .8rem; border-radius: 999px; background: var(--bg); }
.address-form { display: grid; gap: .4rem; }
.address-form label { display: grid; gap: .1rem; font-size: .85rem; color: var(--muted); }
.address-form .two { display: grid; grid-template-columns: 1fr 9rem; gap: .5rem; }
.address-form button { justify-self: start; }
.profile-form select { width: auto; }
.profile-form input[type=date] { width: auto; }
input[type=search], input[type=text], input[type=number], input[type=password], input[type=date], select { width: 100%; min-height: 44px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--text); }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--violet-soft); border-color: var(--violet); }

/* groups of customers */
/* Each call is its own big block: a coloured banner on top, a tinted area for the customers, and a wide gap before the next one. */
.group { --gc: var(--grey); --gt: #f4f4f8; display: block; margin-top: 2.75rem; border: 2px solid var(--gc); border-radius: 20px; background: var(--gt); overflow: hidden; }
.group:first-of-type { margin-top: 1rem; }
.gr { --gc: var(--bad); --gt: #fdf1ef; } .gd { --gc: var(--violet); --gt: #f4effd; }
.g1 { --gc: var(--pink); --gt: #fff3f9; } .g2 { --gc: var(--violet); --gt: #f4effd; } .g3 { --gc: var(--indigo); --gt: #f0f0fd; }
.g4 { --gc: var(--lilac); --gt: #f6f0fb; } .g5 { --gc: var(--grey); --gt: #f4f4f8; } .g6 { --gc: var(--amber); --gt: #fff8ec; }
.group-head { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; background: var(--gc); color: #fff; }
.group-head h3 { font-size: 1.25rem; margin: 0; color: #fff; }
.group-head p { margin: 0; color: rgba(255, 255, 255, .88); }
.group-head .muted { color: rgba(255, 255, 255, .88); }
.rank { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--gc); font-weight: 800; font-size: 1.25rem; flex: none; }
.count { font-size: .9rem; background: rgba(255, 255, 255, .25); color: #fff; border-radius: 999px; padding: 0 .65rem; vertical-align: middle; border: 0; }
.group > .empty { margin: 1rem; }
.calls { display: grid; gap: 1rem; padding: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.call { background: var(--card); border-radius: 14px; padding: .9rem; min-width: 0; overflow-wrap: anywhere; box-shadow: var(--shadow); border-left: 5px solid var(--line); display: grid; gap: .35rem; align-content: start; }
.call p { margin: .2rem 0; }
.call { border-left: 0; }
.call.leaving { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }
.call-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; font-size: .85rem; }
.phone-row { display: flex; align-items: center; gap: .5rem; }
.copy { min-height: 32px; padding: 0 .6rem; font-size: .8rem; border-radius: 8px; }
.why { background: var(--pink-soft); border-radius: 10px; padding: .45rem .65rem; font-size: .93rem; }
.g2 .why, .gd .why { background: var(--violet-soft); } .g3 .why { background: var(--blue-soft); }
.g4 .why { background: var(--lilac-soft); } .g5 .why { background: #f0f0f4; } .g6 .why { background: var(--amber-soft); }
.b-area { background: var(--amber-soft); color: var(--amber); }
.area-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; padding: .7rem 1.1rem 0; }
.area-chip { min-height: 36px; padding: 0 .8rem; border-radius: 999px; background: #fff; color: var(--amber); border: 1px solid var(--amber); font-weight: 700; font-size: .88rem; }
.area-chip span { background: var(--amber); color: #fff; border-radius: 999px; padding: 0 .45rem; margin-left: .2rem; font-size: .8rem; }
.area-chip:hover { background: var(--amber-soft); }
details { font-size: .92rem; }
summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: .15rem 0; }
.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef0ee; }
.b-interested { background: var(--pink-soft); color: var(--pink); }
.b-price_silent { background: var(--violet-soft); color: var(--violet); }
.b-hi_only { background: var(--blue-soft); color: var(--indigo); }
.b-booked { background: var(--good-soft); color: var(--good); }
.b-replied { background: #fbe9e7; color: var(--bad); }
.b-not_interested, .b-fake { background: #efeff4; color: var(--muted); }
.phone { display: inline-block; font-weight: 700; font-size: 1.15rem; color: var(--indigo); padding: .2rem 0; }
a.phone { text-decoration: none; border-bottom: 2px solid var(--violet-soft); }

/* one-click buttons on each customer */
.actions-bar { display: grid; gap: .5rem; margin-top: .35rem; }
.main-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .4rem; }
.main-row .act { width: 100%; padding: .3rem .4rem; }
.more-row { display: flex; flex-wrap: wrap; gap: .4rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.act.small { min-height: 34px; font-size: .82rem; font-weight: 600; padding: .2rem .65rem; }
.act { min-height: 40px; padding: .3rem .8rem; border-radius: 10px; font-size: .9rem; font-weight: 600; width: auto; }
.act.good { background: var(--good); border-color: var(--good); color: #fff; }
.act.good:hover { filter: brightness(.92); }
.act.bad { color: var(--bad); }
select.act { width: auto; padding: .3rem .5rem; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 600px; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* numbers and tools */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.card { background: var(--card); border-radius: 14px; padding: .85rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: .85rem; }
.big { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.small-big { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.sub-h { margin-top: .5rem; }
.stages { list-style: none; margin: 0; padding: 1rem; display: grid; gap: .5rem; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.stages li { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; align-items: center; gap: .5rem; }
.stage-count { text-align: right; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: .75rem; accent-color: var(--violet); }
.box { background: var(--card); border-radius: 14px; padding: 1rem; box-shadow: var(--shadow); display: grid; gap: .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.team-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; }
.team-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--line); }
button, input, select { font: inherit; }
button { min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); background: var(--card); border-radius: 10px; cursor: pointer; color: var(--text); }
button:hover { border-color: var(--violet); }
button.primary { background: var(--brand); color: #fff; border-color: transparent; font-weight: 700; }
button.primary:hover { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--violet); text-decoration: underline; min-height: 0; padding: 0; }
.field { display: grid; gap: .2rem; margin-bottom: .75rem; max-width: 420px; }
.msg { margin: .25rem 0 0; min-height: 1.5rem; }
.msg.ok { color: var(--good); } .msg.bad { color: var(--bad); }
.plain { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .25rem; font-size: .9rem; }

.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: #1c1830; color: #fff; padding: .65rem 1rem; border-radius: 12px; display: flex; gap: 1rem; align-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 10; max-width: calc(100vw - 2rem); pointer-events: none; } /* buttons under the message can still be pressed */
.toast button { pointer-events: auto; }
.toast .link { color: #ffb3d6; }

/* sign in */
.login { max-width: 380px; margin: 9vh auto; padding: 1.75rem; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); display: grid; gap: .75rem; text-align: center; }
.login form { display: grid; gap: .5rem; text-align: left; }
.login button { margin-top: .4rem; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem .75rem; gap: .5rem; }
  .brand span { display: none; }
  .tabs { display: flex; overflow-x: auto; gap: .25rem; flex: 1 1 100%; order: 3; }
  .tab { white-space: nowrap; gap: .4rem; }
  .who { margin: 0 0 0 auto; }
  main { padding: .75rem; }
  .filters { grid-template-columns: 1fr; }
  .stages li { grid-template-columns: 6.5rem 1fr 2rem; }
  .calls { grid-template-columns: 1fr; }
  .team-form { grid-template-columns: 1fr; }
}

/* follow-up: "call after N days" */
.days-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.days-row label { font-weight: 700; }
.days-row input[type=number] { width: 5.5rem; text-align: center; font-size: 1.1rem; font-weight: 700; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; margin-left: auto; }
.day-chip { min-height: 34px; min-width: 40px; padding: 0 .6rem; border-radius: 999px; background: var(--violet-soft); color: var(--violet); border-color: transparent; font-weight: 700; }
.day-chip:hover { background: var(--violet); color: #fff; }
.toast-btn { min-height: 36px; padding: 0 1rem; border: 2px solid #fff; background: transparent; color: #fff; font-weight: 800; border-radius: 10px; }
.toast-btn:hover { background: #fff; color: #1c1830; }

/* add an enquiry by hand */
.add-btn { width: 100%; min-height: 46px; }
.b-source { background: #e8f4ff; color: #1b5fa8; }
dialog.sheet.wide { width: min(640px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .8rem; }
.form-grid label, .wide-field { display: grid; gap: .2rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.wide-field textarea { width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.next-step { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem; display: grid; gap: .5rem; }
.next-step legend { font-weight: 700; padding: 0 .4rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.choice input { margin-top: .25rem; width: 18px; height: 18px; }
.add-days { margin-left: 1.6rem; }
.or-date { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.or-date input { width: auto; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* mobile number box */
.phone-field { display: flex; align-items: stretch; }
.phone-field .prefix { display: grid; place-items: center; padding: 0 .7rem; background: var(--bg); border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-weight: 700; }
.phone-field input { border-radius: 0 10px 10px 0; font-size: 1.05rem; letter-spacing: .04em; }
.phone-field input.invalid { border-color: var(--bad); background: #fff7f6; }
.field-error { color: var(--bad); font-weight: 600; }

/* Details / Quick call */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.view-toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px; box-shadow: var(--shadow); }
.vt { min-height: 38px; border: 0; background: none; padding: 0 1rem; border-radius: 9px; font-weight: 700; color: var(--muted); }
.vt.active { background: var(--brand); color: #fff; }
#tab-calls:not(.view-quick) .quick-view { display: none; }
#tab-calls.view-quick .detail-view { display: none; }
.howto { background: var(--card); border-radius: 14px; padding: .55rem 1rem; box-shadow: var(--shadow); }
.howto ol { margin: .5rem 0 .3rem; padding-left: 1.3rem; display: grid; gap: .4rem; font-size: .93rem; }
.howto summary { font-weight: 700; color: var(--violet); }

/* the quick-call table: one customer per line */
.quick-view { margin: 1rem; background: var(--card); }
/* a thin line between the columns, so each piece of information has its own place (not after the last column) */

/* the last messages of a chat */
.log-h { margin-top: .6rem; }
.chat-log { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .3rem; }
.chat-log li { border-radius: 10px; padding: .35rem .6rem; font-size: .88rem; display: grid; gap: .1rem; }
.chat-log li.in { background: #fff; border: 1px solid var(--line); }
.chat-log li.out { background: var(--violet-soft); }
.chat-log .who { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chat-log .msg-text { overflow-wrap: anywhere; }

.box.danger { border: 2px solid #f0b8b3; background: #fff8f7; }
.box.danger h3 { color: var(--bad); }

/* Quick call, simple version: Name | City | Mobile | Rent for | Mark the call. Fixed widths, so the header always lines up with the rows. */


/* Quick call: a grid. The header and every row use the very same columns, so they always line up. */
.quick-view { margin: 1rem; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; }
.qtable { --qcols: minmax(150px, 1.5fr) minmax(90px, .9fr) minmax(220px, 1.7fr) minmax(140px, 1fr) minmax(330px, 3.2fr); min-width: 920px; font-size: .95rem; }
.qhead, .qrow { display: grid; grid-template-columns: var(--qcols); align-items: center; }
.qhead > div, .qrow > div { padding: .6rem .8rem; min-width: 0; border-right: 1px solid #d9d4ea; overflow-wrap: anywhere; }
.qhead > div:last-child, .qrow > div:last-child { border-right: 0; }
.qhead { background: #fff; border-bottom: 2px solid #d9d4ea; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qrow { border-bottom: 1px solid var(--line); }
.qrow:nth-child(even) { background: #faf9fd; }
.qrow:hover { background: var(--violet-soft); }
.qrow.leaving { opacity: 0; transition: opacity .25s; }
.qrow .q-rent { line-height: 1.3; }
.qrow .q-rent strong { font-weight: 800; }
.qrow .q-phone a.phone { font-size: 1.05rem; white-space: nowrap; }
.qrow .q-phone .copy { margin: 0 0 0 .3rem; min-height: 26px; }
.qbar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: 0; }
.qbar .act { min-height: 32px; padding: .15rem .55rem; font-size: .8rem; white-space: nowrap; }

.my-count { flex-basis: 100%; font-size: .82rem; color: var(--muted); }
.my-count strong { color: var(--violet); }

/* ===== Phone layout (final rules, so they win over everything above) ===== */
.shell { grid-template-columns: 240px minmax(0, 1fr); }
.side, main, .panel, .group, .calls, .call { min-width: 0; }
/* "clip", not "hidden": hidden turns the page into a scroll box and the side menu then scrolls away with the list */
html, body { max-width: 100%; overflow-x: clip; }

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* a compact top bar: logo, "+ Add enquiry", then your name; the tabs scroll sideways underneath */
  .side { padding: .5rem .6rem; gap: .5rem; align-items: center; position: sticky; top: 0; z-index: 5; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { order: 1; }
  .side .add-btn { order: 2; flex: 1 1 0; width: auto; min-height: 44px; }
  .side .who { order: 3; margin: 0; flex: 0 0 auto; gap: .35rem; }
  .side .who > span:not(.avatar):not(.my-count) { display: none; }
  .side .who .my-count { display: none; }
  .side .tabs { order: 4; flex: 1 1 100%; display: flex; gap: .25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tab { flex: none; white-space: nowrap; min-height: 44px; gap: .45rem; }
  main { padding: .6rem; gap: .8rem; }
  h2 { font-size: 1.25rem; }

  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: .55rem .7rem; }
  .tile-n { font-size: 1.7rem; }
  .filters { grid-template-columns: 1fr; }

  .group { margin-top: 1.6rem; border-radius: 16px; }
  .group-head { padding: .7rem .8rem; gap: .65rem; }
  .group-head h3 { font-size: 1.05rem; }
  .rank { width: 36px; height: 36px; font-size: 1.05rem; }
  .calls { grid-template-columns: minmax(0, 1fr); padding: .7rem; gap: .7rem; }

  /* bigger fingers */
  .act, .act.small, .copy, .day-chip { min-height: 44px; }
  .main-row .act { font-size: .88rem; }
  .more-row .act.small { flex: 1 1 auto; }

  /* Quick call: every customer becomes one small card instead of a wide table */
  .quick-view { margin: .6rem; box-shadow: none; background: transparent; overflow: visible; }
  .qtable { min-width: 0; }
  .qhead { display: none; }
  .qrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name rent" "city rent" "phone phone" "actions actions"; gap: .15rem .6rem; padding: .8rem; margin-bottom: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .qrow:nth-child(even) { background: #fff; }
  .qrow > div { border: 0; padding: 0; }
  .qrow .q-name { grid-area: name; font-size: 1.05rem; }
  .qrow .q-city { grid-area: city; color: var(--muted); }
  .qrow .q-rent { grid-area: rent; text-align: right; }
  .qrow .q-phone { grid-area: phone; margin-top: .4rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
  .qrow .q-phone a.phone { font-size: 1.2rem; }
  .qrow .q-actions { grid-area: actions; margin-top: .5rem; }
  .qbar { gap: .4rem; }
  .qbar .act { flex: 1 1 auto; }

  /* windows that open on top */
  dialog.sheet, dialog.sheet.wide { width: calc(100vw - 1rem); max-width: none; max-height: calc(100dvh - 1rem); overflow-y: auto; border-radius: 16px; margin: auto; }
  .sheet-body { padding: .9rem; }
  .sheet-buttons { position: sticky; bottom: 0; background: #fff; padding-top: .5rem; }
  .days-row { gap: .4rem; }
  .chips { margin-left: 0; flex-basis: 100%; }
  .add-days { margin-left: 0; }
  .toast { left: .5rem; right: .5rem; transform: none; max-width: none; }

  /* lists in the other tabs scroll sideways inside their own box, never the whole page */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .box, .stages { padding: .8rem; }
  .team-form { grid-template-columns: 1fr; }
  .view-toggle { width: 100%; }
  .vt { flex: 1; }
}

/* ===== Phone layout, part 2 ===== */
.phone-field input { flex: 1 1 auto; min-width: 0; width: 100%; }
@media (max-width: 760px) {
  .side { height: auto; min-height: 0; align-content: flex-start; }
  .ico { display: none; }
  .days-row input[type=number] { width: 7rem; }
  /* list tables become one small card per customer */
  table.list-table, table.list-table thead, table.list-table tbody, table.list-table tr, table.list-table td { display: block; min-width: 0; width: 100%; }
  table.list-table { min-width: 0; }
  table.list-table thead { display: none; }
  table.list-table tr { padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
  table.list-table td { padding: .15rem 0; border: 0; }
  table.list-table td[data-label]::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .35rem; }
  table.list-table td[data-label="Customer"] { font-weight: 800; font-size: 1.05rem; }
  table.list-table td[data-label="Customer"]::before { display: none; }
  table.list-table td.row-buttons { margin-top: .5rem; display: flex; gap: .4rem; flex-wrap: wrap; }
  table.list-table td.row-buttons .act { flex: 1 1 auto; }
  .list-wrap { overflow-x: visible; }
}

/* a short page must not stretch the top bar to fill the screen */
.shell { align-content: start; }
@media (max-width: 760px) { .shell { grid-auto-rows: max-content; } }

/* "Show by date" in every section */
.date-filter { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: .7rem .9rem; display: grid; gap: .5rem; }
.df-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.df-title { font-weight: 800; color: var(--violet); }
.df-row label { display: flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--muted); font-weight: 600; }
.df-row input[type=date], .df-row input[type=month] { width: auto; min-height: 40px; }
.df-chip { min-height: 36px; padding: 0 .85rem; border-radius: 999px; background: var(--violet-soft); color: var(--violet); border-color: transparent; font-weight: 700; font-size: .85rem; }
.df-chip:hover, .df-chip.active { background: var(--brand); color: #fff; }
.df-count { font-weight: 700; margin-left: auto; }
.df-hint { margin: 0; }
.df-search { flex: 1 1 260px; }

/* WhatsApp chats (computer screens): the page itself does not scroll, so there is no extra scroll bar on the right. Only the chat list and the messages scroll. */
@media (min-width: 761px) {
  html.wa-fit, html.wa-fit body { height: 100%; overflow: hidden; }
  html.wa-fit .shell { height: 100%; min-height: 0; }
  html.wa-fit main { height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
  html.wa-fit main > * { flex: none; }
  html.wa-fit main > #tab-whatsapp:not([hidden]) { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
  html.wa-fit .wa-app { height: 100%; min-height: 0; }
}

/* The side menu never moves: it is fixed to the window and only the list scrolls. */
@media (min-width: 761px) {
  .side { position: fixed; top: 0; left: 0; width: 240px; height: 100vh; overflow-y: auto; z-index: 5; }
  .shell > main { grid-column: 2; }
}

/* No answer / Follow-ups / Booked / Archive: a clear table with real columns */
@media (min-width: 1101px) {
  table.list-table { min-width: 700px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .93rem; }
  table.list-table th { background: var(--violet-soft); color: var(--violet); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .7rem .9rem; border-right: 1px solid #fff; border-bottom: 2px solid #d9cdf6; }
  table.list-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; }
  table.list-table th:last-child, table.list-table td:last-child { border-right: 0; }
  table.list-table tbody tr:nth-child(even) td { background: #faf9fe; }
  table.list-table tbody tr:hover td { background: #f4effd; }
  table.list-table th:nth-child(1) { width: 17%; }
  table.list-table th:nth-child(2) { width: 160px; }
  table.list-table th:nth-child(3) { width: 16%; }
  table.list-table th:nth-child(5) { width: 300px; }
}
.cust-name { font-size: 1rem; overflow-wrap: anywhere; }
.city-chip { display: inline-block; margin-top: .25rem; padding: .05rem .55rem; border-radius: 999px; background: var(--blue-soft); color: var(--indigo); font-size: .78rem; font-weight: 700; overflow-wrap: anywhere; }
table.list-table a.phone { font-size: 1.02rem; white-space: nowrap; border-bottom: 0; }
table.list-table .c-when strong { white-space: nowrap; }
.main-act { display: block; width: 100%; margin-bottom: .4rem; background: var(--violet-soft); color: var(--violet); border-color: transparent; font-weight: 800; }
.row-booked { font-weight: 800; }
.main-act:hover { background: var(--brand); color: #fff; }
.df-none { margin: 0; }
.fresh-form { display: grid; gap: .6rem; max-width: 420px; }
.fresh-form label { display: grid; gap: .2rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  .df-row input[type=date], .df-row input[type=month] { min-height: 44px; }
  .df-row label { flex: 1 1 140px; }
  .df-row label input { flex: 1; width: 100%; }
  .df-chip { min-height: 44px; }
  .df-count { margin-left: 0; flex-basis: 100%; }
}

/* Points: my score in one line, then one bar per person */
.sparks { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.cele { position: fixed; top: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 31; pointer-events: none; background: var(--brand); color: #fff; font-weight: 800; padding: .55rem 1.1rem; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100vw - 2rem); text-align: center; transition: opacity .3s; }
.cele.big { font-size: 1.4rem; padding: .8rem 1.6rem; }
.cele.gone { opacity: 0; }

/* A short call list top */
.date-filter { padding: .55rem .8rem; }
.df-custom summary { font-size: .85rem; }
.df-custom .df-row { margin-top: .4rem; }
.jump { display: flex; flex-wrap: wrap; gap: .35rem; }
.jump-chip { min-height: 34px; padding: 0 .7rem; border-radius: 999px; font-size: .84rem; font-weight: 600; background: var(--card); color: var(--gc); border: 1px solid var(--gc); }
.jump-chip strong { font-weight: 800; }
.howto { margin-top: .5rem; }

/* The buttons of a list row: all small, side by side */
.row-small { display: contents; }
.row-acts { display: flex; flex-wrap: wrap; gap: .3rem; width: 100%; }
.city-chip { margin-top: 0; margin-left: .25rem; }
.main-row .act { white-space: nowrap; }
@media (min-width: 1101px) {
  table.list-table td { padding: .55rem .8rem; }
  .row-acts .act { min-height: 32px; padding: .1rem .6rem; font-size: .8rem; }
}
/* Medium screens (small laptop, tablet): the same list as cards, in columns, so nothing needs sideways scrolling */
@media (min-width: 761px) and (max-width: 1100px) {
  table.list-table, table.list-table thead, table.list-table tbody, table.list-table tr, table.list-table td { display: block; min-width: 0; width: 100%; }
  table.list-table thead { display: none; }
  table.list-table tr { padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
  table.list-table td { padding: .12rem 0; border: 0; }
  table.list-table td[data-label]:not([data-label="Customer"])::before { content: attr(data-label) ": "; font-size: .78rem; font-weight: 700; color: var(--muted); }
  table.list-table td.row-buttons { margin-top: .4rem; }
}
.row-acts .act, .row-acts .main-act { width: auto; display: inline-block; margin: 0; }
.c-what .note { display: inline-block; margin-top: .2rem; }
@media (max-width: 760px) {
  .row-acts .act { flex: 1 1 auto; }
}

/* Points: friendly competition */
.reward-box { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: .8rem 1.1rem; display: flex; align-items: center; gap: 1.2rem; }
.reward-mine { display: grid; justify-items: center; line-height: 1.15; white-space: nowrap; }
.reward-pts { font-size: 2.2rem; font-weight: 800; color: var(--pink); font-variant-numeric: tabular-nums; }
.reward-streak { font-size: 1.5rem; font-weight: 800; }
.reward-goal { flex: 1 1 auto; display: grid; gap: .2rem; min-width: 0; }
.reward-left { font-weight: 700; }
.reward-bar { width: 100%; height: 14px; accent-color: var(--pink); }
.rank-box { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 1rem 1.2rem; display: grid; gap: 1rem; }
.rank-tabs { display: flex; gap: .4rem; }
.rank-period { display: grid; gap: 1.1rem; }
.rank-you { margin: 0; font-size: 1.15rem; text-align: center; background: var(--violet-soft); color: var(--text); border-radius: 12px; padding: .6rem .9rem; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: .6rem; padding-top: .3rem; }
.pod { flex: 0 1 190px; min-width: 0; display: grid; justify-items: center; gap: .25rem; }
.pod-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #fff; background: var(--violet); }
.pod.me .pod-avatar { background: var(--pink); }
.pod-name { font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.pod-step { width: 100%; border-radius: 12px 12px 0 0; display: grid; justify-items: center; align-content: start; padding-top: .5rem; line-height: 1.15; }
.pod-1 .pod-step { height: 150px; background: #fbe7ae; }
.pod-2 .pod-step { height: 115px; background: #e6e6ef; }
.pod-3 .pod-step { height: 90px; background: #f6dcc6; }
.pod-medal { font-size: 1.5rem; }
.pod-pts { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.pod-unit { font-size: .75rem; color: var(--muted); }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.champ { display: grid; justify-items: center; text-align: center; gap: .05rem; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.champ-icon { font-size: 1.4rem; }
.champ-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.rank-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
table.rank-table { min-width: 0; width: 100%; font-size: .95rem; }
table.rank-table th { background: var(--violet-soft); color: var(--violet); font-size: .74rem; font-weight: 800; text-align: center; padding: .5rem .3rem; border-bottom: 0; }
table.rank-table td { text-align: center; padding: .55rem .3rem; font-variant-numeric: tabular-nums; }
table.rank-table th:nth-child(2), table.rank-table td.rank-name { text-align: left; font-weight: 700; overflow-wrap: anywhere; }
table.rank-table tr:last-child td { border-bottom: 0; }
table.rank-table tr.me td { background: var(--pink-soft); }
.rank-no { width: 2.4rem; font-size: 1.15rem; }
td.rank-pts { font-weight: 800; font-size: 1.1rem; }
.rank-key { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) {
  .reward-box { gap: .7rem; padding: .7rem; }
  .reward-pts { font-size: 1.8rem; }
  .pod-avatar { width: 44px; height: 44px; }
  .pod-1 .pod-step { height: 125px; } .pod-2 .pod-step { height: 100px; } .pod-3 .pod-step { height: 80px; }
  .pod-pts { font-size: 1.3rem; }
  .rank-box { padding: .8rem; }
  table.rank-table th { font-size: .66rem; }
}
@media (max-width: 760px) {
  .champs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .champ { padding: .45rem .2rem; }
  .champ-label { font-size: .7rem; }
}

.confirm-type { display: grid; gap: .3rem; font-size: .92rem; }
#confirm-yes:disabled { opacity: .4; cursor: not-allowed; }

/* Icons */
.svg-defs { position: absolute; }
.ic { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.rank .ic { width: 22px; height: 22px; display: block; }
.star .ic { fill: #f5b81f; stroke: #c77700; }
.vt .ic { color: #f5a400; fill: #ffd34d; }
.vt.active .ic { color: #fff; fill: #fff; }
.tile-ic { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: .5em; color: #fff; vertical-align: middle; flex: none; box-shadow: 0 2px 5px rgba(40, 20, 90, .22); }
.tile-ic .ic { width: 62%; height: 62%; vertical-align: 0; }
.tile-phone { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.tile-enquiry { background: linear-gradient(135deg, #ff4fa3, #a21caf); }
.tile-booked { background: linear-gradient(135deg, #34d399, #059669); }
.tile-trophy { background: linear-gradient(135deg, #fbbf24, #ea7a0c); }
.tile-flame { background: linear-gradient(135deg, #fb923c, #dc2626); }
.tile-target { background: linear-gradient(135deg, #a78bfa, #6a1fd0); }
.medal { width: 1.6em; height: 2.1em; vertical-align: middle; flex: none; }
.tab-label { display: inline-flex; align-items: center; gap: .45rem; }
.tab .tile-ic { font-size: .8rem; }
.reward-line { display: flex; align-items: center; gap: .4rem; font-weight: 700; }
.reward-streak { display: inline-flex; align-items: center; gap: .35rem; }
.reward-streak .tile-ic { font-size: 1rem; }
.rank-you .medal, .rank-you .tile-ic { margin-right: .35rem; }
.pod-medal .medal { width: 34px; height: 44px; }
td.rank-no .medal { width: 24px; height: 31px; display: block; margin: 0 auto; }
.champ-icon { font-size: 1.15rem; }
.rank-key > span { display: inline-flex; align-items: center; gap: .3rem; } /* only the outer one: the tile keeps its own centring */
.rank-key .tile-ic { font-size: .78rem; }
.pod-2 .pod-step { height: 130px; }
.pod-3 .pod-step { height: 112px; }
table.rank-table td.rank-name { overflow-wrap: break-word; }
@media (max-width: 760px) {
  .pod-1 .pod-step { height: 135px; } .pod-2 .pod-step { height: 118px; } .pod-3 .pod-step { height: 104px; }
  .pod-medal .medal { width: 30px; height: 39px; }
}
.tile-ic .ic { display: block; }
.tile-missed { background: linear-gradient(135deg, #fb7185, #dc2626); }
.tile-calendar { background: linear-gradient(135deg, #a78bfa, #6a1fd0); }
.tile-archive { background: linear-gradient(135deg, #94a3b8, #52607a); }
.tab.active .tile-ic { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75); }
a.button-link { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; }
a.button-link:hover { filter: brightness(1.08); }

/* Chat window */
.chat-log { display:flex; flex-direction:column; gap:.4rem; max-height:50vh; overflow-y:auto; padding:.5rem; border:1px solid var(--line, #ddd); border-radius:10px; background:var(--soft, #f6f6f4); }
.bubble { max-width:80%; padding:.4rem .6rem; border-radius:12px; background:#fff; align-self:flex-start; }
.bubble.out { align-self:flex-end; background:#dcf8c6; }
.bubble-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.bubble-meta { margin-top:.15rem; }
.tick.read { color:#1a73e8; }
.tick.failed { color:#b3261e; }
#chat-text { width:100%; box-sizing:border-box; }

/* WhatsApp chats tab: looks like WhatsApp Web */
#tab-whatsapp.wa { padding: 0; }
.wa-app { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; height: calc(100vh - 2.5rem); min-height: 480px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.wa-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fff; }
.wa-list-head { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 1rem .4rem; font-size: 1.1rem; }
.wa-search { padding: .4rem .8rem .6rem; }
.wa-search input { width: 100%; box-sizing: border-box; border: 0; border-radius: 999px; background: #f0f2f5; padding: .55rem .9rem; font-size: .9rem; }
.inbox { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.inbox-row { display: flex; gap: .7rem; padding: .65rem 1rem; cursor: pointer; border-bottom: 1px solid #f1f1f4; }
.inbox-row:hover, .inbox-row:focus-visible { background: #f5f6f6; outline: none; }
.inbox-row.active { background: #f0f2f5; }
.inbox-mid { flex: 1; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; gap: .5rem; }
.inbox-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.inbox-time { color: var(--muted); flex-shrink: 0; }
.inbox-row.waiting .inbox-time { color: #1fa855; font-weight: 700; }
.inbox-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .1rem; }
.inbox-tag { display: inline-block; margin-top: .25rem; font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--violet-soft); color: var(--violet); }
.wa-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 1.05rem; }
.wa-chat { display: flex; flex-direction: column; min-height: 0; background: #efeae2; }
.wa-empty { margin: auto; text-align: center; padding: 2rem; max-width: 380px; }
.wa-empty-logo { width: 64px; height: 64px; margin: 0 auto .8rem; display: grid; place-items: center; }
.wa-thread { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.wa-thread[hidden], .wa-empty[hidden] { display: none; }
.wa-head { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; background: #f0f2f5; border-bottom: 1px solid var(--line); }
.wa-head .wa-avatar { width: 40px; height: 40px; }
.wa-back { display: none; border: 0; background: none; font-size: 1.3rem; cursor: pointer; }
.wa-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .25rem; padding: 1rem 5%; }
.wa-day { align-self: center; background: #fff; color: var(--muted); font-size: .7rem; font-weight: 700; padding: .2rem .7rem; border-radius: 8px; margin: .4rem 0; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.wa-log .bubble { max-width: min(75%, 520px); padding: .4rem .6rem .25rem; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.wa-log .bubble.in { align-self: flex-start; border-top-left-radius: 0; }
.wa-log .bubble.out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 0; }
.wa-log .bubble-meta { text-align: right; font-size: .68rem; color: #667781; margin-top: .1rem; }
.wa-log .tick.read { color: #53bdeb; }
.wa-log .tick.failed { color: #d93025; }
.wa-note { margin: 0; padding: .25rem 1rem; background: #f0f2f5; }
.wa-note:empty { display: none; }
.wa-compose { display: flex; align-items: flex-end; gap: .6rem; padding: .6rem .8rem; background: #f0f2f5; }
.wa-compose textarea { flex: 1; resize: none; max-height: 8rem; border: 0; border-radius: 22px; padding: .65rem 1rem; font: inherit; background: #fff; }
.wa-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #00a884; color: #fff; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
.wa-send:disabled { background: #b5c7c2; cursor: not-allowed; }
#wa-msg:empty { display: none; }
@media (max-width: 760px) {
  .wa-app { grid-template-columns: 1fr; height: calc(100dvh - 5rem); }
  .wa-app .wa-chat[data-open="no"] { display: none; }
  .wa-app:has(.wa-chat[data-open="yes"]) .wa-list { display: none; }
  .wa-back { display: inline-block; }
}

/* WhatsApp chats tab: AI switch, attach button, sidebar icon */
.tile-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.wa-head-text { flex: 1; min-width: 0; }
.wa-ai { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .82rem; font-weight: 600; user-select: none; }
.wa-ai input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wa-ai-track { width: 2.3rem; height: 1.3rem; border-radius: 1rem; background: #b8bcc8; position: relative; transition: background .15s; flex: none; }
.wa-ai-track::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.wa-ai input:checked + .wa-ai-track { background: #00a884; }
.wa-ai input:checked + .wa-ai-track::after { transform: translateX(1rem); }
.wa-ai input:focus-visible + .wa-ai-track { outline: 2px solid #6a1fd0; outline-offset: 2px; }
.wa-ai.off-all { opacity: .6; }
.wa-attach { background: none; border: 0; font-size: 1.35rem; cursor: pointer; padding: 0 .4rem; align-self: center; }
.wa-attach:disabled { opacity: .4; cursor: default; }
.inbox-ai { font-size: .68rem; color: #00a884; font-weight: 700; margin-left: .35rem; }
.inbox-ai.off { color: #8a8fa3; }

/* WhatsApp chats tab: Gallabox-style filters, assign, resolve, notes, contact strip */
.wa-filters { display: flex; gap: .35rem; padding: .35rem .6rem .5rem; flex-wrap: wrap; }
.wa-filters button { border: 0; background: #eef0f4; color: #3b3f52; border-radius: 1rem; padding: .22rem .65rem; font-size: .78rem; font-weight: 600; cursor: pointer; }
.wa-filters button.on { background: #d9fdd3; color: #0b6b4f; }
.wa-assign { max-width: 8.5rem; font-size: .78rem; padding: .2rem .3rem; border-radius: .4rem; margin-right: .4rem; }
.wa-resolve { border: 1px solid #00a884; background: #fff; color: #00a884; border-radius: .4rem; font-size: .78rem; font-weight: 700; padding: .25rem .55rem; cursor: pointer; margin-right: .5rem; white-space: nowrap; }
.wa-resolve.done { background: #00a884; color: #fff; }
.wa-info { margin: 0; padding: .25rem .9rem; background: #fff8e1; border-top: 1px solid #f1e3b0; }
.wa-info:empty { display: none; }
.wa-modes { display: flex; gap: .3rem; padding: .35rem .8rem 0; background: #f0f2f5; }
.wa-modes button { border: 0; background: transparent; font-size: .8rem; font-weight: 700; padding: .3rem .6rem; border-radius: .4rem .4rem 0 0; cursor: pointer; color: #667; }
.wa-modes button.on { background: #fff; color: #0b6b4f; }
.wa-modes.note-mode button.on { background: #fff3c4; color: #7a5b00; }
.wa-compose.note-mode textarea { background: #fff3c4; }
.bubble.note { background: #fff3c4; align-self: center; max-width: 80%; border: 1px dashed #d9b54a; }
.inbox-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #25d366; display: inline-block; margin-left: .35rem; }
.inbox-who { font-size: .68rem; color: #6a1fd0; font-weight: 700; margin-left: .35rem; }
.inbox-row.unread strong { font-weight: 800; }
.inbox-row.unread .inbox-line { color: #111; font-weight: 600; }
.inbox-row.unread::after { content: ''; position: absolute; right: .8rem; bottom: .7rem; width: .65rem; height: .65rem; border-radius: 50%; background: #25d366; }
.inbox-row { position: relative; }

/* Train the AI */
.train-list { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .5rem; }
.train-row { display: grid; grid-template-columns: 2rem 1fr auto auto auto auto; gap: .4rem; align-items: start; }
.train-row textarea { width: 100%; font-family: inherit; }
.train-n { font-weight: 800; padding-top: .35rem; color: #6a1fd0; }
@media (max-width: 760px) { .train-row { grid-template-columns: 2rem 1fr; } .train-row > :nth-child(n+3) { grid-column: 2; display: inline-block; } }
.train-title { width: 100%; font-weight: 700; margin-bottom: .25rem; border: 0; border-bottom: 1px dashed #c9c4d8; background: transparent; }
@media (min-width: 761px) { .train-row { grid-template-columns: 2rem 1fr auto auto auto auto; } } /* wide screens only: on a phone the rule above stacks the buttons under the text */
.train-row textarea { min-height: 3rem; }

/* WhatsApp chats tab: reactions, block and delete menu */
.wa-more { position: relative; }
.wa-more summary { list-style: none; cursor: pointer; font-size: 1.3rem; padding: 0 .35rem; user-select: none; }
.wa-more summary::-webkit-details-marker { display: none; }
.wa-more-menu { position: absolute; right: 0; top: 1.9rem; z-index: 5; background: #fff; border: 1px solid #dfe1e6; border-radius: .5rem; box-shadow: 0 6px 18px rgba(0,0,0,.15); display: grid; min-width: 11.5rem; overflow: hidden; }
.wa-more-menu button { border: 0; background: #fff; text-align: left; padding: .55rem .8rem; cursor: pointer; font-size: .85rem; }
.wa-more-menu button:hover { background: #f3f4f7; }
.bubble { position: relative; }
.react-chip { position: absolute; bottom: -.7rem; right: .5rem; background: #fff; border-radius: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.25); font-size: .85rem; padding: 0 .3rem; }
.bubble:has(.react-chip) { margin-bottom: .8rem; }
.inbox-row.blocked .inbox-line { text-decoration: line-through; }

.inbox-needs { background: #fde8e8; color: #b42318; border-radius: .6rem; padding: 0 .4rem; font-size: .68rem; font-weight: 600; white-space: nowrap; }

.media-img { display: block; max-width: 260px; max-height: 320px; border-radius: .4rem; margin-bottom: .25rem; cursor: zoom-in; background: #eee; }
.media-gone, .media-doc { font-size: .8rem; color: #667085; padding: .3rem 0; display: block; }
.media-doc { color: #1a56db; text-decoration: underline; }

/* picture pop-up (lightbox) */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; cursor: grab; }
.lightbox-bar { position: absolute; top: 10px; right: 14px; display: flex; gap: 8px; }
.lightbox-btn { background: rgba(255, 255, 255, 0.15); color: #fff; border: 0; border-radius: 50%; width: 38px; height: 38px; font-size: 18px; line-height: 38px; text-align: center; cursor: pointer; text-decoration: none; }
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(4px); transition: background 0.15s; }
.lightbox-btn svg { display: block; }
.lightbox-bar { align-items: center; }
.lightbox .lightbox-btn { box-sizing: border-box; flex: 0 0 44px; width: 44px; height: 44px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; }
.lightbox .lightbox-btn:hover { background: rgba(255, 255, 255, 0.32); border: 0; }

/* ---- Settings cards ---- */
#tab-tools { display: grid; gap: 1rem; align-content: start; }
.set-grid { display: grid; gap: 1rem; }
.set-card h3 { display: flex; align-items: center; gap: .5rem; margin: 0; }
.set-ic { font-size: 1.15rem; }
.set-field { display: grid; gap: .3rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.set-field:first-of-type { border-top: 0; }
.set-field > label { font-weight: 600; display: flex; gap: .5rem; align-items: baseline; }
.saved-tick { font-size: .8rem; font-weight: 700; }
.saved-tick.ok { color: var(--good); }
.saved-tick.bad { color: var(--bad); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; width: max-content; max-width: 100%; }
.seg-btn { border: 0; border-radius: 0; min-height: 42px; padding: .4rem 1.1rem; background: #fff; font-weight: 600; color: var(--muted); }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { background: var(--bg); border-color: var(--line); }
.seg-btn.on { background: var(--brand); color: #fff; }
.alert-amber { border-left-color: var(--amber); background: var(--amber-soft); }
.alert-dismissible { position: relative; padding-right: 2.8rem; }
.alert-close { position: absolute; top: .3rem; right: .5rem; min-height: 0; border: 0; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1; padding: .15rem .5rem; border-radius: 8px; cursor: pointer; }
.alert-close:hover { background: rgba(0, 0, 0, .08); }
.credit-hot { color: #d92d20; font-weight: 800; }
.alert a { font-weight: 700; color: inherit; }
.credit-num { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.credit-big { font-size: 2rem; font-weight: 800; }
.credit-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.credit-form label { flex-basis: 100%; }
.credit-form input { width: 10rem; }

/* ---- Train the AI ---- */
.train-intro { background: var(--card); border-radius: 14px; padding: .9rem 1.1rem; box-shadow: var(--shadow); border-left: 4px solid var(--violet); }
.train-intro p { margin: 0 0 .4rem; }
.train-tips { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
.train-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--good); margin-right: .4rem; }
.train-bar { display: flex; gap: .6rem; margin: .9rem 0 .6rem; flex-wrap: wrap; }
.train-bar input { flex: 1 1 14rem; }
.rule-list { display: grid; gap: .55rem; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.rule.open { border-color: var(--violet); }
.rule.off .rule-title, .rule.off .rule-prev { opacity: .5; }
.rule-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .75rem 1rem; cursor: pointer; }
.rule-head:hover { background: #faf8ff; }
.rule-n { background: var(--violet-soft); color: var(--violet); font-weight: 800; font-size: .8rem; border-radius: 999px; padding: .25rem .7rem; white-space: nowrap; }
.rule-mid { display: grid; min-width: 0; }
.rule-title { font-size: 1rem; }
.rule-prev { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rule.open .rule-prev { display: none; }
.rule-chev { color: var(--muted); transition: transform .15s; }
.rule.open .rule-chev { transform: rotate(180deg); }
.rule-body { padding: .2rem 1rem 1rem; display: grid; gap: .7rem; border-top: 1px dashed var(--line); }
.rule-lbl { display: grid; gap: .25rem; font-weight: 600; margin-top: .5rem; }
.rule-lbl textarea { width: 100%; min-height: 8rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; line-height: 1.5; resize: vertical; }
.rule-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rule-foot .muted { margin-right: auto; }
.rule-foot button { min-height: 38px; padding: .2rem .8rem; font-size: .85rem; }
.rule-foot .rule-del { color: var(--bad); border-color: #f0b8b3; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-knob { position: absolute; inset: 0; background: #c9c4d8; border-radius: 999px; transition: background .15s; }
.switch-knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .switch-knob { background: var(--good); }
.switch input:checked + .switch-knob::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-knob { outline: 3px solid var(--violet-soft); }
.train-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .8rem; flex-wrap: wrap; }
.train-status { font-weight: 600; color: var(--muted); }
.train-status.ok { color: var(--good); }
.train-status.bad { color: var(--bad); }
@media (max-width: 640px) { .rule-head { grid-template-columns: auto 1fr auto; } .rule-chev { display: none; } }
.tile-sparkles { background: linear-gradient(135deg, #f472b6, #7c3aed); }
.tile-chart { background: linear-gradient(135deg, #2dd4bf, #0e7490); }
.tile-settings { background: linear-gradient(135deg, #94a3b8, #475569); }

/* right-click emoji menu on a customer message */
.react-menu { position: fixed; z-index: 1100; background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(30, 10, 70, .28); padding: .5rem .6rem .6rem; border: 1px solid var(--line); }
.react-menu-title { font-size: .75rem; color: var(--muted); margin: 0 .2rem .3rem; }
.react-menu-row { display: grid; grid-template-columns: repeat(6, auto); gap: .15rem; }
.react-menu, .react-chip { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; }
.react-menu-row button { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; min-height: 0; padding: .3rem .4rem; border-radius: 10px; cursor: pointer; }
.react-menu-row button:hover, .react-menu-row button.on { background: #e7f6ef; }

/* Phones (added 2026-11-22 at the owner's request). One idea: it works like a phone app.
   - the main sections sit in a bar at the bottom of the screen (Call list, WhatsApp chats, No answer, Follow-ups, More); nothing to slide at the top
   - "More" opens the other sections as a list above the bar
   - an open WhatsApp chat fills the whole screen, with a big green Call button and a back arrow
   - every number and button is easy to tap, and no page can be wider than the screen
   Wide screens are not touched: all of this is inside the max-width: 760px block, except the two hidden buttons. */
.tab-more, .wa-call-btn { display: none; }
.wa-head-call { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
a, button, select, summary, label { touch-action: manipulation; }
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  input, select, textarea, .wa-assign { font-size: 16px; } /* under 16px an iPhone zooms the whole page when a box is tapped */

  /* top bar: logo, Add enquiry, who is signed in */
  .side { padding: .5rem .75rem; gap: .5rem; }
  .who .link { min-height: 40px; padding: 0 .3rem; }

  /* bottom bar */
  .side .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; overflow: visible; order: 0; flex: none;
    background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(40, 20, 90, .12); padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom, 0px)); }
  .tabs .tab:not(.tab-main) { display: none; }
  .tab-main, .tab-more { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .1rem; position: relative; min-height: 56px; padding: .3rem 0; border: 0; background: none; border-radius: 12px;
    font: inherit; font-size: .68rem; font-weight: 700; line-height: 1.1; text-align: center; color: var(--muted); }
  .tab-main .tab-label, .tab-more .tab-label { flex-direction: column; gap: .2rem; }
  .tab-main .tab-extra { display: none; } /* "WhatsApp chats" is too wide for one fifth of a phone: the bar says just "WhatsApp" */
  .tab-main .tile-ic, .tab-more .tile-ic { font-size: 1rem; }
  .tab-main .pill { position: absolute; top: 1px; left: calc(50% + .5rem); min-width: 1.15rem; padding: 0 .3rem; font-size: .62rem; text-align: center; }
  .tabs .tab.active, .tab-more.active, .tab-more[aria-expanded="true"] { background: var(--violet-soft); color: var(--violet); }
  .tabs .tab.active .pill { background: var(--violet); color: #fff; }
  .tabs .tab.active .tile-ic { box-shadow: none; }
  .tabs.more-open::before { content: ''; position: fixed; inset: 0; background: rgba(20, 10, 50, .45); z-index: -1; }
  .tabs.more-open .tab:not(.tab-main) { display: flex; order: -1; grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; min-height: 54px; padding: .5rem 1rem;
    border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; text-align: left; }
  .tabs.more-open .tab:not(.tab-main) .tab-label { flex-direction: row; gap: .6rem; }
  .tabs.more-open .tab:not(.tab-main) .tile-ic { font-size: 1rem; }
  .tabs.more-open .tab:not(.tab-main).active { background: var(--violet-soft); color: var(--violet); }

  /* call list: search on its own line, the two choosers side by side, smaller date chips */
  .filters { grid-template-columns: 1fr 1fr; }
  .filters #q { grid-column: 1 / -1; }
  .df-chip { min-height: 38px; }
  a.phone { display: inline-flex; align-items: center; min-height: 44px; }
  .jump-chip, .day-chip { min-height: 40px; }

  /* WhatsApp chats: the list fits above the bottom bar */
  .wa-app { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 10rem); min-height: 360px; }
  .wa-list, .wa-chat, .wa-thread, .wa-log { min-width: 0; }
  .wa-filters button, .wa-resolve, .wa-modes button { min-height: 40px; }
  .inbox-row { padding: .8rem 1rem; }

  /* WhatsApp chats: an open chat fills the screen (no top bar, no bottom bar) */
  html.wa-fit:has(.wa-chat[data-open="yes"]) .wa-app { position: fixed; inset: 0; z-index: 60; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
  .wa-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "back av text call" "ai ai ai more"; align-items: center; gap: .35rem .55rem; padding: .5rem .7rem; }
  .wa-back { grid-area: back; min-width: 36px; min-height: 40px; font-size: 1.6rem; padding: 0; }
  #wa-head-avatar { grid-area: av; }
  .wa-head-text { grid-area: text; min-width: 0; }
  .wa-head-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wa-head-call { display: inline-flex; align-items: center; min-height: 30px; }
  .wa-call-btn { grid-area: call; display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: #00a884; color: #fff; font-weight: 800; text-decoration: none; }
  .wa-call-btn[hidden] { display: none; }
  .wa-assign { grid-area: assign; width: 100%; max-width: none; min-height: 40px; margin: 0; }
  .wa-resolve { grid-area: resolve; justify-self: stretch; margin: 0; }
  .wa-head .wa-ai { grid-area: ai; min-height: 40px; }
  .wa-more { grid-area: more; justify-self: end; }
  .wa-more summary { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; }
  .wa-log { padding: .8rem 3%; }
  .wa-log .bubble { max-width: 88%; }
  .wa-compose { padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); }
  dialog.sheet, dialog.sheet.wide { max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
}

/* Payment card in Settings (added 2026-11-26) */
.pay-form { display: grid; gap: .75rem; margin-top: .75rem; }
.pay-form .field { display: grid; gap: .25rem; }
.pay-form button { justify-self: start; }
.pay-qr { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pay-qr-pic { width: 132px; height: 132px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #fff; text-align: center; padding: .25rem; }
.pay-qr-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pay-qr-actions { display: grid; gap: .4rem; justify-items: start; }
.file-pick { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .55rem .9rem; border-radius: 10px; border: 1px solid var(--violet); color: var(--violet); font-weight: 600; background: #fff; }
.file-pick:hover { background: var(--violet-soft); }
.file-pick svg, .set-ic svg { width: 1.1em; height: 1.1em; }

/* Credit line (changed 2026-11-22 at the owner's request): a quiet "Created by Abhishek" at the very bottom of every screen and under the sign-in panel. It is not laid over the pages. */
.made-by { text-align: center; padding: 1rem 1rem 1.25rem; font-size: .75rem; letter-spacing: .02em; color: var(--muted); }
@media (min-width: 761px) {
  /* on a computer the screen is a fixed frame (the WhatsApp tab never scrolls), so the credit line sits at the bottom of the left menu */
  .made-by { position: fixed; left: 0; bottom: 3px; width: 240px; padding: 0; font-size: .7rem; line-height: 1; pointer-events: none; }
  body:not(:has(.shell)) .made-by { position: static; width: auto; padding: 1rem 1rem 1.25rem; font-size: .75rem; line-height: normal; } /* sign-in and other plain pages: under the panel */
}

/* Customer type in the WhatsApp chat list and payment tags on the call list (added 2026-11-26) */
.inbox-tag.k-pay, .badge.b-pay-check { background: #fff1d6; color: #8a4b00; }
.inbox-tag.k-ready, .badge.b-pay-sent { background: var(--pink-soft); color: #b00d5e; }
.inbox-tag.k-booked { background: var(--good-soft); color: var(--good); }
.inbox-tag.k-interested { background: var(--violet-soft); color: var(--violet); }
.inbox-tag.k-hi { background: #eef0f4; color: #4b5563; }
.inbox-tag.k-lost { background: #f3f3f5; color: #8a8797; }
.badge.b-pay-check, .badge.b-pay-sent { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; }
.badge.b-pay-check svg, .badge.b-pay-sent svg { width: 1em; height: 1em; }

/* Calmer phone screens (added 2026-11-26 at the owner's request: "too confusing on mobile").
   The customers come first: city, situation and dates fold away behind one Filters button, the group chips are one short row,
   and group headings are smaller. Computers are unchanged except for the hidden Filters button. */
.filter-toggle { display: none; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h2 { letter-spacing: -.01em; }
@media (max-width: 760px) {
  .side .add-btn { width: auto; min-height: 40px; padding: 0 1rem; font-size: .92rem; }
  #tab-calls .page-head h2 { font-size: 1.2rem; }
  #tab-calls .view-toggle .vt { min-height: 34px; padding: 0 .8rem; font-size: .85rem; }
  #tab-calls .filters { grid-template-columns: minmax(0, 1fr) auto; }
  #tab-calls .filters #q { grid-column: auto; }
  .filter-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .85rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; }
  .filter-toggle .ic { width: 1.05em; height: 1.05em; }
  .filter-toggle[aria-expanded="true"] { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }
  #tab-calls:not(.filters-open) .filters select, #tab-calls:not(.filters-open) > .date-filter { display: none; }
  #tab-calls.filters-open .filters select { grid-column: 1 / -1; }
  #tab-calls .jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -.6rem; padding: .1rem .6rem .3rem; -webkit-overflow-scrolling: touch; }
  #tab-calls .jump::-webkit-scrollbar { display: none; }
  #tab-calls .jump-chip { flex: none; min-height: 36px; }
  .group-head { padding: .6rem .8rem; }
  .group-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; line-height: 1.35; }
  .rank { width: 32px; height: 32px; font-size: 1rem; }
  .call { padding: .8rem; border-radius: 12px; }
  .call .why { font-size: .88rem; }
}
.address-line { display: none; margin: 0; }
@media (max-width: 760px) {
  .call .address dl { display: none; } /* phones: the address in one line, the full form stays under "Open" */
  .call .address-line { display: block; font-size: .9rem; }
  .call .address { padding: .55rem .7rem; }
}
@media (max-width: 760px) {
  .wa-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wa-filters::-webkit-scrollbar { display: none; }
  .wa-filters button { flex: none; }
}

/* ===== Simple, calm look (changed 2026-11-26 at the owner's request: "the squares are too big", "simplicity") =====
   Thin lines instead of shadows and big coloured boxes; each group is a plain heading with a coloured line; smaller cards. */
:root { --bg: #f7f7fa; --line: #ebe9f1; --shadow: 0 1px 2px rgba(20, 16, 40, .04); }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-weight: 650; }
.box, .table-wrap, .rank-box { box-shadow: none; border: 1px solid var(--line); }
.badge { font-size: .74rem; font-weight: 600; padding: .08rem .5rem; }
.act { border-radius: 8px; font-weight: 600; }
.act.small { min-height: 32px; font-size: .8rem; }
.copy { min-height: 30px; font-size: .78rem; }
.phone { font-size: 1.05rem; font-weight: 650; }

/* call-list groups: a heading, not a big coloured box */
.group { border: 0; border-radius: 0; background: transparent; overflow: visible; margin-top: 2rem; }
.group:first-of-type { margin-top: .75rem; }
.group-head { background: transparent; color: var(--text); padding: 0 0 .55rem; gap: .6rem; border-bottom: 2px solid var(--gc); }
.group-head h3 { color: var(--text); font-size: 1.05rem; display: flex; align-items: center; gap: .45rem; }
.group-head p, .group-head .muted { color: var(--muted); font-size: .8rem; }
.rank { width: 28px; height: 28px; background: var(--gc); color: #fff; font-size: .88rem; font-weight: 700; }
.rank .ic { width: 15px; height: 15px; }
.count { background: var(--gt); color: var(--gc); font-size: .76rem; font-weight: 700; padding: .05rem .5rem; }
.calls { padding: .75rem 0 0; gap: .75rem; }
.call { border: 1px solid var(--line); box-shadow: none; border-radius: 12px; padding: .8rem .9rem; gap: .3rem; }
.why { font-size: .86rem; padding: .4rem .6rem; border-radius: 8px; }
.area-chips { padding: .6rem 0 0; }
.quick-view { margin-top: .75rem; }
.jump-chip { min-height: 32px; font-size: .8rem; font-weight: 600; }

@media (max-width: 760px) {
  .group { margin-top: 1.5rem; }
  .group-head { padding: 0 0 .45rem; }
  .group-head h3 { font-size: 1rem; }
  .calls { padding: .6rem 0 0; gap: .6rem; }
  /* Quick call on a phone: one small card per customer, one row of the 4 main buttons. Not interested / Fake / Note are in Details. */
  .quick-view { margin: .6rem 0 0; }
  .qrow { padding: .65rem .7rem; margin-bottom: .5rem; border-radius: 12px; box-shadow: none; gap: .1rem .5rem; }
  .qrow .q-name { font-size: .98rem; }
  .qrow .q-phone { margin-top: .25rem; }
  .qrow .q-phone a.phone { font-size: 1.05rem; }
  .qrow .q-actions { margin-top: .4rem; }
  .qbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
  .qbar .act { width: 100%; min-height: 36px; padding: 0 .2rem; font-size: .78rem; }
  .qbar .act.bad, .qbar .open-note { display: none; }
  .qbar .price-flag { grid-column: 1 / -1; }
}
.inbox-who { display: none; } /* chats are no longer assigned (2026-11-26) */

/* Reply / Note switch above the typing box (2026-11-26): two clear halves; a note is yellow and only the team sees it */
.wa-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: .5rem .8rem 0; padding: 4px; background: #e6e8ec; border-radius: 12px; }
.wa-modes button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: 9px; padding: .45rem .5rem; font-size: .82rem; font-weight: 600; color: #555a66; }
.wa-modes button .ic { width: 14px; height: 14px; }
.wa-modes button.on { background: #fff; color: #0b6b4f; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.wa-modes.note-mode button.on { background: #fff3c4; color: #7a5b00; }
#wa-form.note-mode textarea { background: #fffbe6; box-shadow: inset 0 0 0 1px #f0d77a; }
#wa-form.note-mode textarea::placeholder { color: #9a7d1a; }

/* Message ticks exactly like WhatsApp (2026-11-26): grey ✓ sent, grey ✓✓ delivered, blue ✓✓ read */
.tick { display: inline-flex; align-items: center; vertical-align: -3px; color: #8696a0; }
.tick .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.tick.read, .wa-log .tick.read { color: #53bdeb; }
.tick.failed, .wa-log .tick.failed { color: #d93025; font-size: .68rem; gap: .15rem; }
.badge.b-coolma-ok { background: #e3f4ec; color: #137a4b; display: inline-flex; align-items: center; gap: .25rem; }
.badge.b-coolma-ok svg { width: .95em; height: .95em; }
.badge.b-coolma-wait { background: #fff4d6; color: #8a5a00; }
.badge.b-coolma-bad { background: #fde8e6; color: #b3261e; }

/* Insights tab (added 2026-11-26) */
.ins-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.ins-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .1rem; }
.ins-k { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.ins-l { font-size: .8rem; color: var(--muted); }
.ins-kpi.good .ins-k { color: var(--good); } .ins-kpi.warn .ins-k { color: var(--amber); } .ins-kpi.bad .ins-k { color: var(--bad); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: .75rem; }
.ins-card h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.ins-card h3 .ic { width: 18px; height: 18px; color: var(--violet); }
.ins-bars { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ins-bar { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); grid-template-areas: "name num" "track track"; gap: .2rem .6rem; font-size: .85rem; }
.ins-bar-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-bar-num { grid-area: num; justify-self: end; color: var(--muted); font-size: .8rem; }
.ins-bar-track { grid-area: track; height: 8px; border-radius: 99px; background: #efedf5; overflow: hidden; }
.ins-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--violet); }
.ins-bar.best .ins-bar-fill { background: var(--good); }
.ins-bar.worst .ins-bar-fill { background: var(--bad); }
.ins-ai { border-color: #d9ccf7; background: linear-gradient(180deg, #faf7ff, #fff); }
.ins-ai #ins-run { justify-self: start; }
.ins-headline { font-size: 1.05rem; font-weight: 600; margin: .3rem 0 .2rem; }
.ins-findings { margin: 0; padding-left: 1.2rem; display: grid; gap: .7rem; }
.ins-findings p { margin: .15rem 0 0; font-size: .9rem; }
.ins-do { display: flex; gap: .35rem; align-items: flex-start; color: #0b6b4f; font-weight: 600; }
.ins-do .ic, .ins-wins .ic { width: 15px; height: 15px; flex: none; margin-top: .2rem; }
.ins-wins { list-style: none; padding: 0; margin: .2rem 0 0; display: grid; gap: .3rem; font-size: .9rem; }
.ins-wins li { display: flex; gap: .35rem; }
.ins-card h4 { margin: .6rem 0 0; font-size: .9rem; }
@media (max-width: 760px) {
  .ins-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .ins-k { font-size: 1.35rem; }
}
.ins-card { align-content: start; }
.ins-bar { grid-template-columns: minmax(0, 1fr) auto; }
.area-hidden { display: none !important; }
.area-chip.on { background: var(--amber); color: #fff; }
.area-chip.on span { background: #fff; color: var(--amber); }

/* Add enquiry, simple version (2026-11-26) */
.add-form { display: grid; gap: .9rem; }
.add-form h3 { margin: 0; font-size: 1.15rem; }
.add-form > p { margin: -.4rem 0 0; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.add-field { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--text); min-width: 0; }
.add-label { font-size: .85rem; font-weight: 600; }
.add-field input[type=text], .add-field input[type=date], .add-field textarea, .add-form .phone-field { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 400; }
.add-field input[type=text], .add-field input[type=date], .add-field textarea { padding: .55rem .75rem; }
.add-form .phone-field { display: flex; align-items: center; overflow: hidden; }
.add-form .phone-field .prefix { padding: 0 .6rem; color: var(--muted); border-right: 1px solid var(--line); align-self: stretch; display: grid; place-items: center; background: #f7f7fa; font-weight: 600; }
.add-form .phone-field input { border: 0; min-height: 44px; flex: 1; min-width: 0; padding: 0 .7rem; font: inherit; font-weight: 400; background: transparent; }
.add-form .phone-field:focus-within, .add-field input:focus, .add-field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.add-form .phone-field input:focus { box-shadow: none; }
.pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.pick button { min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 500; font-size: .88rem; cursor: pointer; }
.pick button:hover { border-color: var(--violet); }
.pick button.on { background: var(--violet); border-color: var(--violet); color: #fff; font-weight: 600; }
.city-field { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: .25rem 0 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(20, 16, 40, .12); max-height: 15rem; overflow-y: auto; }
.suggest li { padding: .6rem .75rem; border-radius: 8px; cursor: pointer; font-weight: 500; }
.suggest li:hover, .suggest li.on { background: var(--violet-soft); color: var(--violet); }
.add-days { padding: .75rem; border-radius: 12px; background: #f7f7fa; border: 1px solid var(--line); }
.add-days .or-date { display: grid; gap: .3rem; font-weight: 500; color: var(--muted); }
.add-days .or-date input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 .75rem; font: inherit; background: #fff; }
.add-days #add-when { margin: 0; color: #0b6b4f; font-weight: 600; }
.add-form .sheet-buttons { display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 760px) {
  .add-row { grid-template-columns: 1fr; }
  .pick button { flex: 1 1 auto; }
}
/* Insights, one clear column (2026-11-26): numbered questions, the answer in one line on top */
.ins-list { display: grid; gap: .75rem; max-width: 760px; }
.ins-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--violet); color: #fff; font-size: .78rem; font-weight: 700; flex: none; }
.ins-answer { margin: .1rem 0 .2rem; font-weight: 600; color: var(--text); }
.ins-more summary { font-weight: 600; color: var(--violet); }
.ins-more .ins-card { border: 0; padding: .6rem 0 0; }
.ins-ai { max-width: 760px; }

/* Templates (2026-11-26) */
.tpl-make { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .75rem; align-items: start; }
.tpl-form { display: grid; gap: .8rem; }
.tpl-form h3, .tpl-waba h3 { margin: 0; display: flex; gap: .4rem; align-items: center; font-size: 1rem; }
.tpl-form h3 .ic, .tpl-waba h3 .ic { width: 18px; height: 18px; color: var(--violet); }
.tpl-form button[type=submit] { justify-self: start; }
.tpl-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: -.4rem; }
.tpl-preview-wrap { display: grid; gap: .35rem; position: sticky; top: 1rem; }
.tpl-phone { background: #efeae2; border-radius: 14px; padding: 1rem; min-height: 120px; border: 1px solid var(--line); }
.tpl-bubble { background: #fff; border-radius: 8px; border-top-left-radius: 0; padding: .55rem .7rem; max-width: 90%; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); font-size: .92rem; white-space: pre-wrap; }
.tpl-footer { color: #8696a0; font-size: .75rem; margin-top: .3rem; }
.tpl-list { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.tpl-card { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .4rem; background: #fff; }
.tpl-card-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tpl-card-head .tpl-status { margin-left: auto; }
.tpl-card-body { white-space: pre-wrap; font-size: .88rem; color: #3b3a48; }
.tpl-status { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; }
.tpl-status.ok { background: var(--good-soft); color: var(--good); }
.tpl-status.wait { background: #fff4d6; color: #8a5a00; }
.tpl-status.bad { background: #fde8e6; color: var(--bad); }
.tpl-choices { display: grid; gap: .4rem; max-height: 14rem; overflow-y: auto; }
.tpl-choice { display: grid; gap: .1rem; text-align: left; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
.tpl-choice.on { border-color: var(--violet); background: var(--violet-soft); }
.tpl-open { display: inline-flex; align-items: center; gap: .35rem; margin: .3rem 1rem .5rem; padding: .55rem .9rem; border-radius: 999px; border: 0; background: #00a884; color: #fff; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; align-self: flex-start; }
.tpl-open .ic { width: 15px; height: 15px; }
.tpl-waba .inline-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.tpl-waba input { flex: 1; min-width: 12rem; }
@media (max-width: 760px) {
  .tpl-make { grid-template-columns: 1fr; }
  .tpl-preview-wrap { position: static; }
}

/* Creator credit (2026-11-26): small copyright-style lines, never over the page */
.brand-credit { display: block; font-size: .68rem; font-weight: 600; color: var(--violet); letter-spacing: .02em; margin-top: .1rem; }
.credit-line { margin: -.2rem 0 .4rem; font-size: .8rem; font-weight: 600; color: var(--violet); letter-spacing: .03em; }
.made-by strong { color: var(--violet); font-weight: 600; }
@media (max-width: 760px) {
  .side .brand span { display: block; font-size: 0; line-height: 1; }
  .side .brand span .brand-credit { font-size: .58rem; margin: 0; white-space: nowrap; }
  .side .brand { flex-direction: column; gap: .15rem; }
}
@media (min-width: 761px) {
  .side { padding-bottom: 2.6rem; }
  .made-by { padding: 0 .9rem; line-height: 1.3; font-size: .66rem; }
  body:not(:has(.shell)) .made-by { padding: 1rem 1rem 1.25rem; font-size: .75rem; }
}

/* Add enquiry: parts slide open and closed instead of jumping (2026-11-26) */
.reveal { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .28s ease, opacity .22s ease, margin .28s ease; }
.reveal.closed { grid-template-rows: 0fr; opacity: 0; margin-top: -.9rem; pointer-events: none; }
.reveal-in { overflow: hidden; min-height: 0; }
.reveal-in > .add-field { padding: 2px; }
.add-days-box { padding: .75rem !important; border-radius: 12px; background: #f7f7fa; border: 1px solid var(--line); }
.add-days-box .or-date { display: grid; gap: .3rem; font-weight: 500; color: var(--muted); }
.add-days-box .or-date input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 .75rem; font: inherit; background: #fff; }
.add-days-box #add-when { margin: 0; color: #0b6b4f; font-weight: 600; }
.add-days { padding: 0; background: none; border: 0; }
.pick button { transition: background .15s, border-color .15s, color .15s; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* Our own calendar in Add enquiry (2026-11-26): a date button, the month opens right under it */
.date-btn { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 46px; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; text-align: left; }
.date-btn .ic { width: 18px; height: 18px; color: var(--violet); }
.date-btn.has-value { color: var(--text); font-weight: 600; border-color: var(--violet); }
.date-btn[aria-expanded="true"] { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.dp { margin-top: .4rem; padding: .7rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(20, 16, 40, .08); transition: opacity .2s ease, transform .2s ease; }
.dp.closed { display: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.dp-head strong { font-size: .95rem; }
.dp-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--text); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; text-align: center; }
.dp-wd { font-size: .7rem; font-weight: 600; color: var(--muted); padding: .2rem 0; }
.dp-day { height: 40px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 500; font-size: .9rem; color: var(--text); cursor: pointer; }
.dp-day:hover:not(:disabled) { background: var(--violet-soft); color: var(--violet); }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--pink); font-weight: 700; }
.dp-day.on { background: var(--violet); color: #fff; font-weight: 700; box-shadow: none; }
.dp-day:disabled { color: #cfccdb; cursor: default; }
.dp-foot { display: flex; justify-content: flex-end; margin-top: .3rem; }
.dp-foot:empty { display: none; }
.or-date { display: grid; gap: .3rem; font-weight: 500; color: var(--muted); }

/* Everything on a page lines up on the same left and right edge (2026-11-26: "not properly justified") */
.ins-list, .ins-ai { max-width: none; }
.ins-list { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); align-items: start; }
.ins-list > .ins-more { grid-column: 1 / -1; }
#tab-insights, #tab-templates, #tab-train, #tab-tools, #tab-overview { display: grid; gap: .9rem; align-content: start; }
#tab-insights > *, #tab-templates > *, #tab-train > *, #tab-tools > *, #tab-overview > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
.box { border-radius: 14px; }

/* Calendar: small and neat */
.dp { max-width: 320px; padding: .55rem; }
.dp-day { height: 34px; font-size: .85rem; border-radius: 8px; }
.dp-nav { width: 32px; height: 32px; font-size: 1.05rem; }
.dp-head { margin-bottom: .35rem; }
.dp-head strong { font-size: .88rem; }

/* WhatsApp profile card (2026-11-26) */
.wa-prof { display: grid; gap: .8rem; }
.wa-prof h3 { margin: 0; display: flex; gap: .45rem; align-items: center; font-size: 1rem; }
.wa-prof h3 .ic { width: 18px; height: 18px; color: #00a884; }
.prof-top { display: flex; gap: 1rem; align-items: center; }
.prof-pic { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: #f0f2f5; border: 1px solid var(--line); text-align: center; }
.prof-pic img { width: 100%; height: 100%; object-fit: cover; }
.prof-id { display: grid; gap: .25rem; justify-items: start; min-width: 0; }
.prof-id strong { font-size: 1.05rem; }
.small-pick { padding: .4rem .75rem; font-size: .85rem; }
.prof-note { margin: 0; padding: .55rem .7rem; border-radius: 10px; background: #f7f7fa; }
.prof-save { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.sub-h2 { font-size: 1.15rem; }
.add-row { align-items: end; }
