/* Seri's Choice Enterprise — styles modelled on the Elective 2 sample designs */
:root {
  --blue: #0d6efd; --blue-d: #0b5ed7; --teal: #17a2b8; --yellow: #ffc107; --red: #dc3545;
  --dark: #343a40; --line: #d6d6d6; --panel: #f1f1f1; --ro: #e9ecef; --text: #222; --muted: #6c757d;
  --tan: #e8d5b0;
  --title-font: "Algerian", "Rye", "Bernard MT Condensed", "Copperplate", "Copperplate Gothic Bold", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.4 "Segoe UI", Calibri, Roboto, Arial, sans-serif; color: var(--text); background: #fff; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; }
.r { text-align: right; } .nowrap { white-space: nowrap; } .inline { display: inline; }

/* ---------- login ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; background: #f4f4f4; }
.login-card { width: 340px; max-width: 92vw; background: #fff; border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25); overflow: hidden; }
.login-body { padding: 18px 26px 22px; text-align: center; }
.login-logo { width: 54px; height: 54px; margin-top: -4px; }
.login-title { color: #3b8fe8; font: 400 26px/1.2 Arial, sans-serif; margin: 2px 0 14px; }
.login-input { display: block; width: 100%; margin: 0 0 10px; padding: 9px 10px; border: 0;
  background: #f2f2f2; border-radius: 3px; text-align: center; font-size: 13px; }
.login-input:focus { outline: 2px solid #9cc8f5; background: #fff; }
.login-btn { margin-top: 6px; width: auto; min-width: 72px; height: auto; padding: 8px 26px; border: 0; border-radius: 3px;
  background: #5bb8ef; color: #fff; font-size: 11px; letter-spacing: .5px; cursor: pointer;
  box-shadow: 0 4px 10px rgba(91,184,239,.5); }
.login-btn:hover { background: #3aa5e6; }
.login-foot { background: #f5f5f5; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.login-foot a { color: #5aa4e6; text-decoration: none; }

/* ---------- admin layout ---------- */
body.app { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh;
  border-top: 5px solid var(--tan); background: linear-gradient(to right, #000 200px, #fff 200px); }
.sidebar { background: #000; color: #fff; padding: 14px 0 20px; position: sticky; top: 0; height: calc(100vh - 5px);
  display: flex; flex-direction: column; }
.brand { color: #fff; text-decoration: none; font: 700 15px/1.2 Arial, sans-serif; padding: 0 14px 18px; }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a, .sidebar .linklike { color: #c9c9c9; text-decoration: none; padding: 6px 20px; font-size: 13px;
  background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; width: 100%; }
.sidebar nav a:hover, .sidebar .linklike:hover { color: #fff; background: #1b1b1b; }
.sidebar nav a.active { color: #fff; background: #222; border-left: 3px solid var(--tan); padding-left: 17px; }
.whoami { margin-top: auto; padding: 12px 18px 0; font-size: 11.5px; color: #8f8f8f; border-top: 1px solid #222; }
.whoami strong { color: #ddd; }
.menu-toggle { display: none; }
.content { padding: 18px 26px 40px; min-width: 0; }
.company-head h1 { font: 400 22px Arial, sans-serif; }
.company-head p { font-size: 11px; margin: 2px 0 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { border: 1px solid var(--line); border-radius: 6px; padding: 14px; text-decoration: none; color: var(--text);
  border-left: 4px solid var(--tan); }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 22px; }
.stat:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* ---------- flashes / toast ---------- */
.flashes { margin-bottom: 12px; }
.flash { padding: 9px 12px; border-radius: 4px; margin: 0 0 8px; font-size: 13px; text-align: left; }
.flash.error { background: #f8d7da; color: #842029; } .flash.success { background: #d1e7dd; color: #0f5132; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #198754; color: #fff; padding: 10px 16px;
  border-radius: 6px; opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; z-index: 50;
  max-width: 360px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: none; } .toast.error { background: var(--red); }

/* ---------- forms ---------- */
.page-title { font-family: var(--title-font); font-weight: 900; font-size: 30px; text-transform: uppercase;
  text-align: center; letter-spacing: .5px; margin: 6px 0 18px; }
.sheet { max-width: 1000px; margin: 0 auto; } .sheet.narrow { max-width: 680px; }
.panel { background: var(--panel); padding: 10px 14px 6px; margin-bottom: 14px; }
label { display: block; font-size: 12px; color: #444; margin-bottom: 8px; }
label > input, label > select { margin-top: 3px; }
input, select { width: 100%; padding: 6px 8px; border: 1px solid #ced4da; border-radius: 3px; background: #fff;
  font: inherit; font-size: 13px; min-height: 32px; }
input:focus, select:focus { outline: none; border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13,110,253,.18); }
input[readonly], input.ro { background: var(--ro); }
input[type=file] { border: 0; padding: 4px 0; background: none; font-size: 12px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
label.check { display: flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 0 14px; }
.g-names { grid-template-columns: 1fr 1fr 1fr .6fr; }
.g-4 { grid-template-columns: 1fr 1fr .8fr 1fr; }
.g-2 { grid-template-columns: 1fr 1.5fr; }
.g-dept { grid-template-columns: 2fr 1fr 1fr; }
.g-5 { grid-template-columns: repeat(5, 1fr); }
.g-ua2 { grid-template-columns: 1fr 1fr 1.3fr; }
.g-ua3 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.w-80 { width: 80%; } .w-50 { width: 50%; }
.section { font-size: 14px; font-weight: 700; margin: 10px 0 6px; text-transform: none; }
.photo-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.photo-row .panel { margin: 30px 0 0; }
.photo-col { width: 150px; flex: none; }
.photo-box { width: 150px; height: 140px; object-fit: cover; object-position: center; border: 1px solid var(--line); background: #f3f3f3; display: block; }
.grow { flex: 1; min-width: 0; }
.actions { display: flex; gap: 8px; margin-top: 10px; } .actions.center { justify-content: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 18px; min-height: 34px;
  border: 1px solid transparent; border-radius: 4px; font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: none; color: #fff; background: var(--blue); white-space: nowrap; }
.btn:hover { filter: brightness(.92); } .btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.primary { background: var(--blue); } .btn.teal { background: var(--teal); }
.btn.yellow { background: var(--yellow); color: #222; } .btn.red { background: var(--red); }
.btn.dark { background: var(--dark); } .btn.outline { background: #fff; color: #333; border-color: #999; }
.btn.sm { padding: 4px 10px; min-height: 28px; font-size: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }

/* ---------- toolbar & tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.toolbar .spacer { flex: 1; }
.inline-label { display: flex; align-items: center; gap: 6px; margin: 0; }
.table-wrap { overflow-x: auto; }
table.report { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th, .report td { padding: 7px 8px; border-bottom: 1px solid #e3e3e3; text-align: left; vertical-align: middle; }
.report th.r, .report td.r { text-align: right; }
.report thead th { background: #000; color: #fff; font-weight: 600; position: sticky; top: 0; }
.report tfoot th { background: #f3f3f3; }
.report tbody tr:hover { background: #fafafa; } .report tr.selected { background: #fff7e0; }
.report tr.dim { opacity: .5; } .report .empty { text-align: center; color: var(--muted); padding: 24px; }
.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; display: block; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; background: #eee; }
.pill.active { background: #d1e7dd; color: #0f5132; } .pill.inactive { background: #f8d7da; color: #842029; }
.pill.editing { background: #fff3cd; color: #664d03; }

/* ---------- payroll ---------- */
.payroll .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.payroll .section { text-transform: uppercase; }
.frow { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; margin: 0 0 6px 10px; }
.frow label { margin: 0; font-size: 12px; }
.frow .btn { justify-self: start; }
.frow input, .frow select { max-width: 180px; min-height: 28px; padding: 4px 8px; }
.photo-lg { width: 150px; height: 150px; object-fit: cover; border: 1px solid var(--line); margin: 4px 0 10px 10px; display: block; background: #eee; }
.spacer-top { height: 30px; }

/* ---------- user account ---------- */
.card { border: 1px solid #e3e3e3; box-shadow: 0 2px 10px rgba(0,0,0,.07); padding: 18px 16px 24px; max-width: 1000px; }
.ua-title { font: 500 28px "Segoe UI", Calibri, sans-serif; margin-bottom: 10px; }
.ua-top { height: 0; position: relative; z-index: 1; }
.ua-top .photo-box { width: 72px; height: 74px; }
.ua-panel { padding-top: 36px; margin-top: 36px; }
.ua-names { margin-left: 80px; margin-top: -30px; }

/* ---------- POS ---------- */
.sm-input { min-width: 140px !important; }
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.product { background: none; border: 0; padding: 0; cursor: pointer; text-align: center; font: inherit; color: #1d3a6e; }
.pimg { display: block; aspect-ratio: 1 / 1; border: 1px solid #cfcfcf; box-shadow: 0 2px 4px rgba(0,0,0,.2);
  padding: 4px; background: #fff; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  background: #fff; transition: transform .2s; }
.product:hover .pimg img { transform: scale(1.05); }
.product.picked .pimg { outline: 3px solid var(--blue); }
.pname { display: block; font-size: 12px; margin-top: 6px; } .pname strong { color: #222; }
.pos-bottom { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: start; }
.order-details .frow { grid-template-columns: 140px 1fr; } .order-details .frow input { max-width: 200px; }
.radios { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.radios label { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12.5px; }
.btn-row4 { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3px; margin-bottom: 8px; }
.btn-row4 .btn { padding: 8px 4px; font-size: 12px; }
.keypad { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); grid-auto-rows: 44px; gap: 3px; }
.keypad button { border: 0; border-radius: 3px; background: var(--dark); color: #fff; font-size: 15px; cursor: pointer; }
.keypad button:hover { background: #4a5157; } .keypad button:active { transform: scale(.97); }
.keypad .enter { grid-row: span 4; background: var(--blue); font-size: 13px; }
.keypad .enter:hover { background: var(--blue-d); }

/* ---------- receipt / payslip ---------- */
.receipt, .payslip { max-width: 420px; margin: 0 auto; border: 1px dashed #bbb; padding: 20px; }
.payslip { max-width: 800px; border-style: solid; }
.receipt h2, .payslip h2 { text-align: center; font-size: 18px; }
.receipt > p, .payslip > p { text-align: center; }
table.kv { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.kv th, .kv td { padding: 5px 6px; border-bottom: 1px solid #eee; text-align: left; }
.kv th.sub { background: #000; color: #fff; } .kv tr.total td { font-weight: 700; border-top: 2px solid #333; }
.payslip .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.netpay { font-size: 20px; text-align: right !important; margin-top: 8px; }

/* ---------- receipt pop-up ---------- */
body.bare { padding: 12px; background: #fff; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 60; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 8px; width: min(480px, 94vw); max-height: 92vh; display: flex;
  flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.modal-head { padding: 12px 16px; border-bottom: 1px solid #eee; }
.modal-box iframe { border: 0; width: 100%; height: 60vh; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid #eee; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } .pos-bottom { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  body.app { grid-template-columns: 1fr; background: #fff; }
  .sidebar { position: fixed; left: -220px; width: 210px; z-index: 40; transition: left .2s; height: 100vh; }
  .sidebar.open { left: 0; }
  .menu-toggle { display: block; position: fixed; top: 8px; left: 8px; z-index: 41; background: #000; color: #fff;
    border: 0; border-radius: 4px; font-size: 20px; padding: 4px 10px; }
  .content { padding: 50px 12px 30px; }
  .g-names, .g-4, .g-2, .g-dept, .g-5, .g-ua2, .g-ua3, .payroll .cols-2, .payslip .cols-2 { grid-template-columns: 1fr 1fr; }
  .ua-names { margin-left: 0; margin-top: 50px; }
  .photo-row { flex-direction: column; } .photo-row .panel { margin-top: 0; width: 100%; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .page-title { font-size: 22px; }
  .w-80, .w-50 { width: 100%; }
}

/* ---------- print ---------- */
@media print {
  body.app { display: block; border: 0; }
  .sidebar, .no-print, .menu-toggle, .toast, .flashes { display: none !important; }
  .content { padding: 0; }
  .report thead th { background: #ddd !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt, .payslip { border: 0; }
}
