/* =====================================================================
   IBWE CLEANING SERVICES — Mtindo wa tovuti na admin
   ===================================================================== */
:root {
  --navy: #0B2A5C;
  --navy-2: #12397a;
  --navy-ink: #06183A;
  --lime: #C8F25A;
  --lime-dark: #a9d63a;
  --blue: #1F58B0;
  --sky: #E4EEFB;
  --ink: #0B2A5C;
  --muted: #4A6189;
  --line: #DCE5F3;
  --bg: #FFFFFF;
  --bg-alt: #F3F7FD;
  --danger: #B3261E;
  --radius: 20px;
  --shadow: 0 12px 32px rgba(11, 42, 92, .12);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h2, .h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Vitufe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 16px var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: var(--navy); }
.btn-primary:hover { background: var(--lime-dark); color: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Kichwa ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand img { height: 52px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav nav a:not(.btn) { color: var(--navy); text-decoration: none; font-weight: 500; }
.nav nav a:not(.btn):hover { color: var(--blue); }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #fff; padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 700; color: var(--lime); margin-bottom: 14px; }
.eyebrow.dark { color: var(--blue); }
.hero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -.025em; line-height: .98; }
.hero h1 span { color: var(--lime); }
.lead { font-size: 19px; color: rgba(255,255,255,.88); max-width: 520px; }
.lead.dark { color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-actions.center { justify-content: center; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.hero-chips li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: rgba(255,255,255,.88); }
.hero-media { position: relative; }
.hero-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 28px; border: 6px solid rgba(255,255,255,.1); }
.hero-badge { position: absolute; left: -36px; bottom: -36px; width: 42%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid var(--lime); box-shadow: var(--shadow); }

/* ---------- Sehemu ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 36px; }
.note { margin-top: 20px; color: var(--muted); font-size: 14px; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; display: flex; flex-direction: column; }
.service-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; margin-bottom: 16px; }
.service-card .muted { font-size: 15px; }
.price-list { list-style: none; padding: 0; margin: 6px 0 0; }
.price-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.price-list span small, .price-list strong small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.price-list strong { text-align: right; white-space: nowrap; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.steps span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); font: 800 20px var(--display); margin-bottom: 16px; }
.steps p { color: var(--muted); margin: 0; }

/* ---------- Fomu ya kuomba ---------- */
.request-form { display: grid; grid-template-columns: 1.3fr .9fr; gap: 28px; align-items: start; }
.picker { display: flex; flex-direction: column; gap: 12px; }
.picker-group { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.picker-group summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; min-height: 56px; }
.picker-group summary::-webkit-details-marker { display: none; }
.picker-group summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--muted); }
.picker-group[open] summary::after { content: '−'; }
.picker-group[open] summary { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.group-count { white-space: nowrap; font-style: normal; background: var(--lime); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.group-count:empty { display: none; }
.picker-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.picker-row:first-of-type { border-top: 0; }
.picker-row.selected { background: #F7FCE8; }
.picker-info { display: flex; flex-direction: column; }
.picker-name { font-weight: 600; }
.picker-price { font-size: 14px; color: var(--muted); }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.qty-btn { width: 44px; height: 44px; border: 0; background: #fff; font-size: 20px; cursor: pointer; color: var(--navy); }
.qty-btn:hover { background: var(--sky); }
.qty input { width: 52px; height: 44px; border: 0; text-align: center; font: 700 16px var(--body); color: var(--navy); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.summary { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.estimate { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; }
.estimate span { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.75); }
.estimate strong { font: 800 36px var(--display); color: var(--lime); }
.estimate small { color: rgba(255,255,255,.8); }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=datetime-local], input[type=search], select, textarea {
  font: 500 16px var(--body); color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 88, 176, .25); border-color: var(--blue); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 22px; height: 22px; accent-color: var(--navy); }

.alert { border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-error { background: #FDECEA; color: var(--danger); border: 1px solid #F5C6C2; }
.alert-ok { background: #EEF9D9; color: #2F5A06; border: 1px solid #D3EE9C; }

.track-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.track-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.track-inline input { flex: 1 1 220px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* ---------- Mafanikio / ufuatiliaji ---------- */
.success-card { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 44px 32px; box-shadow: var(--shadow); }
.success-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--lime); color: var(--navy); display: grid; place-items: center; margin: 0 auto 18px; }
.ref-box { background: var(--navy); color: #fff; border-radius: 18px; padding: 18px; margin: 24px auto; max-width: 340px; display: flex; flex-direction: column; }
.ref-box span, .ref-box small { color: rgba(255,255,255,.8); font-size: 14px; }
.ref-box strong { font: 800 40px var(--display); color: var(--lime); letter-spacing: .02em; }
.table { width: 100%; border-collapse: collapse; text-align: left; margin: 12px 0; font-size: 15px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.table tfoot th { font-size: 16px; }
.num { text-align: right; white-space: nowrap; }
.track-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.track-top h2 { margin: 0; }
.progress { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.progress li span { display: block; height: 8px; border-radius: 99px; background: var(--line); margin-bottom: 8px; }
.progress li.done { color: var(--navy); }
.progress li.done span { background: var(--lime-dark); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0 0 12px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 3px solid var(--sky); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 15px; width: 11px; height: 11px; border-radius: 50%; background: var(--blue); }
.timeline time { color: var(--muted); font-size: 14px; margin-right: 6px; }

.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-mpya { background: #FFF1C9; color: #7A5300; }
.badge-imethibitishwa { background: var(--sky); color: var(--navy); }
.badge-inaendelea { background: #DCEBFF; color: #0F4AA8; }
.badge-imekamilika { background: #E4F7C9; color: #2F5A06; }
.badge-imeghairiwa { background: #FDECEA; color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-ink); color: rgba(255,255,255,.85); padding: 56px 0 24px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-logo { height: 72px; width: auto; background: #fff; border-radius: 16px; padding: 8px 12px; margin-bottom: 14px; }
.site-footer h3 { color: #fff; font-size: 17px; }
.site-footer p { margin: 0 0 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: 14px; color: rgba(255,255,255,.6); }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 30; }
.wa-float:hover { color: #fff; transform: scale(1.05); }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-body { background: var(--bg-alt); }
.admin-top { background: var(--navy); color: #fff; }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.admin-top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-top nav a { color: rgba(255,255,255,.85); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.admin-top nav a.active, .admin-top nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 18px var(--display); }
.admin-brand img { height: 40px; background: #fff; border-radius: 10px; padding: 3px 6px; }
.admin-main { padding: 32px 0 64px; }
.admin-main h1 { font-size: 32px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; text-decoration: none; color: var(--ink); }
.stat span { font-size: 14px; color: var(--muted); }
.stat strong { display: block; font: 800 32px var(--display); }
.stat.highlight { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat.highlight span { color: rgba(255,255,255,.8); }
.stat.highlight strong { color: var(--lime); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 200px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.table-wrap .table { margin: 0; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 18px; }
.table tr.inactive td { opacity: .5; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--blue); font: 600 15px var(--body); cursor: pointer; padding: 0; text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.pager { display: flex; gap: 8px; margin-top: 16px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 16px; }
.login-card { background: #fff; border-radius: 24px; padding: 32px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card img { height: 88px; width: auto; margin: 0 auto 6px; }

/* ---------- Simu ---------- */
@media (max-width: 920px) {
  .hero-grid, .request-form, .grid-2 { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 520px; margin-left: 36px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary { position: static; }
}
@media (max-width: 640px) {
  .nav { padding: 8px 0; flex-wrap: nowrap; }
  .hide-sm { display: none; }
  .nav nav { flex-wrap: nowrap; }
  .nav nav { gap: 12px; font-size: 15px; }
  .brand img { height: 44px; }
  .hero { padding: 40px 0 64px; }
  .service-grid, .steps, .footer-grid, .form-grid, .facts { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .progress { font-size: 12px; }
  .picker-row { padding: 12px 14px; gap: 10px; }
  .picker-info { flex: 1 1 auto; min-width: 0; }
  .qty-btn { width: 40px; }
  .qty input { width: 40px; }
  .picker-group summary { padding: 14px; font-size: 16px; }
}

/* =====================================================================
   VIFURUSHI NA SALIO
   ===================================================================== */
.pkg-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #F7FCE8; font-size: 14px; }
.card-accent { border-left: 0; box-shadow: inset 0 0 0 2px var(--lime), var(--shadow); }
.pkg-summary { display: flex; align-items: center; gap: 22px; margin: 18px 0; flex-wrap: wrap; }
.pkg-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #fff 76%, transparent 77% 100%), conic-gradient(var(--lime-dark) calc(var(--p) * 1%), var(--sky) 0); }
.pkg-ring strong { font: 800 40px/1 var(--display); color: var(--navy); }
.pkg-ring span { font-size: 13px; color: var(--muted); }
.pkg-big { font: 800 24px var(--display); margin-bottom: 4px; }
.balance-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 14px; }
.balance-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-weight: 600; }
.bar { height: 10px; border-radius: 99px; background: var(--sky); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--lime-dark); border-radius: 99px; }
.bar.sm { height: 6px; margin-top: 6px; max-width: 120px; }
.qty-mini { width: 90px !important; min-height: 40px !important; text-align: center; }
.pkg-editor { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }
.pkg-editor summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.pkg-editor .picker-row { padding: 8px 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--bg-alt); }

/* =====================================================================
   SIMU: menyu ya chini, kitufe cha makadirio, jedwali kuwa kadi
   ===================================================================== */
.tabbar { display: none; }
.est-bar { display: none; }
.est-bar[hidden] { display: none !important; }

@media (max-width: 920px) {
  .est-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 25; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--navy); color: #fff; border-radius: 18px; padding: 10px 12px 10px 18px; box-shadow: 0 12px 30px rgba(6,24,58,.35); }
  .est-bar span { display: flex; flex-direction: column; font-size: 12px; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .1em; }
  .est-bar strong { font: 800 22px var(--display); color: var(--lime); text-transform: none; letter-spacing: 0; }
}

@media (max-width: 640px) {
  body.has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(11,42,92,.08); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px;
    font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
  .tabbar a.active, .tabbar a:hover { color: var(--navy); }
  .tabbar a.active svg { color: var(--blue); }
  .wa-float { bottom: calc(80px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .est-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .summary { padding: 18px; }
  .estimate strong { font-size: 30px; }
  .pkg-summary { gap: 16px; }
  .pkg-ring { width: 108px; height: 108px; }
  .pkg-ring strong { font-size: 32px; }
  .track-inline .btn { width: 100%; }
  .success-card { padding: 32px 18px; }

  /* Admin */
  .admin-top .wrap { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0; }
  .admin-top nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; max-width: 100%; min-width: 0; }
  .admin-top nav a { flex: none; }
  .admin-main { padding-top: 20px; }
  .admin-main h1 { font-size: 26px; }
  .stat strong { font-size: 26px; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .table-stack td { border: 0; padding: 5px 0 !important; text-align: right; overflow: hidden; }
  .table-stack td::before { content: attr(data-label); float: left; margin-right: 12px; font-size: 12px; line-height: 22px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
  .table-stack td .bar.sm { margin-left: auto; }
  .table-stack td.td-action { padding-top: 8px !important; }
  .table-stack td.td-action::before { content: none; }
  .table-wrap { border-radius: 14px; }
  .card { padding: 18px; }
}

body.est-open .wa-float { display: none; }

/* =====================================================================
   POS, MAUZO, WATEJA
   ===================================================================== */
.admin-top nav a.nav-pos { background: var(--lime); color: var(--navy); }
.admin-top nav a.nav-pos:hover, .admin-top nav a.nav-pos.active { background: var(--lime-dark); color: var(--navy); }
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pos-today { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--navy); }
.pos { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pos-catalog { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 14px; font: 600 14px var(--body); cursor: pointer; min-height: 40px; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-item { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; min-height: 86px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; font: 700 15px var(--body); color: var(--navy); position: relative; }
.pos-item small { font-weight: 500; color: var(--muted); font-size: 13px; }
.pos-item em { font-style: normal; font-size: 11px; background: var(--lime); border-radius: 99px; padding: 2px 8px; align-self: flex-start; }
.pos-item:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.pos-item:active { transform: scale(.98); }
.pos-cart { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.cust-info { background: var(--bg-alt); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.cust-pkg { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cart-lines { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.cart-line { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.cart-line.is-pkg { box-shadow: inset 4px 0 0 var(--lime-dark); }
.line-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.line-name { font-weight: 700; }
.line-name em { font-style: normal; font-size: 11px; background: var(--lime); border-radius: 99px; padding: 2px 8px; }
.line-name-input { min-height: 40px !important; }
.line-remove { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; width: 36px; height: 36px; flex: none; }
.line-remove:hover { color: var(--danger); }
.line-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.line-price { flex-direction: row; align-items: center; gap: 4px; font-weight: 500; color: var(--muted); }
.line-price input { width: 92px; min-height: 40px; padding: 6px 8px; }
.line-total { min-width: 70px; text-align: right; }
.totals { border-top: 2px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.totals > div, .totals .offer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.totals input { width: 130px; min-height: 40px; text-align: right; }
.offer-row { color: #2F5A06; font-weight: 600; }
.offer-row span { flex: 1; }
.totals .grand { font: 800 26px var(--display); }
.paid-row { display: flex; gap: 8px; }
.change { border-radius: 12px; padding: 10px 14px; background: var(--bg-alt); font-size: 16px; }
.change.ok { background: #EEF9D9; color: #2F5A06; }
.change.debt { background: #FFF1C9; color: #7A5300; }
.pos-pay { min-height: 56px; font-size: 18px; }
.card-warn { box-shadow: inset 0 0 0 2px #F5C6C2, var(--shadow); background: #FFF8F7; }
.offer-banner { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 16px; padding: 16px 20px; }
.offer-banner strong { background: var(--lime); color: var(--navy); border-radius: 999px; padding: 4px 12px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
label.inline input { width: auto; }
.inline-pay { display: flex; gap: 6px; }
.inline-pay input { width: 100px !important; min-height: 40px !important; }
@media (max-width: 920px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; }
  .cart-lines { max-height: none; }
}
@media (max-width: 640px) {
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .totals input { width: 110px; }
  .line-price input { width: 76px; }
  .line-bottom { gap: 6px; }
  .pos-cart { padding: 14px; }
}

/* =====================================================================
   TOLEO LA 4: ofa za msimu, vitendo vya haraka, akaunti, SMS
   ===================================================================== */
.promo-strip { background: linear-gradient(180deg, var(--navy) 0 50%, var(--bg) 50% 100%); padding: 0 0 8px; }
.promo-grid { display: grid; gap: 14px; }
.promo-card { position: relative; display: flex; align-items: center; gap: 22px; background: #fff; border-radius: 24px; padding: 22px 26px;
  box-shadow: 0 18px 40px rgba(6,24,58,.18); border: 2px solid var(--lime); flex-wrap: wrap; }
.promo-tag { position: absolute; top: -12px; left: 22px; background: var(--lime); color: var(--navy); font: 800 12px var(--body); letter-spacing: .14em; padding: 5px 12px; border-radius: 999px; }
.promo-pct { flex: none; width: 104px; height: 104px; border-radius: 50%; background: var(--navy); color: var(--lime); display: grid; place-content: center; text-align: center; font: 800 34px/1 var(--display); }
.promo-pct small { display: block; font: 600 12px var(--body); color: #fff; margin-top: 4px; }
.promo-body { flex: 1 1 260px; }
.promo-body h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 6px; }
.promo-body p { margin: 0 0 4px; color: var(--muted); }
.promo-meta { font-weight: 700; color: var(--navy) !important; }

.quick-actions { padding: 28px 0 0; }
.qa-grid, .me-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.qa-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 18px 20px;
  text-decoration: none; color: var(--navy); min-height: 116px; transition: border-color .15s, box-shadow .15s; }
.qa-card svg { color: var(--blue); margin-bottom: 6px; }
.qa-card strong { font: 800 19px var(--display); }
.qa-card span { color: var(--muted); font-size: 14px; }
.qa-card:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--navy); }
.me-actions { margin-bottom: 18px; }

.quick-form { margin: 0; }
.remember { margin-top: 12px; font-size: 14px; }
.me-box { background: var(--bg-alt); border-radius: 12px; padding: 10px 14px; margin: 0; font-size: 15px; }
.discount-row th { color: #2F5A06; }
#estimateDiscount { color: var(--lime); font-weight: 700; }
.account-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; text-align: left;
  background: var(--bg-alt); border-radius: 16px; padding: 16px 18px; margin: 18px 0 0; }
.account-cta div { display: flex; flex-direction: column; flex: 1 1 260px; }
.account-cta span { color: var(--muted); font-size: 14px; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--sky); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.auth-tabs a { text-align: center; padding: 12px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--navy); }
.auth-tabs a.active { background: var(--navy); color: #fff; }
.auth-card { display: flex; flex-direction: column; gap: 14px; }
.pin-input { letter-spacing: .6em; font-size: 22px !important; text-align: center; }
.center-text { text-align: center; }
.loyalty-card { background: var(--navy); color: #fff; border: 0; }
.loyalty-card .bar { background: rgba(255,255,255,.2); }
.pkg-mini { border-top: 1px solid var(--line); padding: 14px 0; }
.pkg-mini:first-of-type { border-top: 0; padding-top: 0; }

.status-steps { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.step-btn { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: 700 15px var(--body); cursor: pointer; }
.step-btn:hover { background: var(--lime); border-color: var(--lime); }
.step-btn.current { background: var(--navy); color: #fff; cursor: default; }
.sms-tpl { border-top: 1px solid var(--line); padding: 10px 0; }
.sms-tpl textarea { margin-top: 6px; min-height: 64px; font-size: 14px; }
.provider-help { padding-left: 18px; margin: 14px 0 0; }
.provider-help li { margin-bottom: 4px; }

@media (max-width: 640px) {
  .qa-grid, .me-actions { grid-template-columns: 1fr; }
  .qa-card { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 14px 16px; }
  .qa-card svg { margin: 0; }
  .qa-card span { flex-basis: 100%; }
  .promo-card { padding: 22px 18px 18px; gap: 14px; }
  .promo-pct { width: 84px; height: 84px; font-size: 28px; }
  .promo-card .btn { width: 100%; }
  .step-btn { flex: 1 1 45%; }
}

/* =====================================================================
   TOLEO LA 5: Admin ya kitaalamu (sidebar + dashibodi)
   ===================================================================== */
.admin-body { background: #F4F6FA; }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy-ink); color: rgba(255,255,255,.82); display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 8px 14px; }
.side-brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.side-brand span { font: 800 20px/1 var(--display); display: flex; flex-direction: column; }
.side-brand small { font: 500 12px var(--body); color: rgba(255,255,255,.6); margin-top: 4px; letter-spacing: .04em; }
.side-pos { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; background: var(--lime);
  color: var(--navy); font-weight: 800; text-decoration: none; margin-bottom: 8px; }
.side-pos:hover { background: var(--lime-dark); color: var(--navy); }
.side-group { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.4); margin: 14px 10px 6px; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: 15px; min-height: 44px; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.side-link svg { flex: none; opacity: .9; }
.side-count { margin-left: auto; font-style: normal; background: var(--lime); color: var(--navy); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.side-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 14px 10px 4px; display: flex; flex-direction: column; }
.side-user strong { color: #fff; }
.side-user small { color: rgba(255,255,255,.55); }
.admin-content { min-width: 0; }
.topbar { display: none; }
.menu-scrim { display: none; }
.admin-main { padding: 28px 32px 64px; max-width: 1400px; }
.admin-main h1 { font-size: 30px; margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.admin-main .card { box-shadow: 0 1px 2px rgba(11,42,92,.06), 0 8px 24px rgba(11,42,92,.05); border-color: #E3E9F3; }

.kpis { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid #E3E9F3; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
a.kpi:hover { border-color: var(--blue); }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { font: 800 28px/1.15 var(--display); }
.kpi small { font-size: 12.5px; color: var(--muted); }
.kpi-main { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi-main span, .kpi-main small { color: rgba(255,255,255,.75); }
.kpi-main strong { color: var(--lime); font-size: 36px; }
.kpi-alert { box-shadow: inset 0 0 0 2px #F6C343; }

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-grid .card { margin: 0; }
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pipe { border-radius: 14px; padding: 10px 12px; text-decoration: none; display: flex; flex-direction: column; color: var(--navy); background: var(--bg-alt); }
.pipe strong { font: 800 24px var(--display); }
.pipe span { font-size: 12.5px; font-weight: 600; }
.pipe-mpya { background: #FFF6DA; }
.pipe-tayari { background: #EAF8D3; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue li a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.queue li:first-child a { border-top: 0; }
.queue li a:hover { background: var(--bg-alt); }
.q-main { display: flex; flex-direction: column; min-width: 0; }
.q-top { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 200px; align-items: end; padding-top: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar-fill { width: 100%; max-width: 44px; background: var(--blue); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.bar-col:last-child .bar-fill { background: var(--lime-dark); }
.bar-val { font-size: 12px; font-weight: 700; color: var(--muted); }
.bar-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.note-line { margin: 0 0 10px; }
.inline-form select { min-height: 40px; padding: 6px 10px; width: auto; }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-main { grid-column: span 1; }
}
@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .menu-scrim { display: block; position: fixed; inset: 0; background: rgba(6,24,58,.45); z-index: 50; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; padding: 10px 16px; }
  .menu-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
  .topbar-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 800 18px var(--display); margin-right: auto; }
  .topbar-brand img { width: 34px; height: 34px; background: #fff; border-radius: 9px; padding: 2px; object-fit: contain; }
  .admin-main { padding: 20px 16px 48px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-main { grid-column: span 2; }
  .kpi strong { font-size: 22px; }
  .kpi-main strong { font-size: 30px; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main h1 { font-size: 24px; }
  .bars { height: 160px; gap: 6px; }
}
@media (min-width: 1025px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
@media print { .sidebar, .topbar { display: none; } .admin-shell { display: block; } }
.cash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cash-chips .chip { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.kbd-help { margin: 4px 0 0; }
kbd { font: 700 12px ui-monospace, monospace; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
@media (max-width: 1024px) { .kbd-help { display: none; } }

/* Kitu kilichofichwa kibaki kimefichwa hata kama kina display yake */
[hidden] { display: none !important; }

/* Kitufe cha WhatsApp */
.btn-wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; border-color: #1EBE5A; color: #fff; }
