:root {
  /* Indus logo palette: Navy #0B2D4A (trust, stability) and Gold #D4AF37 (success, value) */
  --navy: #0B2D4A; --navy-hover: #14426a; --gold: #D4AF37; --gold-deep: #7a5f10;
  --bg: #faf7ef; --card: #ffffff; --line: #e8e1cd; --text: #172f45; --muted: #6b7886;
  --orange: #D4AF37; --orange-soft: #f6efd6; --yellow: #D4AF37; --yellow-soft: #faf3d6;
  --ms-bg: #fde8cf; --ms-fg: #b0560c; --ms-bar: #f3a24f;
  --hsd-bg: #def2e1; --hsd-fg: #2c7a43; --hsd-bar: #6fbf86;
  --green: #3f9b5f; --red: #d2493f; --side: 264px; --rail: 64px; --top: 60px;
  --shadow: 0 1px 2px rgba(11, 45, 74, .06), 0 4px 14px rgba(11, 45, 74, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--red); min-height: 1.3em; margin: 0; font-size: 14px; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { margin: 0; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--orange-soft); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #14426a; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--orange-soft); }
input, select { font: inherit; color: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: var(--yellow); }
input[readonly] { background: var(--orange-soft); cursor: pointer; }
input[type=number] { text-align: right; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, var(--yellow-soft), transparent 50%), radial-gradient(circle at 90% 90%, var(--orange-soft), transparent 55%), var(--bg); }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: 18px; padding: 28px; display: grid; gap: 12px; box-shadow: var(--shadow); text-align: center; }
.login-card label { display: grid; gap: 4px; text-align: left; font-size: 13px; color: var(--muted); }
.login-logo { width: 72px; margin: 0 auto; }

/* Shell */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 20px; letter-spacing: .5px; color: var(--orange); }
.spacer { flex: 1; }
.top-logo { width: 38px; height: 38px; }
.ro-pill { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--yellow-soft); font-weight: 600; font-size: 14px; }
.price-chips { display: flex; gap: 8px; }
.price-chip{font-size:13px;color:#4e5b69;background:#f7f2e2;border:1px solid #e6dcc0;
  border-radius:999px;padding:6px 12px;white-space:nowrap}
.price-chip.MS{background:var(--ms-bg);border-color:var(--ms-bg);color:var(--ms-fg)}.price-chip.HSD{background:var(--hsd-bg);border-color:var(--hsd-bg);color:var(--hsd-fg)}
.price-chip:empty { display: none; }
.price-chip.neg { color: var(--red); }
.price-chip.profit { font-weight: 700; color: var(--text); }
.sync-btn { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--orange-soft); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.sync-btn:hover { border-color: var(--orange); }
.sync-btn span { display: grid; line-height: 1.15; font-size: 13px; }
.sync-btn small { color: var(--muted); font-size: 11px; }

.sidebar { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 15; background: var(--card); border-right: 1px solid var(--line); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; transition: width .2s, transform .2s; }
.sidebar a, .sidebar .group > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; }
.sidebar a:hover, .sidebar .group > button:hover { background: var(--orange-soft); }
.sidebar a.active { background: var(--yellow-soft); color: #0B2D4A; font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.sidebar .caret { margin-left: auto; width: 18px; height: 18px; transition: transform .2s; }
.group.open .caret { transform: rotate(180deg); }
.group .sub { display: none; padding-left: 14px; }
.group.open .sub { display: block; }
.view { margin-left: var(--side); padding: calc(var(--top) + 20px) 22px 40px; transition: margin .2s; max-width: 1280px; }

.collapsed .sidebar { width: var(--rail); }
.collapsed .view { margin-left: var(--rail); }
.collapsed .sidebar span, .collapsed .sidebar .caret { display: none; }
.collapsed .sidebar a, .collapsed .sidebar .group > button { justify-content: center; padding: 12px 0; }
.collapsed .group .sub { display: block; padding-left: 0; }
.scrim { display: none; }

@media (max-width: 820px) {
  .view { margin-left: 0 !important; padding: calc(var(--top) + 14px) 12px 40px; }
  .sidebar { width: var(--side) !important; transform: translateX(-100%); box-shadow: var(--shadow); }
  .collapsed .sidebar span, .collapsed .sidebar .caret { display: inline; }
  .collapsed .sidebar a, .collapsed .sidebar .group > button { justify-content: flex-start; padding: 10px 12px; }
  .collapsed .group .sub { display: none; padding-left: 14px; }
  .collapsed .group.open .sub { display: block; }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(11, 45, 74, .3); z-index: 14; }
  .ro-pill { max-width: 110px; padding: 6px 10px; }
  .sync-btn span { display: none; }
  .sync-btn { padding: 8px; }
  .brand, .price-chips { display: none; }
  td input, td select { min-width: 66px; padding: 7px 6px; }
  .card { padding: 12px; }
  .collapsible { padding: 0; }
  .sec-head { padding: 12px; } .sec-body { padding: 0 12px 12px; }
}

/* Content */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.page-head h2 { font-size: 22px; }
.page-head .grow { flex: 1; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat { font-size: 26px; font-weight: 700; }
.stat small { font-size: 13px; font-weight: 500; color: var(--muted); }
.empty { text-align: center; padding: 38px 16px; display: grid; gap: 12px; justify-items: center; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--yellow-soft); color: #7a5f10; }
.tag.MS { background: var(--ms-bg); color: var(--ms-fg); } .tag.HSD { background: var(--hsd-bg); color: var(--hsd-fg); }
.bar { height: 9px; border-radius: 6px; background: var(--orange-soft); overflow: hidden; margin: 6px 0; }
.bar i.MS { background: var(--ms-bar); } .bar i.HSD { background: var(--hsd-bar); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: 6px; }
.row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tank { padding: 10px 0; border-top: 1px solid var(--line); } .tank:first-of-type { border-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }

/* Collapsible sections */
.collapsible { padding: 0; }
.sec-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 14px; }
.sec-head:hover { background: var(--orange-soft); }
.sec-head h3 { margin: 0; white-space: nowrap; }
.sec-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 400; }
.collapsible .caret { width: 20px; height: 20px; transition: transform .2s; transform: rotate(180deg); }
.collapsible.collapsed .caret { transform: none; }
.sec-body { padding: 0 16px 16px; }
.collapsed .sec-body { display: none; }
.pump h4 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.pump h4 { align-items: center; flex-wrap: wrap; }
.pump h4 .muted { font-weight: 400; font-size: 13px; margin-left: auto; }
.pump h4 input.serial { width: 150px; padding: 4px 8px; font-size: 13px; }
.pump { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }

.sum-chip { display: inline-block; margin: 0 6px; padding: 1px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--yellow-soft); color: #7a5f10; }
.sum-chip.MS { background: var(--ms-bg); color: var(--ms-fg); }
.sum-chip.HSD { background: var(--hsd-bg); color: var(--hsd-fg); }

/* Tables (scroll on mobile) */
.tscroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 6px 8px; white-space: nowrap; }
td { padding: 5px 6px; border-top: 1px solid var(--line); }
td input, td select { min-width: 84px; }
td.num, th.num { text-align: right; }
td.calc { text-align: right; font-weight: 600; white-space: nowrap; padding-right: 10px; }
.stack { display: grid; gap: 14px; }
.two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.totals { display: grid; gap: 6px; }
.totals .row.big { font-size: 17px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line); }
.diff.ok { color: var(--green); } .diff.bad { color: var(--red); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.rates { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.rates label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); width: 130px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 9px 16px; border-radius: 10px; z-index: 50; font-size: 14px; }

dialog { border: 0; border-radius: 16px; padding: 22px; width: min(420px, calc(100vw - 24px)); box-shadow: 0 10px 40px rgba(11, 45, 74, .25); }
dialog::backdrop { background: rgba(11, 45, 74, .35); }
dialog p { color: var(--muted); }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--orange-soft); border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; margin: 8px auto 0; }
.spinner.stop { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Help & Guidelines */
.help { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; height: calc(100vh - 170px); min-height: 520px; }
.help-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.help-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.guide { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.guide h3 { margin: 0; }
.guide-progress { height: 6px; background: var(--orange-soft); border-radius: 6px; overflow: hidden; }
.guide-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.guide-step { display: flex; gap: 10px; background: var(--yellow-soft); border-radius: 12px; padding: 12px; }
.guide-step p { margin: 4px 0 0; font-size: 14px; }
.guide-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.guide-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.guide-list button { width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.guide-list button:hover { background: var(--orange-soft); }
.guide-list button.cur { color: var(--text); font-weight: 600; background: var(--orange-soft); }
.guide-list button.done { color: var(--green); }
.guide-list button.done::before { content: "✓ "; }
.btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 820px) {
  .help { grid-template-columns: 1fr; height: auto; }
  .help-frame { height: 70vh; }
}

/* One box holding Sales summary + Cash collection summary */
.sum-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
.sum-split section { padding: 16px; min-width: 0; }
.sum-split section + section { border-left: 1px solid var(--line); }
@media (max-width: 820px) {
  .sum-split { grid-template-columns: 1fr; }
  .sum-split section { padding: 12px; }
  .sum-split section + section { border-left: 0; border-top: 1px solid var(--line); }
}

/* Keep Net sales and Net collection on the same line (pinned to the bottom of each column) */
.sum-split section { display: flex; flex-direction: column; }
.sum-split .totals { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sum-split .totals .row.big { margin-top: auto; }
@media (max-width: 820px) { .sum-split .totals .row.big { margin-top: 6px; } }

/* Credit customers: red = credit given (up), green = dues received (down) */
th.cr-given, td.cr-given { color: var(--red); } th.cr-recv, td.cr-recv { color: var(--green); }
th.cr-given .i, th.cr-recv .i { width: 14px; height: 14px; vertical-align: -2px; stroke-width: 2.4; }
input.cr-given-in { color: var(--red); } input.cr-recv-in { color: var(--green); }

/* Customers / Employees lists */
.nl-add { display: flex; gap: 8px; margin-bottom: 4px; }
.nl-add input { flex: 1; max-width: 380px; }

/* No spinner arrows on number boxes */
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Credit column button in Cash collected, and its pop-up */
.input-like { width: 100%; min-width: 84px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: var(--red); text-align: right; cursor: pointer; }
.input-like:hover { border-color: var(--orange); background: var(--orange-soft); }
#creditDlg { width: min(560px, calc(100vw - 24px)); }
.crd-row { display: grid; grid-template-columns: 1fr 130px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.crd-row select, .crd-row .crd-new { grid-column: 1; }
.crd-row .crd-amt { grid-column: 2; color: var(--red); }
.cr-given-ro { text-align: right; color: var(--red); padding: 8px 10px; white-space: nowrap; }
td small.muted { display: block; font-size: 11px; margin: 2px 0 0 4px; }
@media (max-width: 480px) { .crd-row { grid-template-columns: 1fr 100px 32px; } }

/* Manual setup */
.ms-n { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; margin-left: 12px; }
.ms-n input { width: 76px; padding: 5px 8px; }

/* Lists: quiet action buttons, danger button */
.nl-actions { text-align: right; white-space: nowrap; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: #fdecea; border-color: var(--red); }
#rmDlg input { margin-top: 6px; }

/* DSR bottom action bar and submitted state */
.action-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.action-bar .grow { flex: 1; }
.sub-badge { background: #def2e1; border-color: #def2e1; color: #2c7a43; font-weight: 600; }

/* Pump reading slip */
#slipDlg { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.slip-choose { display: flex; gap: 12px; margin: 14px 0; } .slip-choose .btn { flex: 1; padding: 18px 12px; font-size: 16px; }
.slip-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.slip-thumb { width: 130px; max-height: 190px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.slip-info { display: grid; gap: 8px; font-size: 14px; min-width: 0; } .slip-info label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.slip-table td { vertical-align: middle; } .slip-table td select { width: auto; min-width: 120px; }
.ok { color: var(--green); } .warn { color: #8a6d14; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; } .chk input { width: auto; }
.slip-raw { max-height: 200px; overflow: auto; font-size: 12px; white-space: pre-wrap; background: var(--orange-soft); padding: 8px; border-radius: 8px; }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); margin: 6px 0; }
@media (max-width: 520px) { .slip-top { flex-direction: column; } .slip-thumb { width: 100%; max-height: 160px; } }

.slip-unsure td { background: #faf3d6; } .slip-table small { display: block; font-size: 11px; margin-top: 2px; }

/* DSR calendar: green = entries, red = past day without entries */
.dp-wrap { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.datepick { position: relative; }
.dp-btn { display: inline-flex; align-items: center; gap: 10px; justify-content: space-between; min-width: 170px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: var(--text); cursor: pointer; }
.dp-btn:hover { border-color: var(--orange); } .dp-btn .i { width: 18px; height: 18px; }
.cal-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: min(300px, 92vw); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(11, 45, 74, .18); padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 20px; cursor: pointer; color: var(--text); } .cal-head button:hover { background: var(--orange-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow span { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-grid button { height: 34px; border: 1px solid transparent; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.cal-grid button:hover { border-color: var(--orange); }
.cal-grid .cal-has { background: #def2e1; color: #2c7a43; }
.cal-grid .cal-miss { background: #fde3df; color: #b3382f; }
.cal-grid .cal-today { box-shadow: inset 0 0 0 2px var(--yellow); }
.cal-grid .cal-sel { background: var(--orange); color: #fff; font-weight: 700; }
.cal-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-foot button { margin-left: auto; border: 0; background: none; color: var(--orange); font: inherit; font-weight: 600; cursor: pointer; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; } .cal-dot.g { background: #def2e1; border: 1px solid #9ad2a6; } .cal-dot.r { background: #fde3df; border: 1px solid #efa59d; }

/* ===== Phones ===== */
@media (max-width: 640px) {
  /* 16px text in boxes stops iPhones zooming the page when you tap one */
  input, select, textarea { font-size: 16px; }
  /* table rows become stacked cards: a small heading above each box */
  .tscroll { overflow-x: visible; }
  table.stk, table.stk tbody { display: block; width: 100%; }
  table.stk tr:has(th) { display: none; }
  table.stk tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
  table.stk tr:first-of-type { border-top: 0; }
  table.stk td { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; min-width: 0; text-align: left; }
  table.stk td[data-label]:not([data-label=""])::before { content: attr(data-label); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
  table.stk td:first-child, table.stk td[colspan], table.stk td[data-label=""] { grid-column: 1 / -1; }
  table.stk td[data-label=""] { align-items: flex-end; }
  table.stk td input, table.stk td select, table.stk td .input-like { min-width: 0; width: 100%; }
  table.stk td.calc { align-items: flex-start; text-align: left; padding: 0; font-size: 15px; }
  table.stk td.num { text-align: left; }
  table.stk td:first-child:not(:has(input, select, button)) { align-items: flex-start; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  table.stk td:first-child:not(:has(input, select, button))::before { display: none; }
  .cr-given-ro { text-align: left; padding: 8px 0; }
  .pump h4 { gap: 8px; } .pump h4 .btn { width: 100%; } .pump h4 input.serial { flex: 1; width: auto; }
  .pump h4 .muted { margin-left: 0; width: 100%; }
  .pump { padding: 10px; }
  .page-head { gap: 8px; } .page-head h2 { font-size: 20px; }
  .action-bar .btn { flex: 1; padding: 12px 8px; }
  .action-bar .grow, .action-bar .muted { display: none; }
  .dp-btn { min-width: 150px; }
  .sec-sum { font-size: 12px; }
  .nl-add input { max-width: none; }
  dialog { padding: 16px; }
  .crd-row { grid-template-columns: 1fr 96px 32px; }
  #view { overflow-x: hidden; }
}

/* Collapsible sections: add-buttons live inside the body; side-by-side pairs keep their own height */
.sec-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.two.top { align-items: start; }

/* Upload pump reading slip: inviting, tactile button */
.slip-btn { position: relative; overflow: hidden; gap: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: #7a5f10;
  background: linear-gradient(135deg, var(--yellow-soft) 0%, #f1e3a8 100%); border: 1.5px solid var(--orange); border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 6px rgba(212, 175, 55, .22); transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease; }
.slip-btn .i { width: 18px; height: 18px; transition: transform .25s ease; }
.slip-btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.slip-btn:hover { transform: translateY(-1px); color: #fff; background: linear-gradient(135deg, #14426a 0%, var(--orange) 100%); box-shadow: 0 6px 14px rgba(212, 175, 55, .38); }
.slip-btn:hover::after { left: 120%; }
.slip-btn:hover .i { transform: rotate(-8deg) scale(1.12); }
.slip-btn:active { transform: translateY(0) scale(.97); box-shadow: 0 1px 3px rgba(212, 175, 55, .4); }
.slip-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.slip-btn:disabled { color: var(--muted); background: #f4efe7; border-color: var(--line); box-shadow: none; transform: none; cursor: not-allowed; }
.slip-btn:disabled::after { display: none; }
@media (hover: none) { .slip-btn:hover { transform: none; color: #7a5f10; background: linear-gradient(135deg, var(--yellow-soft) 0%, #f1e3a8 100%); box-shadow: 0 2px 6px rgba(212, 175, 55, .22); } .slip-btn:active { background: var(--orange); color: #fff; } }
@media (prefers-reduced-motion: reduce) { .slip-btn, .slip-btn .i, .slip-btn::after { transition: none; } }
@media (max-width: 640px) { .pump h4 .slip-btn { width: 100%; justify-content: center; padding: 12px 14px; font-size: 15px; } }

/* Sign in / Sign up */
.login-card { text-align: left; } .login-card h1, .login-card > .muted, .login-logo { text-align: center; }
.login-card > .muted { margin: 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--orange-soft); padding: 4px; border-radius: 12px; margin: 6px 0 2px; }
.auth-tabs button { border: 0; background: none; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(11, 45, 74, .15); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.auth-form .small, .small { font-size: 12px; margin: 0; }
.pw-wrap { position: relative; display: block; } .pw-wrap input { padding-right: 62px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--orange); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.pw-meter { height: 6px; border-radius: 6px; background: var(--orange-soft); overflow: hidden; margin-top: -6px; } .pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s, background .2s; }
.notice { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--text); }
.auth-done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 8px 0; }
.auth-tick { width: 52px; height: 52px; border-radius: 50%; background: #def2e1; color: var(--green); display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.login-card { width: min(420px, 100%); }

/* Admin */
.st-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-approved { background: #def2e1; color: #2c7a43; } .st-pending { background: var(--yellow-soft); color: #7a5f10; } .st-blocked { background: #fde3df; color: #b3382f; }
.adm-row { cursor: pointer; } .adm-row:hover td { background: var(--orange-soft); }
#admDsrDlg { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
#admDsrBody h4 { margin: 14px 0 4px; font-size: 14px; } .adm-t td, .adm-t th { padding: 5px 8px; }
.adm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 6px 0; }
.adm-sum div { background: var(--orange-soft); border-radius: 10px; padding: 8px 10px; } .adm-sum small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; } .adm-sum b { font-size: 16px; }

/* Admin entrance on the sign-in page */
.login-card { position: relative; }
.admin-corner { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.admin-corner .i { width: 15px; height: 15px; } .admin-corner:hover { color: #7a5f10; border-color: var(--orange); background: var(--orange-soft); }
.admin-banner { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 2px; padding: 10px; border-radius: 12px; background: var(--yellow-soft); border: 1px solid var(--yellow); color: #7a5f10; font-weight: 700; }
.admin-banner .i { width: 18px; height: 18px; }

/* Administrator console */
.is-admin .dealer-only { display: none !important; }
.app:not(.is-admin) .admin-only { display: none !important; }
.is-admin .brand::after { content: " Admin"; font-size: 12px; font-weight: 700; color: #7a5f10; background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: middle; }
.adm-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.adm-tools input[type=search], .adm-tools input[type=date], .adm-tools select, .adm-tools input:not([type=checkbox]) { width: auto; min-width: 150px; flex: 0 1 260px; }
.adm-tools .grow { flex: 1; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--line); background: #fff; padding: 7px 12px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button:last-child { border-right: 0; } .seg button:hover { background: var(--orange-soft); } .seg button.on { background: var(--orange); color: #fff; font-weight: 600; }
.seg button i { font-style: normal; opacity: .75; margin-left: 4px; }
.statlink { color: inherit; text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; } .statlink:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11, 45, 74, .12); }
.neg-text { color: var(--red); } .neg-text small { color: var(--muted); }
.feed-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; } .feed-row:first-of-type { border-top: 0; }
textarea { font: inherit; color: inherit; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; }
textarea:focus { outline: 2px solid var(--yellow); border-color: var(--yellow); }
.plain { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
code { background: var(--orange-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.temp-pw { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--yellow-soft); border: 1px dashed var(--orange); border-radius: 12px; padding: 14px 16px; margin: 8px 0; }
.temp-pw code { font-size: 22px; letter-spacing: 1px; background: none; padding: 0; user-select: all; }
.notice-bar { position: fixed; top: var(--top); left: var(--side); right: 0; z-index: 12; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 18px; background: var(--yellow-soft); border-bottom: 1px solid var(--yellow); color: #5a4710; font-size: 14px; }
.notice-bar button { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.collapsed ~ .notice-bar, .collapsed .notice-bar { left: var(--rail); }
body:has(.notice-bar:not(.hidden)) .view { padding-top: calc(var(--top) + 64px); }
#accountDlg { width: min(440px, calc(100vw - 24px)); } #contactDlg, #tempDlg { width: min(440px, calc(100vw - 24px)); }
.admin-corner + .login-logo { margin-top: 8px; }
@media (max-width: 820px) { .notice-bar { left: 0; } .feed-row { grid-template-columns: 1fr; gap: 0; } }

/* Customers list: name + mobile on the add form */
.nl-add { flex-wrap: wrap; } .nl-add input { flex: 1 1 200px; max-width: 280px; }
input.bad { border-color: var(--red); box-shadow: 0 0 0 2px #fdecea; }
input.need { background: var(--yellow-soft); border-color: var(--yellow); }
td input[data-phone] { min-width: 130px; }

/* Indus logo: round, so the square image never shows its corners */
.top-logo, .login-logo { border-radius: 50%; object-fit: cover; }

/* ===== Navy and gold theme (logo palette) ===== */
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.btn:hover { background: var(--orange-soft); }
.btn.primary:disabled { opacity: .5; }
.brand { color: var(--navy); }
.sidebar a.active { box-shadow: inset 3px 0 0 var(--gold); }
.guide-n, .cal-grid .cal-sel, .seg button.on { background: var(--navy); color: #fff; }
.cal-grid .cal-today { box-shadow: inset 0 0 0 2px var(--gold); }
.bar i, .guide-progress i { background: linear-gradient(90deg, #e6cd73, var(--gold)); }
.bar i.MS { background: var(--ms-bar); } .bar i.HSD { background: var(--hsd-bar); }
.slip-btn:hover { color: #fff; background: linear-gradient(135deg, var(--navy-hover) 0%, var(--navy) 100%); box-shadow: 0 6px 14px rgba(11, 45, 74, .35); }
.slip-btn { border-color: var(--gold); }
.pw-eye, .cal-foot button, .auth-tabs button.on { color: var(--navy); }
.pw-eye:hover { text-decoration: underline; }
input:focus, select:focus, textarea:focus { outline-color: var(--gold); border-color: var(--gold); }
.spinner { border-top-color: var(--navy); }
.price-chip.profit { color: var(--navy); }
.sync-btn:hover, .dp-btn:hover, .admin-corner:hover { border-color: var(--gold); }
.admin-corner:hover { color: var(--navy); }
.st-pending { background: var(--yellow-soft); color: #7a5f10; }
.top-logo { box-shadow: 0 0 0 1px var(--line); }
@media (hover: none) { .slip-btn:active { background: var(--navy); color: #fff; } }
