:root {
  --navy: #0c1b2a;
  --navy-2: #13283d;
  --navy-3: #1f3b56;
  --yellow: #f5c400;
  --yellow-dark: #d9ad00;
  --ink: #182230;
  --muted: #667085;
  --line: #dfe4ea;
  --surface: #ffffff;
  --canvas: #f3f5f7;
  --green: #16794a;
  --green-bg: #e8f7ef;
  --red: #b42318;
  --red-bg: #fff0ee;
  --orange: #a34f00;
  --orange-bg: #fff4e5;
  --blue: #175cd3;
  --blue-bg: #eaf2ff;
  --shadow: 0 8px 24px rgba(12, 27, 42, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 260px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--navy);
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
}

.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; line-height: 1.2; }
.brand span { margin-top: 3px; color: #9fb1c2; font-size: 11px; }

.nav { padding: 14px 12px 24px; }
.nav-group { margin: 14px 10px 6px; color: #7f95a9; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav a {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 42px;
  margin: 3px 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: #d8e1e9;
  font-weight: 650;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.active { background: var(--yellow); color: var(--navy); }
.nav-icon { width: 22px; text-align: center; }

.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255, 255, 255, .1); color: #9fb1c2; font-size: 12px; }

.app-main { min-height: 100vh; margin-left: 260px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

.menu-toggle { display: none; }
.topbar-title { font-weight: 800; }
.topbar-spacer { flex: 1; }
.user-menu { display: flex; gap: 11px; align-items: center; }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; }
.user-meta strong, .user-meta span { display: block; }
.user-meta span { color: var(--muted); font-size: 11px; text-transform: capitalize; }

.content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px; }

.page-heading { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.page-heading p { max-width: 760px; margin: 7px 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.button, button.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 750;
  line-height: 1.1;
  cursor: pointer;
}
.button:hover { filter: brightness(1.06); text-decoration: none; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary, .button.yellow { background: var(--yellow); color: var(--navy); }
.button.secondary, .button.outline { border-color: var(--line); background: #fff; color: var(--ink); }
.button.danger { background: var(--red); color: #fff; }
.button.success { background: var(--green); color: #fff; }
.button.small { min-height: 32px; padding: 7px 10px; font-size: 12px; }
.button.link { min-height: auto; padding: 0; background: transparent; color: var(--blue); }

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.panel, .plain-card, .form-card, .profile-card, .report-card, .backup-card, .settings-card, .admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel { overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.plain-card, .form-card, .profile-card, .report-card, .backup-card, .settings-card, .admin-card { padding: 22px; }

.panel-header { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; color: var(--navy); font-size: 17px; }
.panel-body { padding: 20px; }
.panel-note, .muted, .hint, small { color: var(--muted); }

.alert { position: relative; margin-bottom: 18px; padding: 13px 42px 13px 15px; border: 1px solid; border-radius: 9px; }
.alert.success { border-color: #a8dfc1; background: var(--green-bg); color: #0f603a; }
.alert.error { border-color: #f2b8b2; background: var(--red-bg); color: var(--red); }
.alert.warning { border-color: #f3ce93; background: var(--orange-bg); color: var(--orange); }
.alert-close { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: inherit; cursor: pointer; }

.badge, .status-badge, .condition-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 99px;
  background: #edf0f3;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.status-available, .status-approved, .status-active, .status-completed, .status-confirmed, .status-good { background: var(--green-bg); color: var(--green); }
.status-issued, .status-pending, .status-requested, .status-in-transit, .status-fair { background: var(--orange-bg); color: var(--orange); }
.status-repair, .status-damaged, .status-overdue, .status-rejected, .status-lost, .status-retired, .status-archived, .status-poor { background: var(--red-bg); color: var(--red); }
.status-returned, .status-closed, .status-cancelled { background: #edf0f3; color: #475467; }
.status-open, .status-planned, .status-draft { background: var(--blue-bg); color: var(--blue); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card { position: relative; overflow: hidden; min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.kpi-card::after { content: ""; position: absolute; inset: auto -22px -28px auto; width: 86px; height: 86px; border-radius: 50%; background: rgba(245, 196, 0, .14); }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { margin-top: 7px; color: var(--navy); font-size: 30px; font-weight: 900; line-height: 1.1; }
.kpi-note { margin-top: 7px; color: var(--muted); font-size: 12px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); gap: 20px; }
.dashboard-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-action { display: flex; gap: 11px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 750; }
.quick-action:hover { border-color: var(--yellow-dark); background: #fffdf2; text-decoration: none; }
.quick-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 8px; background: var(--yellow); color: var(--navy); }
.attention-list, .activity-list { display: grid; gap: 11px; }
.attention-item, .activity-item { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 11px; border-bottom: 1px solid #edf0f2; }
.attention-item:last-child, .activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.attention-icon, .activity-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: var(--orange-bg); color: var(--orange); font-weight: 900; }
.attention-item strong, .activity-item strong { display: block; }

.toolbar, .filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.filter-fields { display: flex; flex: 1; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.search-box { position: relative; min-width: min(340px, 100%); flex: 1; }
.search-box input { padding-left: 38px; }
.search-box::before { content: "⌕"; position: absolute; top: 7px; left: 13px; color: var(--muted); font-size: 20px; }

label { display: block; margin-bottom: 6px; color: #344054; font-size: 12px; font-weight: 750; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd6de;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 104px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 92, 211, .12); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--navy); }
.field-help { margin-top: 5px; color: var(--muted); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group.full, .full-width { grid-column: 1 / -1; }
.form-section { margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section:first-child { margin-top: 0; padding-top: 0; border: 0; }
.form-section h2, .form-section h3 { margin: 0 0 14px; color: var(--navy); font-size: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkbox-row { display: flex; gap: 9px; align-items: center; min-height: 42px; }
.checkbox-row label { margin: 0; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f8f9fa; color: #475467; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px; border-bottom: 1px solid #edf0f2; vertical-align: top; }
tbody tr:hover { background: #fbfcfd; }
tbody tr:last-child td { border-bottom: 0; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.row-title { color: var(--navy); font-weight: 800; }
.row-subtitle { margin-top: 2px; color: var(--muted); font-size: 11px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool-cell { display: flex; gap: 10px; align-items: center; min-width: 210px; }
.tool-thumb { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; overflow: hidden; border-radius: 8px; background: #edf0f3; color: var(--navy); font-weight: 900; }
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; }
.empty-state { padding: 38px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding: 15px 20px; border-top: 1px solid var(--line); }
.pagination a, .pagination span { display: grid; min-width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.pagination .active { border-color: var(--navy); background: var(--navy); color: #fff; }

.tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tabs a { flex: 0 0 auto; padding: 9px 14px; border-radius: 7px; color: var(--muted); font-weight: 750; }
.tabs a.active { background: var(--navy); color: #fff; }
.tabs a:hover { text-decoration: none; }

.profile-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
.profile-aside { text-align: center; }
.profile-photo { display: grid; min-height: 220px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f3f5f7; color: #7b8794; font-size: 56px; font-weight: 900; }
.profile-photo img { width: 100%; height: 100%; max-height: 300px; object-fit: cover; }
.qr-box { display: inline-grid; min-width: 170px; min-height: 170px; margin-top: 16px; padding: 12px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.detail-item { padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }

.scanner-panel { display: none; margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.scanner-panel.open { display: block; }
.scanner-layout { display: grid; grid-template-columns: minmax(240px, 460px) minmax(240px, 1fr); gap: 18px; align-items: start; }
.scanner-video { width: 100%; min-height: 250px; border-radius: 10px; background: #07111b; object-fit: cover; }

.project-grid, .people-grid, .report-grid, .admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card, .person-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.project-card h3, .person-card h3, .report-card h3, .backup-card h3 { margin: 0; color: var(--navy); }
.project-card p, .person-card p, .report-card p, .backup-card p { color: var(--muted); }
.project-stats, .person-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.mini-stat { padding: 10px; border-radius: 8px; background: #f7f8fa; }
.mini-stat strong, .mini-stat span { display: block; }
.mini-stat strong { color: var(--navy); font-size: 18px; }
.mini-stat span { color: var(--muted); font-size: 10px; text-transform: uppercase; }

.movement-list, .maintenance-list, .incident-list { display: grid; gap: 12px; }
.movement-card, .maintenance-card, .incident-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.movement-icon, .maintenance-icon, .incident-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 9px; background: #eef2f6; color: var(--navy); font-weight: 900; }
.movement-main, .maintenance-main, .incident-main { min-width: 0; flex: 1; }
.movement-meta, .maintenance-meta, .incident-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 5px; color: var(--muted); font-size: 12px; }

.count-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.count-table input[type="number"] { width: 92px; min-height: 36px; }
.variance-positive { color: var(--green); font-weight: 800; }
.variance-negative { color: var(--red); font-weight: 800; }

.report-card, .backup-card { min-height: 180px; }
.report-icon { display: grid; width: 44px; height: 44px; margin-bottom: 14px; place-items: center; border-radius: 10px; background: var(--yellow); color: var(--navy); font-size: 20px; font-weight: 900; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 20px; }
.audit-detail { max-width: 420px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 13, 22, .72); }
.modal-backdrop.open { display: flex; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 7px; background: #f1f3f5; cursor: pointer; }

.login-page { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .85fr) minmax(440px, 1.15fr); background: var(--navy); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: min(430px, 100%); }
.login-card h1 { margin: 24px 0 6px; color: var(--navy); font-size: 30px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); }
.login-card .brand { min-height: auto; padding: 0; border: 0; color: var(--navy); }
.login-card .brand span { color: var(--muted); }
.login-form { display: grid; gap: 16px; }
.login-form .button { width: 100%; min-height: 46px; }
.login-visual { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 60px; color: #fff; background: linear-gradient(135deg, rgba(12, 27, 42, .82), rgba(12, 27, 42, .96)), radial-gradient(circle at 70% 20%, #f5c400 0, transparent 30%); }
.login-visual::before { content: ""; position: absolute; inset: 8% 8% auto auto; width: 220px; height: 220px; border: 36px solid rgba(245, 196, 0, .16); transform: rotate(18deg); }
.login-visual h2 { position: relative; max-width: 650px; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; }
.login-visual p { position: relative; max-width: 600px; color: #c7d2dc; font-size: 17px; }

.site-footer { display: flex; gap: 12px; justify-content: space-between; margin-top: 28px; padding: 18px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.hide { display: none !important; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid, .people-grid, .report-grid, .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 18px 0 50px rgba(0, 0, 0, .25); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: inline-grid; margin-right: 12px; }
  .content { padding: 22px 18px; }
  .profile-grid, .settings-grid, .scanner-layout { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

@media (max-width: 680px) {
  .topbar { padding: 9px 14px; }
  .topbar-title, .user-meta { display: none; }
  .content { padding: 18px 12px; }
  .page-heading { display: block; }
  .page-actions { justify-content: flex-start; margin-top: 14px; }
  .kpi-grid, .dashboard-bottom, .project-grid, .people-grid, .report-grid, .admin-grid, .form-grid, .form-grid.three, .detail-grid, .quick-actions { grid-template-columns: 1fr; }
  .form-group.full, .full-width { grid-column: auto; }
  .filter-fields, .toolbar, .filter-bar { display: grid; grid-template-columns: 1fr; }
  .search-box { min-width: 0; }
  .panel-header { align-items: flex-start; }
  .movement-card, .maintenance-card, .incident-card { padding: 13px; }
  .login-panel { padding: 28px 18px; }
  .site-footer { display: block; }
  .site-footer span { display: block; margin-top: 4px; }
}

@media print {
  .sidebar, .topbar, .page-actions, .button, .tabs, .site-footer, .filter-bar, .toolbar { display: none !important; }
  .app-main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .panel, .plain-card, .form-card, .profile-card, .report-card { box-shadow: none; }
  body { background: #fff; }
}

/* Application-specific components */
.main-area { min-height: 100vh; margin-left: 260px; }
.sidebar-brand { display: flex; gap: 11px; align-items: center; min-height: 78px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand > div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { letter-spacing: .06em; }
.sidebar-brand small { margin-top: 2px; color: #8fa5b9; font-size: 9px; letter-spacing: .12em; }
.sidebar-close { display: none; width: 34px; height: 34px; border: 0; border-radius: 7px; background: rgba(255,255,255,.08); color: #fff; font-size: 20px; cursor: pointer; }
.sidebar nav { padding: 13px 11px 20px; }
.sidebar nav p { margin: 13px 10px 6px; color: #728ba1; font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.sidebar nav a { position: relative; display: flex; gap: 11px; align-items: center; min-height: 42px; margin: 3px 0; padding: 9px 11px; border-radius: 8px; color: #cfdae4; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--yellow); color: var(--navy); }
.sidebar nav a > span { width: 24px; font-size: 18px; text-align: center; }
.sidebar nav a b { flex: 1; font-size: 12px; }
.sidebar nav a em { display: grid; min-width: 22px; height: 22px; padding: 0 5px; place-items: center; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-style: normal; }
.sidebar-user { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 15px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user > div { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #fff; font-size: 12px; }
.sidebar-user small { color: #8fa5b9; font-size: 10px; }
.sidebar-user > a { color: #b9c7d3; font-size: 20px; }
.menu-backdrop { display: none; }

.topbar { gap: 14px; }
.global-search { position: relative; display: flex; max-width: 640px; min-width: 260px; flex: 1; align-items: center; }
.global-search > span { position: absolute; left: 13px; color: var(--muted); font-size: 19px; }
.global-search input { min-height: 40px; padding: 8px 74px 8px 39px; background: #f6f7f9; }
.global-search kbd { position: absolute; right: 8px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font: 10px ui-monospace, monospace; }
.scan-btn { display: inline-flex; min-height: 40px; padding: 9px 13px; align-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 750; }
.scan-btn:hover { background: #f8f9fa; text-decoration: none; }
.bell { position: relative; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); font-size: 18px; }
.bell i { position: absolute; top: -5px; right: -4px; display: grid; min-width: 19px; height: 19px; padding: 0 4px; place-items: center; border: 2px solid #fff; border-radius: 99px; background: var(--red); color: #fff; font-size: 9px; font-style: normal; }

.page-heading > div { min-width: 0; }
.page-heading > div > p { margin: 0 0 4px; color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.page-heading > div > span { display: block; max-width: 780px; margin-top: 7px; color: var(--muted); }

.btn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; line-height: 1.1; cursor: pointer; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn-primary { background: var(--yellow); color: var(--navy); }
.btn-light { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.btn-wide { width: 100%; }

.panel-title { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.panel-title h2, .panel-title p { margin: 0; }
.panel-title h2 { color: var(--navy); font-size: 16px; }
.panel-title p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.panel-title > a, .panel-title > button { flex: 0 0 auto; }

.quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.quick-grid > a { display: flex; gap: 11px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.quick-grid > a:hover { border-color: #ebbf11; transform: translateY(-1px); text-decoration: none; }
.quick-grid > a > div { min-width: 0; flex: 1; }
.quick-grid strong, .quick-grid span { display: block; }
.quick-grid strong { color: var(--navy); }
.quick-grid span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-grid > a > b { color: #98a2b3; font-size: 22px; }
.quick-icon.yellow, .kpi-icon.yellow { background: #fff8d4; color: #8d7000; }
.quick-icon.blue, .kpi-icon.blue, .blue { background: var(--blue-bg); color: var(--blue); }
.quick-icon.purple, .kpi-icon.purple, .purple { background: #f2ebff; color: #6941c6; }
.quick-icon.green, .kpi-icon.green, .green { background: var(--green-bg); color: var(--green); }

.attention-card { display: flex; overflow: hidden; margin-bottom: 18px; border: 1px solid #f0d37b; border-radius: 12px; background: #fffef8; box-shadow: var(--shadow); }
.attention-title { display: flex; width: 230px; flex: 0 0 230px; gap: 10px; align-items: center; padding: 16px 18px; background: #fff8d9; }
.attention-title > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 900; }
.attention-title strong, .attention-title small { display: block; }
.attention-title small { color: #817029; }
.attention-items { display: grid; min-width: 0; flex: 1; grid-template-columns: repeat(4,minmax(0,1fr)); }
.attention-items > a { display: flex; min-width: 0; gap: 9px; align-items: center; padding: 13px; border-left: 1px solid #f1e4bb; color: var(--ink); }
.attention-items > a:hover { background: #fffaf0; text-decoration: none; }
.attention-items i { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 8px; font-style: normal; }
.attention-items div { min-width: 0; flex: 1; }
.attention-items strong, .attention-items span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-items strong { font-size: 12px; }
.attention-items span { color: var(--muted); font-size: 10px; }
.attention-items b { color: var(--blue); font-size: 10px; white-space: nowrap; }

.kpi-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.kpi { display: flex; min-width: 0; gap: 11px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.kpi-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 10px; background: #edf0f3; color: var(--navy); font-size: 19px; font-weight: 900; }
.kpi-icon.orange { background: var(--orange-bg); color: var(--orange); }
.kpi-icon.red { background: var(--red-bg); color: var(--red); }
.kpi-icon.navy { background: #eaf0f5; color: var(--navy); }
.kpi > div:last-child { min-width: 0; }
.kpi span, .kpi strong, .kpi small { display: block; }
.kpi span { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.kpi strong { margin: 2px 0; color: var(--navy); font-size: 22px; line-height: 1.1; }
.kpi small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.red-text { color: var(--red) !important; }

.project-list > a { display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto; gap: 11px; align-items: center; padding: 13px 18px; border-bottom: 1px solid #edf0f2; color: var(--ink); }
.project-list > a:last-child { border-bottom: 0; }
.project-list > a:hover { background: #fafbfc; text-decoration: none; }
.project-badge { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 900; }
.project-list strong, .project-list small { display: block; }
.project-list small { overflow: hidden; max-width: 300px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.project-list em { color: var(--muted); font-size: 11px; font-style: normal; }
.project-list b { min-width: 90px; text-align: right; }
.activity-list > div { display: flex; gap: 11px; align-items: flex-start; padding: 13px 18px; border-bottom: 1px solid #edf0f2; }
.activity-list > div:last-child { border-bottom: 0; }
.activity-list i { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border-radius: 50%; font-style: normal; }
.activity-list strong, .activity-list span, .activity-list small { display: block; }
.activity-list span, .activity-list small { color: var(--muted); font-size: 11px; }

.toolbar.panel { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 13px; overflow: visible; }
.filter-form { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-form label { margin: 0; }
.filter-form select { width: auto; min-width: 130px; }
.table-search { position: relative; min-width: 240px; flex: 1; }
.table-search span { position: absolute; top: 8px; left: 12px; color: var(--muted); font-size: 18px; }
.table-search input { padding-left: 37px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.toolbar-actions a { color: var(--navy); font-size: 12px; font-weight: 800; }
.table-panel { margin-bottom: 18px; }
.table-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.table-footer .pagination { padding: 0; border: 0; }
.tool-name { display: flex; min-width: 190px; gap: 10px; align-items: center; }
.tool-name > i { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 8px; background: #edf1f4; color: var(--navy); font-size: 11px; font-style: normal; font-weight: 900; }
.tool-name strong, .tool-name small, .cell-sub { display: block; }
.tool-name small, .cell-sub { margin-top: 2px; color: var(--muted); font-size: 10px; }
.cell-normal { font-weight: 650; }
.link { color: var(--blue); font-weight: 800; }
.condition { white-space: nowrap; font-size: 11px; font-weight: 750; }
.condition.good { color: var(--green); }
.condition.warn { color: var(--orange); }
.condition.danger { color: var(--red); }
.badge.good { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--orange-bg); color: var(--orange); }
.badge.danger { background: var(--red-bg); color: var(--red); }
.badge.neutral { background: #edf0f3; color: #475467; }
.row-actions a { display: grid; min-width: 30px; height: 30px; padding: 0 7px; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); font-weight: 800; }
.row-actions a:hover { border-color: var(--navy); text-decoration: none; }

.scan-panel, .import-panel { margin-bottom: 16px; padding: 18px; }
.scan-panel > div:first-child { display: flex; gap: 12px; align-items: center; }
.scan-panel > div:first-child > span { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 10px; background: var(--yellow); color: var(--navy); font-size: 22px; }
.scan-panel h2, .scan-panel p { margin: 0; }
.scan-panel p { color: var(--muted); }
.scanner-controls { display: flex; gap: 10px; align-items: center; margin-top: 15px; }
.scanner-controls form, .inline-form { display: flex; flex: 1; gap: 9px; align-items: center; }
.camera-scanner { max-width: 620px; margin-top: 16px; padding: 14px; border-radius: 10px; background: #0b1620; color: #fff; text-align: center; }
.camera-scanner[hidden] { display: none; }
.camera-scanner video { width: 100%; max-height: 360px; border-radius: 7px; }
.import-panel { padding: 0; }
.import-panel .inline-form { padding: 17px; }
.import-errors { margin: 0 17px 17px; padding: 12px; border-radius: 8px; background: var(--red-bg); color: var(--red); }

.profile-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; }
.profile-main { padding: 20px; }
.tool-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tool-hero > img, .tool-photo-placeholder { width: 124px; height: 104px; flex: 0 0 124px; border-radius: 10px; object-fit: cover; }
.tool-photo-placeholder { display: grid; place-items: center; background: #e9eef2; color: var(--navy); font-size: 28px; font-weight: 900; }
.tool-hero h2, .tool-hero p { margin: 0; }
.tool-hero h2 { margin-top: 7px; color: var(--navy); font-size: 22px; }
.tool-hero p { color: var(--muted); }
.status-line { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-main .detail-grid > div { padding: 11px 0; border-bottom: 1px solid #edf0f2; }
.profile-main .detail-grid span, .profile-main .detail-grid strong { display: block; }
.profile-main .detail-grid span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-actions a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy); font-weight: 800; }
.qr-card { align-self: start; padding: 20px; text-align: center; }
.qr-card h2, .qr-card p { margin: 0; }
.qr-card p { margin-top: 4px; color: var(--muted); }
.qr-code { display: grid; min-height: 214px; margin: 15px 0; place-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 9px; overflow-wrap: anywhere; }
.qr-card > strong { display: block; margin-bottom: 13px; }
.history-panel { margin-top: 18px; }
.record-list article { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px 18px; border-bottom: 1px solid #edf0f2; }
.record-list article:last-child { border-bottom: 0; }
.record-list article > i { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; font-style: normal; }
.record-list strong, .record-list span, .record-list small { display: block; }
.record-list span, .record-list small { color: var(--muted); font-size: 11px; }

.form-card { max-width: 1020px; margin: 0 auto; padding: 0; }
.form-card.compact { max-width: 900px; }
.form-section { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 24px; margin: 0; padding: 22px; border-bottom: 1px solid var(--line); }
.form-section:first-child { padding-top: 22px; }
.form-section > div:first-child h2, .form-section > div:first-child p { margin: 0; }
.form-section > div:first-child p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.form-card > .form-actions { justify-content: flex-end; margin: 0; padding: 17px 22px; border: 0; }
.span-2 { grid-column: 1 / -1; }
.form-warning { display: flex; gap: 10px; align-items: flex-start; margin: 16px 22px 0; padding: 12px; border: 1px solid #f1d18e; border-radius: 8px; background: var(--orange-bg); color: #7d4300; }
.form-warning > span { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: #f5c56c; font-weight: 900; }
.danger-zone { display: flex; max-width: 1020px; gap: 16px; align-items: center; justify-content: space-between; margin: 18px auto 0; padding: 18px; border-color: #f0b4ae; background: #fffafa; }
.danger-zone strong, .danger-zone span { display: block; }
.danger-zone span { color: var(--muted); font-size: 11px; }

.tabs { margin-bottom: 14px; }
.movement-list { display: grid; gap: 10px; }
.movement-list > article { display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(130px,auto) auto; gap: 13px; align-items: center; padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.movement-list > article > i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 9px; background: #eef2f5; font-style: normal; }
.movement-main > div { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.movement-main h3, .movement-main p { margin: 0; }
.movement-main h3 { margin-top: 4px; color: var(--navy); font-size: 14px; }
.movement-main p { color: var(--muted); font-size: 11px; }
.movement-meta { display: block; }
.movement-meta span, .movement-meta small { display: block; }
.movement-actions { display: flex; gap: 7px; }
.modal-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2, .modal-head p { margin: 0; }
.modal-head p { color: var(--muted); font-size: 11px; }
.modal-head > button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: #eef1f4; cursor: pointer; }
.modal-form { display: grid; gap: 14px; padding: 20px; }
.modal-form .form-actions { margin: 0; }

.count-layout { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 18px; }
.count-setup { align-self: start; padding: 18px; }
.scan-area { display: grid; margin-top: 18px; padding: 22px 15px; place-items: center; border: 1px dashed #bac4ce; border-radius: 10px; background: #fafbfc; text-align: center; }
.scan-area > span { font-size: 35px; }
.scan-area strong { margin-top: 7px; }
.scan-area p { color: var(--muted); font-size: 11px; }
.count-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid #edf0f2; }
.count-row label { width: 100px; margin: 0; }
.count-row input { min-height: 36px; }
.count-submit { padding: 18px; }
.count-submit .btn { float: right; }

.project-card, .person-card { padding: 0; overflow: hidden; }
.project-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px 0; }
.project-top > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 9px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 900; }
.project-card > h2, .project-card > p { margin: 0; padding: 0 17px; }
.project-card > h2 { margin-top: 12px; color: var(--navy); font-size: 16px; }
.project-card > p { overflow: hidden; min-height: 39px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.project-stats, .person-stats { padding: 0 17px; }
.project-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.project-stats > div, .person-stats > div { padding: 9px; border-radius: 8px; background: #f6f8f9; }
.project-stats span, .project-stats strong, .person-stats span, .person-stats strong { display: block; }
.project-stats span, .person-stats span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.project-manager { display: flex; gap: 9px; align-items: center; margin: 14px 17px; padding-top: 13px; border-top: 1px solid var(--line); }
.project-manager > div { min-width: 0; }
.project-manager small, .project-manager strong { display: block; }
.project-manager small { color: var(--muted); }
.avatar.small { width: 32px; height: 32px; }
.avatar.large { width: 52px; height: 52px; flex: 0 0 52px; }
.card-actions { display: flex; border-top: 1px solid var(--line); }
.card-actions a { flex: 1; padding: 10px; color: var(--navy); font-size: 11px; font-weight: 800; text-align: center; }
.card-actions a + a { border-left: 1px solid var(--line); }
.person-head { display: flex; gap: 11px; align-items: center; padding: 17px; }
.person-head > div:nth-child(2) { min-width: 0; flex: 1; }
.person-head h2, .person-head p, .person-head span { margin: 0; }
.person-head h2 { color: var(--navy); font-size: 15px; }
.person-head p, .person-head span { color: var(--muted); font-size: 10px; }
.person-project { padding: 11px 17px; background: #f8f9fa; }
.person-project small, .person-project strong { display: block; }
.person-project small { color: var(--muted); }
.person-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 14px 0; }

.report-grid { margin-bottom: 18px; }
.report-grid > article { display: grid; grid-template-columns: 45px minmax(0,1fr); gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.report-grid > article > i { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 9px; background: var(--yellow); color: var(--navy); font-size: 19px; font-style: normal; }
.report-grid h2, .report-grid p { margin: 0; }
.report-grid h2 { color: var(--navy); font-size: 15px; }
.report-grid p, .report-grid span { color: var(--muted); font-size: 11px; }
.report-grid > article > a, .report-grid > article > button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 800; text-align: center; cursor: pointer; }
.report-summary { margin-top: 18px; }

.audit-head, .audit-list article { display: grid; grid-template-columns: 150px 120px 150px 170px minmax(220px,1fr); gap: 12px; align-items: start; padding: 11px 16px; }
.audit-head { background: #f7f8fa; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.audit-list { overflow-x: auto; }
.audit-list article { min-width: 900px; border-top: 1px solid #edf0f2; font-size: 11px; }
.audit-list article code, .audit-list article p { margin: 0; overflow-wrap: anywhere; }
.audit-list article p { color: var(--muted); }

.admin-split { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 18px; }
.side-form { display: grid; align-self: start; gap: 13px; padding: 20px; }
.side-form h2, .side-form p { margin: 0; }
.side-form p { color: var(--muted); }
.side-form .form-warning { margin: 0; }
.backup-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.backup-card { min-height: 0; }
.backup-card > i { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; border-radius: 10px; background: var(--yellow); color: var(--navy); font-size: 20px; font-style: normal; }
.backup-card ol, .backup-card ul { padding-left: 20px; color: #475467; }
.backup-card .form-warning { margin: 14px 0 0; }
.roles-layout { grid-template-columns: minmax(0,.85fr) minmax(430px,1.15fr); }
.role-form { align-self: start; padding: 20px; }
.role-form > h2 { margin: 0 0 15px; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.permission-grid > label { display: flex; gap: 8px; align-items: center; min-height: 39px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfc; color: var(--ink); font-size: 11px; }
.permission-grid input { flex: 0 0 auto; }

.app-footer { display: flex; gap: 12px; justify-content: space-between; margin-top: 26px; padding: 17px 1px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.plain-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.plain-page .plain-card { max-width: 520px; text-align: center; }
.error-symbol { display: grid; width: 50px; height: 50px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: var(--red-bg); color: var(--red); font-size: 24px; font-weight: 900; }

body.login-page { display: block; background: var(--navy); }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(440px,1.15fr) minmax(360px,.85fr); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(32px,6vw,76px); color: #fff; background: radial-gradient(circle at 75% 20%,rgba(245,196,0,.22),transparent 27%),linear-gradient(140deg,#0c1b2a,#132d45); }
.login-brand::after { content: "NC"; position: absolute; right: -20px; bottom: -105px; color: rgba(255,255,255,.035); font-size: 320px; font-weight: 950; letter-spacing: -.14em; }
.brand-lockup { display: flex; gap: 12px; align-items: center; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { letter-spacing: .08em; }
.brand-lockup small { color: #9fb0bf; font-size: 9px; letter-spacing: .15em; }
.login-brand > div:nth-child(2) { position: relative; z-index: 1; max-width: 700px; }
.login-brand h1 { margin: 8px 0 15px; font-size: clamp(38px,5vw,66px); line-height: 1.02; letter-spacing: -.04em; }
.login-brand > div:nth-child(2) > p:last-child { max-width: 620px; color: #bdcbd7; font-size: 16px; }
.eyebrow { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: var(--yellow); }
.login-points { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px 20px; color: #c7d2dc; font-size: 12px; }
.login-card { display: flex; align-items: center; justify-content: center; padding: 40px; border: 0; border-radius: 0; box-shadow: none; }
.login-card-inner { width: min(420px,100%); }
.login-card-inner h2 { margin: 4px 0; color: var(--navy); font-size: 30px; }
.login-card-inner > p { color: var(--muted); }
.login-card-inner form { display: grid; gap: 16px; margin-top: 25px; }
.login-help { margin-top: 20px; font-size: 11px; text-align: center; }

.action-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sidebar-user a strong { color: #fff; }
.sidebar-user a:hover { text-decoration: none; }
.green-text { color: var(--green) !important; }
.employee-kpis, .report-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; }
.report-kpis { grid-template-columns: repeat(5,minmax(0,1fr)); }
.detail-stack { display: grid; gap: 0; margin-top: 16px; text-align: left; }
.detail-stack > span { display: block; padding: 11px 0; border-bottom: 1px solid #edf0f2; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.detail-stack strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; text-transform: none; }
.clearance-filter { display: flex; max-width: 720px; gap: 10px; align-items: flex-end; margin-bottom: 18px; padding: 16px; }
.clearance-filter label { min-width: 280px; flex: 1; }
.clearance-card { margin-top: 18px; }
.clearance-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 18px; }
.clearance-summary span { padding: 13px; border-radius: 9px; background: #f7f8fa; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.clearance-summary strong { display: block; margin-top: 3px; color: var(--navy); font-size: 22px; }

.print-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; margin: 16px 0; }
.print-sheet { max-width: 210mm; min-height: 277mm; margin: 0 auto; padding: 14mm; border: 1px solid #d5dae0; background: #fff; box-shadow: var(--shadow); }
.print-sheet > header { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 13px; align-items: center; padding-bottom: 12px; border-bottom: 3px solid var(--navy); }
.print-brand { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 8px; background: var(--yellow); color: var(--navy); font-size: 18px; font-weight: 950; }
.print-sheet header h1, .print-sheet header p { margin: 0; }
.print-sheet header h1 { color: var(--navy); font-size: 20px; }
.print-sheet header p { color: var(--muted); font-size: 10px; }
.print-reference { text-align: right; }
.print-reference span, .print-reference strong { display: block; }
.print-reference span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.print-reference strong { font-size: 15px; }
.print-sheet > h2 { margin: 20px 0; color: var(--navy); font-size: 17px; text-align: center; }
.print-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 18px; border: 1px solid var(--line); }
.print-meta > span { padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.print-meta > span:nth-child(even) { border-right: 0; }
.print-meta strong, .print-meta small { display: block; }
.print-meta strong { margin-top: 3px; color: var(--ink); font-size: 12px; text-transform: none; }
.print-meta small { color: var(--muted); text-transform: none; }
.print-sheet table { margin: 16px 0; border: 1px solid var(--line); }
.print-sheet th, .print-sheet td { border: 1px solid var(--line); }
.print-sheet td small { display: block; color: var(--muted); }
.print-purpose { margin: 18px 0; }
.print-purpose span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.print-purpose p { min-height: 38px; margin: 4px 0 11px; padding: 8px; border: 1px solid var(--line); }
.print-agreement { margin: 18px 0 34px; color: #475467; font-size: 10px; text-align: justify; }
.signature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 42px; }
.signature-grid > div { text-align: center; }
.signature-grid span { display: block; min-height: 26px; border-bottom: 1px solid #344054; }
.signature-grid strong, .signature-grid small { display: block; margin-top: 4px; }
.signature-grid strong { font-size: 10px; }
.signature-grid small { color: var(--muted); font-size: 8px; }
.print-sheet > footer { display: flex; gap: 10px; justify-content: space-between; margin-top: 46px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.qr-label-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.qr-label-grid article { display: grid; min-height: 92mm; padding: 9mm; place-items: center; border: 1px dashed #98a2b3; background: #fff; text-align: center; break-inside: avoid; }
.qr-label-grid .qr-code { min-height: 205px; margin: 0; border: 0; padding: 0; }
.qr-label-grid strong, .qr-label-grid span, .qr-label-grid small { display: block; }
.qr-label-grid strong { margin-top: 5px; color: var(--navy); font-size: 16px; }
.qr-label-grid span { font-weight: 750; }
.qr-label-grid small { color: var(--muted); }
.clearance-signatures { padding: 0 18px 22px; grid-template-columns: repeat(2,minmax(0,1fr)); }

@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .attention-card { display: block; }
  .attention-title { width: 100%; }
  .attention-items > a:first-child { border-left: 0; }
}

@media (max-width: 1040px) {
  .quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .attention-items { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .attention-items > a:nth-child(3) { border-top: 1px solid #f1e4bb; border-left: 0; }
  .attention-items > a:nth-child(4) { border-top: 1px solid #f1e4bb; }
  .backup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .main-area { margin-left: 0; }
  .sidebar-close { display: block; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(4,13,22,.65); }
  .menu-backdrop.show { display: block; }
  body.no-scroll { overflow: hidden; }
  .profile-layout, .count-layout, .admin-split { grid-template-columns: 1fr; }
  .roles-layout { grid-template-columns: 1fr; }
  .qr-card, .count-setup, .side-form { width: 100%; }
  .project-grid, .people-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .global-search { min-width: 0; }
  .global-search kbd, .scan-btn { display: none; }
  .global-search input { padding-right: 10px; }
  .quick-grid, .kpi-grid, .project-grid, .people-grid, .report-grid { grid-template-columns: 1fr; }
  .attention-items { grid-template-columns: 1fr; }
  .attention-items > a { border-top: 1px solid #f1e4bb; border-left: 0; }
  .attention-items > a:first-child { border-top: 0; }
  .project-list > a { grid-template-columns: 40px minmax(0,1fr) auto; }
  .project-list > a > b { grid-column: 2 / -1; text-align: left; }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .toolbar.panel, .table-footer { display: block; }
  .filter-form { display: grid; grid-template-columns: 1fr; }
  .filter-form select, .table-search { width: 100%; min-width: 0; }
  .toolbar-actions { margin-top: 12px; }
  .table-footer .pagination { margin-top: 10px; justify-content: flex-start; }
  .scanner-controls, .scanner-controls form, .inline-form { display: grid; grid-template-columns: 1fr; }
  .tool-hero { align-items: flex-start; }
  .tool-hero > img, .tool-photo-placeholder { width: 88px; height: 78px; flex-basis: 88px; }
  .form-section { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .form-card > .form-actions { padding: 15px 18px; }
  .movement-list > article { grid-template-columns: 40px minmax(0,1fr); }
  .movement-meta, .movement-actions { grid-column: 2; }
  .count-row { align-items: flex-end; }
  .login-card { padding: 28px 18px; }
  .app-footer { display: block; }
  .app-footer span { display: block; }
  .employee-kpis, .report-kpis, .clearance-summary, .qr-label-grid { grid-template-columns: 1fr; }
  .clearance-filter { display: grid; grid-template-columns: 1fr; }
  .clearance-filter label { min-width: 0; }
  .print-sheet { min-height: 0; padding: 18px; }
  .print-sheet > header, .print-meta, .signature-grid { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
  .print-reference { text-align: left; }
}

@media print {
  .main-area { margin: 0; }
  .sidebar, .topbar, .page-heading > .btn, .toolbar, .tabs, .app-footer, .profile-actions, .btn, button { display: none !important; }
  .content { padding: 0; }
  .page-heading { margin-bottom: 8mm; }
  .print-actions { display: none !important; }
  .print-sheet { min-height: 277mm; padding: 10mm; border: 0; box-shadow: none; }
  .qr-label-grid { grid-template-columns: repeat(3,1fr); gap: 0; }
  .qr-label-grid article { min-height: 90mm; }
  .clearance-card { box-shadow: none; }
}
