/* ---------- foundations ---------- */
:root {
  --ink: #1E2547; --muted: #66708F; --line: #E3E8F0;
  --teal: #12C2B8; --teal-deep: #0A8F88; --gold: #FFB627; --coral: #FF5E5B; --violet: #6C5CE7; --sky: #3FA9F5;
  --gold-soft: #FFF0CC; --coral-soft: #FFE1DF; --violet-soft: #E8E4FF; --sky-soft: #DDEFFE; --teal-soft: #D6F5F2;
  --good: #1E9E63; --mid: #D9910A; --low: #D8483F;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 16px; font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); line-height: 1.5; background: #F3FAF9; }
body.admin { background: #F4F5F8; --radius: 10px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: 'Fredoka', 'DM Sans', sans-serif; font-weight: 600; font-size: 1.6rem; }
h2 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .6rem; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem 1rem; font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
a { color: inherit; }
.loading { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty { color: var(--muted); margin: .4rem 0 0; }
.hint { color: var(--muted); font-size: .88rem; }
.error { color: var(--low); font-weight: 500; margin: 0; }
.muted { color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--violet); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.link.danger { color: var(--low); }
.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.demobar, .demo-note { background: var(--gold-soft); color: #7A5200; text-align: center; font-size: .82rem; padding: .35rem .75rem; }
.demo-note { border-radius: 10px; display: inline-block; margin-bottom: 1rem; }
.center-card { max-width: 420px; margin: 18vh auto 0; padding: 1.5rem; text-align: center; }

/* ---------- team: layout ---------- */
.team-view { max-width: 520px; margin: 0 auto; padding: 0 1rem 7rem; }
.page-head { padding: 1.4rem 0 .8rem; }
.page-head p { color: var(--muted); margin-top: .3rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.1rem 1.15rem; margin: 0 0 1rem; box-shadow: 0 1px 0 var(--line); }
.card h2 { margin-bottom: .55rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head a { color: var(--violet); font-weight: 500; font-size: .92rem; }
.back { display: inline-block; margin-top: 1rem; color: var(--muted); text-decoration: none; font-weight: 500; }

/* ---------- team: sunrise hero ---------- */
.hero { position: relative; overflow: hidden; margin: 0 -1rem 1.1rem; padding: 2rem 1.4rem 4.6rem; color: #fff;
  background: linear-gradient(175deg, #FFB627 0%, #FF7B54 40%, #D9549B 72%, #6C5CE7 100%); }
.hero .sun { position: absolute; right: -34px; top: -34px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF6D6, #FFD36B 70%); opacity: .95; }
.hello { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.75rem; line-height: 1.15; margin: 0; position: relative; }
.today { margin: .15rem 0 1.1rem; opacity: .92; position: relative; }
.quote { position: relative; margin: 0; padding: .95rem 1.1rem; border-radius: 16px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .38); backdrop-filter: blur(6px); }
.quote figcaption { font-size: .8rem; opacity: .9; margin-bottom: .3rem; }
.quote blockquote { margin: 0; font-size: 1.08rem; font-weight: 500; line-height: 1.4; }
.hero .wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 58px; display: block; }

/* ---------- team: tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.tile { border-radius: var(--radius); padding: .95rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
.tile b { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
.tile small { font-size: .84rem; opacity: .8; }
.tile-icon { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .7); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: .45rem; }
.t-gold { background: var(--gold-soft); } .t-sky { background: var(--sky-soft); } .t-coral { background: var(--coral-soft); } .t-violet { background: var(--violet-soft); }

.period p { color: var(--muted); }
.bar { height: 10px; border-radius: 6px; background: var(--teal-soft); overflow: hidden; margin: .6rem 0 .5rem; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), var(--sky)); }
.period-note b { color: var(--ink); }

/* ---------- team: entries ---------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: none; background: var(--teal-soft); }
.entry.sale .entry-icon { background: var(--gold-soft); } .entry.trip .entry-icon { background: var(--sky-soft); }
.entry.petrol .entry-icon, .entry.parking .entry-icon { background: var(--coral-soft); } .entry.other .entry-icon { background: var(--violet-soft); }
.entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-value { font-weight: 700; white-space: nowrap; }
.mini { padding: .25rem .5rem; border-radius: 10px; font-size: .9rem; }
.mini.danger { color: var(--low); }

/* ---------- team: add flow and forms ---------- */
.choices { display: grid; gap: .75rem; }
.choice { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; text-decoration: none; border-radius: var(--radius); padding: 1rem 1.1rem; }
.choice span { grid-row: 1 / 3; font-size: 1.7rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(255, 255, 255, .7); }
.choice b { font-size: 1.1rem; font-family: 'Fredoka', sans-serif; font-weight: 600; } .choice small { color: var(--muted); }
.form { display: grid; gap: .9rem; }
.form label, .grid-form label { display: block; font-weight: 500; font-size: .92rem; }
.form label input:not([type=checkbox]), .form label select, .grid-form label input:not([type=checkbox]), .grid-form label select { display: block; margin-top: .3rem; }
.form label em, .grid-form label em { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=month], select {
  width: 100%; padding: .7rem .8rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 1rem; min-height: 46px; }
input:focus, select:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px var(--violet-soft); }
.form .check, .grid-form .check { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--violet); flex: none; }
.preview { background: var(--teal-soft); border-radius: 12px; padding: .6rem .8rem; margin: 0; font-size: .92rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form .primary { padding: .85rem 1rem; font-size: 1.02rem; border-radius: 14px; background: linear-gradient(90deg, var(--violet), #D9549B); border: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.seg button { padding: .65rem .3rem; border-radius: 12px; border: 1.5px solid var(--line); }
.seg button.on { background: var(--coral-soft); border-color: var(--coral); font-weight: 700; }
.photo { display: flex; align-items: center; gap: .8rem; }
.photo-btn { display: inline-flex !important; border: 1.5px dashed var(--teal-deep); color: var(--teal-deep); border-radius: 12px; padding: .65rem 1rem; cursor: pointer; font-weight: 500; }
#thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }

/* ---------- team: bottom bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom)); z-index: 10; max-width: 560px; margin: 0 auto; }
.tabbar a { text-decoration: none; display: grid; justify-items: center; gap: .05rem; font-size: .74rem; color: var(--muted); padding: .25rem 0; font-weight: 500; }
.tabbar a span { font-size: 1.3rem; line-height: 1.2; }
.tabbar a.on { color: var(--violet); font-weight: 700; }
.tabbar a.plus span { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.7rem; background: linear-gradient(135deg, var(--teal), var(--violet)); box-shadow: 0 6px 14px rgba(108, 92, 231, .35); }

/* ---------- login ---------- */
.login { position: relative; overflow: hidden; min-height: 100vh; padding: 3.2rem 1.2rem 2rem; text-align: center; background: linear-gradient(175deg, #FFB627 0%, #FF7B54 32%, #D9549B 62%, #6C5CE7 100%); color: #fff; }
.login .sun { position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF6D6, #FFD36B 70%); }
.login h1, .login .sub { position: relative; } .login .sub { margin: .3rem 0 1.2rem; opacity: .95; }
.login-card { position: relative; max-width: 380px; margin: 0 auto; text-align: left; background: #fff; color: var(--ink); border-radius: 22px; padding: 1.2rem; display: grid; gap: .8rem; }
.login-card h2 { font-size: .95rem; color: var(--muted); margin-top: .3rem; }
.login-card label { display: grid; gap: .3rem; font-weight: 500; }
.who { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border-radius: 14px; padding: .75rem 1rem; }
.who small { color: var(--muted); font-weight: 400; }

/* ---------- toast and lightbox ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .65rem 1.1rem; border-radius: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.warn { background: var(--low); }
body.admin .toast { bottom: 24px; }
.lightbox { position: fixed; inset: 0; background: rgba(15, 20, 40, .88); z-index: 60; display: grid; place-items: center; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; } .lightbox button { margin-top: 1rem; }

/* ================= ADMIN: plain, numbers first ================= */
body.admin h1 { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1.5rem; }
.topbar { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: .7rem 1.2rem; background: #14213D; color: #fff; }
.brand { font-size: 1.05rem; }
.topbar nav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; padding: .45rem .8rem; border-radius: 8px; color: #C9D2E6; font-weight: 500; }
.topbar nav a.on { background: rgba(255, 255, 255, .14); color: #fff; }
.who-am-i { color: #C9D2E6; font-size: .9rem; }
.topbar .link { color: #fff; }
.admin-view { max-width: 1180px; margin: 0 auto; padding: 0 1.2rem 3rem; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.pnav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; }
.pnav b { text-align: center; } .pnav small { grid-column: 1 / 4; text-align: center; color: var(--muted); }
.pnav button { padding: .3rem .8rem; border-radius: 8px; font-size: 1.1rem; }

body.admin .card { box-shadow: none; border: 1px solid var(--line); padding: 1rem 1.1rem; }
body.admin .card.note { background: #F8FAFC; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .15rem; }
.kpi small { color: var(--muted); } .kpi b { font-size: 1.45rem; font-variant-numeric: tabular-nums; } .kpi em { font-style: normal; color: var(--muted); font-size: .82rem; }
.kpi.accent { background: #14213D; color: #fff; border-color: #14213D; } .kpi.accent small, .kpi.accent em { color: #C9D2E6; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 500; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.r { text-align: right; }
td small { display: block; color: var(--muted); font-size: .8rem; }
tr.inactive td { color: var(--muted); }
td a { text-decoration: none; color: var(--ink); } td a:hover b { text-decoration: underline; }
.prog { min-width: 130px; } .prog small { display: block; }
.meter { height: 8px; border-radius: 4px; background: #E8ECF3; overflow: hidden; } .meter i { display: block; height: 100%; }
.meter.good i { background: var(--good); } .meter.mid i { background: var(--mid); } .meter.low i { background: var(--low); }
.months td.below { color: var(--low); background: #FDF1F0; } .months td.above { color: var(--good); }
.months td small { font-size: .75rem; }
.chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.chip.ok { background: #E3F6EC; color: #11693F; } .chip.held { background: #FFF1D1; color: #7A5200; }
.chip.none { background: #EEF1F6; color: var(--muted); } .chip.low { background: #FCE4E2; color: #A12D26; }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.flag { padding: .6rem .8rem; border-radius: 8px; background: #FFF8E6; border-left: 4px solid var(--mid); }
.flag.review { background: #FDF1F0; border-left-color: var(--low); }
.steps td { padding: .5rem .6rem; } .steps tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.toolbar { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.toolbar label { display: grid; gap: .25rem; font-weight: 500; font-size: .88rem; } .toolbar select, .toolbar input { min-height: 40px; padding: .45rem .7rem; width: auto; border-radius: 8px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem 1.2rem; }
.grid-form .wide, .grid-form .actions, .grid-form .check { grid-column: 1 / -1; }
.grid-form input, .grid-form select { border-radius: 8px; min-height: 42px; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; } .actions .primary { border-radius: 8px; }
.inline-form { display: flex; gap: .6rem; margin: .5rem 0 1rem; } .inline-form input { flex: 1; border-radius: 8px; }
.plain { list-style: none; margin: 0; padding: 0; } .plain li { padding: .5rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
body.admin button { border-radius: 8px; }
@media (max-width: 640px) { .topbar { gap: .6rem; } .who-am-i { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.dialog-box { background: #fff; color: var(--ink); border-radius: 16px; padding: 1.2rem; width: 100%; max-width: 340px; }
.dialog-box p { font-weight: 500; margin-bottom: 1rem; }
.dialog-box button { margin-top: 0; }
.dialog-box .primary { background: var(--low); border-color: var(--low); color: #fff; }

/* ---- Stage 2: payouts ---- */
.banner { border-left: 6px solid var(--line, #cfd8dc); }
.banner.good { border-left-color: #1f9d6b; }
.banner.mid { border-left-color: #e0a100; }
.banner.low { border-left-color: #d64545; }
.banner .warn { background: #fff4d6; color: #5a4300; padding: 8px 12px; border-radius: 8px; }
.decide { display: grid; gap: 10px; margin-top: 10px; max-width: 520px; }
.decide label { display: block; }
.decide input { display: block; width: 100%; margin-top: 4px; }
.btn-link { display: inline-block; margin-top: 6px; font-weight: 600; }
tfoot td { border-top: 2px solid #cfd8dc; padding-top: 10px; }
ul.log li { padding: 6px 0; }
ul.log small { color: #607d8b; margin-left: 6px; }
.payout-done { background: linear-gradient(135deg, #fff3c4, #ffd9e0); border-radius: 16px; padding: 14px 16px; margin: 6px 0 12px; }
.payout-done b { display: block; font-family: 'Fredoka', sans-serif; font-size: 2rem; line-height: 1.1; color: #4a2a00; }
.payout-done small, .payout-done p { color: #5b3a1a; margin: 2px 0 0; }

/* ---- change requests ---- */
.dialog-box.wide { width: min(92vw, 440px); text-align: left; display: grid; gap: 10px; }
.dialog-box.wide h2 { margin: 0; }
.dialog-box.wide label { display: block; font-weight: 500; }
.dialog-box.wide input[type=text], .dialog-box.wide input[type=date], .dialog-box.wide input[type=number], .dialog-box.wide select { display: block; width: 100%; margin-top: 4px; }
.dialog-box .fields { display: grid; gap: 8px; }
.seg { display: flex; gap: 16px; flex-wrap: wrap; }
.seg label { display: inline-flex; gap: 6px; align-items: center; }
.req { border-top: 1px solid var(--line); padding: 12px 0; }
.req:first-of-type { border-top: 0; }
.req-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req .why { color: var(--muted); margin: 6px 0; font-style: italic; }
.req .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.req .note { flex: 1 1 200px; }
ul.diff { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 2px; }
ul.diff span { display: inline-block; min-width: 130px; color: var(--muted); }
.removal { color: #b3261e; font-weight: 600; margin: 6px 0; }
.attention { border-left: 6px solid #e0a100; }
.dialog-box .fields[hidden] { display: none; }
.dialog-box.wide { max-width: 440px; max-height: 90vh; overflow-y: auto; }
.dialog-box.wide .primary { background: var(--ink); border-color: var(--ink); }

/* ---- Stage 3: clients ---- */
.head-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: .6rem 1rem; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.btn.primary { background: linear-gradient(90deg, var(--violet), #D9549B); color: #fff; border: 0; }
.clients-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.clients-tools input[type=search] { flex: 1 1 200px; min-width: 0; }
.clients-tools button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
ul.clients { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.client { display: flex; align-items: center; gap: .75rem; background: #fff; border-radius: 16px; padding: .7rem .85rem; text-decoration: none; color: inherit; box-shadow: 0 1px 0 var(--line); }
.client-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.client-main b, .client-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-main small { color: var(--muted); }
.client-tags { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; background: linear-gradient(135deg, #7A5CFA, #FF7A59); }
.avatar.big { width: 64px; height: 64px; font-size: 1.4rem; }
.client-head { display: flex; gap: 1rem; align-items: center; }
.client-head h1 { margin: 0; font-size: 1.35rem; } .client-head p { margin: .1rem 0 .4rem; color: var(--muted); }
.reach { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.reach-btn { text-align: center; padding: .75rem; border-radius: 14px; background: #fff; font-weight: 600; text-decoration: none; color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.quick { display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; } .quick label { flex: 1 1 140px; }
.kinds { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.kind input { position: absolute; opacity: 0; } .kind span { display: inline-block; padding: .4rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.kind input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); } .kind input:focus-visible + span { outline: 2px solid var(--violet); }
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .8rem; }
.timeline li { display: flex; gap: .7rem; } .timeline p { margin: 0; } .timeline small { color: var(--muted); }
.tl-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--teal-soft); display: grid; place-items: center; flex: none; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line); } .kv span { color: var(--muted); } .kv b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.gen-notes { background: #f7f8fb; border-radius: 12px; padding: .7rem .85rem; margin-top: .7rem; white-space: pre-wrap; }
.chip.fu-overdue { background: #fde2e0; color: #9b1c14; } .chip.fu-today { background: #ffe9b8; color: #6b4a00; }
.chip.fu-soon { background: #dff3ea; color: #14633f; } .chip.fu-later { background: #eef1f6; color: #4a5470; }
.chip.st-lead { background: #e8e4ff; color: #3d2fa0; } .chip.st-contacted { background: #dcecff; color: #1d4f91; } .chip.st-meeting { background: #d9f4f1; color: #0b5e57; }
.chip.st-proposal { background: #ffe9b8; color: #6b4a00; } .chip.st-client { background: #d8f5e4; color: #14633f; } .chip.st-inactive { background: #eef1f6; color: #6b7390; }
ul.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
ul.bars li { display: grid; grid-template-columns: 120px 1fr 32px; gap: .6rem; align-items: center; position: relative; }
ul.bars i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #2bb5a8, #4a78d8); min-width: 4px; } ul.bars b { text-align: right; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; } .two-col .card { margin: 0; }
.tabbar a span { font-size: 1.25rem; }
textarea { font: inherit; width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; resize: vertical; }

/* ---- Stage 4: schedule ---- */
.seg-tabs { display: flex; gap: .4rem; margin: .2rem 0 1rem; }
.seg-tabs button { flex: 1; padding: .6rem; border-radius: 12px; font-weight: 600; }
.seg-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.day h2 { font-size: 1rem; margin: 1rem 0 .5rem; } .day h2 small { color: var(--muted); font-weight: 400; margin-left: .4rem; }
ul.appts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.appt { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border-radius: 16px; padding: .75rem .85rem; box-shadow: 0 1px 0 var(--line); border-left: 5px solid #7A5CFA; }
.appt.done { border-left-color: #1f9d6b; } .appt.missed { border-left-color: #d64545; } .appt.cancelled { border-left-color: #b8bfd0; opacity: .75; }
.appt.late { border-left-color: #e0a100; }
.appt-time { min-width: 56px; display: flex; flex-direction: column; } .appt-time b { font-family: 'Fredoka', sans-serif; font-size: 1.15rem; } .appt-time small { color: var(--muted); }
.appt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; } .appt-main small { color: var(--muted); overflow-wrap: anywhere; } .appt-main .outcome { color: #14633f; }
.appt-actions { display: flex; gap: .35rem; }
.mini.ok { background: #d8f5e4; border-color: #b6e6c9; color: #14633f; font-weight: 700; }
a.mini { display: inline-grid; place-items: center; text-decoration: none; }
.menu { display: grid; gap: .5rem; } .menu .btn, .menu button { text-align: left; width: 100%; }
.warn-line { background: #fff4d6; color: #5a4300; padding: .5rem .75rem; border-radius: 10px; margin: 0 0 .6rem; }

/* Admin: record a sale */
#addsale summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
#addsale summary small { color: var(--muted); }
#addsale form { margin-top: 1rem; }
