/* ============================================================================
   BADA WHOLESALER — STYLE.CSS
   Reusable component library built on top of theme.css tokens
   ----------------------------------------------------------------------------
   01. Icon Tiles & Stat Cards
   02. Soft Badges & Document Status Badges
   03. Avatars & Avatar Groups
   04. Table Card, Toolbar, Search & Filters
   05. Media List Rows (Top Customers / Top Products)
   06. Timeline
   07. Activity Feed
   08. Quick Actions
   09. Notification Dropdown
   10. Empty State
   11. Chart Card Helpers
   12. Authentication Layout
   13. Generic Utilities & Animations
   No page-specific selectors — every class here is reusable.
   ========================================================================== */

/* ============================================================================
   01. ICON TILES & STAT CARDS
   ========================================================================== */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius);
  font-size: 1.15rem;
}
.icon-tile.tile-sm { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 10px; }
.icon-tile.tile-lg { width: 56px; height: 56px; font-size: 1.35rem; }

/* Tinted tile variants */
.tile-primary   { background: var(--bs-primary-bg-subtle);   color: var(--crm-primary); }
.tile-secondary { background: var(--bs-secondary-bg-subtle); color: var(--crm-secondary); }
.tile-success   { background: var(--bs-success-bg-subtle);   color: var(--crm-success); }
.tile-danger    { background: var(--bs-danger-bg-subtle);    color: var(--crm-danger); }
.tile-warning   { background: var(--bs-warning-bg-subtle);   color: var(--crm-warning); }
.tile-info      { background: var(--bs-info-bg-subtle);      color: var(--crm-info); }

/* Solid gradient tile — hero stat cards */
.tile-gradient {
  background: var(--crm-gradient);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--crm-secondary-rgb), 0.35);
}

/* --- Primary stat card ---------------------------------------------------- */
.stat-card .stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--crm-text-muted);
  margin-bottom: 0.35rem;
}
.stat-card .stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--crm-heading);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0;
}
.stat-card .stat-compare {
  font-size: 0.75rem;
  color: var(--crm-text-muted);
  margin-top: 0.45rem;
}

/* Delta pill (▲ 12.5%) */
.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28em 0.6em;
  border-radius: 99px;
}
.stat-delta.up   { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); }
.stat-delta.down { color: var(--bs-danger-text-emphasis);  background: var(--bs-danger-bg-subtle); }
.stat-delta.flat { color: var(--crm-text-muted);           background: #EFF1F6; }

/* Compact stat card (second KPI row) */
.stat-mini { display: flex; align-items: center; gap: 0.9rem; }
.stat-mini .stat-value { font-size: 1.2rem; }
.stat-mini .stat-label {
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-bottom: 0.1rem;
}

/* ============================================================================
   02. SOFT BADGES & DOCUMENT STATUS BADGES
   ========================================================================== */
.badge-soft-primary   { color: var(--bs-primary-text-emphasis);   background: var(--bs-primary-bg-subtle); }
.badge-soft-secondary { color: var(--bs-secondary-text-emphasis); background: var(--bs-secondary-bg-subtle); }
.badge-soft-success   { color: var(--bs-success-text-emphasis);   background: var(--bs-success-bg-subtle); }
.badge-soft-danger    { color: var(--bs-danger-text-emphasis);    background: var(--bs-danger-bg-subtle); }
.badge-soft-warning   { color: var(--bs-warning-text-emphasis);   background: var(--bs-warning-bg-subtle); }
.badge-soft-info      { color: var(--bs-info-text-emphasis);      background: var(--bs-info-bg-subtle); }
.badge-soft-neutral   { color: #5A6478;                           background: #EFF1F6; }

/* Status badge with leading dot — one class per §9.6 document state:
   draft=gray · pending=amber · active/confirmed=blue · completed/paid=green ·
   hold/overdue=orange · cancelled/failed=red */
.badge-status { padding-left: 0.55em; }
.badge-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.45em;
  vertical-align: 1px;
  background: currentColor;
}
.status-draft     { color: #5A6478;                           background: #EFF1F6; }
.status-pending   { color: var(--bs-warning-text-emphasis);   background: var(--bs-warning-bg-subtle); }
.status-active    { color: var(--bs-secondary-text-emphasis); background: var(--bs-secondary-bg-subtle); }
.status-completed { color: var(--bs-success-text-emphasis);   background: var(--bs-success-bg-subtle); }
.status-hold      { color: #B45309;                           background: #FFF1DE; }
.status-cancelled { color: var(--bs-danger-text-emphasis);    background: var(--bs-danger-bg-subtle); }

/* ============================================================================
   03. AVATARS & AVATAR GROUPS
   ========================================================================== */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 26px; height: 26px; font-size: 0.6rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.7rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-rounded { border-radius: var(--radius-sm); }

/* Initials color variants — rotate per row for visual variety */
.avatar-primary   { background: var(--bs-primary-bg-subtle);   color: var(--crm-primary); }
.avatar-secondary { background: var(--bs-secondary-bg-subtle); color: var(--crm-secondary); }
.avatar-success   { background: var(--bs-success-bg-subtle);   color: var(--bs-success-text-emphasis); }
.avatar-danger    { background: var(--bs-danger-bg-subtle);    color: var(--bs-danger-text-emphasis); }
.avatar-warning   { background: var(--bs-warning-bg-subtle);   color: var(--bs-warning-text-emphasis); }
.avatar-info      { background: var(--bs-info-bg-subtle);      color: var(--bs-info-text-emphasis); }
.avatar-gradient  { background: var(--crm-gradient); color: #fff; }

/* Presence dot */
.avatar .presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--crm-success);
}
.avatar .presence.away { background: var(--crm-warning); }
.avatar .presence.offline { background: #B3BAC9; }

/* Overlapping group */
.avatar-group { display: inline-flex; }
.avatar-group .avatar {
  margin-left: -10px;
  border: 2px solid #fff;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* ============================================================================
   04. TABLE CARD, TOOLBAR, SEARCH & FILTERS
   ========================================================================== */
/* Card that hosts a data table edge-to-edge */
.table-card .card-body { padding: 0; }
.table-card .table > :not(caption) > * > *:first-child { padding-left: 1.5rem; }
.table-card .table > :not(caption) > * > *:last-child { padding-right: 1.5rem; }

/* Toolbar above the table: search on the left, filters/actions right */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--crm-border);
}
.table-toolbar .toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Standalone search input with embedded icon */
.search-box { position: relative; min-width: 220px; }
.search-box .form-control {
  padding-left: 2.35rem;
  background: #F8F9FC;
  border-color: transparent;
}
.search-box .form-control:focus { background: #fff; border-color: var(--crm-secondary); }
.search-box > i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--crm-text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

/* Compact select used as a table filter */
.filter-select {
  width: auto;
  min-width: 140px;
  font-size: 0.82rem;
  background-color: #F8F9FC;
  border-color: transparent;
}
.filter-select:focus { background-color: #fff; }

/* Footer row under the table: range summary + pagination */
.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--crm-border);
  font-size: 0.8rem;
  color: var(--crm-text-muted);
}
.table-footer .page-size-select { width: auto; font-size: 0.8rem; }

/* Primary cell: avatar + name + sub-line */
.cell-primary { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.cell-primary .cell-title {
  font-weight: 600;
  color: var(--crm-heading);
  font-size: 0.86rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-primary .cell-sub {
  font-size: 0.74rem;
  color: var(--crm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.cell-title:hover { color: var(--crm-secondary); }

/* Numeric / money cells */
.cell-amount { font-weight: 600; color: var(--crm-heading); font-variant-numeric: tabular-nums; }

/* Row action cluster (view / edit / more) */
.row-actions { display: inline-flex; gap: 0.25rem; }
.row-actions .btn {
  color: var(--crm-text-muted);
  border: 0;
}
.row-actions .btn:hover { background: #EFF1F6; color: var(--crm-secondary); }
.row-actions .btn.text-danger-hover:hover { color: var(--crm-danger); background: var(--bs-danger-bg-subtle); }

/* Sortable column headers */
th.sortable { cursor: pointer; user-select: none; }
th.sortable i { margin-left: 0.35rem; opacity: 0.4; font-size: 0.65rem; }
th.sortable:hover { color: var(--crm-secondary); }

/* Active filter pills row */
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--crm-secondary);
  background: var(--bs-secondary-bg-subtle);
  border-radius: 99px;
  padding: 0.3em 0.5em 0.3em 0.8em;
}
.filter-pill .pill-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  font-size: 0.6rem;
  color: inherit;
  background: rgba(var(--crm-secondary-rgb), 0.15);
  cursor: pointer;
}
.filter-pill .pill-close:hover { background: var(--crm-secondary); color: #fff; }

/* ============================================================================
   05. MEDIA LIST ROWS (Top Customers / Top Products / rankings)
   ========================================================================== */
.media-list { display: flex; flex-direction: column; }
.media-list .media-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.5rem;
  transition: background-color 0.15s ease;
}
.media-list .media-row:hover { background: #F8F9FC; }
.media-list .media-row + .media-row { border-top: 1px solid var(--crm-border); }
.media-row .media-body { flex: 1 1 auto; min-width: 0; }
.media-row .media-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--crm-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.media-row .media-sub { font-size: 0.74rem; color: var(--crm-text-muted); }
.media-row .media-value { text-align: right; flex-shrink: 0; }
.media-row .media-value .val { font-size: 0.86rem; font-weight: 600; color: var(--crm-heading); font-variant-numeric: tabular-nums; }
.media-row .media-value .sub { font-size: 0.72rem; color: var(--crm-text-muted); }

/* Rank chip (1, 2, 3…) */
.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--crm-text-muted);
  background: #EFF1F6;
}
.media-row:nth-child(1) .rank-chip { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.media-row:nth-child(2) .rank-chip { background: #EDF0F5; color: #5A6478; }
.media-row:nth-child(3) .rank-chip { background: #FBEFE4; color: #A5602A; }

/* ============================================================================
   06. TIMELINE
   ========================================================================== */
.timeline { position: relative; padding-left: 0; list-style: none; margin: 0; }
.timeline-item {
  position: relative;
  padding: 0 0 1.4rem 2.1rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--crm-border);
}
.timeline-item:last-child { padding-bottom: 0.25rem; }
.timeline-item:last-child::before { display: none; }

.timeline-marker {
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.55rem;
  color: #fff;
  background: var(--crm-secondary);
  box-shadow: 0 0 0 4px var(--bs-secondary-bg-subtle);
}
.timeline-marker.marker-success { background: var(--crm-success); box-shadow: 0 0 0 4px var(--bs-success-bg-subtle); }
.timeline-marker.marker-danger  { background: var(--crm-danger);  box-shadow: 0 0 0 4px var(--bs-danger-bg-subtle); }
.timeline-marker.marker-warning { background: var(--crm-warning); box-shadow: 0 0 0 4px var(--bs-warning-bg-subtle); }
.timeline-marker.marker-info    { background: var(--crm-info);    box-shadow: 0 0 0 4px var(--bs-info-bg-subtle); }
.timeline-marker.marker-muted   { background: #B3BAC9;            box-shadow: 0 0 0 4px #EFF1F6; }

.timeline-title { font-size: 0.84rem; font-weight: 600; color: var(--crm-heading); margin-bottom: 0.1rem; }
.timeline-text  { font-size: 0.78rem; color: var(--crm-text); margin-bottom: 0.15rem; }
.timeline-time  { font-size: 0.7rem; color: var(--crm-text-muted); }

/* ============================================================================
   07. ACTIVITY FEED (avatar-led variant of the timeline)
   ========================================================================== */
.activity-feed { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 0.9rem;
  padding: 0.9rem 1.5rem;
}
.activity-item + .activity-item { border-top: 1px dashed var(--crm-border); }
.activity-item .activity-body { flex: 1 1 auto; min-width: 0; }
.activity-item .activity-text { font-size: 0.82rem; color: var(--crm-text); line-height: 1.45; }
.activity-item .activity-text strong { color: var(--crm-heading); font-weight: 600; }
.activity-item .activity-time { font-size: 0.7rem; color: var(--crm-text-muted); margin-top: 0.15rem; }

/* ============================================================================
   08. QUICK ACTIONS
   ========================================================================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.1rem 0.75rem;
  border: 1px dashed var(--crm-border-strong);
  border-radius: var(--radius);
  color: var(--crm-text);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  transition: border-color var(--transition), background-color var(--transition),
              color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.quick-action:hover {
  border-color: var(--crm-secondary);
  border-style: solid;
  background: var(--bs-secondary-bg-subtle);
  color: var(--crm-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.quick-action:hover .icon-tile { background: var(--crm-secondary); color: #fff; }

/* ============================================================================
   09. NOTIFICATION DROPDOWN
   ========================================================================== */
.notification-menu {
  width: 360px;
  max-width: calc(100vw - 2rem);
  padding: 0;
  overflow: hidden;
}
.notification-menu .menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--crm-border);
}
.notification-menu .menu-head h6 { margin: 0; font-size: 0.9rem; }
.notification-menu .menu-body { max-height: 340px; overflow-y: auto; }
.notification-menu .menu-foot {
  padding: 0.7rem 1.15rem;
  border-top: 1px solid var(--crm-border);
  text-align: center;
}
.notification-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  transition: background-color 0.15s ease;
}
.notification-item:hover { background: #F8F9FC; }
.notification-item + .notification-item { border-top: 1px solid var(--crm-border); }
.notification-item .notif-text { font-size: 0.8rem; color: var(--crm-text); line-height: 1.4; }
.notification-item .notif-text strong { color: var(--crm-heading); font-weight: 600; }
.notification-item .notif-time { font-size: 0.68rem; color: var(--crm-text-muted); margin-top: 0.15rem; }
.notification-item.unread { background: rgba(var(--crm-secondary-rgb), 0.045); }
.notification-item .unread-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 50%;
  background: var(--crm-secondary);
}

/* ============================================================================
   10. EMPTY STATE
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.6rem;
  color: var(--crm-text-muted);
  background: #EFF1F6;
  margin-bottom: 1rem;
}
.empty-state h6 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.empty-state p { font-size: 0.8rem; color: var(--crm-text-muted); max-width: 320px; margin-bottom: 1rem; }

/* ============================================================================
   11. CHART CARD HELPERS
   ========================================================================== */
.chart-area { min-height: 300px; }
.chart-area-sm { min-height: 240px; }

/* Custom legend row under/beside a chart */
.legend-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--crm-text); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

/* KPI summary strip inside a chart card header */
.chart-kpis { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; }
.chart-kpis .kpi .kpi-label { font-size: 0.72rem; color: var(--crm-text-muted); }
.chart-kpis .kpi .kpi-value { font-size: 1.05rem; font-weight: 700; color: var(--crm-heading); font-variant-numeric: tabular-nums; }

/* ApexCharts polish */
.apexcharts-tooltip {
  border: 0 !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: 10px !important;
  font-family: var(--bs-body-font-family) !important;
}
.apexcharts-tooltip-title {
  background: #F8F9FC !important;
  border-bottom: 1px solid var(--crm-border) !important;
  font-weight: 600 !important;
}
.apexcharts-legend-text { color: var(--crm-text) !important; }

/* ============================================================================
   12. AUTHENTICATION LAYOUT
   ========================================================================== */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--crm-body-bg);
}

/* Brand / marketing panel (left, hidden below lg) */
.auth-brand-panel {
  position: relative;
  flex: 1 1 52%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  color: #fff;
  background: var(--crm-gradient);
  overflow: hidden;
}
/* Decorative orbs */
.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-brand-panel::before {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}
.auth-brand-panel::after {
  width: 520px;
  height: 520px;
  left: -180px;
  bottom: -220px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%);
}
.auth-brand-panel > * { position: relative; z-index: 1; }

.auth-headline {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 30rem;
}
.auth-headline .accent { color: #9BB8FF; }
.auth-lead { font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); max-width: 30rem; }

/* Feature bullet rows on the brand panel */
.auth-feature { display: flex; align-items: flex-start; gap: 0.9rem; }
.auth-feature .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}
.auth-feature h6 { color: #fff; font-size: 0.88rem; margin-bottom: 0.15rem; }
.auth-feature p { color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; margin-bottom: 0; }

/* Metric chips row (bottom of brand panel) */
.auth-metrics { display: flex; flex-wrap: wrap; gap: 2.25rem; }
.auth-metrics .metric .metric-value { font-size: 1.35rem; font-weight: 700; color: #fff; }
.auth-metrics .metric .metric-label { font-size: 0.74rem; color: rgba(255, 255, 255, 0.55); }

/* Form panel (right) */
.auth-form-panel {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { box-shadow: var(--shadow-lg); border: 0; }
.auth-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 0.86rem; color: var(--crm-text-muted); }

/* "or continue with" separator */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.74rem;
  color: var(--crm-text-muted);
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--crm-border); }

/* Password input with a reveal toggle button */
.password-field { position: relative; }
.password-field .password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: 0;
  background: transparent;
  color: var(--crm-text-muted);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
}
.password-field .password-toggle:hover { color: var(--crm-heading); background: #F1F3F8; }
.password-field .form-control { padding-right: 3rem; }

@media (max-width: 991.98px) {
  .auth-brand-panel { display: none; }
  .auth-form-panel { flex-basis: 100%; }
}

/* ============================================================================
   12b. STEPPER — pipeline / process stages (leads, orders, wizards)
   <div class="stepper">
     <div class="stepper-item done"><span class="stepper-dot">…</span><span class="stepper-label">…</span></div>
     <div class="stepper-item current">…</div>
     <div class="stepper-item">…</div>
   </div>
   ========================================================================== */
.stepper { display: flex; }
.stepper-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  min-width: 0;
}
/* Connector line to the previous step */
.stepper-item:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--crm-border-strong);
}
.stepper-item.done:not(:first-child)::before,
.stepper-item.current:not(:first-child)::before { background: var(--crm-secondary); }

.stepper-dot {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--crm-border-strong);
  color: var(--crm-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.stepper-item.done .stepper-dot {
  background: var(--crm-secondary);
  border-color: var(--crm-secondary);
  color: #fff;
}
.stepper-item.current .stepper-dot {
  border-color: var(--crm-secondary);
  color: var(--crm-secondary);
  box-shadow: 0 0 0 4px rgba(var(--crm-secondary-rgb), 0.15);
}
.stepper-item.danger .stepper-dot {
  background: var(--crm-danger);
  border-color: var(--crm-danger);
  color: #fff;
}
.stepper-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--crm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stepper-item.done .stepper-label,
.stepper-item.current .stepper-label { color: var(--crm-heading); }

/* ============================================================================
   12c. DETAIL LIST — label/value rows on 360° screens
   ========================================================================== */
.detail-list { display: flex; flex-direction: column; gap: 0.8rem; font-size: 0.83rem; }
.detail-item { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.detail-item .dt { color: var(--crm-text-muted); flex-shrink: 0; }
.detail-item .dd {
  font-weight: 500;
  color: var(--crm-heading);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ============================================================================
   12d. UPLOAD BOX — dashed drop-zone style file input
   <label class="upload-box"><input type="file"> icon + text</label>
   ========================================================================== */
.upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 1.6rem 1rem;
  border: 2px dashed var(--crm-border-strong);
  border-radius: var(--radius);
  background: #F8F9FC;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}
.upload-box:hover { border-color: var(--crm-secondary); background: var(--bs-secondary-bg-subtle); }
.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-box .upload-icon { font-size: 1.35rem; color: var(--crm-secondary); }
.upload-box .upload-text { font-size: 0.8rem; font-weight: 500; color: var(--crm-heading); }
.upload-box .upload-hint { font-size: 0.7rem; color: var(--crm-text-muted); }

/* ============================================================================
   13. GENERIC UTILITIES & ANIMATIONS
   ========================================================================== */
.fs-13 { font-size: 0.8125rem; }
.fs-12 { font-size: 0.75rem; }
.text-heading { color: var(--crm-heading); }
.bg-gradient-brand { background: var(--crm-gradient); }
.rounded-crm { border-radius: var(--radius); }
.shadow-crm { box-shadow: var(--shadow); }
.border-dashed { border-style: dashed !important; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }

/* Entrance animation with stagger helpers — add .anim-rise + .delay-N */
.anim-rise { animation: riseIn 0.45s ease both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }

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

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
