/* Module 06: agent and teller desk, tills, network and kiosk mode. */
.ag-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ag-scroll .ct-tbl td.wrap, .ct-tbl td.wrap { white-space: normal; min-width: 160px; }
.ct-tbl td .sub, .ag-who .sub, .ag-req .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: normal; }
.ag-h { margin: 6px 0 0; font-size: 13px; color: #2f4559; border-bottom: 1px solid #e0e7ed; padding-bottom: 4px; }
.ag-line { font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed #e0e7ed; }
.ag-line:last-child { border-bottom: 0; }
.ag-links { display: grid; gap: 6px; }
.ag-links a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid #d6e0e9; border-radius: 4px; font-weight: 600; font-size: 12.5px; }
.ag-links a:hover { background: #f5faff; }
.ag-links .ct-badge { margin-left: auto; position: static; }
.ag-pos { padding: 6px 0 10px; border-bottom: 1px solid #e6edf3; }
.ag-pos:last-child { border-bottom: 0; }
.ag-pos-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ag-chip { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: #eaf2f9; color: #2f5f88; margin: 1px 3px 1px 0; white-space: nowrap; }
.ag-chip.low { background: var(--warnBg); color: var(--warnFg); }
.ag-chip.over { background: var(--badBg); color: var(--badFg); }
.ag-chip.ok { background: var(--okBg); color: var(--okFg); }
.ag-mini { display: inline-flex; gap: 4px; align-items: center; margin: 2px 0; flex-wrap: wrap; }
.ag-mini .ct-input { min-height: 28px; padding: 2px 6px; width: 150px; font-size: 12px; }
.ag-menu { display: inline-block; position: relative; }
.ag-menu > summary { list-style: none; cursor: pointer; }
.ag-menu > summary::-webkit-details-marker { display: none; }
.ag-menu[open] > div { position: absolute; right: 0; z-index: 5; background: #fff; border: 1px solid #c8d4df; border-radius: 4px; padding: 8px; box-shadow: 0 6px 18px rgba(20, 40, 60, .15); display: grid; gap: 6px; min-width: 260px; }
.ag-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ag-kyb { margin-top: 10px; gap: 6px; }

/* Send and payout */
.ag-who { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; }
.ag-recips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ag-recip { border: 1px solid #c8d4df; border-radius: 4px; padding: 9px 11px; display: grid; gap: 2px; color: inherit; }
.ag-recip span { font-size: 11.5px; color: var(--muted); }
.ag-recip:hover { border-color: #0a6fd2; }
.ag-recip.on { border-color: #0a6fd2; background: #eef6ff; box-shadow: inset 3px 0 0 #0a6fd2; }
.ag-add > summary { cursor: pointer; font-weight: 700; color: #0a6fd2; margin: 6px 0 10px; }
.ag-details { display: grid; gap: 10px; }
.ag-quote { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ag-quote > div { border: 1px solid #d6e0e9; border-radius: 4px; padding: 8px 10px; background: #fafcfe; }
.ag-quote small { display: block; color: var(--muted); font-size: 11.5px; }
.ag-quote b { font-size: 16px; }
.ag-quote .tot { background: #eef6ff; border-color: #b9d6f5; }
.ag-quote .tot b { font-size: 20px; color: #004f9f; }
.ag-quote .sub { display: block; font-size: 11.5px; color: var(--muted); }
.ag-change { font-weight: 700; color: var(--okFg); margin: 0; }
.ag-expire.gone { color: var(--badFg); font-weight: 700; }
.ct-btn.big { min-height: 44px; font-size: 14px; padding: 0 18px; }
.ag-camera { display: grid; gap: 6px; justify-items: start; }
.ag-camera video, .ag-camera img { max-width: 320px; width: 100%; border: 1px solid #c8d4df; border-radius: 4px; background: #000; }
.ag-status { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }

/* Till counts */
.ag-counts { display: grid; gap: 10px; }
.ag-count { border: 1px solid #d6e0e9; border-radius: 4px; padding: 8px 10px 10px; margin: 0; min-width: 0; }
.ag-count legend { font-weight: 700; padding: 0 4px; font-size: 13px; }
.ag-count legend .mut { font-weight: 400; font-size: 12px; margin-left: 6px; }
.ag-denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.ag-denoms label { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); }
.ag-denoms input { width: 100%; min-height: 32px; border: 1px solid #b9c7d4; border-radius: 3px; padding: 2px 6px; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.ag-count-total { margin-top: 8px; font-size: 13px; }
.ag-count-total .short { color: var(--badFg); font-weight: 700; } .ag-count-total .over { color: var(--warnFg); font-weight: 700; } .ag-count-total .even { color: var(--okFg); font-weight: 700; }

/* Float positions */
.ag-positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ag-position { border: 1px solid #c8d4df; border-radius: 4px; background: #fff; padding: 10px 12px; color: inherit; display: grid; gap: 4px; }
.ag-position .top { display: flex; justify-content: space-between; align-items: center; }
.ag-position strong { font-size: 20px; }
.ag-position small { color: var(--muted); font-size: 11.5px; }
.ag-position dl { display: grid; grid-template-columns: auto auto; gap: 2px 10px; margin: 6px 0 0; font-size: 12px; }
.ag-position dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ag-position dt { color: var(--muted); }
.ag-position.on { border-color: #0a6fd2; box-shadow: inset 0 3px 0 #0a6fd2; }
.ag-position.low { box-shadow: inset 0 3px 0 #d99a06; } .ag-position.over { box-shadow: inset 0 3px 0 #df4152; }
.ag-limits { border-bottom: 1px solid #e6edf3; padding: 6px 0; }
.ag-limits > summary { cursor: pointer; font-size: 12.5px; padding: 4px 0; }
.ag-req { padding: 6px 0; border-bottom: 1px solid #e6edf3; font-size: 12.5px; }

/* Network tree */
.ag-tree td:first-child { padding-left: calc(10px + var(--d, 0) * 18px); }
.ag-tree td:first-child .ag-indent { display: none; }

/* Offline queue and network strip */
.ag-netbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 4px; background: var(--warnBg); border: 1px solid #f0d58f; color: var(--warnFg); font-size: 12.5px; }
.ag-netbar.online { background: var(--infoBg); border-color: #c2d9f5; color: var(--infoFg); }
.ag-netbar .ag-net-state { font-weight: 700; }

/* SMS / USSD simulator */
.ag-phone { max-width: 420px; margin: 0 auto; border: 10px solid #24313d; border-radius: 24px; background: #24313d; }
.ag-phone-screen { background: #f1f5f8; border-radius: 12px 12px 0 0; min-height: 320px; max-height: 420px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ag-bubble { max-width: 85%; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.35; background: #fff; border: 1px solid #d6e0e9; align-self: flex-start; }
.ag-bubble.in { align-self: flex-end; background: #0a6fd2; color: #fff; border-color: #0a6fd2; }
.ag-bubble small { display: block; font-size: 10px; opacity: .7; margin-bottom: 2px; }
.ag-phone-input { display: flex; gap: 6px; padding: 8px; background: #fff; }
.ag-phone-input:last-child { border-radius: 0 0 12px 12px; border-top: 1px solid #e0e7ed; }
.ag-phone-input .ct-input { flex: 1; min-width: 0; }

/* Receipts */
.ag-receipt { max-width: 420px; margin: 0 auto; background: #fff; border: 1px dashed #9fb2c6; padding: 18px 20px; font-size: 13px; }
.ag-receipt.inline { margin: 0; }
.ag-receipt header { text-align: center; border-bottom: 1px dashed #c8d4df; padding-bottom: 8px; margin-bottom: 10px; }
.ag-receipt header b { display: block; font-size: 16px; } .ag-receipt header span { color: var(--muted); font-size: 12px; }
.ag-receipt h2 { font-size: 15px; text-align: center; margin: 4px 0 10px; }
.ag-receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.ag-receipt dt { color: var(--muted); } .ag-receipt dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ag-receipt dd.big { font-size: 16px; font-weight: 700; }
.ag-receipt .small { font-size: 11px; color: var(--muted); margin-top: 12px; }
.ag-receipt .sign { margin-top: 26px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: flex-end; }
.ag-receipt .sign span { flex: 1; border-bottom: 1px solid #2f4559; height: 26px; }
@media print { .ct-content > :not(.ag-receipt):not(.ct-stack), .ct-toasts, .ag-netbar { display: none !important; } .ag-receipt { border: 0; max-width: none; } }

/* Kiosk mode */
body.kiosk-mode { background: #0d2238; }
.ks { min-height: 100vh; display: flex; flex-direction: column; color: #12263a; }
.ks-top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: #fff; }
.ks-top img { height: 34px; } .ks-top div { flex: 1; display: grid; } .ks-top span { color: var(--muted); font-size: 12px; }
.ks-main { flex: 1; padding: 22px 16px; max-width: 980px; width: 100%; margin: 0 auto; display: grid; gap: 14px; align-content: start; }
.ks-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.ks-card { background: #fff; border-radius: 10px; padding: 22px; display: grid; gap: 12px; align-content: start; }
.ks-card h1 { margin: 0; font-size: 26px; }
.ks-card form { display: grid; gap: 12px; }
.ks-card label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.ks-card input, .ks-card select { min-height: 52px; font-size: 20px; padding: 6px 12px; border: 2px solid #b9c7d4; border-radius: 8px; }
.ks-btn { min-height: 56px; padding: 0 22px; border-radius: 8px; border: 2px solid #0a6fd2; background: #fff; color: #0a6fd2; font-size: 18px; font-weight: 700; cursor: pointer; }
.ks-btn.pri { background: #0a6fd2; color: #fff; } .ks-btn.ghost { border-color: #c8d4df; color: #2f4559; min-height: 44px; font-size: 15px; }
.ks-btn:disabled { opacity: .45; cursor: not-allowed; }
.ks-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ks-recips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ks-recip { border: 2px solid #c8d4df; border-radius: 8px; padding: 12px; cursor: pointer; display: grid !important; gap: 2px; }
.ks-recip input { display: none; } .ks-recip span { font-weight: 400; color: var(--muted); font-size: 13px; }
.ks-recip:has(input:checked) { border-color: #0a6fd2; background: #eef6ff; }
.ks-quote { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ks-quote > div { background: #f3f7fb; border-radius: 8px; padding: 12px; } .ks-quote small { display: block; color: var(--muted); }
.ks-quote b { font-size: 22px; } .ks-quote .tot { background: #e3f0ff; }
.ks-notes { display: flex; flex-wrap: wrap; gap: 10px; }
.ks-note { min-width: 96px; min-height: 60px; border-radius: 8px; border: 2px solid #12a079; background: #eafaf3; color: #0b6b4f; font-size: 20px; font-weight: 700; cursor: pointer; position: relative; }
.ks-note[data-n]::after { content: attr(data-n); position: absolute; top: -8px; right: -8px; background: #0b6b4f; color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; }
.ks-inserted { font-size: 18px; } .ks-inserted b { font-size: 22px; }
.ks-status { display: grid; gap: 2px; background: #f3f7fb; border-radius: 8px; padding: 12px; }
.ks-receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 16px; }
.ks-receipt dd { margin: 0; text-align: right; } .ks-receipt dd.big { font-size: 22px; font-weight: 700; }
.ks-foot { text-align: center; color: #9fc0e4; font-size: 12px; padding: 10px; }

@media (max-width: 760px) {
    .ks-grid { grid-template-columns: 1fr; }
    .ag-quote b { font-size: 15px; } .ag-quote .tot b { font-size: 18px; }
    .ag-denoms { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
    .ag-mini .ct-input { width: 110px; }
}
