/* ── E-Budgeting custom overrides for Tabler 1.4 ── */

/* ── Sidebar user section ── */
.navbar-vertical .nav-user {
  padding: .75rem 1rem;
  border-top: 1px solid var(--tblr-border-color);
  margin-top: auto;
}
.navbar-vertical .nav-user .user-name  { font-size: .875rem; font-weight: 600; color: var(--tblr-body-color); }
.navbar-vertical .nav-user .user-role  { font-size: .75rem; color: var(--tblr-secondary); }
.navbar-vertical .nav-user .user-unit  { font-size: .75rem; color: var(--tblr-secondary); opacity: .75; }

/* ── Stat cards ── */
.metric-card .metric-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-secondary); margin-bottom: .25rem; }
.metric-card .metric-value { font-size: 1.75rem; font-weight: 700; color: var(--tblr-body-color); line-height: 1.2; }

/* ── DataTable toolbar ── */
.dt-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .625rem;
  padding: .875rem 1rem .75rem;
  border-bottom: 1px solid var(--tblr-border-color);
}
.dt-footbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .625rem;
  padding: .625rem 1rem;
  background: var(--tblr-bg-surface-secondary);
  border-top: 1px solid var(--tblr-border-color);
  border-radius: 0 0 var(--tblr-border-radius) var(--tblr-border-radius);
}
.dt-pagesize { width: 80px !important; }
.dt-search   { width: 220px !important; }
.dt-empty    { padding: 3rem 1rem; text-align: center; color: var(--tblr-secondary); }
.dt-empty svg { display: block; margin: 0 auto .75rem; opacity: .3; }

/* ── Sort icons on th ── */
.dt-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.dt-sortable:hover { color: var(--tblr-primary) !important; }
.dt-sort-active { color: var(--tblr-primary) !important; }
.dt-sort-icon { display: inline-block; width: 9px; height: 9px; margin-left: 4px; vertical-align: middle; fill: var(--tblr-border-color-dark); position: relative; top: -1px; }
.dt-sort-icon.active { fill: var(--tblr-primary); }
.dt-sortable:hover .dt-sort-icon:not(.active) { fill: var(--tblr-secondary); }

/* ── Export button group ── */
.dt-topbar .btn-group .btn { font-size: .75rem; padding: .25rem .5rem; display: inline-flex; align-items: center; gap: 4px; }

/* ── Approval / workflow timeline ── */
.timeline-dot  { width: .625rem; height: .625rem; border-radius: 50%; flex-shrink: 0; margin-top: .375rem; }
.timeline-line { width: 1px; flex: 1; background: var(--tblr-border-color); margin: .25rem auto; }

/* ── Toast notifications ── */
.eb-toast {
  display: block; min-width: 240px; max-width: 340px;
  padding: .75rem 1.25rem; border-radius: var(--tblr-border-radius);
  font-size: .875rem; color: #fff;
  box-shadow: var(--tblr-box-shadow);
  opacity: 1; transition: opacity .3s;
  margin-bottom: .5rem;
}
.eb-toast.success { background: var(--tblr-success); }
.eb-toast.error   { background: var(--tblr-danger);  }
.eb-toast.info    { background: var(--tblr-dark);    }

/* ── Login / Auth page ── */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.auth-logo {
  width: 3.5rem; height: 3.5rem;
  object-fit: contain;
  border-radius: .875rem;
}

/* ── Page fade animation ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp .2s ease; }

/* ── Progress thin variant ── */
.progress-xs { height: .375rem; }

/* ── Dashboard: status bar chart ── */
.sbar-chart { display: flex; flex-direction: column; gap: .75rem; }
.sbar-row { display: flex; align-items: center; gap: .75rem; }
.sbar-label { flex: 0 0 108px; font-size: .8125rem; color: var(--tblr-body-color); }
.sbar-track { flex: 1 1 auto; height: 10px; background: var(--tblr-bg-surface-secondary); border-radius: 5px; overflow: hidden; }
.sbar-fill { height: 100%; border-radius: 5px; transition: width .3s ease, filter .15s ease; }
.sbar-row:hover .sbar-fill { filter: brightness(1.08); }
.sbar-value { flex: 0 0 32px; text-align: right; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tblr-body-color); }

/* ── Dashboard: horizontal stacked bar (part-to-whole) ── */
.stackbar-track { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--tblr-bg-surface-secondary); gap: 2px; }
.stackbar-seg { height: 100%; transition: filter .15s ease; }
.stackbar-seg:hover { filter: brightness(1.08); }
.stackbar-legend { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.stackbar-legend-item { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; }
.stackbar-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.stackbar-legend-label { color: var(--tblr-body-color); }
.stackbar-legend-value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Dashboard: trend line chart tooltip ── */
.trend-dot { transition: r .15s ease; }
.trend-dot:hover { r: 6; }
.chart-tooltip {
  position: absolute; transform: translateX(-50%);
  background: var(--tblr-dark, #1a2234); color: #fff;
  border-radius: .5rem; padding: .375rem .625rem;
  font-size: .75rem; line-height: 1.3; pointer-events: none;
  box-shadow: var(--tblr-box-shadow); white-space: nowrap; z-index: 5;
}
.chart-tooltip-label { color: rgba(255,255,255,.7); }
.chart-tooltip-value { font-weight: 600; font-variant-numeric: tabular-nums; }
