/* MedSkin — application layout & component styles
   Supplements styles.css. Covers all class names used in JSX. */

/* ========== Layout shell ========== */
.app { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-app); }
.app-body { display: flex; flex: 1; min-height: 0; }
.app-body.with-sidebar { /* sidebar + main */ }
.app-body.auth-body { display: block; }
.app-main { flex: 1; min-width: 0; padding: 32px 40px; max-width: 100%; }
.app-main.with-sidebar { padding: 32px 40px; }

@media (max-width: 768px) {
  .app-main, .app-main.with-sidebar { padding: 16px; padding-bottom: 80px; }
}

/* ========== Top bar ========== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: var(--bg-page); border-bottom: 1px solid var(--border);
  padding: 0;
}
.topbar-inner {
  height: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  width: 100%; max-width: none; margin: 0;
}
.logo { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-pressed));
  color: #fff; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.topnav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.topnav a {
  padding: 6px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-body);
  text-decoration: none; transition: var(--transition);
}
.topnav a:hover { background: var(--bg-hover); color: var(--text-heading); text-decoration: none; }
.topnav a.active { color: var(--primary-pressed); background: var(--primary-soft); }

/* Topbar generic icon button */
.ic-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 6px; border: none; background: none;
  color: var(--text-body);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.ic-btn:hover { background: var(--bg-hover); color: var(--text-heading); }
.ic-btn-sm {
  width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.ic-btn-sm:hover { background: var(--bg-hover); color: var(--text-heading); border-color: var(--border-strong); }
.ic-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* Account button */
.account-menu { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  border: 1px solid transparent; border-radius: 8px;
  background: none; cursor: pointer; transition: var(--transition);
}
.account-btn:hover { background: var(--bg-hover); border-color: var(--border); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #FCA5A5, #F472B6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 14px; }
.avatar-xl { width: 64px; height: 64px; font-size: 20px; }
.account-meta { text-align: left; line-height: 1.15; }
.account-name { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.account-role { font-size: 10px; margin-top: 2px; }

.role-pill {
  display: inline-block; padding: 1px 6px;
  border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  background: var(--primary-soft); color: var(--primary-pressed);
}
.role-pill.pro { background: var(--bg-pro); color: var(--bg-pro-text); }
.role-pill.pending { background: var(--warning-soft); color: var(--bg-pro-text); }

/* ========== Sidebar ========== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-page);
  border-right: 1px solid var(--border);
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 16px;
}
@media (max-width: 768px) {
  aside.sidebar { display: none !important; }
  .app-body.with-sidebar > .app-main.with-sidebar { padding: 16px; padding-bottom: 80px; }
}
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 600;
  padding: 8px 12px 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  height: 36px; padding: 0 12px;
  font-size: 13px; color: var(--text-body);
  border-radius: 6px; cursor: pointer; transition: var(--transition);
  position: relative; border: none; background: none;
  text-align: left; width: 100%; text-decoration: none;
}
.sidebar-link:hover { background: var(--bg-hover); color: var(--text-heading); text-decoration: none; }
.sidebar-link.active {
  background: var(--primary-soft); color: var(--primary-pressed); font-weight: 500;
}
.sidebar-link.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--primary); border-radius: 0 2px 2px 0;
}
.sidebar-link .count {
  margin-left: auto; background: var(--bg-section); color: var(--text-secondary);
  padding: 0 8px; height: 18px; border-radius: 9px;
  font-size: 11px; display: inline-flex; align-items: center;
}
.sidebar-link.active .count { background: #fff; color: var(--primary); }
.sidebar-link svg { color: var(--text-secondary); flex-shrink: 0; }
.sidebar-link.active svg { color: var(--primary); }

/* Manager card */
.manager-card {
  margin-top: auto;
  padding: 12px; border-radius: 8px;
  background: var(--bg-section);
}
.manager-card .label { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.manager-card-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.manager-card .name { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.manager-card .meta { font-size: 11px; color: var(--text-secondary); }

/* Profile mini in sidebar */
.profile-mini {
  padding: 12px; border-radius: 8px;
  background: var(--bg-section);
  display: flex; align-items: center; gap: 12px;
}
.profile-mini .name { font-size: 13px; font-weight: 600; color: var(--text-heading); line-height: 1.2; }

/* ========== Page header ========== */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-head h1 { margin: 0; }
.page-sub { color: var(--text-secondary); margin: 4px 0 0; font-size: 14px; }

/* ========== Demo switcher ========== */
.demo-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 850;
  width: 44px; height: 44px; border-radius: 22px;
  background: #1F2937; color: #fff; border: none;
  box-shadow: var(--shadow-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.demo-fab:hover { background: #111827; }
.demo-switcher {
  position: fixed; bottom: 24px; left: 24px; z-index: 850;
  width: 300px; max-height: calc(100vh - 48px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.demo-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  background: linear-gradient(180deg, #1F2937 0%, #374151 100%);
  color: #fff;
}
.demo-title { font-size: 13px; font-weight: 700; color: #fff; }
.demo-sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.demo-header .ic-btn { color: rgba(255,255,255,0.8); }
.demo-header .ic-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.demo-section {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-y: auto;
}
.demo-section:last-child { border-bottom: none; }
.demo-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); font-weight: 600;
  margin-bottom: 6px;
}
.demo-segmented {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.demo-pill {
  padding: 5px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 500;
  border: 1px solid var(--border); background: #fff;
  color: var(--text-body); cursor: pointer; transition: var(--transition);
  flex: 1; min-width: 0;
}
.demo-pill:hover { background: var(--bg-hover); }
.demo-pill.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.demo-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; cursor: pointer; margin: 0 0 6px;
}
.demo-toggle input { margin: 0; }
.demo-jumps { display: flex; flex-wrap: wrap; gap: 4px; }
.demo-jump {
  padding: 4px 8px; font-size: 11px;
  border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--text-body); cursor: pointer;
}
.demo-jump:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-pressed); }

/* ========== Dashboard ========== */
.dash-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 24px;
}
.dash-col-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dash-col-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.kpi {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px;
}
.kpi-val { font-size: 22px; font-weight: 700; color: var(--text-heading); line-height: 1.1; }
.kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; margin-top: 4px; }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2,1fr); } }

/* ========== Catalog ========== */
.catalog-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 24px;
  align-items: flex-start;
}
.filters-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; position: sticky; top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.catalog-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.filter-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff;
}
.filter-search.inline { width: 280px; }
.filter-search svg { color: var(--text-muted); flex-shrink: 0; }
.filter-search input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 13px; color: var(--text-heading);
}
.filter-group { border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.filter-group:first-of-type { border-top: none; padding-top: 0; }
.filter-head {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 0; border: none; background: none;
  font-size: 12px; font-weight: 600; color: var(--text-heading);
  text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer;
  margin-bottom: 8px;
}
.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-options label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-body); font-weight: 400;
  cursor: pointer; margin: 0;
}
.filter-options label:hover { color: var(--text-heading); }
.filter-options input { margin: 0; }
.filter-options .count { color: var(--text-muted); margin-left: auto; font-size: 12px; }

/* Check rows (used in filters and forms) */
.check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-body); font-weight: 400;
  cursor: pointer; padding: 4px 0; margin: 0;
}
.check-row:hover { color: var(--text-heading); }
.check-row input { margin: 0; flex-shrink: 0; }
.check-row span { flex: 1; }
.check-row .count { color: var(--text-muted); margin-left: auto; font-size: 12px; }

/* Catalog table — alias of product-table */
.cat-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff;
}
.cat-table th {
  background: var(--bg-section); border-bottom: 1px solid var(--border);
  padding: 10px 12px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--text-heading);
  text-transform: uppercase; letter-spacing: 0.03em;
  position: sticky; top: 0; z-index: 1;
}
.cat-table th.num, .cat-table td.num { text-align: right; }
.cat-table td {
  padding: 12px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle; font-size: 13px;
}
.cat-table tbody tr { transition: background 0.1s; }
.cat-table tbody tr:hover { background: var(--bg-hover); }
.cat-table tbody tr.selected { background: var(--primary-soft); }
.cat-table.dense td { padding: 6px 10px; font-size: 12px; }
.cat-table.dense th { padding: 6px 10px; }
.cat-table input[type="checkbox"] { margin: 0; }

@media (max-width: 768px) {
  .cat-table { min-width: 760px; }
  .cat-table th, .cat-table td { padding: 8px 10px; font-size: 12px; }
}

/* Order timeline (horizontal) */
.order-timeline {
  display: flex; align-items: flex-start; gap: 0;
  padding: 24px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 16px; overflow-x: auto;
}
.tl-step {
  flex: 1; min-width: 100px; text-align: center;
  position: relative;
}
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%;
  margin: 0 auto 8px;
  background: #fff; border: 2px solid var(--border-strong);
  position: relative; z-index: 1;
}
.tl-step.done .tl-dot { background: var(--success); border-color: var(--success); }
.tl-step.current .tl-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.tl-step::after {
  content: ''; position: absolute; top: 9px;
  left: calc(50% + 14px); right: calc(-50% + 14px);
  height: 2px; background: var(--border-strong);
}
.tl-step.done::after, .tl-step.current::after { background: var(--success); }
.tl-step:last-child::after { display: none; }
.tl-step .label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.tl-step.done .label, .tl-step.current .label { color: var(--text-heading); }
.tl-step .date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

@media (max-width: 768px) {
  .order-timeline { padding: 16px 12px; gap: 0; }
  .tl-step { min-width: 84px; }
  .tl-step .label { font-size: 11px; }
  .tl-step .date { font-size: 10px; }
  .tl-dot { width: 16px; height: 16px; }
  .tl-step::after { top: 7px; }
}

/* Alert (warning / info / error) */
.alert {
  display: flex; gap: 14px;
  padding: 16px 20px;
  border-radius: 8px; border: 1px solid;
  border-left-width: 4px;
  margin-bottom: 16px;
}
.alert-warning { background: var(--warning-soft); border-color: #FCD34D; border-left-color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: #93C5FD; border-left-color: var(--info); }
.alert-error { background: var(--error-soft); border-color: #FCA5A5; border-left-color: var(--error); }
.alert-success { background: var(--success-soft); border-color: #6EE7B7; border-left-color: var(--success); }
.alert-ic { flex-shrink: 0; color: var(--warning); padding-top: 1px; }
.alert-info .alert-ic { color: var(--info); }
.alert-error .alert-ic { color: var(--error); }
.alert-success .alert-ic { color: var(--success); }
.alert-body { flex: 1; }
.alert-title { font-weight: 600; color: var(--text-heading); margin-bottom: 4px; font-size: 14px; }
.alert-body p { margin: 0 0 8px; color: var(--text-body); font-size: 13px; line-height: 1.5; }
.alert-body .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.alert-meta { flex-shrink: 0; text-align: right; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-warn { background: var(--warning); }
.dot-success { background: var(--success); }
.dot-error { background: var(--error); }

/* Top bar overflow fixes */
.topbar-actions { gap: 8px; }
.topbar-actions .search-bar { flex: 1 1 240px; min-width: 160px; max-width: 360px; }
.search-bar input { padding-right: 44px; }
.account-meta { min-width: 0; max-width: 140px; }
.account-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
@media (max-width: 1280px) {
  .topbar-actions .search-bar { max-width: 240px; }
}
@media (max-width: 1100px) {
  .search-kbd { display: none; }
  .search-bar input { padding-right: 12px; }
  .topbar-actions .search-bar { max-width: 200px; }
}
@media (max-width: 1024px) {
  .account-meta { display: none; }
  .account-btn { padding: 4px; }
  .topnav { gap: 0; }
  .topnav a { padding: 6px 8px; font-size: 12px; }
  .topbar-inner { gap: 12px; padding: 0 16px; }
}
@media (max-width: 768px) {
  .topbar-actions .search-bar { display: none; }
  .topbar-actions { gap: 4px; }
  .account-btn .chev, .account-btn svg:last-child { display: none; }
  .topbar-inner { padding: 0 12px; gap: 8px; }
}

/* ========== Global responsive pass ========== */
@media (max-width: 900px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-head .page-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .page-head h1 { font-size: 22px; }
}

@media (max-width: 768px) {
  /* KPI tighter */
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-val { font-size: 18px; }
  .kpi-lbl { font-size: 11px; }

  /* Filters wrap nicely */
  .filters-bar { gap: 8px; }
  .filters-bar .select { width: 100%; }
  .chip-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chip-row .chip { white-space: nowrap; flex-shrink: 0; }

  /* Modals: full bleed */
  .modal { width: calc(100vw - 16px) !important; max-width: 100% !important; max-height: calc(100vh - 32px); margin: 16px 8px; }
  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-header h2 { font-size: 17px; }

  /* Buttons stretch */
  .btn-block { width: 100%; }

  /* Page actions wrap */
  .page-actions .btn { font-size: 12px; }

  /* Card grids: single column on tight screens */
  .card-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Demo FAB out of mobile-nav way */
  .demo-fab { bottom: 72px; }
  .demo-switcher { bottom: 72px; left: 12px; right: 12px; width: auto; max-width: 320px; }

  /* Bread crumbs scroll */
  .bread { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* Tabs row scroll */
  .tabs.main-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs.main-tabs .tab { white-space: nowrap; flex-shrink: 0; }

  /* Section paddings */
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 15px; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row .kpi:nth-child(n+5) { grid-column: span 2; }
  .topnav { display: none; }
  .topbar-inner { padding: 0 10px; }
  .logo-text { display: none; }
  .auth-buttons .btn-sm { padding: 6px 10px; font-size: 12px; }
}

/* Form row helper */
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-row > span { font-size: 13px; font-weight: 500; color: var(--text-heading); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; font-size: 13px; }
.link { color: var(--primary); cursor: pointer; }
.link:hover { color: var(--primary-hover); text-decoration: underline; }

@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; max-height: none; }
}

/* Mobile filter sheet + toolbar */
.catalog-mobile-toolbar { display: none; }
.filter-sheet-head { display: none; }
.filter-sheet-foot { display: none; }
.filter-sheet-overlay { display: none; }
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--primary); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 600;
  margin-left: 4px;
}

@media (max-width: 768px) {
  /* Show mobile toolbar */
  .catalog-mobile-toolbar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
    position: sticky; top: var(--topbar-h);
    background: var(--bg-app); padding: 8px 0; z-index: 50;
  }
  .catalog-mobile-toolbar .filter-search { flex: 1; }

  /* Hide desktop search inside panel */
  .filter-search-desktop { display: none; }

  /* Filter panel becomes slide-up sheet */
  .filters-panel {
    position: fixed !important;
    left: 0; right: 0; bottom: 0;
    top: auto !important; max-height: 80vh !important;
    border-radius: 16px 16px 0 0;
    z-index: 951;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    padding: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
  }
  .filters-panel.open { transform: translateY(0); }
  .filter-sheet-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 950;
    animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .filter-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .filter-sheet-head h3 { margin: 0; font-size: 16px; }
  .filters-panel { display: flex !important; flex-direction: column; gap: 0 !important; }
  .filters-panel > .filter-group { padding: 12px 16px; border-top: 1px solid var(--border-subtle); }
  .filters-panel > .filter-group:first-of-type { border-top: none; }
  .filter-sheet-foot {
    display: flex; gap: 8px; padding: 12px 16px;
    border-top: 1px solid var(--border); background: #fff;
    flex-shrink: 0;
  }
  .filter-sheet-foot .btn { flex: none; }
  .filter-sheet-foot .btn.grow { flex: 1; }

  /* Hide table view permanently — only grid on mobile */
  .cat-table { display: none !important; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Bulk-bar wraps */
  .bulk-bar { flex-wrap: wrap; }
  .bulk-bar .btn { flex: 1; min-width: 120px; }

  /* View toggle hidden on mobile (component already conditional) */
  .view-toggle { display: none; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
}

.bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--primary-soft); border: 1px solid var(--primary);
  border-radius: 6px; font-size: 13px;
}
.catalog-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.catalog-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* Product table */
.product-table-wrap {
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.product-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.product-table th {
  background: var(--bg-section); border-bottom: 1px solid var(--border);
  padding: 10px 12px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--text-heading);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.product-table th.num, .product-table td.num { text-align: right; }
.product-table td {
  padding: 12px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle; font-size: 13px;
}
.product-table tbody tr:hover { background: var(--bg-hover); }
.product-table tbody tr.selected { background: var(--primary-soft); }
.product-table.compact td { padding: 6px 10px; font-size: 12px; }
.product-table.compact th { padding: 6px 10px; }

.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-name { font-weight: 500; color: var(--text-heading); cursor: pointer; line-height: 1.3; }
.prod-name:hover { color: var(--primary); }
.prod-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--bg-section); color: var(--text-secondary);
}
.tag-sub { background: var(--purple-soft); color: #6D28D9; }
.tag-protocol { background: var(--info-soft); color: #1D4ED8; }
.tag-new { background: var(--success-soft); color: #047857; }
.tag-pro { background: var(--bg-pro); color: var(--bg-pro-text); }

.sku { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; color: var(--text-muted); background: var(--bg-section); padding: 2px 6px; border-radius: 3px; }

.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

td.num, .num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; color: var(--text-heading); }
.strike { text-decoration: line-through; color: var(--text-muted); }
.personal { color: var(--success); }
.muted-cell { color: var(--text-secondary); }
.success-text { color: var(--success); }

/* Product card grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: var(--transition);
}
.product-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.prod-img { width: 100%; aspect-ratio: 1; height: auto; }
.prod-card-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }

/* ========== Orders ========== */
.filters-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.orders-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff;
}
.orders-table th {
  background: var(--bg-section); border-bottom: 1px solid var(--border);
  padding: 10px 14px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--text-heading);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.orders-table th.num, .orders-table td.num { text-align: right; }
.orders-table td {
  padding: 14px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle; font-size: 13px;
}
.orders-table tbody tr:hover { background: var(--bg-hover); }
.orders-table tbody tr.clickable { cursor: pointer; }

/* Wrap table for horizontal scroll on narrow screens */
.card.no-pad { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  .orders-table { min-width: 640px; }
  .orders-table th, .orders-table td { padding: 10px; font-size: 12px; }
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: 13px; font-weight: 500; cursor: pointer;
}
.link-btn:hover { color: var(--primary-hover); text-decoration: underline; }
.link-btn-danger {
  background: none; border: none; padding: 0;
  color: var(--error); font-size: 13px; font-weight: 500; cursor: pointer;
}
.link-btn-danger:hover { text-decoration: underline; }

/* Order detail */
.order-detail-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 24px;
}
.order-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1024px) { .order-detail-grid { grid-template-columns: 1fr; } }

.ship-item {
  padding: 12px 16px; display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
.ship-item:last-child { border-bottom: none; }

@media (max-width: 600px) {
  .ship-item { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .ship-item .grow { flex: 1 1 calc(100% - 70px); min-width: 0; }
  .ship-item .num { font-size: 13px; }
  .ship-item .btn { flex: 1 1 100%; margin-top: 4px; }

  .ship-head { flex-wrap: wrap; }
  .ship-head-right { margin-left: 0; flex-wrap: wrap; gap: 6px; }

  /* Tracking page */
  .track-meta { grid-template-columns: 1fr 1fr !important; }
  .track-card { padding: 16px; }
  .track-actions { gap: 6px; }
  .track-actions .btn { flex: 1; min-width: 0; font-size: 12px; }
  .track-event { padding-left: 18px; }
  .te-name { font-size: 12px; }
}

@media (max-width: 480px) {
  /* Page-actions on order detail compact */
  .order-detail .page-actions .btn { padding: 6px 10px; font-size: 12px; }
}

/* ========== Cart ========== */
.cart-line {
  padding: 16px; display: flex; gap: 16px; align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
.cart-line:last-child { border-bottom: none; }
.cart-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: flex-start; }
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }

/* ========== Subscriptions ========== */
.sub-card { display: flex; flex-direction: column; gap: 14px; }
.sub-card-head { display: flex; gap: 16px; align-items: flex-start; }
.sub-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sub-price-block { text-align: right; flex-shrink: 0; }
.sub-progress { padding: 12px; background: var(--bg-section); border-radius: 6px; }
.sub-prog-line { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.sub-prog-fill { height: 100%; background: var(--primary); border-radius: 3px; }
.sub-prog-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.sub-actions-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-suggest { display: flex; gap: 16px; align-items: center; background: linear-gradient(90deg, var(--primary-soft), #fff); border-color: var(--primary); }

@media (max-width: 600px) {
  .sub-card-head { flex-wrap: wrap; gap: 12px; }
  .sub-card-head > .grow { flex: 1 1 calc(100% - 100px); min-width: 0; }
  .sub-price-block { width: 100%; text-align: left; padding-top: 8px; border-top: 1px solid var(--border-subtle); display: flex; align-items: baseline; gap: 12px; }
  .sub-name-row h3 { font-size: 16px; }
  .sub-actions-row { gap: 6px; }
  .sub-actions-row .btn { flex: 1 1 calc(50% - 6px); min-width: 0; font-size: 12px; }
  .sub-suggest { flex-direction: column; align-items: flex-start; padding: 16px; }
  .sub-suggest .btn { width: 100%; }
}

/* ========== Returns ========== */
.return-row { display: flex; gap: 14px; align-items: center; }
.return-card { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 600px) {
  .return-row { flex-wrap: wrap; gap: 10px; }
  .return-row .grow { flex: 1 1 100%; }
  .return-row .num { font-size: 13px; }
  .return-row .btn { flex: 1 1 100%; }
  .draft-card .draft-actions { flex-wrap: wrap; }
  .draft-card .draft-actions .btn { flex: 1 1 calc(50% - 4px); font-size: 12px; }
}

/* ========== Drafts/Wishlist ========== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.draft-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.draft-head { display: flex; align-items: center; gap: 8px; }
.draft-thumbs { display: flex; gap: 4px; }
.thumb-more { width: 32px; height: 32px; border-radius: 4px; background: var(--bg-section); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.draft-meta { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.draft-actions { display: flex; gap: 6px; }

/* ========== Profile ========== */
.profile-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 16px;
}
.profile-status { margin-top: 8px; }
@media (max-width: 600px) {
  .profile-hero { flex-direction: column; align-items: flex-start; padding: 16px; gap: 12px; }
  .profile-hero h2 { font-size: 18px; }
  .avatar-xl { width: 56px; height: 56px; font-size: 18px; }
}
.addr-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.addr-card.default { border-color: var(--primary); border-width: 1.5px; }
.addr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.addr-icon { font-size: 18px; }
.addr-card p { margin: 0; font-size: 13px; color: var(--text-body); line-height: 1.5; }

.pay-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }

/* ========== Notifications ========== */
.notif-row-lg {
  display: flex; gap: 14px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px;
}
.notif-row-lg.unread { background: var(--primary-soft); border-color: #93C5FD; }
.notif-ic { font-size: 18px; flex-shrink: 0; }
.notif-title { font-weight: 600; color: var(--text-heading); font-size: 14px; margin-bottom: 4px; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }

/* ========== AI Page ========== */
.ai-page {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 0;
  height: calc(100vh - var(--topbar-h) - 64px);
  min-height: 600px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.ai-sidebar {
  border-right: 1px solid var(--border); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  background: var(--bg-app);
}
.ai-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 600;
  margin-top: 8px;
}
.ai-history-item {
  padding: 10px 12px; border-radius: 6px;
  background: #fff; border: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.ai-history-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.ai-history-item.active { background: var(--primary-soft); border-color: var(--primary); }

.ai-main { display: flex; flex-direction: column; min-width: 0; }
.ai-thread { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ai-empty { padding: 40px 24px; text-align: center; color: var(--text-secondary); }
.ai-empty h2 { color: var(--text-heading); margin-bottom: 8px; }
.ai-input-area {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.ai-input {
  flex: 1; height: 40px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--bg-app); font-size: 14px; outline: none;
  font-family: inherit;
}
.ai-input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ai-input-area .btn { flex-shrink: 0; }
.ai-input-area .ic-btn { flex-shrink: 0; color: var(--text-muted); }
.ai-input-area .ic-btn:hover { color: var(--primary); }

@media (max-width: 900px) {
  .ai-page { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 32px); }
  .ai-sidebar { display: none; }
  .ai-msg, .ai-msg.user { max-width: 96%; }
}
@media (max-width: 768px) {
  .ai-page {
    height: calc(100vh - var(--topbar-h) - 56px);
    border-radius: 0; border-left: none; border-right: none;
    margin: -16px; margin-bottom: -80px;
  }
  .ai-header { padding: 10px 14px; }
  .ai-header .btn { padding: 6px 10px; font-size: 12px; }
  .ai-messages { padding: 14px 12px; gap: 10px; }
  .ai-msg { max-width: 100%; gap: 8px; }
  .ai-msg.user { max-width: 88%; }
  .ai-bubble { padding: 8px 12px; font-size: 13px; }
  .ai-bubble p { margin: 0 0 6px; }
  .ai-products { gap: 6px; }
  .ai-product { padding: 8px; gap: 8px; }
  .ai-product .prod-name { font-size: 12px; }
  .ai-protocol-card { padding: 10px 12px; flex-wrap: wrap; }
  .ai-protocol-card .apc-icon { font-size: 18px; }
  .ai-protocol-card strong { font-size: 13px; }
  .ai-feedback { gap: 4px; }
  .ai-fb-btn { font-size: 11px; height: 26px; padding: 0 8px; }
  .ai-fb-icon { width: 26px; }
  .ai-feedback .link-btn { font-size: 12px; flex-basis: 100%; padding-top: 4px; }
  .ai-disclaimer {
    font-size: 10px; padding: 6px 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ai-input-area {
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
  }
  .ai-input { height: 36px; font-size: 13px; }
  .ai-input-area .ic-btn { display: none; }
}

/* ========== Mobile bottom nav ========== */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: #fff;
  border-top: 1px solid var(--border);
  z-index: 100;
}
.mnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; color: var(--text-secondary);
  border: none; background: none; cursor: pointer;
}
.mnav-item.active { color: var(--primary); }
.mnav-item svg { color: inherit; }
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  .topnav { display: none; }
  .topbar-inner { padding: 0 12px; gap: 8px; }
}

/* ========== Auth pages ========== */
.auth-actions { display: flex; gap: 8px; align-items: center; margin-top: 24px; }
.auth-step-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* Stepper indicator (auth multi-step) */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-section); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.step.done .step-num { background: var(--success); color: #fff; }
.step.current .step-num { background: var(--primary); color: #fff; }
.step-label { font-size: 12px; color: var(--text-secondary); }
.step.current .step-label { color: var(--text-heading); font-weight: 600; }

/* ========== Drawer (mini-cart, slide-out) ========== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 900; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw;
  background: #fff; box-shadow: var(--shadow-lg); z-index: 901;
  display: flex; flex-direction: column;
  animation: slideInRight 0.2s ease;
}
.drawer-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.cart-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.cart-item:last-child { border-bottom: none; }
.cart-empty { text-align: center; padding: 40px 16px; color: var(--text-secondary); }

/* ========== AI floating widget ========== */
.ai-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 800;
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  color: #fff; border: none;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35), 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: ai-fab-in 0.4s ease-out;
}
.ai-fab svg { flex-shrink: 0; }
.ai-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45), 0 4px 10px rgba(0,0,0,0.1);
}
.ai-fab:active { transform: translateY(0) scale(1); }
.ai-fab::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.4;
  animation: ai-fab-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ai-fab-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes ai-fab-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}
.ai-fab .red-dot {
  position: absolute; top: 4px; right: 4px;
  width: 9px; height: 9px;
  background: var(--error); border-radius: 50%; border: 2px solid #fff;
}

@media (max-width: 768px) {
  .ai-fab {
    bottom: 72px;
    width: 48px; height: 48px;
  }
  .ai-fab svg { width: 20px; height: 20px; }
}

.ai-window {
  position: fixed; bottom: 24px; right: 24px; z-index: 800;
  width: 420px; height: 620px; max-height: calc(100vh - 48px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
  display: flex; flex-direction: column; overflow: hidden;
  animation: ai-win-in 0.18s ease-out;
}
@keyframes ai-win-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.ai-win-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  color: #fff;
  flex-shrink: 0;
}
.ai-win-header .ai-bot-avatar.sm { background: rgba(255,255,255,0.2); }
.ai-win-header .ai-bot-name { color: #fff; font-size: 13px; }
.ai-win-header .caption { color: rgba(255,255,255,0.85); display: inline-flex; align-items: center; gap: 4px; }
.ai-win-header .ic-btn { color: rgba(255,255,255,0.9); padding: 4px; border-radius: 6px; }
.ai-win-header .ic-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.ai-win-body { flex: 1; overflow-y: auto; padding: 14px; gap: 10px; }

@media (max-width: 600px) {
  .ai-window {
    width: calc(100vw - 24px); right: 12px;
    height: calc(100vh - 100px); bottom: 84px;
  }
}

/* ========== Misc helpers ========== */
.grow { flex: 1; min-width: 0; }
.no-pad { padding: 0; }
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-secondary); }
.empty-state h2, .empty-state h3 { color: var(--text-heading); margin: 16px 0 8px; }
.empty-state p { margin: 0 0 16px; }

/* Active order card */
.active-order { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.active-order-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

/* Banner already in styles.css; ensure spacing */
.banner + .banner { margin-top: 8px; }

/* Guest/home hero */
.guest-hero { background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 60%); padding: 48px; border-radius: 12px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Protocol step blocks (used by protocol pages) */
.protocol-step { padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.protocol-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 600; }
.proto-saved-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: var(--transition); }
.proto-saved-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* Education / events cards */
.edu-card, .event-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: var(--transition); display: flex; flex-direction: column; gap: 8px; }
.edu-card:hover, .event-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.event-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }

/* Account dropdown — augment existing rules */
.account-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 280px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
}

/* Thumb list */
.thumb-list { display: flex; gap: 4px; }
.thumb-list > * { width: 32px; height: 32px; border-radius: 4px; }
