:root {
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --canvas: #f3f5f8;
  --primary: #e53935;
  --primary-hover: #d32f2f;
  --primary-light: #fef2f2;
  --green: #10b981;
  --green-light: #ecfdf5;
  --orange: #f59e0b;
  --orange-light: #fffbeb;
  --blue: #0284c7;
  --blue-light: #f0f9ff;
  --sidebar-bg: #1b1e24;
  --sidebar-hover: #262b33;
  --sidebar-line: #292f38;
  --sidebar-text: #9ca3af;
  --sidebar-active: #e53935;
  --radius: 8px;
  --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Zoho Inventory Dark Sidebar */
.sidebar {
  position: fixed;
  z-index: 20;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  padding: 18px 14px 16px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 6px 20px;
  color: #ffffff;
  text-decoration: none;
  font: 700 18px 'DM Sans', sans-serif;
  letter-spacing: -0.3px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-dot { color: #fca5a5; }
.brand small {
  display: block;
  font: 700 8px 'DM Sans', sans-serif;
  letter-spacing: 1px;
  color: #9ca3af;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--sidebar-line);
  border-radius: 7px;
  background: #222730;
  margin: 0 0 18px;
}
.workspace-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #323946;
  color: #f1f5f9;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
.workspace strong, .workspace small, .profile strong, .profile small { display: block; }
.workspace strong { font-size: 11px; color: #f3f4f6; }
.workspace small, .profile small { font-size: 11px; color: #94a3b8; }
.workspace > svg { margin-left: auto; width: 14px; color: #64748b; }

.nav-label {
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #64748b;
  margin: 12px 10px 6px;
}
.nav { display: grid; gap: 3px; }
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link svg { width: 17px; height: 17px; color: #818a99; }
.nav-link:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}
.nav-link:hover svg { color: #ffffff; }
.nav-link.active {
  color: #ffffff;
  background: var(--sidebar-active);
  font-weight: 600;
}
.nav-link.active svg { color: #ffffff; }
.nav-count {
  margin-left: auto;
  min-width: 19px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #2a303a;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-count.accent {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.sidebar-bottom { margin-top: auto; }
.help-card {
  background: #222730;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 14px;
}
.help-card strong { display: block; margin: 4px 0 2px; font-size: 11px; color: #f1f5f9; }
.help-card p { font-size: 11px; line-height: 1.5; color: #94a3b8; margin: 0 0 8px; }
.help-card a { color: #f87171; font-size: 11px; font-weight: 600; text-decoration: none; }
.profile {
  border-top: 1px solid var(--sidebar-line);
  padding: 12px 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatar {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
}
.profile-copy { min-width: 0; flex: 1; }
.profile strong { font-size: 11px; color: #f3f4f6; }
.logout-quick {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #262c36;
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  transition: 0.15s;
}
.logout-quick:hover { background: #323a47; color: #fca5a5; }

/* Main Canvas & Topbar */
.main {
  margin-left: 240px;
  padding: 0 28px 40px;
  min-height: 100vh;
  background: var(--canvas);
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  margin: 0 -28px 20px;
  padding: 0 28px;
}
.breadcrumbs { color: #64748b; font-size: 12px; }
.breadcrumbs span { margin: 0 6px; color: #cbd5e1; }
.breadcrumbs strong { color: #111827; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.date-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.icon-button {
  border: 0;
  background: transparent;
  position: relative;
  color: #64748b;
  padding: 5px;
  border-radius: 6px;
}
.icon-button:hover { background: #f1f5f9; color: #111827; }
.notification i {
  position: absolute;
  right: 5px;
  top: 4px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  border: 1px solid white;
}
.top-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 11px;
}
.mobile-menu { display: none; }

/* Buttons & UI controls */
.button {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.15s;
}
.button.primary {
  background: var(--primary);
  color: #ffffff;
}
.button.primary:hover {
  background: var(--primary-hover);
}
.button.secondary {
  color: #374151;
  background: #ffffff;
  border-color: #d1d5db;
}
.button.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.danger-button {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Pages & Layout Typography */
.page { display: none; }
.page.active-page { display: block; }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-heading .eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}
.page-heading h1 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}
.page-heading .subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}
.panel-header h2 {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}
.panel-header p { font-size: 11px; color: #64748b; margin: 2px 0 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
thead { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
th {
  height: 38px;
  padding: 0 16px;
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: none;
}
td {
  height: 48px;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 16px;
  color: #334155;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
tbody tr {
  transition: background-color 0.1s ease;
}
tbody tr:hover { background: #f8fafc; }

.empty-state {
  padding: 36px 16px !important;
  text-align: center !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
}
.product-thumb {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}
.badge.ok { color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; }
.badge.low { color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; }
.badge.empty { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.badge.progress { color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; }
.badge.done { color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; }

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.table-action:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}
.table-action.danger-action:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* taste-skill-ignore */
  font-size: 11px;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}
.session-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.session-mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.session-mini-icon svg {
  width: 15px;
  height: 15px;
}
.progress-table {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
}
.admin-message {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Report Grid & Analytic Cards */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.report-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  position: relative;
  margin-bottom: 0;
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.report-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.report-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.report-icon.green { background: #ecfdf5; color: #059669; }
.report-icon.orange { background: #fffbeb; color: #d97706; }
.report-icon.blue { background: #f0f9ff; color: #0284c7; }
.report-icon.slate { background: #f1f5f9; color: #334155; }
.report-card strong {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 4px;
}
.report-card p {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
}
.admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Category Composition Chart */
.category-chart {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.category-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.category-row span {
  width: 140px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-track {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}
.category-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.category-row strong {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Feedback Layout */
.feedback-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .feedback-layout {
    grid-template-columns: 1fr;
  }
}
.feedback-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feedback-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.feedback-form select,
.feedback-form textarea {
  font-family: inherit;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  color: #0f172a;
  outline: none;
  background: #ffffff;
}
.feedback-form textarea {
  min-height: 120px;
  resize: vertical;
}
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: var(--primary);
}
.feedback-list {
  padding: 16px 20px;
}
.feedback-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.feedback-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.feedback-item p {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 8px 0;
}
.feedback-item small {
  font-size: 11px;
  color: #94a3b8;
}

/* Workspace Settings Card */
.settings-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}
.settings-brand h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.settings-brand p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0 0;
}
.settings-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
}
.settings-info div span {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}
.settings-info div strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.api-status {
  color: #059669 !important;
}
.notification-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex-wrap: wrap;
}
.notification-settings strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.notification-settings p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0 0;
}
.settings-note {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}
.settings-actions {
  padding-top: 10px;
}

/* Search & Form Elements */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  width: 260px;
  background: #ffffff;
}
.search-box input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 12px;
  color: #0f172a;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e7eb;
}
.toolbar select, .toolbar-inline select, .form-field select, .form-field input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  outline: none;
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.modal-body { padding: 18px 20px; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.toast {
  position: fixed;
  z-index: 60;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: 0.2s;
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 12px;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Auth Screen */
.auth-required .sidebar, .auth-required .main { display: none; }
#authScreen { display: none; min-height: 100vh; background: #f8fafc; }

@media (min-width: 1024px) {
  .auth-required #authScreen {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #ffffff;
  }
  .auth-card {
    padding: 48px 56px;
    width: 100%;
    max-width: 460px;
    margin: auto;
    background: #ffffff;
  }
  .auth-decoration {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #181b20;
    color: #ffffff;
    padding: 60px 48px;
    border-left: 1px solid #282e38;
  }
}

@media (max-width: 1023px) {
  .auth-required #authScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
  }
  .auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 32px 24px;
    margin: auto;
  }
  .auth-decoration {
    display: none !important;
  }
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px 0;
  text-decoration: none;
}
.auth-copy h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.auth-copy p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 18px 0;
  line-height: 1.5;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 3px;
  margin: 0 0 16px 0;
}
.auth-tab {
  flex: 1;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
  text-align: center;
}
.auth-tab:hover {
  color: #0f172a;
}
.auth-tab.selected {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
}
.auth-message {
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 12px 0;
  display: none;
}
.auth-message:not(:empty) {
  display: block;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 6px;
}
.auth-form {
  display: grid;
  gap: 13px;
}
.auth-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.auth-form input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  height: 40px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}
.auth-form input:focus {
  border-color: var(--primary);
}
.auth-submit {
  width: 100%;
  height: 40px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  margin-top: 4px;
}
.auth-back {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 6px 0;
}
.setup-callout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  margin-top: 14px;
}
.setup-callout button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.auth-footnote {
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.auth-decoration-badge {
  display: inline-block;
  color: #f87171;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.auth-decoration h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 10px 0;
}
.auth-decoration > p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 28px 0;
}
.auth-feature-list {
  display: grid;
  gap: 14px;
}
.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #20242b;
  border: 1px solid #303642;
  border-radius: 6px;
}
.auth-feature-item svg {
  width: 18px;
  height: 18px;
  color: #f87171;
  flex-shrink: 0;
  margin-top: 2px;
}
.auth-feature-item strong {
  display: block;
  font-size: 13px;
  color: #f3f4f6;
  font-weight: 600;
}
.auth-feature-item span {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
  line-height: 1.4;
}

/* Mobile Drawer Backdrop & Close Button */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 28;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  background: #282f3a;
  border: 1px solid #374151;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.sidebar-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Bottom Navigation Bar for Mobile (Android & iOS) */
.bottom-nav {
  display: none;
}

/* Base Mobile Helpers */
button, a, select, input {
  -webkit-tap-highlight-color: transparent;
}
.button, .nav-link, .bottom-nav-item, .icon-button {
  touch-action: manipulation;
}

/* Responsive Overhaul for Mobile & Tablet (iOS & Android) */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(285px, 86vw) !important;
    z-index: 30 !important;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: flex;
  }

  .main {
    margin-left: 0 !important;
    padding: 0 14px calc(76px + env(safe-area-inset-bottom, 16px)) !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .topbar {
    height: 52px;
    margin: 0 -14px 14px !important;
    padding: 0 14px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
    max-width: 100vw;
  }
  .topbar .mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: #1e293b;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
  }
  .topbar .search-box {
    width: auto;
    flex: 1;
    min-width: 0;
    max-width: 180px;
    height: 32px;
    border-radius: 9999px;
  }
  .topbar .search-box input {
    font-size: 13px;
  }
  .top-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .top-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  /* Bottom Navigation Bar */
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    z-index: 25;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 0;
    text-decoration: none;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }
  .bottom-nav-item.active {
    color: var(--primary);
  }
  .bottom-nav-item.active svg {
    stroke-width: 2.2;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS Safari from auto-zooming input fields */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Table Horizontal Scrolling */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .table-wrap table {
    min-width: 580px;
  }
}

@media (max-width: 640px) {
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .heading-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }
  .heading-actions .button,
  .page-heading > .button {
    flex: 1;
    justify-content: center;
    height: 38px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }
  .toolbar .search-box {
    width: 100% !important;
    max-width: 100% !important;
  }
  .toolbar select {
    width: 100%;
    height: 36px;
  }

  .report-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .report-card {
    padding: 14px 12px !important;
  }
  .report-card strong {
    font-size: 20px !important;
  }

  /* Bottom sheet modal on mobile */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: 0;
    max-height: 88vh !important;
    margin: 0 !important;
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUpModal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .feedback-layout {
    grid-template-columns: 1fr;
  }
}


