/* ============================================================
   WMS - Warehouse Management System
   Shared Stylesheet
   ============================================================ */

:root {
  --bg-primary:    #0f172a;
  --bg-secondary:  #1e293b;
  --bg-tertiary:   #293548;
  --bg-hover:      #334155;
  --surface-2:     #1e293b;   /* card surface (alias used by newer pages) */
  --accent-blue:        #3b82f6;
  --accent-blue-dark:   #2563eb;
  --accent-green:       #22c55e;
  --accent-green-dark:  #16a34a;
  --accent-red:         #ef4444;
  --accent-red-dark:    #dc2626;
  --accent-yellow:      #f59e0b;
  --accent-yellow-dark: #d97706;
  --accent-purple:      #a855f7;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border:         #2d3f55;
  --border-light:   #3d5270;
  --shadow:         0 4px 24px rgba(0,0,0,0.45);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
}

/* ── LIGHT MODE ── */
[data-theme="light"] {
  --bg-primary:    #eaeef4;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #f1f5f9;
  --bg-hover:      #e2e8f0;
  --surface-2:     #ffffff;   /* card surface (alias used by newer pages) */
  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --border:        #dde3ec;
  --border-light:  #c8d3e0;
  --shadow:        0 10px 28px rgba(16,24,40,0.10);
  --shadow-sm:     0 1px 3px rgba(16,24,40,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
/* App-launcher sidebar — ADAPTS to theme: dark panel in dark mode, light panel in light mode. */
.sidebar {
  --sb-bg: #0f1626; --sb-tile: #1b2741; --sb-tile-h: #26344f;
  --sb-text: #cdd6e6; --sb-strong: #e6ebf5; --sb-muted: #8a93a8; --sb-line: rgba(255,255,255,.10);
  width: 232px; height: 100vh; height: 100dvh;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 100;
  transition: transform 0.25s ease;
}
[data-theme="light"] .sidebar {
  --sb-bg: #ffffff; --sb-tile: #f1f5f9; --sb-tile-h: #e2e8f0;
  --sb-text: #334155; --sb-strong: #0f172a; --sb-muted: #94a3b8; --sb-line: #eef2f7;
}
.sidebar-header { padding: 16px 14px; border-bottom: 1px solid var(--sb-line); display: flex; align-items: center; gap: 10px; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-logo-img { width: 36px; height: 36px; object-fit: contain; background: transparent; flex-shrink: 0; }
[data-theme="dark"] .sidebar-logo-img { filter: invert(1); }
.sidebar-logo-text { font-size: 15px; font-weight: 400; color: var(--sb-strong); letter-spacing: -0.3px; line-height: 1; }
.sidebar-logo-text strong { font-weight: 800; color: var(--accent-blue); }
.sidebar-logo span { color: var(--sb-muted); font-weight: 400; font-size: 11px; display: block; margin-top: 1px; }
.sidebar-close { display: none; background: none; border: none; color: var(--sb-strong); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 4px; flex-shrink: 0; }
.sidebar-user { padding: 11px 14px; border-bottom: 1px solid var(--sb-line); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-info .user-name { font-weight: 600; font-size: 13px; line-height: 1.2; color: var(--sb-strong); }
.user-info .user-role { font-size: 10px; color: var(--sb-muted); margin-top: 1px; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { flex: 1; min-height: 0; padding: 8px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Groups + titles */
.nav-group { margin-bottom: 6px; }
.nav-group-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--sb-muted); padding: 0 4px; margin: 14px 2px 8px; }
.nav-group:first-child .nav-group-title { margin-top: 4px; }
#sidebar.nav-single .nav-group-title { display: none; }

/* Tiles */
.nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nav-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--sb-tile); color: var(--sb-text); border: none; border-radius: 11px;
  text-decoration: none; cursor: pointer; padding: 10px 4px; min-height: 62px;
  position: relative; transition: background .13s, color .13s; text-align: center;
}
.nav-tile i { font-size: 21px; line-height: 1; }
.nav-cap { font-size: 10px; line-height: 1.2; }
.nav-tile:hover { background: var(--sb-tile-h); color: var(--sb-strong); }
.nav-tile.active { background: var(--accent-blue-dark); color: #fff; }

/* Compact mode (Marketing / Encoder): small captioned tiles (short names), hover tooltip = full name */
#sidebar.nav-icons .nav-cap { display: block; font-size: 9px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#sidebar.nav-icons .nav-tile { min-height: 52px; padding: 8px 3px; gap: 5px; }
#sidebar.nav-icons .nav-tile i { font-size: 18px; }
.nav-tip {
  position: fixed; transform: translateY(-50%); display: none; z-index: 9999;
  background: #0b1220; color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.sidebar-footer { padding: 8px 12px 12px; }
.sidebar-foot-link { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--sb-text); text-decoration: none; margin-bottom: 4px; }
.sidebar-foot-link i { font-size: 17px; }
.sidebar-foot-link:hover { background: var(--sb-tile); color: var(--sb-strong); }
.btn-logout { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; background: rgba(239,68,68,0.08); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.18); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.13s; }
.btn-logout:hover { background: rgba(239,68,68,0.18); }

/* ── MAIN CONTENT ── */
.main-content { margin-left: 232px; flex: 1; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.page-body { min-width: 0; }
img, canvas, video, svg { max-width: 100%; }
.table-wrap { -webkit-overflow-scrolling: touch; }
.topbar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 13px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; gap: 12px; }
.topbar-title { font-size: 17px; font-weight: 700; }
.topbar-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.page-body { flex: 1; padding: 20px 24px; }
.page-content { max-width: 1140px; margin: 0 auto; }

.hamburger { display: none; background: none; border: none; color: var(--text-primary); font-size: 22px; cursor: pointer; padding: 4px; flex-shrink: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 99; }

/* ── CARDS ── */
.card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.18s, transform 0.18s; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.card-title { font-size: 14px; font-weight: 700; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.13s; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary  { background: var(--accent-blue);   color: #fff; }
.btn-primary:hover:not(:disabled)  { background: var(--accent-blue-dark); }
.btn-success  { background: var(--accent-green);  color: #fff; }
.btn-success:hover:not(:disabled)  { background: var(--accent-green-dark); }
.btn-danger   { background: var(--accent-red);    color: #fff; }
.btn-danger:hover:not(:disabled)   { background: var(--accent-red-dark); }
.btn-warning  { background: var(--accent-yellow); color: #000; }
.btn-warning:hover:not(:disabled)  { background: var(--accent-yellow-dark); }
.btn-ghost    { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)    { background: var(--bg-hover); border-color: var(--border-light); }
.btn-sm  { padding: 5px 11px; font-size: 12px; }
.btn-lg  { padding: 13px 24px; font-size: 15px; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 13px;
  background: var(--bg-tertiary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 14px; font-family: inherit;
  transition: border-color 0.13s, background 0.13s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent-blue); background: var(--bg-secondary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-input::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-secondary); color: var(--text-primary); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── COMPACT ROW (date + shift + button setup forms) ── */
.compact-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; max-width: 620px; }
.compact-row .form-group { flex: 1; min-width: 130px; margin: 0; }

/* ── SCAN INPUT ── */
.scan-area { background: var(--bg-primary); border: 2px dashed var(--border-light); border-radius: var(--radius); padding: 20px; text-align: center; transition: border-color 0.15s; }
.scan-area:focus-within { border-color: var(--accent-blue); }
.scan-area .scan-icon { font-size: 32px; margin-bottom: 6px; display: block; }
.scan-area .scan-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.scan-big-input { width: 100%; padding: 14px; background: var(--bg-secondary); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 18px; font-weight: 700; letter-spacing: 2px; text-align: center; outline: none; transition: border-color 0.15s; font-family: 'Courier New', monospace; }
.scan-big-input:focus { border-color: var(--accent-blue); }
.scan-big-input::placeholder { color: var(--text-muted); font-weight: 400; font-size: 13px; letter-spacing: 0; }
.scan-big-input:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-available { background: rgba(34,197,94,0.13); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.25); }
.badge-active    { background: rgba(59,130,246,0.13); color: var(--accent-blue);  border: 1px solid rgba(59,130,246,0.25); }
.badge-warning   { background: rgba(245,158,11,0.13); color: var(--accent-yellow);border: 1px solid rgba(245,158,11,0.25); }
.badge-danger    { background: rgba(239,68,68,0.13);  color: var(--accent-red);   border: 1px solid rgba(239,68,68,0.25); }
.badge-purple    { background: rgba(168,85,247,0.13); color: var(--accent-purple);border: 1px solid rgba(168,85,247,0.25); }
.badge-gray      { background: rgba(100,116,139,0.13);color: var(--text-secondary);border: 1px solid rgba(100,116,139,0.25); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { background: var(--bg-tertiary); padding: 11px 13px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:hover { background: var(--bg-tertiary); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 11px 13px; color: var(--text-primary); }

/* ── SCAN LIST ── */
.scan-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.scan-list-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid var(--border); font-size: 13px; transition: background 0.1s; }
.scan-list-item:last-child { border-bottom: none; }
.scan-list-item:hover { background: var(--bg-tertiary); }
.scan-list-item.ok    { border-left: 3px solid var(--accent-green); }
.scan-list-item.error { border-left: 3px solid var(--accent-red); }
.scan-list-item.warn  { border-left: 3px solid var(--accent-yellow); }

/* ── STATS ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.18s, transform 0.18s; }
.stat-box:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-number { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label  { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-blue.stat-number,   .stat-blue   .stat-number { color: var(--accent-blue); }
.stat-green.stat-number,  .stat-green  .stat-number { color: var(--accent-green); }
.stat-red.stat-number,    .stat-red    .stat-number { color: var(--accent-red); }
.stat-yellow.stat-number, .stat-yellow .stat-number { color: var(--accent-yellow); }
.stat-purple.stat-number, .stat-purple .stat-number { color: var(--accent-purple); }

/* ── TOAST ── */
.toast-container { position: fixed; top: 14px; right: 14px; z-index: 9999; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); animation: toastIn 0.25s ease; pointer-events: all; min-width: 220px; max-width: 300px; }
.toast-success { background: var(--accent-green); color: #fff; }
.toast-error   { background: var(--accent-red);   color: #fff; }
.toast-warning { background: var(--accent-yellow); color: #000; }
.toast-info    { background: var(--accent-blue);   color: #fff; }
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); animation: modalIn 0.18s ease; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
@keyframes modalIn { from { opacity:0; transform:scale(0.95) translateY(-8px); } to { opacity:1; transform:scale(1) translateY(0); } }

/* ── HELPERS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-muted  { color: var(--text-secondary); }
.text-center { text-align: center; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'Courier New', monospace; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.progress-wrap { background: var(--bg-tertiary); border-radius: 20px; height: 9px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 20px; transition: width 0.3s ease; }
.progress-blue   { background: var(--accent-blue); }
.progress-green  { background: var(--accent-green); }
.progress-red    { background: var(--accent-red); }
.progress-yellow { background: var(--accent-yellow); }
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 36px; margin-bottom: 8px; display: block; }
.empty-state .empty-text { font-size: 13px; }

/* ── RESPONSIVE — TABLET (768px) ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 100%; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .sidebar-overlay.open { display: block; }
  .sidebar-close { display: block; margin-left: auto; }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  /* Mobile: always show captions (no hover on touch) — even for icon-only roles */
  #sidebar.nav-icons .nav-cap { display: block; }
  #sidebar.nav-icons .nav-tile { aspect-ratio: auto; min-height: 78px; padding: 14px 4px; }
  .sidebar-nav .nav-grid { gap: 10px; }
  .sidebar-nav .nav-tile i { font-size: 25px; }
  .sidebar-nav .nav-cap { font-size: 11px; }
  .nav-tip { display: none !important; }
  .page-body { padding: 14px 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 11px 14px; }
  .topbar-title { font-size: 15px; }
  .topbar-subtitle { font-size: 11px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 15px; }
  .modal { padding: 18px; }
  .btn-lg { padding: 11px 18px; font-size: 14px; }
  .scan-big-input { font-size: 15px; padding: 12px; }
  .stat-number { font-size: 26px; }
  .compact-row { max-width: 100%; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 9px 10px; }
}

/* ── RESPONSIVE — MOBILE (480px) ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-box { padding: 12px 8px; }
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 9px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .module-card { padding: 13px; }
  .module-card .module-icon { font-size: 24px; margin-bottom: 5px; }
  .module-card .module-name { font-size: 12px; }
  .module-card .module-desc { font-size: 10px; display: none; }
  .page-body { padding: 10px 12px; }
  .card { padding: 13px; border-radius: var(--radius-sm); }
  .btn { padding: 8px 13px; font-size: 12px; }
  .btn-lg { padding: 10px 16px; font-size: 13px; }
  .scan-big-input { font-size: 14px; padding: 11px; letter-spacing: 1px; }
  .table-wrap { font-size: 11px; }
  thead th { padding: 8px 8px; font-size: 9px; }
  tbody td { padding: 8px 8px; }
  .badge { font-size: 9px; padding: 2px 6px; }
  .form-input, .form-select { font-size: 14px; padding: 9px 11px; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-title { font-size: 14px; }
  .topbar-subtitle { display: none; }
  .modal { padding: 16px; border-radius: var(--radius); }
  .modal-title { font-size: 15px; }
  .compact-row { flex-direction: column; max-width: 100%; }
  .compact-row .form-group { min-width: 100%; }
  /* RTS two-column → single on mobile */
  .rts-layout { grid-template-columns: 1fr !important; }
  .audit-output { font-size: 12px; }
}

/* ── LOGIN ── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-primary); padding: 20px; }
.login-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 30px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .logo-icon  { font-size: 38px; display: block; margin-bottom: 8px; }
.login-logo .logo-title { font-size: 20px; font-weight: 800; }
.login-logo .logo-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.pin-display { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.pin-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border-light); background: transparent; transition: all 0.15s; }
.pin-dot.filled { background: var(--accent-blue); border-color: var(--accent-blue); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pin-key { padding: 15px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 19px; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.1s; user-select: none; }
.pin-key:hover  { background: var(--bg-hover); }
.pin-key:active { transform: scale(0.93); }
.pin-key.delete { font-size: 15px; color: var(--accent-red); }
.pin-key.empty  { background: transparent; border-color: transparent; cursor: default; }

/* ── DASHBOARD ── */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.module-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text-primary); transition: all 0.18s; cursor: pointer; display: block; }
.module-card:hover { border-color: var(--accent-blue); background: var(--bg-tertiary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.module-card .module-icon { font-size: 28px; display: block; margin-bottom: 10px; }
.module-card .module-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.module-card .module-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

/* ── AUDIT OUTPUT ── */
.audit-output { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; color: var(--text-primary); min-height: 100px; }

/* ── PRINT (Barcode Labels) ── */
@media print {
  @page { size: 180mm 100mm landscape; margin: 0; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: fixed; inset: 0; background: #fff; }
  .barcode-label { width: 180mm; height: 100mm; display: flex; flex-direction: column; align-items: center; justify-content: center; page-break-after: always; background: #fff; color: #000; padding: 8mm; }
  .barcode-label .label-item-name { font-size: 18pt; font-weight: 900; text-transform: uppercase; margin-bottom: 4mm; letter-spacing: 1px; color: #000; text-align: center; }
  .barcode-label svg, .barcode-label img { max-width: 140mm; height: auto; }
  .barcode-label .label-code { font-size: 10pt; font-family: 'Courier New', monospace; margin-top: 3mm; color: #000; letter-spacing: 2px; }
}
