:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #172033;
  --muted: #6c7587;
  --line: #e2e7ef;
  --primary: #1f6feb;
  --primary-dark: #1557b7;
  --sidebar: #101828;
  --sidebar-soft: #1d2939;
  --success: #12b76a;
  --danger: #d92d20;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 9px; padding: 11px 16px; background: var(--primary); color: white; cursor: pointer; font-weight: 700; }
button:hover { background: var(--primary-dark); }
button.secondary { background: #eef2f7; color: #344054; }
button.secondary:hover { background: #e2e8f0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error, .message { border-radius: 9px; padding: 12px 14px; margin-top: 14px; }
.error { background: #fef3f2; color: var(--danger); }
.message { margin: 0 0 18px; background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.message.error-state { background: #fef3f2; color: var(--danger); border-color: #fecdca; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #dbeafe, #f4f6f9 45%); }
.login-card { width: min(420px, 100%); background: white; padding: 38px; border-radius: 18px; box-shadow: 0 18px 60px rgba(16, 24, 40, .12); }
.login-card h1 { margin: 16px 0 4px; font-size: 26px; }
.login-card label { display: block; font-weight: 650; margin-top: 18px; }
.login-card input { width: 100%; margin-top: 7px; }
.login-card button { width: 100%; margin-top: 22px; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; background: var(--primary); color: white; font-size: 30px; font-weight: 900; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; }

input, select, textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 9px; padding: 10px 12px; background: white; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #84adff; box-shadow: 0 0 0 3px #dbeafe; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; }
.sidebar { background: var(--sidebar); color: white; padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 22px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand span { color: #98a2b3; font-size: 13px; margin-top: 2px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { text-align: left; background: transparent; color: #d0d5dd; font-weight: 600; }
.nav-item:hover, .nav-item.active { background: var(--sidebar-soft); color: white; }
.sidebar-footer { margin-top: auto; }
.user-chip { padding: 12px; color: #d0d5dd; font-size: 14px; border-top: 1px solid #344054; }
.danger-text { width: 100%; color: #b42318 !important; }

.main { padding: 28px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.status-pill { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; border-radius: 99px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.status-pill span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 6px; }

.view { display: none; }
.view.active { display: block; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(16, 24, 40, .04); }
.stat-card { padding: 20px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.stat-card strong { display: block; font-size: 30px; margin-top: 8px; }
.panel { padding: 20px; min-width: 0; }
.panel.narrow { max-width: 700px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.grid-two { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { font-size: 14px; font-weight: 650; }
.form-grid label input, .form-grid label select, .form-grid label textarea { margin-top: 7px; }
.form-grid .full { grid-column: 1 / -1; }
.search { max-width: 270px; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; font-size: 14px; white-space: nowrap; }
th { color: var(--muted); font-weight: 700; background: #f9fafb; }
tbody tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 99px; background: #eef4ff; color: #3538cd; font-size: 12px; font-weight: 700; }
.badge.out { background: #fef3f2; color: #b42318; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar-brand div:last-child, .nav-item { font-size: 0; }
  .nav-item::first-letter { font-size: 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid-two { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; }
  .sidebar-brand, .sidebar-footer { display: none; }
  .sidebar nav { display: flex; }
  .nav-item { font-size: 13px; white-space: nowrap; }
  .main { padding: 16px; }
  .topbar { align-items: flex-start; }
  .status-pill { display: none; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}


.hero { display:flex; justify-content:space-between; align-items:center; gap:24px; background:linear-gradient(135deg,#101828,#1d4ed8); color:white; padding:28px; border-radius:18px; margin-bottom:20px; }
.hero h2 { font-size:30px; margin:7px 0; }
.hero p { margin:0; color:#dbeafe; }
.eyebrow { font-size:12px; letter-spacing:.16em; font-weight:800; color:#93c5fd; }
.hero-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.big-action { padding:16px 20px; font-size:16px; min-width:145px; }
.danger-action { background:#dc2626; }
.danger-action:hover { background:#b91c1c; }
.secondary-action { background:white; color:#1d4ed8; }
.secondary-action:hover { background:#eff6ff; }
.nav-item span { margin-left:8px; }
.product-head { align-items:flex-start; }
.inline-form { padding:18px; margin-bottom:18px; border:1px solid var(--line); background:#f8fafc; border-radius:12px; }
.form-actions { display:flex; justify-content:flex-end; gap:10px; }
.large-search { margin-bottom:16px; padding:14px 16px; font-size:16px; }
.quick-panel { margin:0 auto; }
.quick-form { display:grid; grid-template-columns:1fr 1fr; gap:14px; position:relative; }
.quick-form label { font-weight:700; font-size:14px; }
.quick-form label input,.quick-form label select { margin-top:7px; }
.quick-form .full { grid-column:1/-1; }
.huge-button { padding:16px; font-size:17px; }
.search-results { grid-column:1/-1; background:white; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 30px rgba(16,24,40,.12); overflow:hidden; margin-top:-8px; }
.result-item { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; background:white; color:var(--text); border-radius:0; border-bottom:1px solid var(--line); text-align:left; }
.result-item:hover { background:#f8fafc; }
.result-item span strong,.result-item span small { display:block; }
.result-item span small { color:var(--muted); margin-top:3px; }
.selected-product { grid-column:1/-1; display:flex; justify-content:space-between; gap:12px; padding:14px; border-radius:12px; background:#eff6ff; border:1px solid #bfdbfe; }
.selected-product span { color:#1d4ed8; }
.critical-list { display:grid; gap:9px; }
.critical-row { display:flex; justify-content:space-between; align-items:center; padding:12px; border:1px solid #fecaca; background:#fef2f2; border-radius:10px; }
.critical-row div:first-child strong,.critical-row div:first-child span { display:block; }
.critical-row div:first-child span { color:var(--muted); font-size:12px; margin-top:3px; }
.critical-row b { color:#b42318; font-size:18px; }
.critical-row small { color:var(--muted); }
.empty-state { padding:18px; text-align:center; color:var(--muted); }

@media (max-width:800px) {
  .hero { align-items:flex-start; flex-direction:column; }
  .hero-actions { justify-content:flex-start; width:100%; }
  .big-action { flex:1; min-width:130px; }
  .quick-form { grid-template-columns:1fr; }
  .quick-form .full,.search-results,.selected-product { grid-column:auto; }
}


.clickable-row { cursor:pointer; }
.clickable-row:hover { background:#f8fafc; }
.detail-drawer { margin-top:18px; padding:22px; border:1px solid var(--line); background:white; border-radius:16px; box-shadow:0 18px 50px rgba(16,24,40,.12); }
.detail-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; }
.detail-head h2 { margin:5px 0 0; }
.eyebrow.dark { color:#1d4ed8; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.code-list,.stock-list,.user-list { display:grid; gap:9px; }
.code-chip,.stock-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.code-chip span small,.code-chip span strong,.stock-row span small,.stock-row span strong { display:block; }
.code-chip small,.stock-row small { color:var(--muted); margin-bottom:3px; }
.icon-danger { width:30px; height:30px; padding:0; border-radius:50%; background:#fee2e2; color:#b91c1c; font-size:20px; }
.mini-form { display:grid; grid-template-columns:130px 1fr auto; gap:8px; margin-top:10px; }
.user-card { padding:15px; border:1px solid var(--line); border-radius:12px; background:white; }
.user-card.inactive { opacity:.62; background:#f8fafc; }
.user-card > div:first-child strong,.user-card > div:first-child span { display:block; }
.user-card > div:first-child span { color:var(--muted); margin-top:4px; }
.user-actions { display:grid; grid-template-columns:130px 1fr auto auto; gap:8px; margin-top:12px; }
.danger-text { color:#b42318; }

@media (max-width:900px) {
  .detail-grid { grid-template-columns:1fr; }
  .user-actions { grid-template-columns:1fr; }
  .mini-form { grid-template-columns:1fr; }
}


.barcode-preview {
  padding:14px 16px;
  border:1px dashed #60a5fa;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:10px;
  font-weight:800;
  letter-spacing:.03em;
}
.full-detail { grid-column:1/-1; }
.serial-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; margin-top:12px; }
.serial-card { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px; border:1px solid var(--line); border-radius:11px; background:#f8fafc; }
.serial-card > div:first-child strong,.serial-card > div:first-child span,.serial-card > div:last-child small { display:block; }
.serial-card > div:first-child strong { font-size:19px; }
.serial-card > div:first-child span,.serial-card > div:last-child small { color:var(--muted); font-size:12px; margin-top:4px; }
.serial-card > div:last-child { text-align:right; }


.serial-workspace { align-items:start; margin-bottom:18px; }
.scanner-input { font-size:20px; font-weight:700; }
.serial-info-card { margin-top:14px; border:1px solid var(--line); border-radius:14px; padding:18px; background:#f8fafc; }
.serial-info-head { display:flex; justify-content:space-between; gap:15px; align-items:flex-start; }
.serial-info-head h2 { margin:4px 0; }
.serial-info-head p { margin:0; color:var(--muted); }
.status-pill { padding:8px 11px; border-radius:999px; background:#dcfce7; color:#166534; font-weight:800; white-space:nowrap; }
.status-pill.out { background:#fee2e2; color:#991b1b; }
.serial-info-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
.serial-info-grid > div { padding:11px; border-radius:10px; background:#fff; border:1px solid var(--line); }
.serial-info-grid small,.serial-info-grid strong { display:block; }
.serial-info-grid small { color:var(--muted); margin-bottom:5px; }
.serial-actions { display:flex; gap:9px; margin-top:14px; flex-wrap:wrap; }
.mini-button { padding:7px 9px; font-size:12px; white-space:nowrap; }
button:disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:800px) {
  .serial-info-grid { grid-template-columns:1fr; }
}


.erp-version-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
}

.erp-version-box span {
  font-size: 10px;
  letter-spacing: .12em;
  opacity: .65;
}

.erp-version-box strong {
  font-size: 13px;
  letter-spacing: .04em;
}


.welcome-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(31,111,235,.20), transparent 36%),
    linear-gradient(145deg, #eef4ff, #f6f8fb 55%, #e9eef7);
}
.welcome-card {
  width: min(620px, 100%);
  background: #fff;
  padding: 34px;
  border: 1px solid rgba(208,213,221,.85);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(16,24,40,.14);
}
.welcome-brand { display:flex; align-items:center; gap:16px; margin-bottom:25px; }
.welcome-brand span { color:var(--primary); font-size:12px; font-weight:900; letter-spacing:.12em; }
.welcome-brand h1 { margin:3px 0 4px; font-size:30px; }
.welcome-brand p { margin:0; color:var(--muted); }
.login-users { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.login-user-card {
  display:flex; align-items:center; gap:12px; text-align:left;
  padding:13px; background:#f8fafc; color:var(--text);
  border:1px solid var(--line);
}
.login-user-card:hover { background:#eef4ff; color:var(--text); border-color:#9dbcf9; }
.login-user-card span:last-child { display:flex; flex-direction:column; gap:3px; min-width:0; }
.login-user-card small { color:var(--muted); }
.login-avatar {
  width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center;
  border-radius:12px; background:#dbeafe; color:#1d4ed8; font-weight:900;
}
.login-loading { color:var(--muted); padding:16px 0; }
.pin-login-form { margin-top:18px; }
.pin-login-form label { display:block; margin-bottom:7px; font-weight:800; }
.pin-login-form input { text-align:center; font-size:28px; letter-spacing:.45em; font-weight:900; }
.pin-login-form button { width:100%; margin-top:10px; }
.selected-login-user {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px; margin-bottom:15px; border-radius:11px;
  background:#eff6ff; border:1px solid #bfdbfe;
}
.selected-login-user span { color:var(--muted); font-size:13px; }
.welcome-version { margin-top:22px; text-align:center; color:var(--muted); font-size:12px; }

.idle-countdown {
  position:fixed; right:18px; bottom:18px; z-index:800;
  width:230px; padding:13px 15px;
  border-radius:14px; color:#fff; background:#172033;
  box-shadow:0 15px 45px rgba(16,24,40,.28);
}
.idle-countdown span,.idle-countdown small { display:block; }
.idle-countdown span { font-size:12px; color:#cbd5e1; }
.idle-countdown strong { display:block; margin:3px 0; font-size:25px; letter-spacing:.08em; }
.idle-countdown small { color:#94a3b8; line-height:1.3; }

.lock-screen {
  position:fixed; inset:0; z-index:1000; display:grid; place-items:center;
  padding:24px; background:rgba(10,18,32,.88); backdrop-filter:blur(12px);
}
.lock-card {
  width:min(410px,100%); padding:32px; text-align:center;
  background:#fff; border-radius:20px; box-shadow:0 25px 90px rgba(0,0,0,.35);
}
.lock-card .brand-mark { margin:0 auto 14px; }
.lock-eyebrow { color:var(--primary); font-size:11px; font-weight:900; letter-spacing:.13em; }
.lock-card h1 { margin:7px 0; }
.lock-card p { color:var(--muted); margin:0 0 18px; }
.lock-card input { text-align:center; font-size:25px; letter-spacing:.35em; font-weight:900; }
.lock-card button { width:100%; margin-top:10px; }

@media (max-width:600px) {
  .welcome-card { padding:24px; }
  .login-users { grid-template-columns:1fr; }
}

.compact-login { width:min(430px,100%); text-align:center; }
.compact-login .brand-mark { margin:0 auto 14px; }
.compact-login h1 { margin:8px 0 4px; }
.admin-gate-title { font-size:18px; font-weight:800; margin:4px 0 16px; }
#adminForm { text-align:left; }
#adminForm label { display:block; margin:12px 0 6px; font-weight:700; }


.customer-exit-fields {
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:12px;
  padding:15px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:12px;
  position:relative;
}
.customer-exit-fields label { position:relative; }
.compact-results { position:absolute; left:0; right:0; top:68px; z-index:40; }
.required-note { color:#b42318; font-weight:700; }
.customer-list { display:grid; gap:9px; max-height:560px; overflow:auto; }
.customer-card {
  width:100%; display:flex; justify-content:space-between; align-items:center;
  gap:12px; padding:13px 14px; text-align:left;
  background:#f8fafc; color:var(--text); border:1px solid var(--line);
}
.customer-card:hover { background:#eef4ff; color:var(--text); }
.customer-card span strong,.customer-card span small { display:block; }
.customer-card span small { color:var(--muted); margin-top:4px; }
.customer-card b { color:var(--primary); white-space:nowrap; font-size:13px; }

@media(max-width:800px){
  .customer-exit-fields{grid-template-columns:1fr}
}


.photo-import-grid {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);
  gap:20px;
}
.upload-zone {
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:25px;
  border:2px dashed #93b4f4;
  border-radius:16px;
  background:#f7faff;
  text-align:center;
  cursor:pointer;
}
.upload-zone:hover { background:#eef4ff; }
.upload-zone input { display:none; }
.upload-zone strong { font-size:18px; }
.upload-zone span { color:var(--muted); }
.photo-preview {
  display:block;
  max-width:100%;
  max-height:380px;
  margin:14px auto 0;
  border-radius:12px;
  border:1px solid var(--line);
}
.photo-scan-status { margin-top:12px; color:var(--muted); font-weight:600; }
.scan-warning { color:#b42318; }
.photo-result-actions { display:flex; gap:8px; flex-wrap:wrap; }
.photo-barcode-results { display:grid; gap:8px; }
.photo-barcode-row {
  display:grid;
  grid-template-columns:36px minmax(220px,1fr) minmax(180px,.65fr) 34px;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f8fafc;
}
.photo-barcode-row.invalid { border-color:#fda29b; background:#fff5f4; }
.photo-row-number {
  width:30px; height:30px; display:grid; place-items:center;
  border-radius:50%; background:#e8eef8; font-weight:800;
}
.photo-barcode-edit { font-weight:800; }
.photo-parse-status strong,.photo-parse-status small { display:block; }
.photo-parse-status small { color:var(--muted); margin-top:3px; }
.bulk-summary-cards {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
  margin-bottom:16px;
}
.bulk-summary-cards > div {
  padding:14px; border:1px solid var(--line);
  border-radius:12px; background:#f8fafc;
}
.bulk-summary-cards span,.bulk-summary-cards strong { display:block; }
.bulk-summary-cards span { color:var(--muted); font-size:12px; }
.bulk-summary-cards strong { margin-top:5px; font-size:23px; }
.bulk-result-list { display:grid; gap:7px; max-height:450px; overflow:auto; }
.bulk-result-row {
  display:flex; justify-content:space-between; gap:15px;
  padding:10px 12px; border-radius:9px; background:#f8fafc;
}
.bulk-result-row.added { background:#ecfdf3; color:#067647; }
.bulk-result-row.already_in_stock { background:#fffaeb; color:#b54708; }
.bulk-result-row.invalid,.bulk-result-row.product_missing { background:#fef3f2; color:#b42318; }

@media(max-width:900px){
  .photo-import-grid{grid-template-columns:1fr}
  .photo-barcode-row{grid-template-columns:32px 1fr 34px}
  .photo-parse-status{grid-column:2}
  .bulk-summary-cards{grid-template-columns:repeat(2,1fr)}
}


.personal-welcome {
  margin-top:7px;
  color:#1d4ed8;
  font-size:15px;
  font-weight:800;
}
.lock-button {
  width:100%;
  margin-bottom:8px;
  color:#344054 !important;
}


.lock-page {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(10,18,32,.94);
}
.lock-page .lock-card {
  width:min(410px,100%);
  padding:32px;
  text-align:center;
  background:#fff;
  border-radius:20px;
  box-shadow:0 25px 90px rgba(0,0,0,.35);
}
.lock-page .lock-card input {
  text-align:center;
  font-size:25px;
  letter-spacing:.35em;
  font-weight:900;
}
.lock-page .lock-card button {
  width:100%;
  margin-top:10px;
}


.full-user-card { display:block; padding:16px; }
.user-card-head {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; margin-bottom:14px;
}
.user-card-head strong,.user-card-head span { display:block; }
.user-card-head span { margin-top:4px; color:var(--muted); }
.user-edit-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
}
.user-edit-grid label { font-weight:700; }
.user-edit-grid input,.user-edit-grid select { margin-top:6px; }
.user-active-label { display:flex; align-items:center; gap:8px; padding-top:28px; }
.user-active-label input { width:auto; margin:0; }
.user-card-actions { display:flex; justify-content:flex-end; margin-top:14px; }
@media(max-width:760px){
  .user-edit-grid{grid-template-columns:1fr}
  .user-active-label{padding-top:0}
}

.autofill-decoy {
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


.users-page-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}
.user-tabs {
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#f2f4f7;
}
.user-tab {
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border-radius:9px;
  background:transparent;
  color:#475467;
  box-shadow:none;
}
.user-tab:hover {
  background:#fff;
  color:#101828;
}
.user-tab.active {
  background:#fff;
  color:#1d4ed8;
  box-shadow:0 2px 8px rgba(16,24,40,.08);
}
.tab-count {
  display:inline-grid;
  place-items:center;
  min-width:23px;
  height:23px;
  padding:0 6px;
  border-radius:999px;
  background:#e8eef8;
  color:#344054;
  font-size:12px;
  font-weight:900;
}
.user-tab.active .tab-count {
  background:#dbeafe;
  color:#1d4ed8;
}
.compact-user-list {
  display:grid;
  gap:9px;
}
.compact-user-card {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:13px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
}
.compact-user-card:hover {
  border-color:#b8c7e8;
  box-shadow:0 5px 18px rgba(16,24,40,.06);
}
.past-user-card {
  background:#f8fafc;
  opacity:.88;
}
.compact-user-avatar {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#eef4ff;
  font-size:20px;
}
.compact-user-info {
  min-width:0;
}
.compact-user-info strong,
.compact-user-info span,
.compact-user-info small {
  display:block;
}
.compact-user-info strong {
  font-size:15px;
}
.compact-user-info span {
  margin-top:3px;
  color:#667085;
  font-size:13px;
}
.compact-user-info small {
  margin-top:4px;
  color:#98a2b3;
}
.compact-user-actions {
  display:flex;
  align-items:center;
  gap:7px;
}
.icon-action {
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:10px;
  background:#f2f4f7;
  color:#344054;
  box-shadow:none;
}
.icon-action:hover {
  background:#e4e7ec;
  color:#101828;
}
.danger-icon:hover {
  background:#fee4e2;
  color:#b42318;
}
.restore-button {
  white-space:nowrap;
}
.drawer-backdrop {
  position:fixed;
  inset:0;
  z-index:950;
  background:rgba(16,24,40,.38);
  backdrop-filter:blur(2px);
}
.user-drawer {
  position:fixed;
  top:0;
  right:0;
  z-index:960;
  width:min(460px,100%);
  height:100vh;
  padding:24px;
  overflow:auto;
  background:#fff;
  box-shadow:-22px 0 60px rgba(16,24,40,.20);
  transform:translateX(105%);
  transition:transform .22s ease;
}
.user-drawer.open {
  transform:translateX(0);
}
body.drawer-open {
  overflow:hidden;
}
.drawer-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px;
  padding-bottom:18px;
  margin-bottom:18px;
  border-bottom:1px solid var(--line);
}
.drawer-head h2 {
  margin:4px 0 0;
}
.drawer-close {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:50%;
  background:#f2f4f7;
  color:#344054;
  font-size:25px;
  line-height:1;
  box-shadow:none;
}
.drawer-form {
  display:grid;
  gap:15px;
}
.drawer-form label {
  font-weight:800;
}
.drawer-form input,
.drawer-form select {
  margin-top:7px;
}
.drawer-form small {
  display:block;
  margin-top:5px;
  color:#667085;
  font-weight:500;
}
.drawer-check {
  display:flex;
  align-items:center;
  gap:9px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
}
.drawer-check input {
  width:auto;
  margin:0;
}
.drawer-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:5px;
}
@media(max-width:680px) {
  .users-page-head {
    align-items:stretch;
    flex-direction:column;
  }
  .user-tabs {
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .user-tab {
    justify-content:center;
    padding:9px 8px;
  }
  .compact-user-card {
    grid-template-columns:42px minmax(0,1fr);
  }
  .compact-user-avatar {
    width:40px;
    height:40px;
  }
  .compact-user-actions {
    grid-column:2;
    justify-content:flex-end;
  }
}


.ocr-mode-badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:#ecfdf3;
  color:#067647;
  font-size:12px;
  font-weight:800;
}

.service-toolbar,.service-filters{display:flex;align-items:center;justify-content:space-between;gap:16px}.service-filters{margin-bottom:16px}.service-filters .large-search{margin:0;flex:1}.service-filters select{max-width:220px}.service-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.service-progress .full{grid-column:1/-1}.service-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;background:#eef2f6}.status-received{background:#eff8ff;color:#175cd3}.status-diagnosing{background:#f4f3ff;color:#5925dc}.status-waiting_approval{background:#fffaeb;color:#b54708}.status-repairing{background:#fff4ed;color:#c4320a}.status-ready{background:#ecfdf3;color:#067647}.status-delivered{background:#e8f5e9;color:#1b5e20}.status-cancelled{background:#fef3f2;color:#b42318}@media(max-width:760px){.service-toolbar,.service-filters{align-items:stretch;flex-direction:column}.service-filters select{max-width:none}.service-progress{grid-template-columns:1fr}}
