/* VPack - Packing Video Management System */
:root {
  --primary: #4f46e5;
  --primary-soft: color-mix(in srgb, var(--primary) 12%, transparent);
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;
  --side: #0f172a;
  --side-text: #cbd5e1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
@supports not (color: color-mix(in srgb, red 10%, white)) { :root { --primary-soft: rgba(79, 70, 229, .12); } }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
kbd { background: #1e293b; color: #fff; border-radius: 4px; padding: 1px 6px; font-size: .8em; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; } .text-center { text-align: center; } .text-left { text-align: left; }
.text-success { color: var(--success); }
.grow { flex: 1; }
.pad { padding: 1rem; }
.mt { margin-top: 1rem; }
.inline { display: inline; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .25s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.brand-mark.lg { width: 64px; height: 64px; font-size: 32px; border-radius: 16px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.brand-text small { color: #94a3b8; font-size: 11px; }
.sidebar nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; margin-bottom: 2px; }
.sidebar nav a i { font-size: 17px; width: 20px; text-align: center; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot small { color: #64748b; }
.sidebar-foot .btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,.15); }
.sidebar-backdrop { display: none; }
.main { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 1.1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
#menuToggle { display: none; }
.content { padding: 20px; max-width: 1600px; width: 100%; margin: 0 auto; }
.net-status { color: var(--success); font-size: 18px; }
.net-status.offline { color: var(--danger); }
.pending-badge { background: #fef3c7; color: #92400e; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 8px; font: inherit; color: var(--text); }
.user-btn:hover { background: var(--bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; vertical-align: middle; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; z-index: 50; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.dropdown-head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.dropdown-head small { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; background: #e2e8f0; color: var(--text); transition: filter .15s, background .15s, transform .05s; white-space: nowrap; text-decoration: none !important; line-height: 1.3; }
.btn:hover { filter: brightness(.95); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); filter: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-danger-outline { background: transparent; border-color: #fecaca; color: var(--danger); }
.btn-danger-outline:hover { background: #fef2f2; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; font-size: 17px; text-decoration: none !important; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.danger:hover { background: #fef2f2; color: var(--danger); }
.icon-btn.dark { background: rgba(15,23,42,.6); color: #fff; backdrop-filter: blur(6px); }
.icon-btn.dark:hover, .icon-btn.dark.active { background: var(--primary); }

/* ---------- Cards / alerts ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; border: 1px solid var(--border); }
.card.narrow { max-width: 720px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.banner i { font-size: 20px; }
.banner span { flex: 1; }
.banner-warning { background: #fef3c7; color: #78350f; }
.banner-danger { background: #fee2e2; color: #7f1d1d; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty > i { font-size: 46px; display: block; margin-bottom: 10px; color: #94a3b8; }
.empty h3 { color: var(--text); }
.empty-sm { color: var(--muted); text-align: center; padding: 14px; list-style: none; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; background: #e2e8f0; color: #334155; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-muted { background: #f1f5f9; color: #64748b; }
.badge-type-packing { background: #e0e7ff; color: #3730a3; }
.badge-type-return { background: #fce7f3; color: #9d174d; }
.badge-type-unboxing { background: #ffedd5; color: #9a3412; }
.badge-type-qc { background: #ccfbf1; color: #115e59; }
.badge-role-admin { background: #ede9fe; color: #5b21b6; }
.badge-role-supervisor { background: #e0f2fe; color: #075985; }
.badge-role-packer { background: #f1f5f9; color: #334155; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #f1f5f9; color: #475569; font-weight: 600; }
.chip.ok { background: #dcfce7; color: #166534; }
.chip.warn { background: #fef3c7; color: #92400e; }
.chip.bad { background: #fee2e2; color: #991b1b; }
.chip-link { padding: 4px 12px; border-radius: 99px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; }
.chip-link:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.dot.on { background: var(--success); box-shadow: 0 0 0 3px #bbf7d0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > span { font-weight: 600; font-size: 13px; color: #334155; }
.field small { font-size: 12px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input:disabled, select:disabled { background: #f8fafc; color: var(--muted); }
input[type=color] { width: 100%; height: 40px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--primary); }
input[type=file] { font: inherit; font-size: 13px; }
.invalid { border-color: var(--danger) !important; }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-sm { width: 90px !important; padding: 5px 8px !important; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 4px 16px 8px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid-2.tight { gap: 0 10px; }
.col-span-2 { grid-column: span 2; }
.section-title { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form input { width: auto !important; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 8px 0; }
.switch input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 40px; height: 22px; background: #cbd5e1; border-radius: 99px; position: relative; flex-shrink: 0; transition: background .2s; margin-top: 1px; }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--primary-soft); }
.switch span { display: flex; flex-direction: column; font-weight: 500; }
.switch small { color: var(--muted); font-weight: 400; font-size: 12px; }
.switch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 20px; margin-bottom: 12px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: #f8fafc; }
.table tfoot th { background: #f8fafc; }
.table th.text-right, .table td.text-right { text-align: right; }
.table.hover tbody tr:hover { background: #f8fafc; }
.table.kv th { width: 38%; color: var(--muted); font-weight: 600; font-size: 13px; }
.table.kv td { word-break: break-word; }
.hash { word-break: break-all; font-size: 11.5px; }
.thumb-sm { display: inline-grid; place-items: center; width: 64px; height: 40px; border-radius: 6px; background: #1e293b center/cover no-repeat; color: #fff; font-size: 18px; }
.thumb-sm i { opacity: .85; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding-top: 14px; }

/* ---------- Filters ---------- */
.filters { padding-bottom: 8px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
.filter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.quick-ranges { display: flex; gap: 6px; flex-wrap: wrap; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-actions p { margin: 0; max-width: 760px; }

/* ---------- Toasts ---------- */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #1e293b; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translateY(20px); opacity: 0; transition: all .25s; font-weight: 500; }
.toast.show { transform: none; opacity: 1; }
.toast i { font-size: 18px; margin-top: 1px; }
.toast-success i { color: #4ade80; } .toast-danger { background: #7f1d1d; } .toast-danger i { color: #fca5a5; }
.toast-warning { background: #78350f; } .toast-warning i { color: #fcd34d; } .toast-info i { color: #7dd3fc; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; background: var(--card); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .18s ease-out; }
.modal-lg { max-width: 820px; } .modal-xl { max-width: 1180px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
body.modal-open { overflow: hidden; }

/* ---------- Auth / install ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 20%, var(--primary-soft), transparent 50%), linear-gradient(135deg, #0f172a, #1e293b); }
.auth-card { background: var(--card); width: 100%; max-width: 400px; padding: 32px; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand img { max-height: 70px; max-width: 200px; object-fit: contain; margin-bottom: 10px; }
.auth-brand .brand-mark { margin-bottom: 10px; }
.auth-brand h1 { font-size: 1.4rem; margin-bottom: 2px; }
.auth-brand p { color: var(--muted); margin: 0; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.install-wrap { width: 100%; max-width: 860px; }
.install-head { display: flex; align-items: center; gap: 16px; color: #fff; margin-bottom: 20px; }
.install-head h1 { margin: 0; font-size: 1.6rem; }
.install-head p { margin: 0; color: #94a3b8; }
.install-wrap .card { padding: 26px; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.08); color: #94a3b8; border-radius: 10px; font-weight: 600; }
.step b { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 13px; }
.step.active { background: var(--primary); color: #fff; }
.step.done { color: #bbf7d0; } .step.done b { background: var(--success); color: #fff; }
.wizard-pane { display: none; } .wizard-pane.active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.wizard-nav > div { display: flex; gap: 8px; }
.logo-preview img { max-height: 80px; border: 1px dashed var(--border); padding: 8px; border-radius: 8px; }

/* ---------- Dashboard ---------- */
.hero-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-actions h2 { margin: 0; }
.hero-actions p { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.kpi > div { display: flex; flex-direction: column; min-width: 0; }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.kpi b { font-size: 1.6rem; line-height: 1.2; }
.kpi em { font-style: normal; color: var(--muted); font-size: 12px; }
.kpi em.up { color: var(--success); } .kpi em.down { color: var(--danger); }
.kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; color: #fff; flex-shrink: 0; }
.bg-primary { background: var(--primary); } .bg-info { background: #0ea5e9; } .bg-success { background: #22c55e; } .bg-warning { background: #f59e0b; } .bg-danger { background: #ef4444; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.chart-box { position: relative; height: 260px; } .chart-box.tall { height: 340px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.recent-item { display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.recent-item:hover { text-decoration: none; }
.recent-item:hover .recent-thumb i { transform: scale(1.15); }
.recent-thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; background: #1e293b center/cover no-repeat; display: grid; place-items: center; color: #fff; font-size: 30px; overflow: hidden; }
.recent-thumb i { transition: transform .2s; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.recent-thumb em { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.recent-item small { color: var(--muted); font-size: 12px; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; padding: 5px 0; }
.bars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.bars b { text-align: right; }
.station-list { list-style: none; padding: 0; margin: 0; }
.station-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.station-list li:last-child { border: 0; }
.station-list div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.station-list small { color: var(--muted); font-size: 12px; }
.station-list em { font-style: normal; font-weight: 700; background: var(--bg); padding: 2px 10px; border-radius: 99px; }

/* ---------- Record station ---------- */
.page-record .content { max-width: none; }
.rec-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.rec-stage-wrap { position: sticky; top: 76px; }
.rec-stage { position: relative; background: #0b1220; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow); display: grid; place-items: center; }
.rec-stage canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
body.recording .rec-stage { box-shadow: 0 0 0 4px #ef4444, 0 10px 40px rgba(239,68,68,.3); }
.rec-stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.stage-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #cbd5e1; background: radial-gradient(circle, #1e293b, #0b1220); text-align: center; padding: 20px; }
.stage-overlay > i { font-size: 54px; color: #475569; }
.stage-overlay .btn-ghost { color: #cbd5e1; border-color: #334155; }
.stage-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.stage-awb { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(239,68,68,.92); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 18px; padding: 4px 14px; border-radius: 8px; pointer-events: none; display: none; }
.rec-stage:fullscreen .stage-awb { display: block; }
.scan-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.scan-flash.ok { animation: flashOk .5s; } .scan-flash.bad { animation: flashBad .6s; }
@keyframes flashOk { 0% { opacity: 1; box-shadow: inset 0 0 0 10px #22c55e; background: rgba(34,197,94,.15); } 100% { opacity: 0; } }
@keyframes flashBad { 0% { opacity: 1; box-shadow: inset 0 0 0 10px #ef4444; background: rgba(239,68,68,.2); } 100% { opacity: 0; } }
.rec-statusbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 4px; color: var(--muted); font-size: 13px; }
.rec-statusbar b { color: var(--text); }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: #e2e8f0; font-size: 12px; }
.state-pill i { font-size: 9px; color: #94a3b8; }
.state-pill.rec { background: #fee2e2; } .state-pill.rec b { color: #b91c1c; } .state-pill.rec i { color: #ef4444; animation: blink 1s infinite; }
.state-pill.saving { background: #fef3c7; } .state-pill.saving i { color: #f59e0b; }
@keyframes blink { 50% { opacity: .2; } }
.rec-panel .card { margin-bottom: 14px; }
.rec-current { text-align: center; background: linear-gradient(135deg, #f8fafc, #eef2ff); }
.rec-current.active { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fecaca; }
.rec-current.dup { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fde68a; }
.rec-current-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.rec-current-awb { font-family: var(--mono); font-size: 1.7rem; font-weight: 800; word-break: break-all; margin: 4px 0; }
.rec-current-meta { color: var(--muted); font-size: 13px; }
.rec-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 4px; }
.help-tips { margin-top: 12px; font-size: 13px; color: var(--muted); }
.help-tips summary { cursor: pointer; font-weight: 600; }
.help-tips ul { padding-left: 18px; margin: 8px 0 0; }
.session-list { list-style: none; padding: 0; margin: 0; max-height: 46vh; overflow-y: auto; }
.session-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.session-item .thumb { width: 72px; height: 44px; border-radius: 6px; background: #1e293b center/cover; flex-shrink: 0; }
.session-item .info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.session-item b { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.session-item small { color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.storage-options { display: grid; gap: 10px; }
.storage-opt { display: flex; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; }
.storage-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.storage-opt.disabled { opacity: .55; cursor: not-allowed; }
.storage-opt input { margin-top: 4px; accent-color: var(--primary); }
.storage-opt b { display: flex; gap: 6px; }
.storage-opt small { display: block; color: var(--muted); }
.folder-row { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Player ---------- */
.player-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.player-video { position: relative; }
.player-video video { width: 100%; background: #000; border-radius: 10px; aspect-ratio: 16/9; display: block; }
.player-msg { position: absolute; inset: 0; aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #0f172a; color: #cbd5e1; border-radius: 10px; text-align: center; padding: 24px; }
.player-msg > i { font-size: 44px; color: #64748b; }
.player-msg .btn-outline { background: transparent; color: #fff; border-color: #475569; }
.integrity { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f1f5f9; font-weight: 600; font-size: 13px; }
.integrity.ok { background: #dcfce7; color: #166534; } .integrity.bad { background: #fee2e2; color: #991b1b; } .integrity.muted { color: var(--muted); font-weight: 500; }
.player-side .table.kv th, .player-side .table.kv td { padding: 6px 4px; font-size: 13px; }
.status-edit { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg); border-radius: 10px; }

/* ---------- Lookup / verify ---------- */
.lookup { max-width: 980px; margin: 0 auto; }
.lookup-card { text-align: center; padding: 28px; }
.lookup-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.lookup-form input { flex: 1; min-width: 220px; font-size: 18px !important; padding: 12px 14px !important; font-family: var(--mono); }
.lookup-cam { position: relative; margin-top: 16px; border-radius: 12px; overflow: hidden; background: #000; }
.lookup-cam video { width: 100%; display: block; max-height: 60vh; object-fit: cover; }
.lookup-cam .icon-btn { position: absolute; top: 10px; right: 10px; }
.scan-frame { position: absolute; inset: 22% 12%; border: 3px solid rgba(34,197,94,.9); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.tl-item:hover { text-decoration: none; background: #f8fafc; }
.tl-item div { display: flex; flex-direction: column; gap: 2px; }
.tl-item small { color: var(--muted); }
.tl-thumb { width: 140px; aspect-ratio: 16/9; border-radius: 8px; background: #1e293b center/cover; display: grid; place-items: center; color: #fff; font-size: 26px; flex-shrink: 0; }
.verify-card { max-width: 860px; margin: 0 auto; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; border: 2px dashed #cbd5e1; border-radius: 14px; cursor: pointer; color: var(--muted); text-align: center; margin: 14px 0; transition: all .15s; }
.dropzone i { font-size: 42px; color: var(--primary); }
.dropzone b { color: var(--text); }
.dropzone.over, .dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.verify-ok, .verify-bad { display: flex; gap: 16px; padding: 18px; border-radius: 12px; }
.verify-ok { background: #f0fdf4; border: 1px solid #bbf7d0; } .verify-ok > i { color: var(--success); font-size: 42px; }
.verify-bad { background: #fef2f2; border: 1px solid #fecaca; } .verify-bad > i { color: var(--danger); font-size: 42px; }
.verify-ok .mono, .verify-bad .mono { word-break: break-all; }

/* ---------- Settings ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; background: var(--card); padding: 6px; border-radius: 12px; border: 1px solid var(--border); }
.tabs button { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--muted); padding: 9px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); background: var(--bg); }
.tabs button.active { background: var(--primary); color: #fff; }
.tab-pane { display: none; } .tab-pane.active { display: block; }
.wm-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; }
.wm-preview { position: sticky; top: 76px; align-self: start; }
.wm-preview canvas { width: 100%; border-radius: 10px; background: #000; display: block; margin-bottom: 8px; }
.wm-controls .switch-list { grid-template-columns: 1fr 1fr; }
.range-val { color: var(--primary); font-family: var(--mono); }
.logo-edit { display: flex; gap: 18px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.logo-box { width: 160px; height: 100px; border: 1px dashed #cbd5e1; border-radius: 10px; display: grid; place-items: center; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0/16px 16px; }
.logo-box img { max-width: 140px; max-height: 84px; object-fit: contain; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; box-shadow: 0 -4px 20px rgba(15,23,42,.06); }
.barcodes-print { margin-top: 8px; }

/* ---------- Print / evidence ---------- */
.print-body { background: #e2e8f0; padding: 20px; }
.print-actions { max-width: 900px; margin: 0 auto 14px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.evidence { max-width: 900px; margin: 0 auto; background: #fff; padding: 36px; border-radius: 8px; box-shadow: var(--shadow); }
.evidence header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--primary); padding-bottom: 16px; margin-bottom: 20px; }
.ev-company { display: flex; gap: 14px; align-items: flex-start; }
.ev-company img { max-height: 70px; max-width: 140px; object-fit: contain; }
.ev-company h1 { font-size: 1.4rem; margin-bottom: 4px; }
.ev-company p, .ev-title p { margin: 0; color: var(--muted); font-size: 12.5px; }
.ev-title { text-align: right; }
.ev-title h2 { color: var(--primary); font-size: 1.25rem; }
.ev-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; }
.ev-thumb { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.ev-statement { margin-top: 22px; padding: 16px; background: #f8fafc; border-radius: 8px; border-left: 4px solid var(--primary); }
.ev-sign { display: flex; justify-content: space-between; margin-top: 60px; }
.ev-sign div { width: 40%; text-align: center; color: var(--muted); font-size: 13px; }
.ev-sign span { display: block; border-top: 1px solid #94a3b8; margin-bottom: 6px; }
.code-sheet { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.code-card { background: #fff; border: 2px dashed #94a3b8; border-radius: 10px; padding: 18px; text-align: center; }
.code-card svg { max-width: 100%; height: auto; }
.code-card h2 { letter-spacing: .1em; }
.code-card small { color: var(--muted); }
@media print {
  .print-actions { display: none; }
  .print-body { background: #fff; padding: 0; }
  .evidence { box-shadow: none; padding: 0; }
  .code-card { break-inside: avoid; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .rec-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .player-body { grid-template-columns: 1fr; }
  .wm-layout { grid-template-columns: 1fr; }
  .wm-preview { position: static; }
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .main { margin-left: 0; }
  #menuToggle { display: inline-grid; }
  .grid-main { grid-template-columns: 1fr; }
  .rec-layout { grid-template-columns: 1fr; }
  .rec-stage-wrap { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .content { padding: 12px; }
  .topbar { padding: 0 10px; }
  .hide-sm { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: auto; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; gap: 10px; } .kpi-icon { width: 38px; height: 38px; font-size: 17px; } .kpi b { font-size: 1.25rem; }
  .rec-current-awb { font-size: 1.35rem; }
  .steps .step span { display: none; }
  .ev-grid { grid-template-columns: 1fr; }
  .evidence { padding: 18px; }
  .evidence header { flex-direction: column; } .ev-title { text-align: left; }
  .wm-controls .switch-list { grid-template-columns: 1fr; }
  .tl-thumb { width: 96px; }
  .modal { padding: 0; } .modal-dialog { border-radius: 0; min-height: 100vh; }
  .sticky-save { flex-direction: column; align-items: stretch; }
}
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); } }

/* ---------- Navigation separator ---------- */
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 6px; }

/* ---------- Help center ---------- */
.help-hero { display: grid; gap: 14px; background: linear-gradient(135deg, var(--card), var(--primary-soft)); }
.help-hero h2 { display: flex; gap: 10px; align-items: center; }
.help-search { position: relative; max-width: 720px; }
.help-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.help-search input { padding: 13px 14px 13px 44px !important; font-size: 16px !important; border-radius: 12px !important; }
.help-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.quick-card { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--text); transition: border-color .15s, transform .15s; }
.quick-card:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.quick-card i { font-size: 22px; color: var(--primary); margin-bottom: 4px; }
.quick-card small { color: var(--muted); }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-toc { position: sticky; top: 76px; padding: 10px; display: flex; flex-direction: column; }
.help-toc a { padding: 8px 10px; border-radius: 8px; color: var(--text); display: flex; gap: 8px; font-weight: 500; }
.help-toc a:hover { background: var(--bg); text-decoration: none; color: var(--primary); }
.help-section { scroll-margin-top: 76px; }
.help-section h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.help-section h3 i { color: var(--primary); }
.help-item { border-top: 1px solid var(--border); }
.help-item summary { cursor: pointer; padding: 12px 4px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "\F282"; font-family: "bootstrap-icons"; color: var(--muted); transition: transform .2s; }
.help-item[open] summary::after { transform: rotate(180deg); }
.help-item summary:hover { color: var(--primary); }
.help-answer { padding: 0 4px 14px; color: #334155; }
.help-answer ol, .help-answer ul { padding-left: 20px; margin: 0 0 8px; }
.help-answer li { margin-bottom: 4px; }
.help-answer .table th, .help-answer .table td { padding: 6px 8px; }
.help-contact, .tut-foot { display: flex; align-items: center; gap: 16px; }
.help-contact > i, .tut-foot > i { font-size: 34px; color: var(--primary); }
.help-contact p, .tut-foot p { margin: 0; }
.tut-foot > div { flex: 1; }

/* ---------- Tutorials ---------- */
.tut-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(135deg, var(--card), var(--primary-soft)); }
.tut-hero p { margin: 0; max-width: 720px; }
.tut-overall { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), #e2e8f0 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; background: var(--card); border-radius: 50%; }
.ring span { position: relative; font-weight: 800; font-size: 1.1rem; }
.tab-count { font-size: 11px; background: rgba(0,0,0,.08); padding: 1px 7px; border-radius: 99px; }
.tabs button.active .tab-count { background: rgba(255,255,255,.25); }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.track-head p { margin: 0; }
.track-progress { min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.track-progress .bar { height: 10px; }
.track-progress .bar i { transition: width .4s; background: var(--success); }
.lessons { list-style: none; padding: 0; margin: 0; }
.lesson { padding: 0; margin-bottom: 10px; overflow: hidden; }
.lesson-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.lesson-head:hover { background: #f8fafc; }
.lesson-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; flex-shrink: 0; }
.lesson-num i { display: none; }
.lesson.done .lesson-num { background: var(--success); color: #fff; }
.lesson.done .lesson-num span { display: none; } .lesson.done .lesson-num i { display: block; }
.lesson-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lesson-title small { color: var(--muted); }
.lesson.done .lesson-title b { color: var(--muted); }
.lesson-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lesson-caret { color: var(--muted); transition: transform .2s; }
.lesson.open .lesson-caret { transform: rotate(180deg); }
.lesson-body { display: none; padding: 0 18px 16px 66px; }
.lesson.open .lesson-body { display: block; }
.lesson-steps { padding-left: 18px; margin: 0 0 14px; }
.lesson-steps li { margin-bottom: 6px; }
.lesson-done { margin: 0; font-weight: 600; }

/* ---------- Guided tour ---------- */
.tour-layer { position: fixed; inset: 0; z-index: 2000; display: none; pointer-events: none; }
.tour-layer.show { display: block; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .62), 0 0 0 3px var(--primary); transition: all .3s ease; pointer-events: none; }
.tour-pop { position: fixed; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); pointer-events: auto; transition: top .3s, left .3s; }
.tour-pop h4 { margin: 4px 0 6px; font-size: 1.05rem; }
.tour-pop p { color: #334155; margin-bottom: 10px; }
.tour-head { display: flex; justify-content: space-between; align-items: center; }
.tour-count { color: var(--primary); font-weight: 700; font-size: 12px; }
.tour-head .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.tour-dots i.done { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.tour-dots i.on { background: var(--primary); width: 18px; border-radius: 99px; }
.tour-nav { display: flex; justify-content: space-between; }
.tour-offer { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 900; display: flex; align-items: center; gap: 12px; background: var(--side); color: #fff; padding: 10px 10px 10px 16px; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.3); transition: transform .35s; max-width: calc(100vw - 24px); }
.tour-offer.show { transform: translate(-50%, 0); }
.tour-offer > i { font-size: 22px; color: #a5b4fc; }
.tour-offer div { display: flex; flex-direction: column; line-height: 1.3; }
.tour-offer span { color: #cbd5e1; font-size: 13px; }
.tour-offer .icon-btn { color: #94a3b8; }
@media (max-width: 992px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 640px) { .tut-hero { flex-direction: column; align-items: flex-start; } .lesson-body { padding-left: 18px; } .lesson-meta { display: none; } }
@media print { .tour-layer, .tour-offer { display: none !important; } }

/* ---------- v2: roles, customers, auth, backups, updates ---------- */
.nav-sep { height: auto; background: none; margin: 14px 6px 4px; }
.nav-sep span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 700; padding-left: 6px; }
.badge-role-super_admin { background: #ede9fe; color: #5b21b6; }
.badge-role-support_admin { background: #e0f2fe; color: #075985; }
.badge-role-customer { background: #dcfce7; color: #166534; }
.auth-title { font-size: 1.15rem; margin-bottom: 6px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 14px; font-size: 13px; font-weight: 600; }
.auth-row.center { justify-content: center; margin: 16px 0 0; }
.auth-card form .btn-lg { margin-top: 4px; }
.input-suffix { display: inline-flex; align-items: center; padding: 0 12px; background: var(--bg); border: 1px solid #cbd5e1; border-left: 0; border-radius: 0 8px 8px 0; color: var(--muted); white-space: nowrap; font-size: 13px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.mini-stats div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.mini-stats b { font-size: 1.4rem; }
.mini-stats small { color: var(--muted); font-size: 11.5px; }
.cust-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cust-head h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.cust-head p { margin: 0 0 4px; }
.cust-logo { width: 96px; height: 96px; border-radius: 16px; border: 1px solid var(--border); display: grid; place-items: center; background: #fff; flex-shrink: 0; overflow: hidden; }
.cust-logo img { max-width: 86px; max-height: 86px; object-fit: contain; }
.cust-logo i { font-size: 40px; color: #94a3b8; }
.cust-cell { display: flex; align-items: center; gap: 10px; color: var(--text); }
.cust-mini { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; background: #fff; flex-shrink: 0; overflow: hidden; }
.cust-mini img { max-width: 32px; max-height: 32px; object-fit: contain; }
.cust-mini i { color: #94a3b8; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.role-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.role-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.backup-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.backup-type { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 14px; border: 2px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, transform .15s; }
.backup-type:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); }
.backup-type:disabled { opacity: .5; cursor: not-allowed; }
.backup-type i { font-size: 24px; color: var(--primary); }
.backup-type small { color: var(--muted); }
.cron-cmd { display: block; padding: 10px 12px; background: #0f172a; color: #e2e8f0; border-radius: 8px; font-size: 12px; word-break: break-all; }
.upd-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.upd-counts .chip { font-size: 12.5px; padding: 4px 10px; }
.upd-files summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.upd-files .table-wrap { max-height: 360px; overflow-y: auto; }
.upd-apply { margin-top: 14px; padding: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; }
.upd-apply ol { margin: 0 0 12px; padding-left: 18px; }
.upload-zone { display: flex; flex-direction: column; gap: 10px; }
.protected-list { display: flex; flex-wrap: wrap; gap: 6px; }
.protected-list code { background: #fef2f2; color: #991b1b; }
