/* HanaVision CRP admin/login UI — qentix-cms visual parity layer.
   Logo/brand text may differ; shell, tokens, density, controls, and hierarchy mirror qentix-cms. */

/* Qentix parity is intentionally scoped to admin/login documents; app.css stays shared semantic UI. */
.admin-page,
.login-page {
  --brand: #151414;
  --brand-fg: #ffffff;
  --sidebar-bg: #151414;
  --sidebar-fg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --canvas: #fafafa;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --muted: #71717a;
  --muted-strong: #52525b;
  --ring: rgb(21 20 20 / 40%);
  --action: var(--brand);
  --action-hover: rgb(21 20 20 / 90%);
  --action-fg: var(--brand-fg);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
  --card-radius: 12px;
  --notice-radius: 12px;
  --control-radius: 10px;
  --control-border: 0;
  --control-bg: var(--surface-muted);
  --control-hover-bg: #f4f4f5;
  --control-focus-shadow: 0 0 0 2px rgb(21 20 20 / 40%);
  --button-border: 1px solid var(--action);
  --button-shadow: none;
  --button-font-weight: 500;
}

.qentix-icon {
  --icon-size: 1rem;
  display: inline-block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--qentix-icon) center / contain no-repeat;
  mask: var(--qentix-icon) center / contain no-repeat;
}

.qentix-icon.icon-md {
  --icon-size: 1.125rem;
}

.qentix-icon.icon-lg {
  --icon-size: 1.25rem;
}

.qentix-icon[data-icon="activity"] { --qentix-icon: url("../icons/qentix/activity.svg"); }
.qentix-icon[data-icon="bell"] { --qentix-icon: url("../icons/qentix/bell.svg"); }
.qentix-icon[data-icon="help-circle"] { --qentix-icon: url("../icons/qentix/help-circle.svg"); }
.qentix-icon[data-icon="image"] { --qentix-icon: url("../icons/qentix/image.svg"); }
.qentix-icon[data-icon="layout-dashboard"] { --qentix-icon: url("../icons/qentix/layout-dashboard.svg"); }
.qentix-icon[data-icon="list-checks"] { --qentix-icon: url("../icons/qentix/list-checks.svg"); }
.qentix-icon[data-icon="log-out"] { --qentix-icon: url("../icons/qentix/log-out.svg"); }
.qentix-icon[data-icon="menu"] { --qentix-icon: url("../icons/qentix/menu.svg"); }
.qentix-icon[data-icon="package"] { --qentix-icon: url("../icons/qentix/package.svg"); }
.qentix-icon[data-icon="pencil"] { --qentix-icon: url("../icons/qentix/pencil.svg"); }
.qentix-icon[data-icon="plus"] { --qentix-icon: url("../icons/qentix/plus.svg"); }
.qentix-icon[data-icon="qr-code"] { --qentix-icon: url("../icons/qentix/qr-code.svg"); }
.qentix-icon[data-icon="search"] { --qentix-icon: url("../icons/qentix/search.svg"); }
.qentix-icon[data-icon="settings"] { --qentix-icon: url("../icons/qentix/settings.svg"); }
.qentix-icon[data-icon="shield-check"] { --qentix-icon: url("../icons/qentix/shield-check.svg"); }
.qentix-icon[data-icon="trash-2"] { --qentix-icon: url("../icons/qentix/trash-2.svg"); }
.qentix-icon[data-icon="upload-cloud"] { --qentix-icon: url("../icons/qentix/upload-cloud.svg"); }
.qentix-icon[data-icon="x"] { --qentix-icon: url("../icons/qentix/x.svg"); }

/* Login surface */
.login-page {
  min-height: 100vh;
  background: #ffffff;
}

.login-shell {
  display: grid;
  max-width: none;
  min-height: 100vh;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
}

.login-brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: var(--brand-fg);
  padding: 48px;
  text-align: center;
  box-shadow: none;
}

.login-brand-panel::before {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92' viewBox='0 0 92 92'%3E%3Cg fill='%23ffffff' opacity='.45'%3E%3Crect x='6' y='6' width='14' height='14' rx='4'/%3E%3Crect x='24' y='6' width='8' height='8' rx='2'/%3E%3Crect x='38' y='6' width='14' height='14' rx='4'/%3E%3Crect x='6' y='24' width='8' height='8' rx='2'/%3E%3Crect x='24' y='24' width='14' height='14' rx='4'/%3E%3Crect x='44' y='28' width='8' height='8' rx='2'/%3E%3Crect x='10' y='42' width='14' height='14' rx='4'/%3E%3Crect x='30' y='46' width='8' height='8' rx='2'/%3E%3Crect x='46' y='42' width='14' height='14' rx='4'/%3E%3C/g%3E%3C/svg%3E");
  background-position: 8% 8%, 50% 50%;
  background-size: 140px 140px;
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.login-brand-panel .eyebrow {
  color: rgb(255 255 255 / 60%);
}

.login-panel-mark {
  margin: 0 auto 28px;
}

.login-card-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto 1.5rem;
}

.login-brand-panel h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.login-brand-panel p {
  margin: 16px auto 0;
  color: rgb(255 255 255 / 60%);
  font-size: 1rem;
  line-height: 1.5;
}

.login-proof-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 32px;
}

.login-proof-grid span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgb(255 255 255 / 30%);
  padding: 0;
  font-size: 0.75rem;
  font-weight: 400;
}

.login-proof-grid img {
  width: 24px;
  height: 24px;
}

.login-form-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #fafafa;
  padding: 3rem 1.5rem;
}

.login-card {
  width: min(24rem, calc(100vw - 32px));
  margin: auto;
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.login-card h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1.5rem;
  line-height: 2.25rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.login-card .muted {
  text-align: center;
  font-size: 0.8125rem;
}

.login-form {
  margin-top: 24px;
}

.login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #a1a1aa;
  padding-top: 2rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.login-footer nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}

.login-footer a:hover {
  color: #52525b;
}

.login-footer p {
  margin: 0;
}

/* Admin shell */
.admin-page {
  min-height: 100vh;
  background: #ffffff;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-menu-open {
  overflow: hidden;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 15rem;
  height: 100vh;
  min-height: 100vh;
  flex-shrink: 0;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  padding: 0;
  box-shadow: none;
}

.sidebar-brand-row {
  display: flex;
  height: 4rem;
  flex-shrink: 0;
  align-items: center;
}

.brand-lockup {
  display: flex;
  height: 4rem;
  flex: 1;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  padding-left: 1.25rem;
  text-decoration: none;
}

.sidebar-close,
.sidebar-backdrop {
  display: none;
}

.brand-logo-mark {
  display: block;
  width: 42px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  padding: 4px;
  object-fit: contain;
  box-shadow: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 0.875rem;
  line-height: 1.1;
}

.brand-lockup small {
  margin-top: 2px;
  color: rgb(255 255 255 / 45%);
  font-size: 0.6875rem;
}

.admin-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  margin: 0;
  padding: 0.5rem 0.75rem 0;
}

.admin-nav a {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 10px;
  color: rgb(255 255 255 / 50%);
  padding: 0 0.75rem;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.admin-nav a:hover,
.admin-nav a:focus-visible {
  background: rgb(255 255 255 / 5%);
  color: rgb(255 255 255 / 80%);
}

.admin-nav a.active,
.admin-nav a[aria-current="page"] {
  border-left-color: #ffffff;
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
  font-weight: 600;
}

.admin-nav a:hover .nav-icon,
.admin-nav a:focus-visible .nav-icon {
  transform: translateX(2px);
}

.admin-nav a.active .nav-icon,
.admin-nav a[aria-current="page"] .nav-icon {
  color: #ffffff;
  transform: scale(1.08);
}

.admin-nav a strong,
.admin-nav a small {
  display: block;
}

.admin-nav a strong {
  font-size: 0.875rem;
  font-weight: inherit;
  line-height: 1.2;
}

.admin-nav a small {
  display: none;
}

.nav-icon,
.subnav-index,
.step-index {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-icon {
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  color: currentColor;
  font-size: 0;
  -webkit-mask: var(--qentix-icon) center / contain no-repeat;
  mask: var(--qentix-icon) center / contain no-repeat;
  transition: transform 200ms ease;
}

.nav-icon[data-route="dashboard"] { --qentix-icon: url("../icons/qentix/layout-dashboard.svg"); }
.nav-icon[data-route="products"] { --qentix-icon: url("../icons/qentix/package.svg"); }
.nav-icon[data-route="employees"] { --qentix-icon: url("../icons/qentix/shield-check.svg"); }
.nav-icon[data-route="scans"] { --qentix-icon: url("../icons/qentix/list-checks.svg"); }
.nav-icon[data-route="alerts"] { --qentix-icon: url("../icons/qentix/bell.svg"); }

.sidebar-card {
  display: none;
}

.sidebar-footer {
  min-height: 4rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding: 0.75rem;
}

.sidebar-footer .secondary-button {
  min-height: 40px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 40%);
  padding-left: 0.75rem;
  font-size: 0.75rem;
}

.sidebar-footer .secondary-button:hover {
  background: rgb(255 255 255 / 5%);
  color: rgb(255 255 255 / 70%);
}

.admin-page :where(button, .button-link, .secondary-button, .danger-button, .icon-button):hover,
.login-page :where(button, .button-link, .secondary-button, .danger-button, .icon-button):hover {
  transform: none;
}

.admin-main {
  min-width: 0;
  flex: 1;
  background: #fafafa;
  padding: 0 1.5rem 1.5rem;
}

.admin-stack {
  display: grid;
  gap: 1rem;
  padding-top: 1.5rem;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 3.5rem;
  align-items: center;
  gap: 0.5rem;
  margin: 0 -1.5rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  padding: 0 1.5rem;
  box-shadow: none;
}

.topbar-title {
  display: none;
}

.topbar-spacer {
  flex: 1;
}

.mobile-menu-button,
.mobile-search-button {
  display: none;
}

.top-search {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #71717a;
  padding: 0 0.5rem 0 0.75rem;
  font-size: 0.75rem;
  text-decoration: none;
}

.top-search-icon {
  --icon-size: 0.875rem;
  color: #71717a;
}

.mobile-search-button {
  text-decoration: none;
}

.top-search kbd {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fafafa;
  color: #71717a;
  padding: 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.625rem;
}

.top-actions,
.section-actions,
.inline-actions,
.employee-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.destructive-inline-form {
  align-items: end;
}

.destructive-inline-form input,
.inline-actions input,
.inline-actions select {
  min-width: 8rem;
  min-height: 36px;
}

.top-actions {
  margin: 0;
  justify-content: flex-end;
}

.notification-button,
.mobile-menu-button,
.mobile-search-button {
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3f3f46;
  text-decoration: none;
  font-size: 1.125rem;
}

.notification-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
}

.notification-button::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  content: "";
}

.notification-button:hover,
.mobile-menu-button:hover,
.mobile-search-button:hover {
  background: #f4f4f5;
}

.scan-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
  color: #3f3f46;
  padding: 0 0.75rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
}

.scan-link:hover {
  background: #f4f4f5;
}

.topbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 32px;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
  line-height: 1.1;
}

.topbar-user span {
  max-width: 180px;
  overflow: hidden;
  color: #18181b;
  font-size: 0.75rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user small {
  margin-top: 0.125rem;
  color: #71717a;
  font-size: 0.625rem;
}

.topbar-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 0.75rem;
  font-weight: 600;
}

.topbar-avatar-logo img {
  display: block;
  width: 28px;
  height: 24px;
  object-fit: contain;
}

.form-grid .checkbox-label,
.checkbox-label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  color: #3f3f46;
  font-size: 0.8125rem;
  font-weight: 600;
}

.form-grid .checkbox-label input,
.checkbox-label input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--brand);
}

.top-actions .button-link,
.top-actions .icon-button,
.top-actions .scan-link {
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

/* Page layout and qentix-density components */
.admin-content {
  margin-right: 0;
  margin-left: 0;
}

.page-title h1,
.admin-topbar h1,
.hero-copy h2,
.section-heading h2,
.page-hero h2 {
  margin: 0;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.page-title h1,
.admin-topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 2rem;
}

.hero-panel,
.page-hero,
.workspace-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 1rem;
  border-color: #86efac;
  background: #ecfdf5;
  padding: 1rem;
}

.hero-panel-normal {
  border-color: #86efac;
  background: #ecfdf5;
}

.hero-panel-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.hero-panel-warning .hero-status-icon {
  background: #fef3c7;
  color: #d97706;
}

.hero-panel-warning .hero-copy h2 {
  color: #b45309;
}

.hero-panel-critical {
  border-color: #fecaca;
  background: #fef2f2;
}

.hero-panel-critical .hero-status-icon {
  background: #fee2e2;
  color: #dc2626;
}

.hero-panel-critical .hero-copy h2 {
  color: #b91c1c;
}

.hero-panel-idle {
  border-color: #e5e7eb;
  background: #f8fafc;
}

.hero-panel-idle .hero-status-icon {
  background: #e5e7eb;
  color: #64748b;
}

.hero-panel-idle .hero-copy h2 {
  color: #475569;
}

.command-panel::before,
.metric-card::after {
  display: none;
}

.hero-copy h2 {
  margin-top: 0;
  color: #10b981;
  font-size: 1rem;
  font-weight: 600;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.compact-card > p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hero-status-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: #bbf7d0;
  color: #10b981;
  font-size: 1rem;
  font-weight: 700;
}

.hero-status-icon .qentix-icon {
  --icon-size: 1.25rem;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 1rem;
  align-items: stretch;
  padding: 1.25rem;
}

.page-hero h2 {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-aside-card {
  display: grid;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  padding: 1rem;
}

.hero-aside-card span,
.metric-body span,
.alert-summary-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.hero-aside-card strong {
  margin-top: 0.25rem;
  color: var(--foreground);
  font-size: 1.875rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-aside-card small {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.warning-card {
  border-color: #fed7aa;
  background: #fff7ed;
}

.metric-grid,
.form-card-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  display: flex;
  min-height: 96px;
  align-items: flex-start;
  gap: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  display: none;
}

.metric-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
}

.metric-icon .qentix-icon {
  --icon-size: 1.25rem;
}

.metric-icon-emerald {
  background: #ecfdf5;
  color: #10b981;
}

.metric-icon-cyan {
  background: #ecfeff;
  color: #06b6d4;
}

.metric-icon-orange {
  background: #fff7ed;
  color: #f97316;
}

.metric-body {
  min-width: 0;
}

.metric-body strong,
.alert-summary-card strong {
  display: block;
  margin-top: 0.125rem;
  color: var(--foreground);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric-body small {
  display: block;
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.alert-metric {
  border-color: #fed7aa;
  background: #fff7ed;
}

.alert-metric .metric-icon {
  background: #fff7ed;
  color: #f97316;
}

.ops-strip {
  display: none;
}

.workspace-section {
  padding: 1.25rem;
  scroll-margin-top: 5rem;
}

.product-subnav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.product-subnav a {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: #27272a;
  padding: 0.75rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.product-subnav a:hover,
.product-subnav a:focus-visible {
  background: #fafafa;
}

.product-subnav a.active,
.product-subnav a[aria-current="page"] {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: inset 0 -2px 0 var(--brand), var(--shadow-sm);
}

.product-subnav a.active .subnav-index,
.product-subnav a[aria-current="page"] .subnav-index {
  background: #ecfeff;
  color: #06b6d4;
}

.product-subnav strong,
.product-subnav small {
  display: block;
}

.product-subnav strong {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.product-subnav small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.subnav-index,
.step-index {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 0.75rem;
  font-weight: 600;
}

.subnav-index {
  font-size: 0;
}

.subnav-index::before {
  display: block;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  content: "";
  -webkit-mask: var(--qentix-icon) center / contain no-repeat;
  mask: var(--qentix-icon) center / contain no-repeat;
}

.subnav-index[data-route="catalog"] { --qentix-icon: url("../icons/qentix/package.svg"); }
.subnav-index[data-route="categories"] { --qentix-icon: url("../icons/qentix/list-checks.svg"); }
.subnav-index[data-route="qr"] { --qentix-icon: url("../icons/qentix/qr-code.svg"); }
.subnav-index[data-route="assets"] { --qentix-icon: url("../icons/qentix/image.svg"); }

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.section-heading p {
  max-width: 720px;
  margin: 0.5rem 0 0;
}

.form-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.split-workspace-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: start;
}

.product-list-panel {
  position: sticky;
  top: 4.5rem;
}

.compact-record-list {
  margin-top: 1rem;
}

.mini-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.mini-record-main,
.record-summary-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.75rem;
}

.mini-record h4 {
  margin: 0.625rem 0 0;
  color: var(--foreground);
  font-size: 0.9375rem;
}

.product-thumb {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #f3f4f6;
  color: #d1d5db;
}

.product-thumb-sm {
  width: 3rem;
  height: 3rem;
}

.product-thumb-lg {
  width: 3.5rem;
  height: 3.5rem;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb .qentix-icon {
  --icon-size: 1rem;
}

.mini-meta {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.mini-meta div {
  border-radius: 10px;
  background: var(--surface-muted);
  padding: 0.625rem;
}

.mini-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.mini-meta dd {
  margin: 0.25rem 0 0;
  color: var(--foreground);
  font-weight: 600;
}

.category-inline-editor,
.deletion-panel {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.archive-delete-actions,
.qr-action-stack {
  display: grid;
  gap: 0.5rem;
}

.asset-list {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.75rem;
}

.asset-list h4 {
  margin: 0 0 0.25rem;
}

.asset-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid #f4f4f5;
  padding-top: 0.625rem;
}

.asset-list-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.asset-list-row strong,
.asset-list-row small {
  display: block;
}

.asset-list-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retired-employee-card {
  border-color: #fecaca;
  background: #fef2f2;
}

.retired-employee-card input:disabled,
.retired-employee-card select:disabled {
  background: #f4f4f5;
  color: #71717a;
}

.product-mini-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.state-pill {
  position: relative;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 0.625rem 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
}

.state-pill[tabindex="0"] {
  cursor: help;
}

.state-pill:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.state-pill-icon {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
}

.state-pill-active {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.state-pill-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.state-pill-danger,
.state-pill-revoked,
.state-pill-archived,
.state-pill-inactive {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.state-pill-prohibited .state-pill-icon {
  color: #991b1b;
}

.state-pill-tooltip {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 0;
  z-index: 20;
  width: max-content;
  max-width: min(22rem, 80vw);
  border: 1px solid #27272a;
  border-radius: 0.625rem;
  background: #18181b;
  color: #ffffff;
  padding: 0.5rem 0.625rem;
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translateY(0.25rem);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  visibility: hidden;
}

.state-pill:hover .state-pill-tooltip,
.state-pill:focus .state-pill-tooltip,
.state-pill:focus-within .state-pill-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
}

.dashboard-panel {
  min-width: 0;
}

.dashboard-table,
.dashboard-event-list {
  display: grid;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.dashboard-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px 96px minmax(160px, 0.7fr);
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid #f4f4f5;
  padding: 0.875rem 1rem;
  color: #52525b;
  font-size: 0.8125rem;
}

.dashboard-row-fail {
  background: #fef2f2;
}

.dashboard-row-fail strong {
  color: #991b1b;
}

.dashboard-row-warning {
  background: #fffbeb;
}

.dashboard-row-warning strong {
  color: #92400e;
}

.issued-qr-table .dashboard-row {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.6fr) minmax(150px, 0.8fr) minmax(280px, 1.25fr);
}

.dashboard-row:first-child {
  border-top: 0;
}

.dashboard-row-head {
  background: #fafafa;
  color: #71717a;
  font-size: 0.75rem;
  font-weight: 600;
}

.dashboard-row strong,
.dashboard-event strong {
  display: block;
  color: #18181b;
  font-size: 0.875rem;
  font-weight: 600;
}

.dashboard-row small,
.dashboard-event small {
  display: block;
  margin-top: 0.125rem;
  overflow: hidden;
  color: #71717a;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #f4f4f5;
  padding: 0.875rem 1rem;
}

.dashboard-event:first-child {
  border-top: 0;
}

.dashboard-chart-panel {
  min-height: 300px;
}

.chart-tabs {
  display: flex;
  gap: 0.375rem;
}

.chart-tabs a,
.chart-tabs span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #71717a;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}

.chart-tabs a.active,
.chart-tabs span.active,
.chart-tabs .active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-fg);
}

.chart-placeholder {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.dashboard-outcome-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-outcome-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem;
}

.dashboard-outcome-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-outcome-card span,
.state-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.dashboard-outcome-card strong,
.state-card strong {
  color: var(--foreground);
  font-size: 1.5rem;
  line-height: 1;
}

.dashboard-outcome-card small,
.state-card small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.outcome-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f4f5;
  margin: 0.75rem 0 0.375rem;
}

.outcome-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.outcome-bar-success { background: #10b981; }
.outcome-bar-warning { background: #f59e0b; }
.outcome-bar-failure { background: #ef4444; }

.inventory-state-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.state-card {
  display: grid;
  gap: 0.375rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem;
}

.state-card-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.state-card-inactive {
  border-color: #fed7aa;
  background: #fff7ed;
}

.state-card-revoked,
.state-card-archived {
  border-color: #fecaca;
  background: #fef2f2;
}

.chart-empty-state {
  display: grid;
  height: 100%;
  place-content: center;
  gap: 0.375rem;
  color: #71717a;
  text-align: center;
}

.chart-empty-state strong {
  color: #18181b;
  font-size: 0.9375rem;
}

.chart-empty-state span {
  font-size: 0.8125rem;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  color: #71717a;
  font-size: 0.75rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.legend-genuine { background: #10b981; }
.legend-warning { background: #f59e0b; }
.legend-fake { background: #ef4444; }

.compact-card {
  margin-top: 0;
  padding: 1.25rem;
}

.compact-card h3,
.record-card h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
}

.compact-card > p {
  margin: 0.5rem 0 0;
}

.emphasis-card {
  border-color: var(--border);
  background: #ffffff;
}

/* qentix-like dense table treatment for existing list markup */
.data-list {
  margin-top: 1rem;
}

.inline-actions .button-link,
.inline-actions .secondary-button,
.inline-actions .danger-button,
.section-actions .button-link,
.section-actions .secondary-button {
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .metric-grid,
  .form-card-grid,
  .page-hero,
  .product-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-list-panel {
    position: static;
  }

  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-outcome-bars,
  .inventory-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 16rem;
    max-width: 80vw;
    height: 100vh;
    min-height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 35%);
    transition: transform 200ms ease-out;
  }

  .admin-sidebar:target {
    transform: translateX(0);
  }

  .admin-sidebar:target .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: block;
    background: rgb(21 20 20 / 40%);
  }

  .sidebar-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    margin-right: 0.5rem;
    border-radius: 6px;
    color: rgb(255 255 255 / 60%);
    text-decoration: none;
    font-size: 1.25rem;
  }

  .sidebar-close:hover,
  .sidebar-close:focus-visible {
    background: rgb(255 255 255 / 8%);
    color: #ffffff;
  }

  .admin-main {
    padding: 0 1rem 1rem;
  }

  .admin-topbar {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .admin-stack {
    padding-top: 1rem;
  }

  .mobile-menu-button,
  .mobile-search-button {
    display: grid;
  }

  .top-search {
    display: none;
  }

  .topbar-user,
  .scan-link {
    display: none;
  }

  .admin-topbar,
  .section-heading {
    display: flex;
  }

  .hero-panel,
  .metric-grid,
  .form-card-grid,
  .page-hero,
  .product-subnav,
  .product-mini-metrics,
  .mini-record {
    grid-template-columns: 1fr;
  }

  .workspace-section,
  .hero-panel,
  .page-hero {
    padding: 1rem;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .asset-list-row,
  .issued-qr-table .dashboard-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .asset-list-row small {
    white-space: normal;
  }

  .asset-list-row .inline-actions,
  .qr-action-stack .inline-actions {
    width: 100%;
    align-items: stretch;
  }

  .asset-list-row .inline-actions input,
  .asset-list-row .inline-actions button,
  .qr-action-stack .inline-actions input,
  .qr-action-stack .inline-actions button {
    width: 100%;
  }

  .chart-tabs {
    flex-wrap: wrap;
  }

  .chart-placeholder {
    height: 180px;
  }

  .dashboard-outcome-bars,
  .inventory-state-grid {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .section-actions {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  .admin-nav a,
  .nav-icon {
    transition-duration: 0.01ms;
  }

  .admin-nav a:hover .nav-icon,
  .admin-nav a:focus-visible .nav-icon {
    transform: none;
  }
}
