:root {
  --page-bg: #0b1220;
  --app-bg: #ffffff;
  --content-bg: #f4f6f9;
  --sidebar-bg: #0b1220;
  --sidebar-surface: rgba(15, 23, 42, 0.55);
  --sidebar-border: rgba(148, 163, 184, 0.14);
  --sidebar-text: rgba(226, 232, 240, 0.92);
  --sidebar-muted: rgba(148, 163, 184, 0.86);
  --sidebar-hover: rgba(148, 163, 184, 0.12);
  --sidebar-active: rgba(37, 99, 235, 0.16);
  --sidebar-active-border: rgba(37, 99, 235, 0.35);
  --sidebar-active-text: rgba(226, 232, 240, 0.98);
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.06);
  --divider: rgba(15, 23, 42, 0.06);
  --shell-shadow: 0 35px 90px rgba(2, 6, 23, 0.55);
  --card-shadow: none;
  --chip-border: rgba(15, 23, 42, 0.1);
  --blue: #2563eb;
  --blue-600: #2563eb;
  --emerald: #16a34a;
  --rose: #e11d48;

  /* Accent palette (RGB triplets for rgba(var(--x), a)) */
  --accent-blue: 37, 99, 235;
  --accent-emerald: 22, 163, 74;
  --accent-amber: 245, 158, 11;
  --accent-violet: 124, 58, 237;
  --accent-cyan: 6, 182, 212;
  --accent-rose: 225, 29, 72;

  /* Controls */
  --btn-radius: 14px;
}

html,
body {
  height: 100%;
}

body {
  background: var(--content-bg);
  color: #0f172a;
}

.page-wrap {
  min-height: 100vh;
  width: 100%;
  padding: 0;
}

.app-shell {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  background: var(--app-bg);
  border-radius: 0;
  box-shadow: none;
  border: 0;
  overflow: hidden;
}

.app-header {
  height: 76px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 2px #ffffff;
}

.app-body {
  display: flex;
  height: calc(100vh - 76px);
  min-height: 0;
}

.app-sidebar {
  width: 286px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  height: 100%;
  overflow: hidden;
}

.sidebar-inner {
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

.sidebar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-tools .sidebar-search {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  padding: 10px 10px;
}

.sidebar-search svg {
  color: var(--sidebar-muted);
}

.sidebar-tool-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-surface);
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-tool-btn:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.sidebar-tool-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.sidebar-search input {
  width: 100%;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--sidebar-text);
}

.sidebar-search input::placeholder {
  color: var(--sidebar-muted);
}

.nav-group {
  margin-top: 14px;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  font-weight: 700;
  margin: 10px 0 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-text);
}

.nav-item:hover {
  background: var(--sidebar-hover);
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-sub {
  margin: 8px 0 0 28px;
  display: none;
  flex-direction: column;
  gap: 6px;
}

/* Collapsible submenus */
.nav-item--parent[aria-expanded="true"] + .nav-sub {
  display: flex;
}

.nav-caret {
  transition: transform 180ms ease;
}

.nav-item--parent[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-subitem {
  display: block;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.86);
}

.nav-subitem:hover {
  background: var(--sidebar-hover);
}

.nav-subitem.is-active {
  background: var(--sidebar-active);
  border: 1px solid var(--sidebar-active-border);
  color: var(--sidebar-active-text);
  box-shadow: none;
}

.nav-item--parent.is-active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  box-shadow: inset 0 0 0 1px var(--sidebar-active-border);
}

.nav-item--parent.is-active:hover {
  background: var(--sidebar-active);
}

.app-main {
  flex: 1;
  padding: 16px 16px 18px;
  background: var(--content-bg);
  min-width: 0;
  height: 100%;
  overflow: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.content-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.col-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 14px 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}

.card-divider {
  height: 1px;
  background: var(--divider);
  margin-top: 12px;
  margin-bottom: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: rgba(71, 85, 105, 0.75);
}

/* Corner action in card headers (reference shows plain icon, not boxed) */
.corner-btn {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.corner-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.icon-btn--md {
  width: 40px;
  height: 40px;
  border-radius: 0;
}

.icon-btn--sm {
  width: 34px;
  height: 34px;
}

.icon-btn--xs {
  width: 30px;
  height: 30px;
  border-radius: 0;
}

.stat-card {
  padding: 12px 12px 11px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border-left: 4px solid rgba(var(--stat-accent, var(--accent-blue)), 0.92);
  background:
    linear-gradient(
      90deg,
      rgba(var(--stat-accent, var(--accent-blue)), 0.12),
      rgba(255, 255, 255, 0) 58%
    ),
    var(--card-bg);
}

.stats-grid .stat-card:nth-child(6n + 1) {
  --stat-accent: var(--accent-blue);
}

.stats-grid .stat-card:nth-child(6n + 2) {
  --stat-accent: var(--accent-emerald);
}

.stats-grid .stat-card:nth-child(6n + 3) {
  --stat-accent: var(--accent-amber);
}

.stats-grid .stat-card:nth-child(6n + 4) {
  --stat-accent: var(--accent-violet);
}

.stats-grid .stat-card:nth-child(6n + 5) {
  --stat-accent: var(--accent-cyan);
}

.stats-grid .stat-card:nth-child(6n + 6) {
  --stat-accent: var(--accent-rose);
}

.stat-card .corner-btn {
  color: rgba(var(--stat-accent, var(--accent-blue)), 0.86);
}

.stat-card .corner-btn:hover {
  background: rgba(var(--stat-accent, var(--accent-blue)), 0.12);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(100, 116, 139, 0.88);
}

.stat-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(15, 23, 42, 0.95);
}

.stat-sub {
  margin-top: 5px;
  font-size: 11px;
  color: rgba(100, 116, 139, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend {
  font-weight: 800;
}

.trend--up {
  color: var(--emerald);
}

.trend--down {
  color: var(--rose);
}

.trend-note {
  color: rgba(100, 116, 139, 0.82);
}

.list-row {
  display: grid;
  grid-template-columns: 70px 1fr auto 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 14px;
}

.list-row:hover {
  background: rgba(248, 250, 252, 0.85);
}

.list-date {
  font-size: 12px;
  color: rgba(100, 116, 139, 0.9);
}

.list-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(51, 65, 85, 0.95);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-amount {
  font-size: 13px;
  font-weight: 700;
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
  font-size: 13px;
  font-weight: 700;
  color: rgba(71, 85, 105, 0.92);
}

.btn-soft--sm {
  padding: 8px 10px;
  border-radius: 0;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 0;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.btn-primary:hover {
  background: rgba(37, 99, 235, 0.98);
}

.btn-primary--sm {
  padding: 8px 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 800;
  color: rgba(71, 85, 105, 0.92);
  white-space: nowrap;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--btn-radius);
  padding: 10px 10px;
  width: min(520px, 46vw);
  margin-left: 6px;
}

.header-search input {
  width: 100%;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
}

.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.user-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.18);
  display: none;
  z-index: 80;
}

.dropdown-menu--right {
  left: auto;
  right: 0;
}

.dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
  color: rgba(51, 65, 85, 0.92);
}

.dropdown-item:hover {
  background: rgba(15, 23, 42, 0.03);
}

.dropdown-sep {
  height: 1px;
  background: rgba(15, 23, 42, 0.07);
  margin: 6px 2px;
}

.btn-soft:hover {
  background: rgba(15, 23, 42, 0.05);
}

.card-slider {
  position: relative;
}

.slider-stage {
  position: relative;
  height: 108px;
}

.slider-arrow {
  position: absolute;
  top: 44px;
  width: 30px;
  height: 30px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(71, 85, 105, 0.8);
  z-index: 6;
}

.slider-arrow--left {
  left: 6px;
}

.slider-arrow--right {
  right: 6px;
}

.cc-card {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  width: 78%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none;
  transform: translateX(14px) scale(0.96);
  opacity: 0.92;
  transition:
    transform 200ms ease,
    opacity 200ms ease;
}

.cc-card.is-active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 5;
}

.cc-card--blue {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 80%);
}

.cc-card--purple {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 85%);
}

.cc-card::before {
  content: "";
  position: absolute;
  inset: -30px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0) 45%
    ),
    radial-gradient(
      220px 120px at 30% 40%,
      rgba(255, 255, 255, 0.16),
      transparent 60%
    ),
    radial-gradient(
      220px 120px at 75% 70%,
      rgba(255, 255, 255, 0.14),
      transparent 60%
    );
  transform: rotate(-10deg);
}

.cc-mark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.06em;
}

.cc-number {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.08em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.35);
}

.dot.is-active {
  background: var(--blue);
}

.donut {
  width: 120px;
  height: 120px;
}

.donut-track {
  fill: none;
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 14;
}

.donut-seg {
  fill: none;
  stroke-width: 14;
  stroke-linecap: butt;
}

.seg-spdr {
  stroke: #2563eb;
}

.seg-apple {
  stroke: #7c3aed;
}

.seg-caram {
  stroke: #f59e0b;
}

.seg-tesla {
  stroke: #22c55e;
}

.seg-harel {
  stroke: #84cc16;
}

.legend-row {
  display: grid;
  grid-template-columns: 18px 36px 1fr 62px;
  align-items: center;
  gap: 6px;
  padding: 6px 6px;
  border-radius: 12px;
}

.legend-row:hover {
  background: rgba(248, 250, 252, 0.9);
}

.legend-name {
  color: rgba(51, 65, 85, 0.92);
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-val {
  text-align: right;
  color: rgba(15, 23, 42, 0.92);
  font-weight: 800;
}

.dot {
  flex: none;
}

.dot-spdr {
  background: #2563eb;
}

.dot-apple {
  background: #7c3aed;
}

.dot-caram {
  background: #f59e0b;
}

.dot-tesla {
  background: #22c55e;
}

.dot-harel {
  background: #84cc16;
}

.asset-chip {
  border-radius: 0;
  border: 1px solid var(--chip-border);
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  min-width: 126px;
  text-align: left;
}

.asset-chip.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.07);
}

.asset-chip-top {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.9);
  line-height: 1.05;
}

.asset-chip-sub {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(100, 116, 139, 0.85);
  font-weight: 700;
}

.asset-row {
  display: grid;
  grid-template-columns: 1fr 78px 72px 64px;
  gap: 8px;
  align-items: center;
  padding: 6px 6px;
  border-radius: 12px;
}

.asset-row:hover {
  background: rgba(248, 250, 252, 0.9);
}

.tab-chip {
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(51, 65, 85, 0.9);
  white-space: nowrap;
}

.tab-chip.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(15, 23, 42, 0.92);
}

.range-chip {
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(51, 65, 85, 0.85);
}

.range-chip.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(15, 23, 42, 0.92);
}

.stock-chart {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  overflow: hidden;
  height: 110px;
}

.loan-bar {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  overflow: hidden;
  height: 120px;
}

.loan-bar svg {
  width: 100%;
  height: 100%;
}

.stock-chart svg {
  width: 100%;
  height: 100%;
}

.gridline {
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 2.2;
}

.doc-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  color: rgba(51, 65, 85, 0.92);
}

.doc-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.banker-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.peek-contact {
  position: absolute;
  right: -52px;
  top: 58px;
}

.peek-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: none;
  width: 160px;
}

.peek-avatar {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.18),
    rgba(148, 163, 184, 0.14)
  );
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.a11y-fab {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: rgba(37, 99, 235, 0.1);
  border: 2px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.a11y-fab-inner {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(37, 99, 235, 0.95);
}

.sidebar-overlay {
  display: none;
}

/* Sidebar collapsed (desktop) */
.sidebar-collapsed .app-sidebar {
  width: 88px;
}

.sidebar-collapsed .sidebar-search {
  display: none;
}

.sidebar-collapsed .sidebar-tools {
  justify-content: center;
}

.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
}

.sidebar-collapsed .nav-left {
  gap: 0;
}

.sidebar-collapsed .nav-left span {
  display: none;
}

.sidebar-collapsed .nav-caret {
  display: none;
}

.sidebar-collapsed .nav-sub {
  display: none !important;
}

/* Tables */
.table-card {
  padding: 0;
}

.table-head {
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--btn-radius);
  padding: 10px 10px;
  width: min(360px, 60vw);
}

.table-search input {
  width: 100%;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.9);
  font-weight: 900;
  white-space: nowrap;
}

table.data-table tbody td {
  padding: 11px 12px;
  font-size: 13px;
  color: rgba(51, 65, 85, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  vertical-align: middle;
}

table.data-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.85);
}

.table-foot {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-btn {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: rgba(71, 85, 105, 0.85);
  font-weight: 900;
}

.pager-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.pager-btn.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(15, 23, 42, 0.92);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
  color: rgba(71, 85, 105, 0.9);
  white-space: nowrap;
}

.badge--success {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.08);
  color: rgba(21, 128, 61, 0.98);
}

.badge--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: rgba(146, 64, 14, 0.95);
}

.badge--danger {
  border-color: rgba(225, 29, 72, 0.25);
  background: rgba(225, 29, 72, 0.08);
  color: rgba(190, 18, 60, 0.98);
}

.badge--info {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(29, 78, 216, 0.98);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 900;
  color: rgba(51, 65, 85, 0.92);
}

.form-label .req {
  color: rgba(225, 29, 72, 0.95);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-help {
  font-size: 12px;
  color: rgba(100, 116, 139, 0.9);
  font-weight: 700;
}

.form-error {
  font-size: 12px;
  color: rgba(190, 18, 60, 0.98);
  font-weight: 800;
}

/* Modals & drawers */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: none;
  z-index: 90;
}

.overlay.is-open {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 95;
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(720px, 96vw);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.25);
  overflow: hidden;
}

.modal-head {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-body {
  padding: 14px 14px;
}

.modal-foot {
  padding: 14px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  z-index: 95;
}

.drawer.is-open {
  display: flex;
}

.drawer-panel {
  width: min(520px, 96vw);
  height: 100%;
  background: #ffffff;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: -30px 0 70px rgba(2, 6, 23, 0.2);
  display: flex;
  flex-direction: column;
}

.drawer-body {
  padding: 14px 14px;
  overflow: auto;
}

/* Toasts */
.toast-root {
  position: fixed;
  top: 16px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 110;
  pointer-events: none;
  align-items: center;
}

.toast {
  width: min(380px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.18);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
  color: rgba(15, 23, 42, 0.72);
  background: rgba(15, 23, 42, 0.06);
}

.toast-body {
  flex: 1 1 auto;
  min-width: 0;
}

.toast-close {
  flex: 0 0 auto;
  margin-left: 8px;
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: 10px;
  color: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}

.toast-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.75);
}

.toast-title {
  font-size: 13px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
}

.toast-msg {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(71, 85, 105, 0.92);
}

.toast--success {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(22, 163, 74, 0.08);
}

.toast--success .toast-icon {
  color: rgba(22, 163, 74, 0.95);
  background: rgba(22, 163, 74, 0.14);
}

.toast--danger {
  border-color: rgba(225, 29, 72, 0.22);
  background: rgba(225, 29, 72, 0.08);
}

.toast--danger .toast-icon {
  color: rgba(225, 29, 72, 0.95);
  background: rgba(225, 29, 72, 0.14);
}

.toast--info {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
}

.toast--info .toast-icon {
  color: rgba(37, 99, 235, 0.95);
  background: rgba(37, 99, 235, 0.14);
}

.toast--warning {
  border-color: rgba(234, 179, 8, 0.26);
  background: rgba(234, 179, 8, 0.1);
}

.toast--warning .toast-icon {
  color: rgba(234, 179, 8, 0.95);
  background: rgba(234, 179, 8, 0.16);
}

/* Scrollbars (subtle) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* Responsive behavior */
@media (max-width: 1199px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .page-wrap {
    padding: 0;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-106%);
    transition: transform 220ms ease;
    z-index: 60;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.35);
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 55;
  }

  .sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

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

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

@media (max-width: 639px) {
  .app-header {
    padding: 0 14px;
  }

  .app-main {
    padding: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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