/* ============================================================
   MediCare HMS — Design System
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --sidebar-grad: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
  --teal: #0d9488;   --teal-2: #14b8a6;
  --orange: #ea580c; --orange-2: #f59e0b;
  --rose: #e11d48;   --rose-2: #f43f5e;
  --sky: #0284c7;    --sky-2: #0ea5e9;
  --green: #16a34a;  --green-2: #22c55e;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px -6px rgba(15, 23, 42, .1);
  --shadow-lg: 0 10px 40px -10px rgba(15, 23, 42, .25);
  --sidebar-w: 256px;
  --topbar-h: 64px;
  font-size: 15px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
img, svg { vertical-align: middle; }
.ico { flex-shrink: 0; }

/* ============================ Auth pages ============================ */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--primary-grad); padding: 20px;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.14) 0, transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.12) 0, transparent 38%),
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
}
/* Login page: photo background with a brand-tinted overlay for contrast */
.login-bg {
  background-color: #312e81;
  background-image:
    linear-gradient(135deg, rgba(30, 27, 75, .78), rgba(76, 29, 149, .72)),
    url('../img/login-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.auth-card {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 400px; padding: 38px 34px; text-align: center;
}
.login-bg .auth-card { background: rgba(255, 255, 255, .96); }
.auth-logo { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.auth-title { font-size: 24px; font-weight: 700; background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 22px; }
.auth-card form { text-align: left; }
.auth-foot { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* ============================ App layout ============================ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-grad); color: #e0e7ff;
  position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-logo { font-size: 30px; background: rgba(255,255,255,.15); border-radius: 12px; padding: 6px 9px; }
.brand-name { font-weight: 700; font-size: 16.5px; color: #fff; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: #c7d2fe; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 12px; color: #c7d2fe;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 4px; font-size: 14.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.active {
  background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  color: #fff; box-shadow: inset 3px 0 0 #a5b4fc;
}
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-version { text-align: center; font-size: 11px; color: #a5b4fc; padding-top: 6px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 40; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 19px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-menu { display: none; }
.icon-btn {
  background: none; border: none; cursor: pointer; color: var(--text);
  padding: 6px; border-radius: 8px; display: inline-flex;
}
.icon-btn:hover { background: var(--bg); }

.net-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.net-status.online  { background: #dcfce7; color: #15803d; }
.net-status.offline { background: #fee2e2; color: #b91c1c; }
.net-status.online .net-icon-off { display: none; }
.net-status.offline .net-icon-on { display: none; }
.pending-sync { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; background: #fef3c7; color: #92400e; padding: 5px 10px; border-radius: 999px; font-weight: 600; }

.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary-grad);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.topbar-user-name { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.topbar-user-role { font-size: 11.5px; color: var(--muted); }

.content { padding: 24px; flex: 1; }

/* ============================ Cards & stats ============================ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 700; margin-right: auto; }
.card-body { padding: 20px; }
.card-body.p0 { padding: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  border-radius: var(--radius); padding: 18px 20px; color: #fff; box-shadow: var(--shadow);
  position: relative; overflow: hidden; min-height: 104px;
}
.stat-card::after {
  content: ''; position: absolute; right: -28px; top: -28px; width: 110px; height: 110px;
  background: rgba(255,255,255,.14); border-radius: 50%;
}
.stat-card .stat-icon { position: absolute; right: 14px; bottom: 12px; opacity: .85; }
.stat-label { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; opacity: .9; }
.stat-value { font-size: 25px; font-weight: 800; margin-top: 5px; }
.stat-sub { font-size: 12px; opacity: .9; margin-top: 3px; }
.grad-indigo { background: linear-gradient(135deg, #4f46e5, #8b5cf6); }
.grad-teal   { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.grad-orange { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.grad-rose   { background: linear-gradient(135deg, #be123c, #fb7185); }
.grad-sky    { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.grad-green  { background: linear-gradient(135deg, #15803d, #4ade80); }
.grad-purple { background: linear-gradient(135deg, #6d28d9, #c084fc); }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-weight: 600; font-size: 14px; font-family: inherit;
  padding: 9.5px 18px; border-radius: 10px; transition: filter .15s, transform .05s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary-grad); color: #fff; }
.btn-teal    { background: linear-gradient(135deg, var(--teal), var(--teal-2)); color: #fff; }
.btn-orange  { background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #fff; }
.btn-rose    { background: linear-gradient(135deg, var(--rose), var(--rose-2)); color: #fff; }
.btn-green   { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; }
.btn-light   { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-light:hover { background: var(--bg); filter: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px; border-radius: 8px; }

/* ============================ Forms ============================ */
.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.form-label .req { color: var(--rose-2); }
.form-control {
  width: 100%; padding: 9.5px 13px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
textarea.form-control { resize: vertical; min-height: 70px; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 6px; border-radius: 8px; display: inline-flex;
}
.pw-toggle:hover { color: var(--primary); background: #eef2ff; }
.form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.form-label-row .form-label { margin-bottom: 0; }
.link-btn { background: none; border: none; color: var(--primary); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.quick-add-row { display: flex; gap: 8px; margin-top: 8px; }
.quick-add-row .form-control { flex: 1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-section-title {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--primary); margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 2px solid #e0e7ff;
}
.search-box { position: relative; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .form-control { padding-left: 38px; }

/* ============================ Tables ============================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 12px 16px; background: #f8fafc; color: #475569;
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tbody tr:hover { background: #f8faff; }
.table .num { text-align: right; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-actions .btn-icon { color: var(--muted); background: #f1f5f9; }
.table-actions .btn-icon:hover { color: var(--primary); background: #e0e7ff; filter: none; }
.table-actions .btn-icon.danger:hover { color: var(--rose); background: #ffe4e6; }

.badge { display: inline-block; padding: 3.5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red   { background: #fee2e2; color: #b91c1c; }
.badge-gray  { background: #e2e8f0; color: #475569; }
.badge-blue  { background: #dbeafe; color: #1d4ed8; }
.badge-purple{ background: #ede9fe; color: #6d28d9; }

.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 10px; }

.pagination { display: flex; gap: 6px; padding: 14px 16px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.pagination .pg-info { margin-right: auto; font-size: 13px; color: var(--muted); }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); font-family: inherit;
}
.page-btn.active { background: var(--primary-grad); color: #fff; border: none; }
.page-btn:disabled { opacity: .4; cursor: default; }

/* ============================ Alerts & toasts ============================ */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; text-align: left; }
.alert-danger  { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-info    { background: #dbeafe; color: #1d4ed8; }
.alert-warn    { background: #fef3c7; color: #92400e; }

.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; background: #1e293b; color: #fff;
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  animation: toastIn .25s ease; max-width: 360px;
}
.toast.success { background: linear-gradient(135deg, #15803d, #16a34a); }
.toast.error   { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.toast.info    { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.toast.warn    { background: linear-gradient(135deg, #b45309, #d97706); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ============================ Modals ============================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 28px 14px; overflow-y: auto;
}
/* display:flex above would defeat the [hidden] attribute — keep it hidden until a modal opens */
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; animation: modalIn .2s ease; margin: auto 0;
}
.modal.modal-lg { max-width: 860px; }
.modal.modal-sm { max-width: 420px; }
.modal-header {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary-grad); color: #fff; border-radius: 16px 16px 0 0;
}
.modal-header h3 { font-size: 16.5px; font-weight: 700; }
.modal-header .icon-btn { color: #fff; }
.modal-header .icon-btn:hover { background: rgba(255,255,255,.18); }
.modal-body { padding: 22px; max-height: 72vh; overflow-y: auto; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============================ Laboratory ============================ */
.lab-cat {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: var(--primary); margin: 12px 0 6px; padding-bottom: 4px; border-bottom: 1.5px solid #e0e7ff;
}
.lab-cat:first-child { margin-top: 0; }
.lab-pick {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; border: 1.5px solid transparent; font-size: 13.5px;
}
.lab-pick:hover { background: #f8faff; }
.lab-pick.active { background: #eef2ff; border-color: var(--primary); }
.lab-pick input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }

.lab-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.lab-check input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); margin-top: 2px; }

.lab-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.lab-block { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.lab-block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--border);
}
.lab-result-table th, .lab-result-table td { padding: 7px 12px; }
.lab-param-row { display: grid; grid-template-columns: 1.6fr 1fr .8fr .8fr 1.2fr auto; gap: 6px; margin-bottom: 6px; }
.lab-param-row .form-control { padding: 7px 10px; font-size: 13px; }
@media (max-width: 700px) {
  .lab-param-row { grid-template-columns: 1fr 1fr auto; }
}

/* ============================ Export picker ============================ */
.export-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.export-item:hover { border-color: var(--primary); background: #f8faff; }
.export-item-text { flex: 1; min-width: 150px; }
.export-item-btns { display: flex; gap: 8px; }

/* ============================ Tabs ============================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 10px 18px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted);
  border: none; background: none; font-family: inherit; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================ POS layout ============================ */
.pos-layout { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; }
.pos-products { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 2px; }
.med-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.med-card {
  background: #fff; border-radius: 12px; padding: 13px 14px; cursor: pointer;
  box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .12s, transform .12s;
  position: relative;
}
.med-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.med-card.out { opacity: .55; cursor: not-allowed; }
.med-name { font-weight: 700; font-size: 13.8px; margin-bottom: 2px; }
.med-detail { font-size: 11.8px; color: var(--muted); margin-bottom: 8px; }
.med-foot { display: flex; justify-content: space-between; align-items: center; }
.med-price { font-weight: 800; color: var(--primary); font-size: 13.5px; }
.med-stock { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.med-stock.low { background: #fef3c7; color: #92400e; }
.med-stock.out { background: #fee2e2; color: #b91c1c; }

.pos-cart { position: sticky; top: calc(var(--topbar-h) + 20px); }
.cart-items { max-height: 34vh; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 13.5px; }
.cart-item-price { font-size: 12px; color: var(--muted); }
.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: #f8fafc;
  cursor: pointer; font-weight: 700; font-size: 15px; line-height: 1; color: var(--text);
}
.qty-btn:hover { background: #e0e7ff; }
.qty-val { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-totals { padding-top: 12px; }
.tot-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.tot-row.grand { font-size: 19px; font-weight: 800; color: var(--primary); border-top: 2px solid var(--border); margin-top: 8px; padding-top: 10px; }

/* ============================ Misc ============================ */
.page-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.page-actions .spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-31 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.fw6 { font-weight: 600; } .fw7 { font-weight: 700; }
.mb0 { margin-bottom: 0; } .mt16 { margin-top: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.chart-box { width: 100%; }
.chart-box canvas { width: 100%; }

.vitals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.vital-tile { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; text-align: center; }
.vital-tile .v-val { font-size: 18px; font-weight: 800; color: var(--primary); }
.vital-tile .v-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-avatar {
  width: 74px; height: 74px; border-radius: 50%; background: var(--primary-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
}
.chip { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; }

/* ============================ Receipt / print ============================ */
.receipt { max-width: 380px; margin: 0 auto; background: #fff; padding: 24px; font-size: 13px; }
.receipt h2 { text-align: center; font-size: 17px; }
.receipt .r-sub { text-align: center; color: var(--muted); font-size: 11.5px; }
.receipt hr { border: none; border-top: 1.5px dashed #cbd5e1; margin: 10px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td, .receipt th { padding: 3px 2px; font-size: 12.5px; text-align: left; }
.receipt .num { text-align: right; }
.receipt .r-total { font-size: 15px; font-weight: 800; }
.receipt .r-foot { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 10px; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toast-wrap, .page-actions { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; }
  .print-area { display: block !important; }
}

/* ============================ Responsive ============================ */
@media (max-width: 1024px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .grid-31 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .topbar-menu { display: inline-flex; }
  .topbar-user-info { display: none; }
  .content { padding: 14px; }
  .form-row, .form-row-3, .grid-2 { grid-template-columns: 1fr; }
  .net-label { display: none; }
  .topbar-title { font-size: 16px; }
}
