:root {
  --font-main: 'Mulish', system-ui, -apple-system, sans-serif;
  --font-mono: 'PT Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg-page: #f3f6fb;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --border: #e6ebf2;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --orange-400: #fb923c;
  --orange-500: #f59e0b;
  --orange-600: #d97706;
  --green-500: #10b981;
  --red-500: #ef4444;
  --radius-card: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -14px rgba(15, 23, 42, 0.14);
  --shadow-card-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 22px 40px -20px rgba(15, 23, 42, 0.28);
  --grad-header: linear-gradient(135deg, var(--blue-500) 0%, var(--indigo-600) 100%);
  --grad-accent: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-600) 100%);
  /* Premium layer tokens: reuse these in page-level CSS instead of hardcoded values */
  --ink: #0b1220;
  --line: rgba(15, 23, 42, 0.07);
  --field-line: #e3e8f0;
  --field-bg: #fbfcfe;
  --label-muted: #8a97ab;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-800: #3730a3;
  --indigo-soft: rgba(99, 102, 241, 0.1);
  --indigo-softer: rgba(99, 102, 241, 0.06);
  --accent-grad: linear-gradient(135deg, var(--blue-500) 0%, var(--indigo-600) 100%);
  --accent-glow: 0 10px 22px -10px rgba(79, 70, 229, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --focus-ring: 0 0 0 4px rgba(99, 102, 241, 0.14);
  --shadow-lift: var(--shadow-card-hover);
  --shadow-pop: 0 4px 10px rgba(15, 23, 42, 0.05), 0 24px 48px -16px rgba(15, 23, 42, 0.25);
  --shadow-seg: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px -4px rgba(15, 23, 42, 0.18);
  --page-glow:
    radial-gradient(1100px 520px at 8% -10%, rgba(99, 102, 241, 0.10), transparent 60%),
    radial-gradient(900px 460px at 95% -6%, rgba(14, 165, 233, 0.09), transparent 58%),
    linear-gradient(180deg, #f7f9fd 0%, #f1f4fa 100%);
  --check-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Reset для сторінок аналітики (не ламає iframe/shell) */
.u-analytics-reset * { box-sizing: border-box; }

body.u-page {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
}

.u-page a { color: var(--blue-600); }
.u-page a:hover { color: var(--blue-700); }

/* Контейнер контенту */
.u-container {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 3rem;
}

.u-container-wide {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 3rem;
}

/* Шапка сторінки (світлий фон, темний текст) */
.u-page-header {
  text-align: center;
  padding: 2rem 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.u-page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.u-page-header p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.u-page-header code {
  background: rgba(59, 130, 246, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* Картки */
.u-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
}

.u-card-tight { padding: 0.875rem 1rem; }

/* Сітка метрик */
.u-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .u-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .u-stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .u-stats-grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* Плитка метрики (граничний акцент + білий фон) */
.u-stat-tile {
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--blue-500);
}

.u-stat-tile--blue { border-left-color: var(--blue-600); }
.u-stat-tile--orange { border-left-color: var(--orange-500); }
.u-stat-tile--green { border-left-color: var(--green-500); }
.u-stat-tile--red { border-left-color: var(--red-500); }

.u-stat-tile-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.u-stat-tile-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

/* Градієнтні міні-картки (як було в ecom_stats — тепер синій/помаранчевий) */
.u-stat-gradient {
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: #fff;
  box-shadow: var(--shadow-card);
}

.u-stat-gradient--blue { background: var(--grad-header); }
.u-stat-gradient--orange { background: var(--grad-accent); }
.u-stat-gradient--green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.u-stat-gradient--rose { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }

/* Toolbar / фільтри */
.u-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.u-input,
.u-toolbar input[type="date"],
.u-toolbar input[type="text"],
.u-toolbar select {
  font-family: var(--font-main);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  background: var(--bg-muted);
  color: var(--text-primary);
}

.u-input:focus,
.u-toolbar input:focus,
.u-toolbar select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.u-btn {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.u-btn--primary {
  background: var(--blue-600);
  color: #fff;
}
.u-btn--primary:hover { background: var(--blue-700); }

.u-btn--orange {
  background: var(--orange-500);
  color: #fff;
}
.u-btn--orange:hover { background: var(--orange-600); }

.u-filter-btn {
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.u-filter-btn:hover {
  border-color: var(--blue-500);
  color: var(--blue-600);
}

.u-filter-btn.is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--blue-500);
  color: var(--blue-700);
}

.u-filter-btn.is-active-warn {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--orange-500);
  color: var(--orange-600);
}

/* Search inputs with an overlaid Material icon need a protected text inset. */
:where(
  .oe-input-wrap,
  .ar-picker-search-wrap,
  .tg-search-wrap,
  .mo-search-bar
) > input {
  padding-inline-start: 2.75rem !important;
}

:where(
  .flow-ms-search,
  .tws-search,
  .tws-json-search,
  .mo-dx-search,
  .tgn-search-wrap
) > input {
  padding-inline-start: 2.25rem !important;
}

/* Єдиний toolbar фільтрів (explorer / logs / staff) */
.u-filter-toolbar {
  justify-content: flex-start;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
}

.u-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.u-filter-field > label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1;
  min-height: 0.8rem;
}

.u-filter-field--grow {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}

.u-filter-field--select {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}

.u-filter-field--date {
  flex: 0 0 150px;
  width: 150px;
}

.u-filter-toolbar .u-filter-field input[type="date"],
.u-filter-toolbar .u-filter-field input[type="text"],
.u-filter-toolbar .u-filter-field input[type="search"],
.u-filter-toolbar .u-filter-field select:not(.tomselected) {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-width: 0;
  margin: 0;
  line-height: 1.2;
}

.u-filter-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  height: 40px;
  align-items: center;
}

.u-filter-preset {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0 0.7rem;
  height: 30px;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.u-filter-preset:hover,
.u-filter-preset.is-active {
  border-color: var(--blue-500);
  color: var(--blue-700);
  background: rgba(59, 130, 246, 0.08);
}

/* Заголовок секції в картці */
.u-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.u-title-gradient {
  background: var(--grad-header);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Таблиці (прості, не DataTables) */
.u-table-wrap {
  overflow: auto;
  max-height: 620px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.u-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.u-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.u-table tbody td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  vertical-align: middle;
}

.u-table tbody tr:nth-child(even) > td {
  background-color: #f8fafc;
}

.u-table tbody tr:nth-child(odd) > td {
  background-color: #ffffff;
}

.u-table tbody tr:hover > td {
  background-color: rgba(59, 130, 246, 0.06);
}

/* Zebra — усі таблиці на сторінках analytics_uah (unified_styles підключено) */
table tbody > tr:nth-child(even):not(.empty-row):not(.is-hidden):not(.order-group-head) > td {
  background-color: #f8fafc;
}

table tbody > tr:nth-child(odd):not(.empty-row):not(.is-hidden):not(.order-group-head) > td {
  background-color: #ffffff;
}

table tbody > tr:not(.empty-row):not(.is-hidden):not(.order-group-head):hover > td {
  background-color: rgba(59, 130, 246, 0.06);
}

/* Таблиця з блакитним заголовком (flow, тощо) */
.u-table--header-grad thead th {
  background: var(--grad-header);
  color: #fff;
  border-bottom: none;
}

.u-table--header-grad thead th:first-child { border-radius: 0; }

.u-row-ok > td { background: rgba(16, 185, 129, 0.06); }
.u-row-bad > td { background: rgba(239, 68, 68, 0.06); }
.u-row-ok:hover > td, .u-row-bad:hover > td { background: rgba(59, 130, 246, 0.06); }

/* Плашки в таблицях / JS-шаблонах */
.u-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.u-pill .material-icons-outlined { font-size: 14px; }
.u-pill--ok { background: rgba(16, 185, 129, 0.15); color: #047857; }
.u-pill--bad { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.u-pill--info { background: rgba(59, 130, 246, 0.15); color: var(--blue-700); }
.u-pill--muted { background: rgba(100, 116, 139, 0.12); color: var(--text-secondary); }

/* Макет flow_realtime / flow_yesterday (сітка метрик) */
.flow-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.flow-block-2 {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.flow-span-2 { grid-column: span 2; }
.flow-block-1 { display: grid; gap: 1rem; }
.flow-pies {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.flow-pie-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}
.flow-pie-panel p {
  font-size: 0.7rem;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.flow-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.flow-date-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-700);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.flow-range-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .flow-range-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .flow-range-grid { grid-template-columns: repeat(4, 1fr); }
}
.flow-range-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.flow-range-cell .flow-range-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}
.flow-range-cell .flow-range-metric {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}
.flow-range-cell .flow-range-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}
.flow-range-cell .flow-range-ok {
  font-size: 0.68rem;
  color: #047857;
  margin: 0.25rem 0 0;
}
.u-flow-accent-blue { color: var(--blue-600); }
.u-flow-accent-green { color: #047857; }
.u-flow-accent-orange { color: var(--orange-600); }
.u-flow-accent-red { color: var(--red-500); }

.u-panel-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: #047857;
  text-align: center;
}
.u-rec-card {
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}
.u-rec-card--high {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
}
.u-rec-card--med {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.u-flex-row-start {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.u-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.u-flex-1 { flex: 1; min-width: 0; }
.u-font-semibold { font-weight: 600; }
.u-text-sm { font-size: 0.875rem; }
.u-ml-2 { margin-left: 0.5rem; }
.u-text-right { text-align: right; }
.u-shortage-card {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}
.u-shortage-card--severe {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.28);
}
.u-shortage-card--warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}
.u-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
}
.u-tag--bad { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.u-tag--warn { background: rgba(245, 158, 11, 0.2); color: var(--orange-600); }

.u-panel-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--blue-700);
  text-align: center;
}

.u-card-list-item {
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.u-card-list-item:last-child { margin-bottom: 0; }
.u-card-list-item--bad { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.28); }
.u-card-list-item--warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.32); }
.u-card-list-item--good { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.28); }
.u-card-list-item--good-strong { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.42); }

.u-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 1024px) {
  .u-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .flow-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .flow-block-2,
  .flow-span-2 {
    grid-column: auto;
    width: 100%;
  }
  .flow-block-2 {
    grid-template-columns: 1fr;
  }
}

.u-text-center { text-align: center; }
.u-mb-4 { margin-bottom: 1rem; }
.u-mb-6 { margin-bottom: 1.5rem; }
.u-mt-2 { margin-top: 0.5rem; }
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap; }
.u-gap-2 { gap: 0.5rem; }
.u-space-y > * + * { margin-top: 1.25rem; }

/* Бейджі */
.u-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.u-badge--paid { background: rgba(16, 185, 129, 0.15); color: #047857; }
.u-badge--fail { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.u-badge--pending { background: rgba(59, 130, 246, 0.15); color: var(--blue-700); }
.u-badge--nev { background: rgba(245, 158, 11, 0.2); color: var(--orange-600); }
.u-badge-type-v { background: rgba(16, 185, 129, 0.12); color: #047857; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; }
.u-badge-type-n { background: rgba(245, 158, 11, 0.15); color: var(--orange-600); font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; }

/* Рядки маршрутів */
.u-routes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .u-routes-row { grid-template-columns: 1fr; }
}

.u-route-card {
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.u-route-card-label { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.25rem; }
.u-route-card-value { font-size: 1.35rem; font-weight: 800; color: var(--blue-600); }
.u-route-card--orange .u-route-card-value { color: var(--orange-600); }
.u-route-card--green .u-route-card-value { color: #047857; }

/* Панель таблиці з тулбаром */
.u-table-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.u-table-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}

.u-table-panel-toolbar h2 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Row highlight */
.u-row-nev { background: rgba(245, 158, 11, 0.06); }
.u-row-nev:hover { background: rgba(245, 158, 11, 0.12); }

.u-error-text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--red-500);
  font-size: 0.72rem;
}

/* Лоадер / спінер */
.u-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: u-spin 0.9s linear infinite;
}

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

.u-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.u-loading-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

/* Авторизація (glass на світлому градієнті) */
body.u-auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background: linear-gradient(160deg, #e0f2fe 0%, #f0f4f8 45%, #ffedd5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--text-primary);
}

.u-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  padding: 2rem 2rem 1.75rem;
}

.u-auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.u-auth-form .u-form-group { margin-bottom: 1rem; }
.u-auth-form label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.u-auth-form input[type="text"],
.u-auth-form input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  background: var(--bg-muted);
  color: var(--text-primary);
}

.u-auth-form input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.u-auth-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--grad-header);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: filter 0.15s, transform 0.1s;
}

.u-auth-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

.u-auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0;
  font-weight: 500;
}

.u-auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-600);
}

.u-auth-error {
  color: var(--red-500);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Shell index.php (після логіну) */
body.u-shell {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-page);
  overflow: hidden;
  --sidebar-width: 190px;
  --sidebar-width-collapsed: 60px;
  --shell-header-height: 64px;
}

.u-shell-header {
  background: var(--grad-header);
  color: #fff;
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-card);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.u-shell-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.u-shell-header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.u-shell-logout {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.u-shell-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

.u-burger {
  display: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.u-shell-wrap {
  display: flex;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--shell-header-height);
  min-height: 0;
  overflow: hidden;
}

.u-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
  transition: width 0.22s ease, transform 0.25s ease;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
}

.u-sidebar.is-collapsed {
  width: var(--sidebar-width-collapsed);
}

.u-sidebar-backdrop {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--shell-header-height);
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 998;
  border: none;
  padding: 0;
  cursor: pointer;
}

.u-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
  flex-shrink: 0;
  min-height: 52px;
}

.u-sidebar-head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.u-sidebar.is-collapsed .u-sidebar-head h2 {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.u-sidebar-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.u-sidebar-toggle:hover {
  background: var(--bg-muted);
  color: var(--blue-600);
  border-color: var(--blue-400);
}

.u-sidebar-toggle .material-icons-outlined {
  font-size: 20px;
  transition: transform 0.22s ease;
}

.u-sidebar.is-collapsed .u-sidebar-toggle .material-icons-outlined {
  transform: rotate(180deg);
}

.u-menu-section { margin-bottom: 0.85rem; }

.u-menu-section h3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem 0.4rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
}

.u-sidebar.is-collapsed .u-menu-section h3 {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  font-size: 0;
  letter-spacing: 0;
  border-bottom-color: transparent;
  margin-bottom: 0.15rem;
}

.u-sidebar.is-collapsed .u-menu-section h3 .material-icons-outlined {
  font-size: 14px !important;
  opacity: 0.45;
}

.u-menu-section-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.u-sidebar.is-collapsed .u-menu-section-label {
  display: none;
}

.u-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 3px solid transparent;
  font-size: 0.8125rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.u-sidebar.is-collapsed .u-menu-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  border-left-width: 0;
  position: relative;
}

.u-menu-item .material-icons-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.u-menu-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.u-menu-badge {
  flex-shrink: 0;
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.u-sidebar.is-collapsed .u-menu-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  min-width: 1rem;
  padding: 0 0.3rem;
  font-size: 0.625rem;
}

.u-sidebar.is-collapsed .u-menu-label {
  display: none;
}

.u-menu-item:hover {
  background: var(--bg-muted);
  color: var(--blue-600);
  border-left-color: var(--blue-400);
}

.u-sidebar.is-collapsed .u-menu-item:hover {
  border-left-color: transparent;
}

.u-menu-item.is-active {
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-700);
  border-left-color: var(--blue-500);
  font-weight: 700;
}

.u-shell-main { flex: 1; position: relative; min-width: 0; min-height: 0; }
.u-shell-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-page);
}

.u-dashboard {
  padding: 2rem;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.u-dashboard h2 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.u-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.u-dash-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-500);
}

.u-dash-card h3 {
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.u-dash-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  body.u-shell {
    --sidebar-width: min(86vw, 280px);
  }

  .u-burger { display: inline-flex; align-items: center; justify-content: center; }

  .u-shell-header-content {
    max-width: none;
    gap: 0.5rem;
  }

  .u-shell-header h1 {
    font-size: 1rem;
    gap: 0.35rem !important;
  }

  .u-shell-header h1 span[style*="font-size:0.78em"] {
    display: none;
  }

  .u-shell-header-right {
    gap: 0.35rem;
  }

  .u-lang-selector,
  .u-currency-selector {
    min-width: 3.75rem !important;
  }

  .u-lang-selector select,
  .u-currency-selector select {
    min-width: 3.75rem !important;
    padding: 0.32rem 0.45rem 0.32rem 1.65rem !important;
  }

  .u-lang-selector .material-icons-outlined,
  .u-currency-selector .material-icons-outlined {
    left: 0.45rem !important;
  }

  .u-shell-logout {
    padding: 0.38rem 0.55rem !important;
  }

  .u-shell-logout .u-logout-label {
    display: none;
  }

  .u-sidebar {
    position: fixed;
    left: 0;
    top: var(--shell-header-height);
    height: calc(100vh - var(--shell-header-height));
    height: calc(100dvh - var(--shell-header-height));
    z-index: 999;
    width: min(86vw, 280px) !important;
  }

  .u-sidebar.is-collapsed {
    width: min(86vw, 280px) !important;
  }

  .u-sidebar.is-collapsed .u-menu-label,
  .u-sidebar.is-collapsed .u-menu-section-label,
  .u-sidebar.is-collapsed .u-sidebar-head h2 {
    display: block;
    opacity: 1;
    width: auto;
  }

  .u-sidebar.is-collapsed .u-menu-item {
    justify-content: flex-start;
    padding: 0.58rem 0.85rem;
    border-left-width: 3px;
  }

  .u-sidebar.is-hidden-mobile {
    transform: translateX(-105%);
  }

  .u-sidebar-toggle {
    display: none;
  }

  .u-sidebar-backdrop.is-visible {
    display: block;
  }

  .u-shell-main { width: 100%; }

  body.u-page {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .u-container,
  .u-container-wide {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .u-shell-header {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .u-lang-selector select,
  .u-currency-selector select {
    max-width: 3.25rem;
    font-size: 0.75rem !important;
  }
}

/* Горизонтальний скрол таблиць на мобільних */
@media (max-width: 768px) {
  .u-table-scroll,
  .mo-table-wrap,
  .u-page .table-responsive,
  body.u-page table {
    -webkit-overflow-scrolling: touch;
  }

  body.u-page .mo-table-wrap,
  body.u-page .u-table-scroll {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    border-radius: 10px;
  }
}

/* -------- BeTrader legacy utilities (scoped; замість cdn.tailwindcss.com) -------- */
body.u-betrader-page {
  font-family: var(--font-main);
}
body.u-betrader-page .flex { display: flex; }
body.u-betrader-page .inline-flex { display: inline-flex; }
body.u-betrader-page .grid { display: grid; }
body.u-betrader-page .hidden { display: none; }
body.u-betrader-page .block { display: block; }
body.u-betrader-page .flex-col { flex-direction: column; }
body.u-betrader-page .flex-1 { flex: 1 1 0%; }
body.u-betrader-page .items-start { align-items: flex-start; }
body.u-betrader-page .items-center { align-items: center; }
body.u-betrader-page .justify-center { justify-content: center; }
body.u-betrader-page .justify-between { justify-content: space-between; }
body.u-betrader-page .flex-wrap { flex-wrap: wrap; }

body.u-betrader-page .gap-1 { gap: 0.25rem; }
body.u-betrader-page .gap-1\.5 { gap: 0.375rem; }
body.u-betrader-page .gap-2 { gap: 0.5rem; }
body.u-betrader-page .gap-3 { gap: 0.75rem; }
body.u-betrader-page .gap-4 { gap: 1rem; }
body.u-betrader-page .gap-6 { gap: 1.5rem; }

body.u-betrader-page .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
body.u-betrader-page .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.u-betrader-page .col-span-3 { grid-column: span 3 / span 3; }

body.u-betrader-page .space-y-1 > * + * { margin-top: 0.25rem; }
body.u-betrader-page .space-y-4 > * + * { margin-top: 1rem; }
body.u-betrader-page .space-y-6 > * + * { margin-top: 1.5rem; }

body.u-betrader-page .w-full { width: 100%; }
body.u-betrader-page .w-2 { width: 0.5rem; }
body.u-betrader-page .w-4 { width: 1rem; }
body.u-betrader-page .w-24 { width: 6rem; }
body.u-betrader-page .h-2 { height: 0.5rem; }
body.u-betrader-page .h-4 { height: 1rem; }
body.u-betrader-page .h-24 { height: 6rem; }
body.u-betrader-page .min-w-full { min-width: 100%; }
body.u-betrader-page .max-w-6xl { max-width: 72rem; }
body.u-betrader-page .max-w-md { max-width: 28rem; }
body.u-betrader-page .max-h-\[400px\] { max-height: 400px; }

body.u-betrader-page .m-0 { margin: 0; }
body.u-betrader-page .max-h-48 { max-height: 12rem; }
body.u-betrader-page .mx-auto { margin-left: auto; margin-right: auto; }
body.u-betrader-page .mb-2 { margin-bottom: 0.5rem; }
body.u-betrader-page .mb-3 { margin-bottom: 0.75rem; }
body.u-betrader-page .mb-4 { margin-bottom: 1rem; }
body.u-betrader-page .mb-6 { margin-bottom: 1.5rem; }
body.u-betrader-page .mr-1 { margin-right: 0.25rem; }
body.u-betrader-page .mr-2 { margin-right: 0.5rem; }
body.u-betrader-page .mt-3 { margin-top: 0.75rem; }
body.u-betrader-page .-mt-4 { margin-top: -1rem; }
body.u-betrader-page .-mr-4 { margin-right: -1rem; }
body.u-betrader-page .pt-4 { padding-top: 1rem; }

body.u-betrader-page .p-3 { padding: 0.75rem; }
body.u-betrader-page .p-4 { padding: 1rem; margin-bottom: 20px; }
body.u-betrader-page .p-6 { padding: 1.5rem; margin-bottom: 20px !important; }
body.u-betrader-page .p-8 { padding: 2rem; }
body.u-betrader-page .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
body.u-betrader-page .px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
body.u-betrader-page .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
body.u-betrader-page .px-4 { padding-left: 1rem; padding-right: 1rem; }
body.u-betrader-page .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
body.u-betrader-page .py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
body.u-betrader-page .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
body.u-betrader-page .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
body.u-betrader-page .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
body.u-betrader-page .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

body.u-betrader-page .text-left { text-align: left; }
body.u-betrader-page .text-center { text-align: center; }
body.u-betrader-page .text-right { text-align: right; }
body.u-betrader-page .text-xs { font-size: 0.75rem; line-height: 1rem; }
body.u-betrader-page .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
body.u-betrader-page .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
body.u-betrader-page .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
body.u-betrader-page .text-2xl { font-size: 1.5rem; line-height: 2rem; }
body.u-betrader-page .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
body.u-betrader-page .text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
body.u-betrader-page .text-5xl { font-size: 3rem; line-height: 1; }
body.u-betrader-page .font-medium { font-weight: 500; }
body.u-betrader-page .font-semibold { font-weight: 600; }
body.u-betrader-page .font-bold { font-weight: 700; }
body.u-betrader-page .uppercase { text-transform: uppercase; }
body.u-betrader-page .tracking-wider { letter-spacing: 0.05em; }
body.u-betrader-page .align-middle { vertical-align: middle; }

body.u-betrader-page .text-white { color: #fff; }
body.u-betrader-page .text-gray-600 { color: #475569; }
body.u-betrader-page .text-gray-700 { color: #334155; }
body.u-betrader-page .text-gray-800 { color: #1e293b; }
body.u-betrader-page .text-red-700 { color: #b91c1c; }
body.u-betrader-page .text-red-800 { color: #991b1b; }
body.u-betrader-page .text-green-800 { color: #166534; }
body.u-betrader-page .text-yellow-800 { color: #854d0e; }

body.u-betrader-page .font-sans { font-family: var(--font-main); }

body.u-betrader-page .bg-white { background-color: #fff; }
body.u-betrader-page .bg-gray-100 { background-color: #f1f5f9; }
body.u-betrader-page .bg-red-100 { background-color: #fee2e2; }
body.u-betrader-page .bg-green-100 { background-color: #dcfce7; }
body.u-betrader-page .bg-yellow-100 { background-color: #fef9c3; }
body.u-betrader-page .bg-blue-500 { background-color: var(--blue-500); }
body.u-betrader-page .bg-green-500 { background-color: var(--green-500); }
body.u-betrader-page .bg-orange-500 { background-color: var(--orange-500); }
body.u-betrader-page .bg-red-500 { background-color: var(--red-500); }
body.u-betrader-page .bg-white\/10 { background-color: rgba(255,255,255,0.1); }
body.u-betrader-page .bg-white\/80 { background-color: rgba(255,255,255,0.8); }

body.u-betrader-page .bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-from, transparent), var(--tw-to, transparent)); }
body.u-betrader-page .bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-from, transparent), var(--tw-to, transparent)); }
body.u-betrader-page .from-blue-500 { --tw-from: #3b82f6; }
body.u-betrader-page .from-green-500 { --tw-from: #22c55e; }
body.u-betrader-page .from-orange-500 { --tw-from: #f97316; }
body.u-betrader-page .from-purple-500 { --tw-from: #3b82f6; }
body.u-betrader-page .from-purple-50 { --tw-from: #eff6ff; }
body.u-betrader-page .to-indigo-600 { --tw-to: #4f46e5; }
body.u-betrader-page .to-emerald-600 { --tw-to: #059669; }
body.u-betrader-page .to-amber-600 { --tw-to: #d97706; }
body.u-betrader-page .to-pink-500 { --tw-to: #2563eb; }
body.u-betrader-page .to-indigo-50 { --tw-to: #f8fafc; }

body.u-betrader-page .rounded-md { border-radius: 0.375rem; }
body.u-betrader-page .rounded-lg { border-radius: 0.5rem; }
body.u-betrader-page .rounded-xl { border-radius: 0.75rem; }
body.u-betrader-page .rounded-2xl { border-radius: 1rem; }
body.u-betrader-page .rounded-full { border-radius: 9999px; }

body.u-betrader-page .border { border-width: 1px; border-style: solid; border-color: var(--border); }
body.u-betrader-page .border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--border); }
body.u-betrader-page .border-gray-300 { border-color: #cbd5e1; }
body.u-betrader-page .border-purple-100 { border-color: #dbeafe; }
body.u-betrader-page .border-red-400 { border-color: #f87171; }

body.u-betrader-page .shadow-sm { box-shadow: 0 1px 2px rgba(15,23,42,0.06); }
body.u-betrader-page .shadow-xl { box-shadow: 0 20px 25px -5px rgba(15,23,42,0.08); }

body.u-betrader-page .relative { position: relative; }
body.u-betrader-page .absolute { position: absolute; }
body.u-betrader-page .sticky { position: sticky; }
body.u-betrader-page .top-0 { top: 0; }
body.u-betrader-page .right-0 { right: 0; }
body.u-betrader-page .right-4 { right: 1rem; }
body.u-betrader-page .top-1\/2 { top: 50%; }
body.u-betrader-page .z-10 { z-index: 10; }
body.u-betrader-page .transform.-translate-y-1\/2 { transform: translateY(-50%); }
body.u-betrader-page .transform:not(.-translate-y-1\/2) { transform: translateZ(0); }

body.u-betrader-page .overflow-hidden { overflow: hidden; }
body.u-betrader-page .overflow-auto { overflow: auto; }
body.u-betrader-page .cursor-pointer { cursor: pointer; }
body.u-betrader-page .opacity-80 { opacity: 0.8; }
body.u-betrader-page .opacity-90 { opacity: 0.9; }
body.u-betrader-page .blur-2xl { filter: blur(40px); }

body.u-betrader-page .table-auto { table-layout: auto; }

body.u-betrader-page .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 200ms; }
body.u-betrader-page .transition-colors { transition-property: color, background-color, border-color; transition-duration: 200ms; }
body.u-betrader-page .duration-200 { transition-duration: 200ms; }

body.u-betrader-page .focus\:outline-none:focus { outline: 2px solid transparent; }
body.u-betrader-page .focus\:ring-2:focus,
body.u-betrader-page .focus\:ring-purple-500:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35); }

body.u-betrader-page .hover\:bg-red-600:hover { background-color: #dc2626; }
body.u-betrader-page .hover\:bg-blue-600:hover { background-color: #2563eb; }
body.u-betrader-page .hover\:bg-green-600:hover { background-color: #16a34a; }
body.u-betrader-page .hover\:bg-orange-600:hover { background-color: #ea580c; }
body.u-betrader-page .hover\:bg-gray-200:hover { background-color: #e2e8f0; }
body.u-betrader-page .hover\:bg-white\/90:hover { background-color: rgba(255,255,255,0.9); }
body.u-betrader-page .hover\:from-purple-600:hover { --tw-from: #2563eb; }
body.u-betrader-page .hover\:to-pink-600:hover { --tw-to: #1d4ed8; }

body.u-betrader-page .accent-blue-600 { accent-color: #2563eb; }
body.u-betrader-page .accent-green-600 { accent-color: #16a34a; }
body.u-betrader-page .accent-indigo-600 { accent-color: #4f46e5; }
body.u-betrader-page .accent-orange-600 { accent-color: #ea580c; }
body.u-betrader-page .accent-rose-600 { accent-color: #e11d48; }

@media (min-width: 640px) {
  body.u-betrader-page .sm\:flex-row { flex-direction: row; }
  body.u-betrader-page .sm\:inline { display: inline; }
  body.u-betrader-page .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.u-betrader-page .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.u-betrader-page .sm\:gap-2 { gap: 0.5rem; }
  body.u-betrader-page .sm\:gap-4 { gap: 1rem; }
  body.u-betrader-page .sm\:gap-6 { gap: 1.5rem; }
  body.u-betrader-page .sm\:p-4 { padding: 1rem; }
  body.u-betrader-page .sm\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
  body.u-betrader-page .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  body.u-betrader-page .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  body.u-betrader-page .sm\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  body.u-betrader-page .sm\:right-6 { right: 1.5rem; }
  body.u-betrader-page .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  body.u-betrader-page .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  body.u-betrader-page .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
}

/* Розширення shim для traders_group_17.php */
body.u-betrader-page .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.u-betrader-page .col-span-full { grid-column: 1 / -1; }
body.u-betrader-page .max-w-7xl { max-width: 80rem; }
body.u-betrader-page .mb-1 { margin-bottom: 0.25rem; }
body.u-betrader-page .ml-2 { margin-left: 0.5rem; }
body.u-betrader-page .ml-6 { margin-left: 1.5rem; }
body.u-betrader-page .mt-1 { margin-top: 0.25rem; }
body.u-betrader-page .mt-2 { margin-top: 0.5rem; }
body.u-betrader-page .mt-4 { margin-top: 1rem; }
body.u-betrader-page .mt-6 { margin-top: 1.5rem; }
body.u-betrader-page .pb-3 { padding-bottom: 0.75rem; }
body.u-betrader-page .pl-3 { padding-left: 0.75rem; }
body.u-betrader-page .pl-10 { padding-left: 2.5rem; }
body.u-betrader-page .pr-4 { padding-right: 1rem; }
body.u-betrader-page .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
body.u-betrader-page .py-12 { padding-top: 3rem; padding-bottom: 3rem; }
body.u-betrader-page .h-8 { height: 2rem; }
body.u-betrader-page .h-12 { height: 3rem; }
body.u-betrader-page .w-8 { width: 2rem; }
body.u-betrader-page .w-12 { width: 3rem; }
body.u-betrader-page .h-full { height: 100%; }
body.u-betrader-page .bg-gray-200 { background-color: #e2e8f0; }
body.u-betrader-page .backdrop-blur-sm { backdrop-filter: blur(4px); }
body.u-betrader-page .pointer-events-none { pointer-events: none; }
body.u-betrader-page .opacity-75 { opacity: 0.75; }
body.u-betrader-page .border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
body.u-betrader-page .border-gray-200 { border-color: #e2e8f0; }
body.u-betrader-page .border-purple-600 { border-color: var(--blue-600); }
body.u-betrader-page .left-0 { left: 0; }
body.u-betrader-page .inset-y-0 { top: 0; bottom: 0; }

body.u-betrader-page .text-blue-600 { color: var(--blue-600); }
body.u-betrader-page .text-purple-600 { color: var(--blue-600); }
body.u-betrader-page .text-gray-400 { color: #94a3b8; }
body.u-betrader-page .text-gray-500 { color: #64748b; }
body.u-betrader-page .text-gray-900 { color: #0f172a; }
body.u-betrader-page .text-green-600 { color: #059669; }
body.u-betrader-page .text-orange-600 { color: var(--orange-600); }
body.u-betrader-page .text-red-600 { color: #dc2626; }
body.u-betrader-page .placeholder-gray-400::placeholder { color: #94a3b8; }

body.u-betrader-page .focus\:border-transparent:focus { border-color: transparent; }

body.u-betrader-page .duration-300 { transition-duration: 300ms; }

@keyframes u-betrader-spin { to { transform: rotate(360deg); } }
body.u-betrader-page .animate-spin { animation: u-betrader-spin 1s linear infinite; }

body.u-betrader-page .bg-gradient-to-r.from-gray-500.to-gray-600 {
  background-image: linear-gradient(to right, #64748b, #475569);
}
body.u-betrader-page .hover\:from-gray-600:hover { --tw-from: #475569; }
body.u-betrader-page .hover\:to-gray-700:hover { --tw-to: #334155; }
body.u-betrader-page .from-gray-500 { --tw-from: #64748b; }
body.u-betrader-page .to-gray-600 { --tw-to: #475569; }
body.u-betrader-page .to-cyan-500 { --tw-to: #06b6d4; }
body.u-betrader-page .hover\:from-blue-600:hover { --tw-from: #2563eb; }
body.u-betrader-page .hover\:to-cyan-600:hover { --tw-to: #0891b2; }
body.u-betrader-page .to-pink-600 { --tw-to: #1d4ed8; }

body.u-betrader-page .overflow-x-auto { overflow-x: auto; }
body.u-betrader-page .top-4 { top: 1rem; }
body.u-betrader-page .text-base { font-size: 1rem; line-height: 1.5rem; }
body.u-betrader-page .bg-yellow-50 { background-color: #fefce8; }
body.u-betrader-page .bg-orange-50 { background-color: #fff7ed; }
body.u-betrader-page .bg-red-50 { background-color: #fef2f2; }
body.u-betrader-page .bg-purple-100 { background-color: #dbeafe; }
body.u-betrader-page .text-yellow-600 { color: #ca8a04; }
body.u-betrader-page .text-purple-700 { color: #1d4ed8; }
body.u-betrader-page .bg-white.bg-opacity-20 { background-color: rgba(255,255,255,0.2); }
body.u-betrader-page .hover\:bg-opacity-30:hover { background-color: rgba(255,255,255,0.3); }
body.u-betrader-page .bg-gradient-to-br.from-purple-500.to-violet-600 {
  background-image: linear-gradient(to bottom right, #3b82f6, #6366f1);
}

body.u-betrader-page .min-h-screen { min-height: 100vh; }

body.u-betrader-page .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
body.u-betrader-page .inline-block { display: inline-block; }
body.u-betrader-page .items-baseline { align-items: baseline; }
body.u-betrader-page .opacity-30 { opacity: 0.3; }
body.u-betrader-page .opacity-60 { opacity: 0.6; }
body.u-betrader-page .py-8 { padding-top: 2rem; padding-bottom: 2rem; }
body.u-betrader-page .tracking-wide { letter-spacing: 0.025em; }
body.u-betrader-page .whitespace-nowrap { white-space: nowrap; }

body.u-betrader-page .divide-y > * + * { border-top: 1px solid #e2e8f0; }
body.u-betrader-page .space-y-2 > * + * { margin-top: 0.5rem; }
body.u-betrader-page .hover\:bg-red-50:hover { background-color: #fef2f2; }
body.u-betrader-page .hover\:bg-gray-50:hover { background-color: #f8fafc; }
body.u-betrader-page .border-green-200 { border-color: #bbf7d0; }
body.u-betrader-page .border-red-200 { border-color: #fecaca; }
body.u-betrader-page .text-green-700 { color: #15803d; }
body.u-betrader-page .cursor-not-allowed { cursor: not-allowed; }
body.u-betrader-page .h-5 { height: 1.25rem; }
body.u-betrader-page .w-5 { width: 1.25rem; }
body.u-betrader-page .text-pink-600 { color: var(--orange-600); }

@media (min-width: 768px) {
  body.u-betrader-page .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.u-betrader-page .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  body.u-betrader-page .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.u-betrader-page .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.u-betrader-page .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* =====================================================================
   Premium layer — shared components (tokens live in :root above).
   Page-level CSS should reuse var(--ink|--line|--accent-grad|--focus-ring…)
   and the .u-icon-tile / .u-seg / .u-check-chip / .u-select components.
   ===================================================================== */
/* :where() keeps specificity at zero so a page's own body background still wins */
:where(body.u-page) {
  background: var(--page-glow);
  background-attachment: fixed;
}
.u-page-header h1,
.u-section-title,
.u-table-panel-toolbar h2 { color: var(--ink); letter-spacing: -0.02em; }

/* Cards & tiles */
.u-card { border-color: var(--line); }
.u-stat-tile,
.u-route-card,
.u-dash-card,
.u-table-panel { border-color: var(--line); }
.u-stat-tile {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--line);
  border-radius: 14px;
}
.u-stat-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tile-accent, var(--blue-500));
}
.u-stat-tile--blue { --tile-accent: var(--blue-600); border-left-color: var(--line); }
.u-stat-tile--orange { --tile-accent: var(--orange-500); border-left-color: var(--line); }
.u-stat-tile--green { --tile-accent: var(--green-500); border-left-color: var(--line); }
.u-stat-tile--red { --tile-accent: var(--red-500); border-left-color: var(--line); }
.u-stat-tile-label { color: var(--label-muted); letter-spacing: 0.07em; }
.u-stat-tile-value,
.u-route-card-value { font-variant-numeric: tabular-nums; }
.u-stat-tile-value { color: var(--ink); letter-spacing: -0.035em; }
.u-dash-card { border-left: 1px solid var(--line); }

/* Gradient icon square: <span class="u-icon-tile material-icons-outlined">…</span> */
.u-icon-tile {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 18px;
  box-shadow: var(--accent-glow);
}
.u-icon-tile--lg { width: 42px; height: 42px; border-radius: 13px; font-size: 22px; }

/* Fields */
.u-input,
.u-toolbar input[type="date"],
.u-toolbar input[type="text"],
.u-toolbar select,
.u-filter-toolbar .u-filter-field input[type="date"],
.u-filter-toolbar .u-filter-field input[type="text"],
.u-filter-toolbar .u-filter-field input[type="search"],
.u-filter-toolbar .u-filter-field select:not(.tomselected) {
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.u-input:hover,
.u-toolbar input:hover,
.u-toolbar select:hover,
.u-filter-toolbar .u-filter-field input:hover,
.u-filter-toolbar .u-filter-field select:not(.tomselected):hover { border-color: #cbd5e1; background: #fff; }
.u-input:focus,
.u-toolbar input:focus,
.u-toolbar select:focus,
.u-filter-toolbar .u-filter-field input:focus,
.u-filter-toolbar .u-filter-field select:not(.tomselected):focus {
  outline: none;
  border-color: var(--indigo-500);
  background: #fff;
  box-shadow: var(--focus-ring);
}
.u-toolbar {
  border-color: var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}
.u-filter-field > label { color: var(--label-muted); letter-spacing: 0.07em; }

/* Native select with chevron: <select class="u-select"> */
select.u-select {
  -webkit-appearance: none;
  appearance: none;
  height: 38px;
  padding: 0 2rem 0 0.8rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field-bg) var(--chevron-svg) no-repeat right 0.75rem center / 12px 12px;
  color: #334155;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
select.u-select:hover { border-color: #cbd5e1; background-color: #fff; }
select.u-select:focus { outline: none; border-color: var(--indigo-500); background-color: #fff; box-shadow: var(--focus-ring); }

/* Checkbox chip: <label class="u-check-chip"><input type="checkbox"><span>…</span></label> */
.u-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 11px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #475569;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.u-check-chip:hover { border-color: #c7d2fe; color: #334155; }
.u-check-chip:has(input:checked) { border-color: transparent; background: var(--indigo-soft); color: var(--indigo-800); }
.u-check-chip--pill { height: 28px; padding: 0 11px 0 8px; border-radius: 999px; font-size: 0.74rem; }
.u-check-chip input[type="checkbox"],
input[type="checkbox"].u-check {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #fff center / 11px 11px no-repeat;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.u-check-chip--pill input[type="checkbox"] { width: 14px; height: 14px; min-height: 14px; border-radius: 50%; background-size: 9px 9px; }
.u-check-chip input[type="checkbox"]:checked,
input[type="checkbox"].u-check:checked {
  border-color: var(--indigo-600);
  background-color: var(--indigo-600);
  background-image: var(--check-svg);
}
.u-check-chip input[type="checkbox"]:focus-visible,
input[type="checkbox"].u-check:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Segmented control: <div class="u-seg"><button class="u-seg-btn is-active">…</button>…</div> */
.u-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: #eef1f6;
}
.u-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.u-seg-btn:hover { color: #0f172a; }
.u-seg-btn.is-active { background: #fff; color: #312e81; box-shadow: var(--shadow-seg); }
.u-seg-btn .material-icons-outlined { font-size: 17px; }

/* Buttons */
.u-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--field-line);
  background: #fff;
  color: #334155;
  font-weight: 700;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.u-btn:not(.u-btn--primary):not(.u-btn--orange):hover { border-color: #cbd5e1; background: #f8fafc; }
.u-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.u-btn:disabled { opacity: 0.6; cursor: default; transform: none; filter: none; }
.u-btn--primary {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--accent-glow);
}
.u-btn--primary:hover:not(:disabled) { background: var(--accent-grad); filter: brightness(1.07); transform: translateY(-1px); }
.u-btn--orange {
  border-color: transparent;
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(217, 119, 6, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.u-btn--orange:hover:not(:disabled) { background: var(--grad-accent); filter: brightness(1.06); transform: translateY(-1px); }
.u-filter-btn,
.u-filter-preset { border-color: var(--field-line); transition: border-color 0.15s, background 0.15s, color 0.15s; }
.u-filter-btn:hover,
.u-filter-preset:hover { border-color: #c7d2fe; background: var(--indigo-softer); color: var(--indigo-700); }
.u-filter-btn.is-active,
.u-filter-preset.is-active { border-color: transparent; background: var(--indigo-soft); color: var(--indigo-800); }

/* Tom Select (analytics_smart_select.php loads after this file, hence the extra specificity) */
body .u-smart-select .ts-control,
body .u-filter-field--select .ts-control {
  border-color: var(--field-line) !important;
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
body .u-smart-select .ts-wrapper.single .ts-control,
body .u-filter-field--select .ts-wrapper.single .ts-control { padding-right: 2rem !important; }
body .u-smart-select .ts-wrapper.single .ts-control::after,
body .u-filter-field--select .ts-wrapper.single .ts-control::after { right: 0.8rem; }
body .u-smart-select .ts-control:hover,
body .u-filter-field--select .ts-control:hover { border-color: #cbd5e1 !important; background: #fff; }
body .u-smart-select .ts-wrapper.focus .ts-control,
body .u-filter-field--select .ts-wrapper.focus .ts-control {
  border-color: var(--indigo-500) !important;
  background: #fff;
  box-shadow: var(--focus-ring) !important;
}
body .u-smart-select .ts-dropdown,
body .u-filter-field--select .ts-dropdown {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
body .u-smart-select .ts-dropdown .active,
body .u-filter-field--select .ts-dropdown .active { background: var(--indigo-soft); color: var(--indigo-800); }

/* Tables */
.u-table-wrap { border-color: var(--line); border-radius: 14px; }
.u-table thead th,
.u-table--header-grad thead th {
  background: rgba(247, 249, 252, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--label-muted);
  font-weight: 800;
  letter-spacing: 0.07em;
  border-bottom: 1px solid #e8edf5;
}
.u-table tbody td {
  border-bottom-color: #f1f4f9;
  font-variant-numeric: tabular-nums;
}
.u-table-panel-toolbar { border-bottom-color: var(--line); }
.u-table-wrap::-webkit-scrollbar,
.u-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.u-table-wrap::-webkit-scrollbar-thumb,
.u-table-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: #d5dce7; }
.u-table-wrap::-webkit-scrollbar-track,
.u-table-scroll::-webkit-scrollbar-track { background: transparent; }

/* Loader, drawer */
.u-spinner { border-color: #e6e9f5; border-top-color: var(--indigo-600); }
.u-loading-overlay {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
body .u-drawer-backdrop {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Shell (index.php) */
.u-shell-header { box-shadow: 0 10px 28px -14px rgba(79, 70, 229, 0.55); }
.u-shell-logout,
.u-burger { border-radius: 10px; }
.u-sidebar {
  border-right-color: var(--line);
  box-shadow: none;
}
.u-sidebar-head { border-bottom-color: var(--line); }
.u-sidebar-head h2 { color: var(--ink); font-weight: 800; }
.u-sidebar-toggle { border-color: var(--field-line); border-radius: 9px; }
.u-sidebar-toggle:hover { border-color: #c7d2fe; background: var(--indigo-softer); color: var(--indigo-700); }
.u-menu-section { margin-bottom: 0.35rem; }
.u-menu-section h3 {
  padding: 0.9rem 1rem 0.35rem;
  border-bottom: 0;
  color: var(--label-muted);
  letter-spacing: 0.08em;
}
.u-menu-item {
  margin: 1px 8px;
  padding: 0.5rem 0.65rem;
  border-left: 0;
  border-radius: 10px;
  color: #475569;
  font-weight: 600;
}
.u-menu-item .material-icons-outlined { color: #94a3b8; transition: color 0.15s; }
.u-menu-item:hover { background: var(--indigo-softer); color: var(--indigo-700); }
.u-menu-item:hover .material-icons-outlined { color: var(--indigo-500); }
.u-menu-item.is-active {
  background: var(--indigo-soft);
  color: var(--indigo-800);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.u-menu-item.is-active .material-icons-outlined { color: var(--indigo-600); }
.u-menu-badge { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 4px 10px -4px rgba(220, 38, 38, 0.6); }
.u-sidebar.is-collapsed .u-menu-item { margin: 1px 8px; }
.u-sidebar::-webkit-scrollbar { width: 6px; }
.u-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #dde3ec; }
.u-sidebar::-webkit-scrollbar-track { background: transparent; }

/* Shell home dashboard (index.php inline styles load after this file) */
body.u-shell .u-mgmt-page { background: var(--page-glow); }
body.u-shell .u-mgmt-head h2,
body.u-shell .u-mgmt-kpi-value,
body.u-shell .u-mgmt-chart-card h3 { color: var(--ink); }
body.u-shell .u-mgmt-kpi-value { font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
body.u-shell .u-mgmt-toolbar,
body.u-shell .u-mgmt-kpi,
body.u-shell .u-mgmt-chart-card { border-color: var(--line); }
body.u-shell .u-mgmt-seg { gap: 2px; padding: 3px; border: 0; border-radius: 12px; background: #eef1f6; }
body.u-shell .u-mgmt-seg button { border-radius: 9px; }
body.u-shell .u-mgmt-seg button + button { border-left: 0; }
body.u-shell .u-mgmt-seg button.is-active { background: #fff; color: #312e81; box-shadow: var(--shadow-seg); }
body.u-shell .u-mgmt-btn { background: var(--accent-grad); box-shadow: var(--accent-glow); border-radius: var(--radius-sm); }
body.u-shell .u-mgmt-btn:hover:not(:disabled) { background: var(--accent-grad); filter: brightness(1.07); }
body.u-shell .u-mgmt-toolbar input[type="date"] { border-color: var(--field-line); }

@media (prefers-reduced-motion: reduce) {
  .u-btn,
  .u-check-chip,
  .u-seg-btn { transition: none; }
}
