:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg2: #121722;
  --bg3: #1a2130;
  --bg4: #222c3c;
  --text: #f1f4fa;
  --text2: #bdc8d9;
  --text3: #9eacc1;
  --brd: rgba(188, 205, 231, .16);
  --brd2: rgba(188, 205, 231, .29);
  --acc: #f2d38c;
  --green: #7ce5a7;
  --yellow: #facc15;
  --blue: #93c5fd;
  --violet: #b6a0f7;
  --red: #ff9898;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.remember-login, #startModal .remember-login { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; font-size: 12px; color: var(--text2); cursor: pointer; }
.remember-login input[type='checkbox'] { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--acc); }
body { font-family: var(--font); color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 2px;
}
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-200%); z-index: 20000; padding: 12px 18px; color: var(--bg); background: var(--acc); border-radius: 8px; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sort-button { background: transparent; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 8px 0; }
.worker-link { color: inherit; background: none; border: 0; padding: 4px 0; text-align: left; font-weight: 600; text-decoration: underline; text-decoration-color: var(--brd2); text-underline-offset: 4px; cursor: pointer; }
dialog.modal, dialog.modal-overlay, dialog#replyModal {
  position: fixed; inset: 0; margin: 0; padding: 20px;
  width: 100%; height: 100dvh; max-width: none; max-height: none;
  color: var(--text); border: 0; background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  align-items: center; justify-content: center; overflow-y: auto;
}
dialog:not([open]) { display: none !important; }
dialog.modal[open], dialog.modal-overlay[open], dialog#replyModal[open] { display: flex; }
dialog::backdrop { background: rgb(3 6 12 / 78%); }
dialog .modal-box { max-height: calc(100dvh - 40px); overflow-y: auto; }
dialog#loanRequestModal { overflow-y: auto; }
dialog#loanRequestModal .modal-box { max-height: calc(100dvh - 40px); overflow-y: auto; }
dialog .modal-title { line-height: 1.4; }
dialog .modal-close { min-width: 36px; min-height: 36px; }
dialog#replyModal > div { max-height: calc(100dvh - 40px); overflow-y: auto; }
input[type='radio']:focus-visible + span, input[type='checkbox']:focus-visible + span {
  outline: 3px solid var(--acc); outline-offset: 3px;
}
.table-scroll { max-width: 100%; overflow-x: auto; }
.portal-content { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 640px; }
.logo { align-items: center; }
body:has(.portal-content) { background: radial-gradient(ellipse at 50% 10%, #20242e 0, var(--bg) 65%); }
body:has(.portal-content) > .logo { width: 100%; max-width: 640px; justify-content: flex-start; }
.portal-content .tiles, .portal-content .skeleton-tiles, .portal-content .user-badge, .portal-content .status-msg { max-width: 640px; }
body:has(.portal-content) .logo-name { font-size: clamp(26px, 5vw, 34px); font-weight: 750; letter-spacing: -.04em; }
body:has(.portal-content) .logo-icon { width: 54px; height: 54px; color: var(--bg); background: var(--acc); border: 0; }
body:has(.portal-content) .logo-sub { font-size: 13px; margin-top: 5px; }
.portal-content .user-badge { padding: 14px 18px; margin-bottom: 20px; }
.portal-content .tiles { gap: 16px; }
.portal-content .tile { padding: 26px; min-height: 180px; border-color: var(--brd); }
.portal-content .tile:hover { border-color: var(--acc); }
.portal-content .tile-title { font-size: 17px; }
.portal-content .contact-tile { grid-column: 1 / -1; min-height: 150px; }
.portal-content .badge-logout { min-height: 34px; color: var(--text2); }
.admin-app { max-width: none; margin: 0; }
.admin-app .header { padding-bottom: 22px; border-bottom: 1px solid var(--brd); }
.admin-app .header h1 { font-size: 25px; letter-spacing: -.03em; }
.admin-app .logo-icon { background: var(--acc); color: var(--bg); border: 0; }
.admin-app .stat-card { border-radius: 12px; padding: 18px; }
.admin-app .stat-label { font-size: 11px; letter-spacing: .06em; }
.admin-app .stat-note { font-size: 12px; }
.admin-app .section-title { color: var(--text2); font-size: 12px; }
.admin-app .tab { white-space: nowrap; min-height: 40px; }
.admin-app .ranking-person { min-width: 0; }
.admin-app .ranking-table { table-layout: fixed; min-width: 1000px; }
.admin-app .ranking-table th:nth-child(2), .admin-app .ranking-table td:nth-child(2) { width: 240px; }
.admin-app .ranking-person .worker-link { min-width: 0; max-width: 190px; }
.admin-app .d-avatar { flex-shrink: 0; }
.admin-app .section, .admin-app .workers-section { min-width: 0; }
.admin-app .sections > * { min-width: 0; }
.admin-app th, .admin-app td { font-size: 12px; }
.transaction { width: 100%; text-align: left; color: var(--text); font-family: var(--font); }
.result { width: 100%; text-align: left; font-family: var(--font); }
#settingsBtn { color: var(--text); border: 1px solid var(--brd2); }
.calculator-tools { position: fixed; left: 16px; bottom: 16px; z-index: 1001; display: flex; align-items: center; gap: 8px; }
.calculator-tools #settingsBtn { position: static; width: 44px; height: 44px; }
.calculator-tools #helpBtn { min-height: 44px; padding: 0 16px; background: var(--bg2); color: var(--text); border: 1px solid var(--brd2); border-radius: 22px; box-shadow: 0 4px 16px rgb(0 0 0 / 40%); }
.calculator-tools #helpBtn:hover { border-color: var(--acc); color: var(--acc); }
.app:not(.cashier-app) .main { padding-bottom: 80px; }
.start-help-btn { display: block; width: 100%; margin-top: 12px; }
.calculator-tools #helpBtn[hidden], .start-help-btn[hidden] { display: none; }
dialog .calculator-help { width: min(860px, 100%); min-width: 0; background: var(--bg2); }
.calculator-help .modal-head { align-items: flex-start; gap: 16px; }
.calculator-help .modal-head p { margin-top: 8px; }
.calculator-help .modal-close-btn { flex-shrink: 0; min-width: 44px; min-height: 44px; }
.help-video { margin: 20px 0 28px; }
.help-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bg); border: 1px solid var(--brd); border-radius: 10px; }
.help-video figcaption { margin-top: 10px; color: var(--text3); font-size: 12px; line-height: 1.6; }
.help-video a { color: var(--acc); text-underline-offset: 3px; }
.help-steps { padding-left: 25px; }
.help-steps li { padding-left: 6px; margin-bottom: 22px; }
.help-steps li::marker { color: var(--acc); font-weight: 700; }
.calculator-help h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.help-steps p, .help-troubleshooting p { color: var(--text2); font-size: 14px; line-height: 1.75; }
.calculator-help strong { color: var(--text); }
.calculator-help kbd { padding: 2px 5px; border: 1px solid var(--brd2); border-radius: 4px; }
.help-troubleshooting { padding: 16px; border: 1px solid var(--brd); border-radius: 10px; }
.help-troubleshooting summary { cursor: pointer; color: var(--acc); font-size: 14px; font-weight: 600; }
.help-troubleshooting p { margin-top: 12px; }
.logo-text { margin: 0; }
.app button.btn-primary, #startModal button.btn-primary, #dashboardModal button.btn-primary { background: var(--acc); }
.mode-switch button:focus-visible { outline: 3px solid var(--acc); }
@media (max-width: 900px) {
  .calculator-tools { left: 12px; bottom: 12px; }
  .app .side .finance { padding-bottom: 76px; }
  .admin-app table { min-width: 660px; }
  .admin-app .stat-card { padding: 14px; }
}
@media (max-width: 600px) {
  dialog.modal, dialog.modal-overlay, dialog#replyModal { padding: 12px; }
  dialog .modal-box { width: 100%; min-width: 0; max-height: calc(100dvh - 24px); padding: 24px 20px; }
  dialog#loanRequestModal .modal-box { max-height: calc(100dvh - 24px); }
  .portal-content .tile { padding: 22px; min-height: 160px; }
  .portal-content .contact-tile { min-height: 160px; }
  .admin-app .header-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.quick-products{display:grid;gap:10px;margin:12px 0}.quick-products h3{font-size:11px;margin:0 0 6px;color:var(--text2)}.quick-products>div>div{display:flex;flex-wrap:wrap;gap:6px}.quick-products small{font-size:11px;color:var(--text3)}.quick-product{font-size:11px;padding:5px 8px;max-width:100%;overflow-wrap:anywhere}.favorite-product{margin-left:auto;padding:4px 8px;flex:0 0 auto}.cart-quantity{width:70px;max-width:100%;min-width:48px;padding:6px!important;font-size:12px;box-sizing:border-box}.cart-quantity:invalid{outline:2px solid #f87171}#undoCartRemove{font-size:11px;max-width:180px}.cashier-basket .toolbar{flex-wrap:wrap;gap:8px}
