/*
 * Tabbit shared design system
 * Tokens, layout primitives, navigation, and rules reused by multiple pages.
 * Page-specific rules live in static/css/pages/.
 */

:root {
  /* Brand */
  --color-brand-50: #fff3ed;
  --color-brand-100: #ffe2d3;
  --color-brand-500: #ff6b35;
  --color-brand-600: #eb5624;
  --color-brand-700: #c94318;
  --gradient-brand: linear-gradient(135deg, #ff6b35 0%, #ff8f4a 100%);
  --gradient-warm: linear-gradient(135deg, #ff6b35 0%, #ffb400 100%);
  --gradient-profile: linear-gradient(145deg, #667eea 0%, #764ba2 100%);

  /* Semantic colors */
  --color-text-strong: #1f2329;
  --color-text: #4e5969;
  --color-text-muted: #86909c;
  --color-text-disabled: #c9cdd4;
  --color-border: #e5e7eb;
  --color-border-subtle: #eef0f3;
  --color-surface: #ffffff;
  --color-surface-subtle: #fafbfc;
  --color-canvas: #f5f6f8;
  --color-hover: #fff7f2;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --text-10: 10px;
  --text-11: 11px;
  --text-12: 12px;
  --text-13: 13px;
  --text-14: 14px;
  --text-16: 16px;
  --text-20: 20px;
  --text-24: 24px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* 4px spacing grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Shape, elevation and motion */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(31, 35, 41, 0.06);
  --shadow-2: 0 6px 18px rgba(31, 35, 41, 0.09);
  --shadow-brand: 0 8px 20px rgba(255, 107, 53, 0.22);
  --duration-fast: 140ms;
  --duration-normal: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Line-height */
  --leading-tight: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 20;
  --z-sticky: 35;
  --z-modal: 40;
  --z-toast: 100;
  --z-overlay: 120;

  /* Status color surfaces */
  --color-success-surface: #ecfdf5;
  --color-warning-surface: #fffbeb;
  --color-danger-surface: #fef2f2;
  --color-info-surface: #eff6ff;

  /* Overlay & base colors */
  --overlay-bg: rgba(31, 35, 41, 0.44);
  --color-white: #ffffff;

  /* Layout */
  --header-height: 60px;
  --sidebar-width: 252px;
  --content-max: 1280px;
  --content-max-compact: 960px;
  --content-max-reading: 900px;
  --page-gutter: 24px;
  --mobile-gutter: 16px;
}

html {
  color-scheme: light;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-strong);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-scroll {
  padding: var(--page-gutter) !important;
}

.page-container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.page-container--compact {
  max-width: var(--content-max-compact);
}

.page-container--reading {
  max-width: var(--content-max-reading);
}

.mobile-page-gutter {
  padding-inline: var(--mobile-gutter) !important;
}

.app-toast-region {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  display: grid;
  gap: var(--space-2);
  z-index: 120;
}

.app-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #fff;
  background: #1f2937;
  box-shadow: var(--shadow-2);
  font-size: var(--text-12);
  line-height: 18px;
}

.page-state {
  width: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}

body[data-state-page] .page-state {
  min-height: 100vh;
}

.page-state-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.page-state-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  border-radius: 20px;
  color: var(--color-brand-600);
  background: var(--color-brand-50);
}

.page-state-icon svg {
  width: 30px;
  height: 30px;
}

.page-state-title {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--text-20);
  line-height: 28px;
  font-weight: var(--weight-bold);
}

.page-state-description {
  max-width: 420px;
  margin: var(--space-2) auto 0;
  color: var(--color-text-muted);
  font-size: var(--text-13);
  line-height: 20px;
}

.page-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

.page-state-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  font-size: var(--text-13);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.page-state-button--primary {
  color: #fff;
  border-color: transparent;
  background: var(--gradient-brand);
}

.page-state--loading .page-state-icon {
  border-radius: 50%;
  background: transparent;
  border: 3px solid var(--color-brand-100);
  border-top-color: var(--color-brand-500);
  animation: page-state-spin 0.8s linear infinite;
}

.page-state--loading .page-state-icon svg {
  display: none;
}

.page-state--forbidden .page-state-icon,
.page-state--error .page-state-icon,
.page-state--server-error .page-state-icon {
  color: var(--color-danger);
  background: #fef2f2;
}

.page-state-code {
  margin-bottom: var(--space-2);
  color: var(--color-brand-500);
  font-size: 52px;
  line-height: 1;
  font-weight: var(--weight-bold);
  letter-spacing: -0.04em;
}

.state-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.state-demo-grid .page-state {
  min-height: 340px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

@keyframes page-state-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .app-toast-region {
    right: var(--mobile-gutter);
    bottom: var(--mobile-gutter);
    left: var(--mobile-gutter);
  }

  .app-toast {
    min-width: 0;
    max-width: none;
  }

  .state-demo-grid {
    grid-template-columns: 1fr;
  }
}

button,
a,
input,
select,
textarea {
  transition:
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Desktop application sidebar */
.app-sidebar {
  width: var(--sidebar-width) !important;
  min-width: var(--sidebar-width) !important;
  position: relative;
  overflow-x: hidden !important;
  background:
    linear-gradient(180deg, #fff 0%, #fff 72%, #fcfcfd 100%) !important;
  border-color: var(--color-border-subtle) !important;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.app-sidebar:hover {
  scrollbar-color: #d9dde3 transparent;
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
}

.app-sidebar:hover::-webkit-scrollbar-thumb {
  background: #d9dde3;
}

.app-sidebar .sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 8px !important;
  padding: 14px !important;
  border-radius: var(--radius-xl) !important;
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 10px 24px rgba(93, 76, 184, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.app-sidebar .sidebar-profile img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.sidebar-profile-copy {
  min-width: 0;
  flex: 1;
}

.sidebar-profile-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-14);
  font-weight: var(--weight-bold);
}

.sidebar-profile-name span {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  font-size: var(--text-10);
}

.sidebar-profile-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: var(--text-11);
  font-weight: var(--weight-regular);
  opacity: 0.92;
}

.sidebar-profile-meta strong {
  font-weight: var(--weight-semibold);
}

.sidebar-profile-progress {
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-profile-progress i {
  display: block;
  width: 53%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fde047, #f59e0b);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.sidebar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  color: #fff;
  background: var(--gradient-warm);
  font-size: var(--text-12);
  font-weight: var(--weight-bold);
  text-decoration: none;
  box-shadow: var(--shadow-brand);
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: var(--text-14);
  line-height: 20px;
}

.sidebar-brand span {
  color: var(--color-text-muted);
  font-size: var(--text-11);
  line-height: 16px;
}

.sidebar-mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 2px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
  font-size: var(--text-12);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.sidebar-mode-switch:hover {
  color: var(--color-brand-600);
  background: var(--color-brand-50);
}

.sidebar-mode-switch svg {
  width: 15px;
  height: 15px;
}

.sidebar-menu {
  flex: 1;
  padding: 4px 12px 16px;
}

.sidebar-menu-group {
  margin-top: 14px;
}

.sidebar-menu-label {
  margin: 0 8px 6px;
  color: var(--color-text-muted);
  font-size: var(--text-11);
  font-weight: var(--weight-semibold);
  line-height: 18px;
  letter-spacing: 0.08em;
}

.sidebar-menu-list {
  display: grid;
  gap: 2px;
}

.sidebar-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--color-text);
  font-size: var(--text-13);
  font-weight: var(--weight-medium);
  line-height: 20px;
  text-decoration: none;
}

.sidebar-menu-item:hover {
  color: var(--color-brand-600);
  background: var(--color-hover);
}

.sidebar-menu-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.sidebar-menu-item[aria-current="page"] {
  color: var(--color-brand-600);
  background: var(--color-brand-50);
  border-color: var(--color-brand-100);
  font-weight: var(--weight-semibold);
}

.sidebar-menu-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 3px;
  width: 3px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-500);
}

.sidebar-menu-subitem {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 35px;
  color: var(--color-text-muted);
  font-size: var(--text-12);
}

.sidebar-menu-subitem svg {
  width: 15px;
  height: 15px;
}

.sidebar-menu-text {
  min-width: 0;
  flex: 1;
}

.sidebar-menu-badge {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  color: var(--color-brand-600);
  background: var(--color-brand-50);
  font-size: var(--text-10);
  font-weight: var(--weight-bold);
  line-height: 16px;
}

.app-sidebar .sidebar-section {
  padding-left: 12px !important;
  padding-right: 12px !important;
  margin-top: 14px !important;
}

.app-sidebar .sidebar-section.sidebar-section-first {
  margin-top: 6px !important;
}

.app-sidebar .sidebar-label {
  display: flex;
  align-items: center;
  min-height: 20px;
  gap: 5px;
  margin: 0 4px 6px !important;
  padding: 0 !important;
  color: var(--color-text-muted) !important;
  font-size: var(--text-11) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 20px;
  letter-spacing: 0.08em;
}

.app-sidebar .sidebar-label svg {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px;
}

.app-sidebar .sidebar-quick-grid {
  gap: 4px !important;
}

.app-sidebar .sidebar-quick-item {
  min-width: 0;
  min-height: 52px;
  gap: 8px !important;
  padding: 7px 6px !important;
  border: 1px solid transparent;
  border-radius: 12px !important;
  color: var(--color-text-strong);
}

.app-sidebar .sidebar-quick-item:hover {
  color: var(--color-brand-600);
  background: var(--color-hover) !important;
  border-color: var(--color-brand-100);
  transform: translateY(-1px);
}

.app-sidebar .sidebar-quick-item .ibox {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}

.app-sidebar .sidebar-quick-item > span {
  min-width: 0;
  font-size: var(--text-12) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 1.35;
}

.app-sidebar .sidebar-nav-item {
  min-height: 36px;
  padding: 8px 10px !important;
  border: 1px solid transparent;
  border-radius: 10px !important;
  color: var(--color-text);
  font-size: var(--text-13) !important;
  line-height: 18px;
}

.app-sidebar .sidebar-nav-item:hover {
  color: var(--color-brand-600) !important;
  background: var(--color-hover) !important;
}

.app-sidebar .sidebar-nav-item[aria-current="page"],
.app-sidebar .sidebar-nav-item.is-active,
.app-sidebar .sidebar-quick-item[aria-current="page"] {
  color: var(--color-brand-600) !important;
  background: var(--color-brand-50) !important;
  border-color: var(--color-brand-100);
  font-weight: var(--weight-semibold);
}

.app-sidebar .sidebar-nav-item[aria-current="page"]::before,
.app-sidebar .sidebar-nav-item.is-active::before {
  content: "";
  width: 3px;
  height: 16px;
  margin-left: -7px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-500);
}

.app-sidebar .sidebar-recommendations {
  min-height: 120px;
}

.app-sidebar .sidebar-rec-item {
  display: block;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}

.app-sidebar .sidebar-rec-item:hover {
  background: var(--color-surface-subtle) !important;
}

.app-sidebar .sidebar-rec-item svg {
  width: 12px !important;
  height: 12px !important;
  display: inline-block;
  vertical-align: -2px;
}

.app-sidebar .sidebar-rec-item > div:first-child {
  font-size: var(--text-12) !important;
  font-weight: var(--weight-medium);
  line-height: 18px !important;
}

.app-sidebar .sidebar-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto !important;
  padding: 8px 12px 10px !important;
  border-color: var(--color-border-subtle) !important;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 20px rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.app-sidebar .sidebar-footer .sidebar-menu-item {
  color: var(--color-text-muted);
}

.app-sidebar .sidebar-footer .sidebar-menu-item:hover,
.app-sidebar .sidebar-footer .sidebar-menu-item[aria-current="page"] {
  color: var(--color-brand-600);
}

.context-route-link {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  font-size: var(--text-12);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.context-route-link:hover {
  color: var(--color-brand-600);
  border-color: var(--color-brand-100);
  background: var(--color-brand-50);
}

.app-sidebar .sidebar-footer .sidebar-nav-item {
  color: var(--color-text-muted);
}

.app-sidebar .sidebar-footer .sidebar-nav-item:hover {
  color: var(--color-brand-600);
}

@media (max-width: 1023px) {
  :root {
    --sidebar-width: 236px;
    --page-gutter: 20px;
  }
}

@media (max-width: 767px) {
  :root {
    --page-gutter: 16px;
  }

  .page-scroll {
    padding: var(--page-gutter) !important;
  }
}

/* ── Global resets ─────────────────────────────────────── */

* { box-sizing: border-box; }

/* ── Global scrollbar ──────────────────────────────────── */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C9CDD4; border-radius: 3px; }

/* ── Scroll helpers ────────────────────────────────────── */

.scroll-x { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ── Gradient utilities ────────────────────────────────── */

.g-welcome { background: linear-gradient(135deg, #FF6B35 0%, #FFB400 100%); }
.g-user    { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.g-orange  { background: linear-gradient(135deg, #FF6B35 0%, #FF8F4A 100%); }

/* ── Animations ────────────────────────────────────────── */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .65; }
}

.pulse { animation: pulse 2s infinite; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card hover ────────────────────────────────────────── */

.card-h { transition: all .22s ease; }
.card-h:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .10) !important; }

/* ── Tab active indicator ──────────────────────────────── */

.tab-a { position: relative; transition: color .18s; }
.tab-a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-brand-500);
}

/* ── Input focus ───────────────────────────────────────── */

.if:focus { outline: none; border-color: var(--color-brand-500); box-shadow: 0 0 0 3px rgba(255, 107, 53, .14); }

/* ── Icon box ──────────────────────────────────────────── */

.ibox {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Safe area ─────────────────────────────────────────── */

.safe-b { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ── Line clamp ────────────────────────────────────────── */

.lc-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Chat send button ──────────────────────────────────── */

.btn-send { background: var(--gradient-brand); transition: all .2s; }
.btn-send:hover { box-shadow: 0 4px 14px rgba(255, 107, 53, .4); transform: scale(1.05); }

/* ── Chat input ────────────────────────────────────────── */

.input-chat { transition: all .2s; }
.input-chat:focus { border-color: var(--color-brand-500); box-shadow: 0 0 0 3px rgba(255, 107, 53, .12); }

/* ── Model selector ────────────────────────────────────── */

.model-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%2386909C'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* ── Quick tag ─────────────────────────────────────────── */

.qt { transition: all .2s; cursor: pointer; }
.qt:hover { background: var(--color-brand-50); border-color: var(--color-brand-500); color: var(--color-brand-500); }

/* ── Template gradients (g-tpl-*) ──────────────────────── */

.g-tpl-1  { background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%); }
.g-tpl-2  { background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%); }
.g-tpl-3  { background: linear-gradient(135deg, #F43F5E 0%, #EC4899 100%); }
.g-tpl-4  { background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%); }
.g-tpl-5  { background: linear-gradient(135deg, #10B981 0%, #14B8A6 100%); }
.g-tpl-6  { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); }
.g-tpl-7  { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.g-tpl-8  { background: linear-gradient(135deg, #F97316 0%, #EA580C 100%); }
.g-tpl-9  { background: linear-gradient(135deg, #84CC16 0%, #65A30D 100%); }
.g-tpl-10 { background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%); }
.g-tpl-11 { background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%); }
.g-tpl-12 { background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%); }

/* ── Card gradients (g-card-*) ─────────────────────────── */

.g-card-1 { background: linear-gradient(135deg, #EF4444 0%, #EC4899 100%); }
.g-card-2 { background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%); }
.g-card-3 { background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%); }
.g-card-4 { background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%); }
.g-card-5 { background: linear-gradient(135deg, #10B981 0%, #14B8A6 100%); }
.g-card-6 { background: linear-gradient(135deg, #F43F5E 0%, #EF4444 100%); }
.g-card-7 { background: linear-gradient(135deg, #0EA5E9 0%, #3B82F6 100%); }
.g-card-8 { background: linear-gradient(135deg, #84CC16 0%, #22C55E 100%); }

/* ── Data table (canonical) ────────────────────────────── */

table.data-table { border-collapse: collapse; width: 100%; font-size: 13px; }

table.data-table thead th {
  background: var(--color-surface-subtle, #F7F8FA);
  padding: 12px;
  font-size: 12px;
  color: var(--color-text-muted, #86909C);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
}

table.data-table tbody td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-subtle, #EEF0F3);
}

table.data-table tr:hover { background: #FFF9F7; transition: background .15s; }

/* ── Shared sidebar profile utilities ──────────────────── */

.sidebar-badge-bg { background: linear-gradient(135deg, #FCD34D, #F59E0B); }
.sidebar-progress-track { background: rgba(255, 255, 255, .28); }
.sidebar-progress-fill { width: 53%; background: linear-gradient(90deg, #FDE047, #F59E0B); }

/* ── Shared select arrow utility ───────────────────────── */

.select-arrow {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* ── Light brand background utility ────────────────────── */

.g-orange-light { background: rgba(255, 107, 53, 0.1); }
