/* ==========================================================================
   RUHUNA TECMART / NR CALCULATOR — MODERN ADMIN UI DESIGN SYSTEM
   Inspired by Reference Architecture: Sleek Dark Slate, Rounded Rect Cards,
   Burgundy Stock Attention Banners, Pill Indicators, and Clean Typography
   ========================================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Core Backgrounds — Dark Slate & Midnight Blue */
  --bg-body: #070D18;
  --bg-sidebar: #091122;
  --bg-card: #0D162B;
  --bg-card-subtle: #0B1325;
  --bg-card-hover: #121E3A;
  --bg-input: #091021;
  --bg-modal: #0D162B;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: #152243;
  --border-focus: #2563EB;
  --border-alert: #5A1924;

  /* Primary Brand Blues */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: rgba(37, 99, 235, 0.15);
  --primary-glow: rgba(37, 99, 235, 0.35);

  /* Status Colors */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-text: #34D399;

  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.12);

  --danger: #EF4444;
  --danger-bg: #2B1117;
  --danger-chip: #3D141D;
  --danger-border: #7F1D1D;
  --danger-text: #F87171;

  --purple: #8B5CF6;
  --purple-bg: rgba(139, 92, 246, 0.15);

  --cyan: #06B6D4;
  --cyan-bg: rgba(6, 182, 212, 0.15);

  /* Typography */
  --text-main: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dark: #334155;

  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;

  /* Spacings & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --trans-fast: 0.18s ease;
  --trans-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-primary: 0 4px 16px rgba(37, 99, 235, 0.35);
  --sidebar-width: 250px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  color: inherit;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: #1A2645;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #253866;
}

/* ══════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, #111C38 0%, #070D18 70%);
  padding: 20px;
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.login-logo-wrapper {
  margin-bottom: 20px;
  display: inline-flex;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 3px solid #1E3A8A;
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.35);
}

.login-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-input-group {
  text-align: left;
}

.login-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-input-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
  transition: border-color var(--trans-fast);
}

.login-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.login-error {
  color: var(--danger-text);
  font-size: 0.82rem;
  display: none;
}

.login-error.show {
  display: block;
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: all var(--trans-fast);
  box-shadow: var(--shadow-primary);
}

.login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   ADMIN APP LAYOUT
   ══════════════════════════════════════════ */
.admin-app {
  display: none;
}

.admin-app.active {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 100;
  padding: 20px 14px;
  transition: transform var(--trans-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 22px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.sidebar-brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: #111C38;
  border: 1px solid #1E3A8A;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.sidebar-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-brand-info h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sidebar-brand-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Nav items */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--trans-fast);
  user-select: none;
}

.sidebar-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

/* Active Nav item: Solid Blue Pill */
.sidebar-nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidebar-nav-item.active .nav-icon {
  opacity: 1;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: #DC2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

/* Sidebar Footer & System Status Card */
.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-status-card {
  background: #181424;
  border: 1px solid #3F1D2C;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--trans-fast);
}

.sidebar-status-card:hover {
  border-color: #7F1D1D;
}

.status-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.status-card-icon {
  font-size: 0.9rem;
}

.status-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
}

.status-card-badge {
  background: #7F1D1D;
  color: #FCA5A5;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.status-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.theme-switch-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.theme-pill-badge {
  background: #111C38;
  color: #60A5FA;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #1E3A8A;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.sidebar-footer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer-link.logout {
  color: #F87171;
}

.sidebar-footer-link.logout:hover {
  background: var(--danger-bg);
}

/* ── MAIN CONTENT AREA ── */
.admin-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  background: var(--bg-body);
  display: flex;
  flex-direction: column;
  flex: 1;
  box-sizing: border-box;
}

/* Top Bar */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px 16px 36px;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  width: 100%;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  align-items: center;
  justify-content: center;
}

.topbar-hamburger svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
}

.topbar-heading-group {
  display: flex;
  flex-direction: column;
}

.topbar-breadcrumb {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #60A5FA;
  margin-bottom: 2px;
}

.topbar-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.topbar-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: all var(--trans-fast);
}

.topbar-icon-btn:hover {
  color: #fff;
  border-color: #253866;
}

.topbar-icon-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.6);
  color: #60A5FA;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.topbar-alerts-container {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #DC2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-body);
  transition: all var(--trans-fast);
}

.notification-badge.badge-pulse {
  animation: notificationBadgePulse 2s infinite;
}

@keyframes notificationBadgePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.8);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-primary);
  transition: all var(--trans-fast);
}

.btn-primary-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Main Inner Container */
.admin-content {
  padding: 20px 36px 48px 36px;
  width: 100%;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════
   STOCK ATTENTION BANNER (Reference Image 1)
   ══════════════════════════════════════════ */
.stock-attention-banner {
  background: #1C1017;
  border: 1px solid #4C1924;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(127, 29, 29, 0.15);
}

.attention-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.attention-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #3B141E;
  border: 1px solid #7F1D1D;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F87171;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.attention-info h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.attention-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.attention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--danger-chip);
  border: 1px solid #5A1926;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: #FCA5A5;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.attention-chip:hover {
  background: #4E1724;
  border-color: #882235;
  color: #fff;
  transform: translateY(-1px);
}

.attention-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #EF4444;
}

/* ══════════════════════════════════════════
   KPI CARDS GRID (Reference Image 1)
   ══════════════════════════════════════════ */
.kpi-main-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.kpi-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: all var(--trans-fast);
}

.kpi-box:hover {
  border-color: #253866;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.kpi-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.kpi-icon-badge.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
}

.kpi-icon-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.kpi-icon-badge.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}

.kpi-icon-badge.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
}

.kpi-icon-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
}

.kpi-box-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-box-value.green {
  color: #34D399;
}

.kpi-box-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.kpi-box-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   CHARTS & SECTIONS (Reference Images 2 & 3)
   ══════════════════════════════════════════ */
.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.chart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chart-heading-group h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.chart-heading-group p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.time-range-pills {
  display: inline-flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.time-pill-btn {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: all var(--trans-fast);
}

.time-pill-btn:hover {
  color: #fff;
}

.time-pill-btn.active {
  background: var(--primary);
  color: #fff;
}

.chart-body-wrap {
  position: relative;
  height: 280px;
}

.chart-legend-custom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.legend-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  margin-right: 6px;
}

/* Two Column Grid for Charts */
.dashboard-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

/* Two Column Grid for Recent Sales & Stocks */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  margin-bottom: 24px;
}

/* ══════════════════════════════════════════
   DATA TABLES (Reference Images 3 & 4)
   ══════════════════════════════════════════ */
.table-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.table-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-panel-title-group h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.table-panel-title-group p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.table-view-all-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #60A5FA;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--trans-fast);
}

.table-view-all-link:hover {
  color: #93C5FD;
}

/* Search and Filter Row for Catalog Table */
.catalog-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.catalog-search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.catalog-search-box input {
  width: 100%;
  padding: 9px 16px 9px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: #fff;
  transition: border-color var(--trans-fast);
}

.catalog-search-box input:focus {
  border-color: var(--primary);
}

.catalog-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.catalog-category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill-btn {
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  transition: all var(--trans-fast);
}

.cat-pill-btn:hover {
  color: #fff;
  border-color: #253866;
}

.cat-pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.results-count-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Modern Data Table */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th {
  padding: 14px 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.modern-table td {
  padding: 15px 20px;
  font-size: 0.88rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.modern-table tbody tr {
  transition: background var(--trans-fast);
}

.modern-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.inventory-table th {
  padding: 13px 16px;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.inventory-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.inventory-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

/* Table Item Components */
.table-prod-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.table-prod-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.type-pill.blue {
  background: rgba(37, 99, 235, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.type-pill.purple {
  background: rgba(139, 92, 246, 0.18);
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.profit-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #34D399;
}

.profit-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-dot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #10B981;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbl-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.tbl-action-btn:hover {
  color: #fff;
  border-color: #253866;
}

.tbl-action-btn.edit:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
}

.tbl-action-btn.delete:hover {
  background: var(--danger-bg);
  color: #F87171;
  border-color: #7F1D1D;
}

/* ══════════════════════════════════════════
   RIGHT COLUMN WIDGETS (Image 3)
   ══════════════════════════════════════════ */
.widget-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.widget-title-wrap {
  margin-bottom: 16px;
}

.widget-title-wrap h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
}

.widget-title-wrap p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stock-progress-item {
  margin-bottom: 14px;
}

.stock-progress-item:last-child {
  margin-bottom: 0;
}

.progress-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-low-mini {
  background: #7F1D1D;
  color: #FCA5A5;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.progress-bar-fill.red {
  background: #EF4444;
}

.progress-bar-fill.green {
  background: #10B981;
}

/* Timeline Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-info h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.activity-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   MODAL / POPUP
   ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-normal);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 10;
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform var(--trans-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 22px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.modal-close:hover {
  color: #fff;
  background: #1B294B;
}

/* Form controls */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.88rem;
  transition: border-color var(--trans-fast);
}

.form-group select option {
  background: var(--bg-card);
  color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.btn-primary {
  padding: 10px 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  padding: 10px 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.btn-secondary:hover {
  color: #fff;
  border-color: #253866;
}

/* ══════════════════════════════════════════
   MX PRO TOAST NOTIFICATIONS
   ══════════════════════════════════════════ */
.admin-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 32px);
}

.admin-toast-card {
  position: relative;
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(13, 23, 48, 0.96) 0%, rgba(8, 14, 28, 0.98) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: translateX(120%) scale(0.92);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.admin-toast-card.toast-show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.admin-toast-card.toast-hide {
  transform: translateX(120%) scale(0.9);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.3s ease;
}

.admin-toast-card.success {
  border-left: 4px solid #10B981;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.22);
}

.admin-toast-card.error {
  border-left: 4px solid #EF4444;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(239, 68, 68, 0.22);
}

.admin-toast-card.warning {
  border-left: 4px solid #F59E0B;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.22);
}

.admin-toast-card.info {
  border-left: 4px solid #3B82F6;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.22);
}

.toast-card-halo {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.15;
}

.admin-toast-card.success .toast-card-halo {
  background: radial-gradient(circle, #10B981 0%, transparent 70%);
}

.admin-toast-card.error .toast-card-halo {
  background: radial-gradient(circle, #EF4444 0%, transparent 70%);
}

.admin-toast-card.warning .toast-card-halo {
  background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
}

.admin-toast-card.info .toast-card-halo {
  background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
}

.toast-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  position: relative;
  z-index: 2;
}

.toast-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon-wrap.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast-icon-wrap.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.toast-icon-wrap.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.toast-content-body {
  flex: 1;
  min-width: 0;
}

.toast-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.toast-badge-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toast-badge-title.success {
  color: #34D399;
}

.toast-badge-title.error {
  color: #F87171;
}

.toast-badge-title.warning {
  color: #FBBF24;
}

.toast-badge-title.info {
  color: #60A5FA;
}

.toast-time-pill {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.toast-message-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #E2E8F0;
  line-height: 1.4;
  word-break: break-word;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.toast-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.toast-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.toast-progress-indicator {
  height: 100%;
  width: 100%;
  animation: toastIndicatorProgress linear forwards;
}

.toast-progress-indicator.success {
  background: linear-gradient(90deg, #10B981, #34D399);
}

.toast-progress-indicator.error {
  background: linear-gradient(90deg, #EF4444, #F87171);
}

.toast-progress-indicator.warning {
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.toast-progress-indicator.info {
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

@keyframes toastIndicatorProgress {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* ══════════════════════════════════════════
   TOPBAR ALERTS DROPDOWN (MX PRO DESIGN)
   ══════════════════════════════════════════ */
.topbar-alerts-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 410px;
  max-width: calc(100vw - 28px);
  max-height: 560px;
  background: linear-gradient(180deg, rgba(13, 22, 45, 0.98) 0%, rgba(8, 14, 28, 0.99) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 18px;
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  transform: translateY(-8px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.topbar-alerts-dropdown.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.alerts-dd-header {
  padding: 16px 18px;
  background: rgba(15, 27, 56, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alerts-dd-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alerts-bell-halo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60A5FA;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.alerts-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 8px #EF4444;
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }

  100% {
    transform: scale(0.9);
    opacity: 1;
  }
}

.alerts-dd-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.alerts-dd-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.alerts-dd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alerts-count-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.alerts-count-chip.active {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.alerts-refresh-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.alerts-refresh-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60A5FA;
}

.alerts-refresh-btn svg.spinning {
  animation: spinRefresh 0.6s linear;
}

@keyframes spinRefresh {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Segmented Tabs */
.alerts-tabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 12px;
  gap: 8px;
  background: rgba(10, 17, 34, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.alerts-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.alerts-tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.alerts-tab-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-badge {
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 800;
}

.tab-badge.badge-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.tab-badge.badge-cyan {
  background: rgba(14, 165, 233, 0.2);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.tab-badge.badge-zero {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Scroll Area */
.alerts-scroll-area {
  max-height: 340px;
  overflow-y: auto;
  padding: 12px 14px;
}

.alerts-scroll-area::-webkit-scrollbar {
  width: 5px;
}

.alerts-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.alerts-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Items List */
.alerts-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(18, 30, 60, 0.45);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all var(--trans-fast);
}

.alert-row-card:hover {
  background: rgba(24, 40, 78, 0.65);
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.alert-row-card.critical-border {
  border-left: 3px solid #EF4444;
}

.alert-row-card.warning-border {
  border-left: 3px solid #F59E0B;
}

.alert-row-card.order-border {
  border-left: 3px solid #38BDF8;
}

.alert-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #0B132B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.alert-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.alert-order-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38BDF8;
  flex-shrink: 0;
}

.alert-details-col {
  flex: 1;
  min-width: 0;
}

.alert-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.alert-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.alert-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.alert-tag-category {
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.alert-stock-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.alert-stock-badge.out {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.alert-stock-badge.low {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.alert-mini-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.alert-mini-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width var(--trans-fast);
}

.alert-mini-progress-bar.out {
  background: #EF4444;
}

.alert-mini-progress-bar.low {
  background: linear-gradient(90deg, #F59E0B, #10B981);
}

.alert-order-amount {
  font-weight: 800;
  color: #38BDF8;
}

.alert-order-items-count,
.alert-order-date {
  color: var(--text-muted);
}

.alert-pending-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 6px #F59E0B;
  animation: pulseDot 1.4s infinite;
}

.alert-action-col {
  flex-shrink: 0;
}

.alert-quick-refill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.1;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
  transition: all var(--trans-fast);
}

.alert-quick-refill-btn small {
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.85;
}

.alert-quick-refill-btn:hover {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.alert-view-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  background: rgba(14, 165, 233, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.alert-view-order-btn:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: #38BDF8;
  color: #fff;
  transform: translateX(2px);
}

/* Empty State */
.alerts-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
}

.empty-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.empty-icon-ring.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.empty-icon-ring.info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.empty-state-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F8FAFC;
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.4;
}

/* Footer */
.alerts-dd-footer {
  padding: 12px 14px;
  background: rgba(10, 17, 34, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.alerts-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.alerts-footer-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ══════════════════════════════════════════
   ANALYTICS & REPORTS STYLES (Matching Reference Images)
   ══════════════════════════════════════════ */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-card);
  color: #60A5FA;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.btn-export:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary);
  color: #fff;
}

.report-section-wrap {
  margin-bottom: 32px;
}

.report-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.report-kpi-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.analytics-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

/* Best Selling Products List */
.best-selling-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.best-selling-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.best-selling-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.best-selling-rank {
  font-weight: 800;
  color: #60A5FA;
  margin-right: 6px;
}

.best-selling-name {
  font-weight: 700;
  color: #fff;
}

.best-selling-val {
  font-weight: 800;
  color: #fff;
}

.best-selling-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.best-selling-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.best-selling-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #60A5FA);
  border-radius: var(--radius-pill);
}

/* Top Customers Widget */
.top-customers-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.top-customer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.customer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: #1D4ED8;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

.customer-info h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.customer-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.customer-spent-amount {
  font-size: 0.88rem;
  font-weight: 800;
  color: #34D399;
}

/* Promo Codes Manager */
.promo-code-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px dashed #2563EB;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 800;
  color: #60A5FA;
  letter-spacing: 0.5px;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all var(--trans-fast);
}

.copy-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.usage-progress {
  width: 90px;
  height: 5px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 4px;
}

.usage-progress-bar {
  height: 100%;
  background: #34D399;
  border-radius: var(--radius-pill);
}

/* ── Premium Inventory Modern SaaS Dashboard Styles ── */
.inv-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.inv-hero-titles h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inv-hero-titles p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.inv-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1280px) {
  .inv-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .inv-stat-grid {
    grid-template-columns: 1fr;
  }
}

.inv-stat-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.inv-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.inv-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.inv-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.inv-stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inv-stat-icon-wrap.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border-color: rgba(37, 99, 235, 0.3);
}

.inv-stat-icon-wrap.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border-color: rgba(139, 92, 246, 0.3);
}

.inv-stat-icon-wrap.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border-color: rgba(6, 182, 212, 0.3);
}

.inv-stat-icon-wrap.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

.inv-stat-icon-wrap.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.3);
}

.inv-stat-pill {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.inv-stat-pill.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #93C5FD;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.inv-stat-pill.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #C4B5FD;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.inv-stat-pill.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #7DD3FC;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.inv-stat-pill.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.inv-stat-pill.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.inv-stat-pill.red {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.inv-stat-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  display: block;
}

.inv-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.inv-stat-value.emerald {
  color: #34D399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.2);
}

.inv-stat-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Modern Table Container & Filter Bar ── */
.inv-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 30px;
}

.inv-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(15, 23, 42, 0.4);
}

.inv-search-wrap {
  position: relative;
  min-width: 260px;
}

.inv-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.inv-search-input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.inv-search-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.inv-cat-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-filter-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.inv-filter-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.inv-filter-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #3B82F6;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

/* Row & Column Tweaks */
.inv-prod-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-prod-img-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
}

.inv-prod-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.inv-prod-meta {
  display: flex;
  flex-direction: column;
}

.inv-prod-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 3px;
}

.inv-prod-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.inv-prod-cat-tag {
  background: rgba(96, 165, 250, 0.12);
  color: #93C5FD;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.68rem;
}

.inv-price-unit {
  display: flex;
  flex-direction: column;
}

.inv-sell-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
}

.inv-cost-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.inv-profit-wrap {
  display: flex;
  flex-direction: column;
}

.inv-profit-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #34D399;
}

.inv-margin-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  width: fit-content;
}

.inv-stock-level {
  display: flex;
  flex-direction: column;
}

.inv-stock-num {
  font-size: 1.15rem;
  font-weight: 800;
}

.inv-stock-num.in-stock {
  color: #34D399;
}

.inv-stock-num.low-stock {
  color: #FBBF24;
}

.inv-stock-num.out-of-stock {
  color: #F87171;
}

.inv-stock-threshold {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.inv-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.inv-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 2px;
}

.inv-stepper input {
  width: 44px;
  border: none;
  background: transparent;
  color: #FFFFFF;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 2px;
}

.inv-stepper input:focus {
  outline: none;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.stock-pill.in-stock {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.stock-pill.low-stock {
  background: rgba(245, 158, 11, 0.14);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulseLowStock 2s infinite ease-in-out;
}

.stock-pill.out-of-stock {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes pulseLowStock {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.btn-refill-sm {
  padding: 7px 14px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--trans-fast);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-refill-sm:hover {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-history-sm {
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--trans-fast);
}

.btn-history-sm:hover {
  color: #fff;
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.1);
}

.refill-quick-chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.refill-chip {
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #60A5FA;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.refill-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.history-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.history-badge.restock {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.history-badge.manual {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.history-badge.sale {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ══════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stock-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .kpi-main-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-sub-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-kpi-grid.three-col {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-cards-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-mid-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .stock-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.7);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    width: 100%;
  }

  .topbar-hamburger {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--trans-normal);
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .stock-kpi-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    padding: 16px 20px;
  }

  .admin-content {
    padding: 16px 20px 30px 20px;
  }

  .kpi-main-grid {
    grid-template-columns: 1fr;
  }

  .kpi-sub-grid {
    grid-template-columns: 1fr;
  }

  .report-kpi-grid {
    grid-template-columns: 1fr;
  }

  .report-kpi-grid.three-col {
    grid-template-columns: 1fr;
  }

  .catalog-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search-box {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .topbar-title {
    font-size: 1.3rem;
  }

  .topbar-date {
    display: none;
  }

  .kpi-box-value {
    font-size: 1.5rem;
  }
}

/* ══════════════════════════════════════════
   CUSTOMER MANAGEMENT SUITE & DIRECTORY STYLES
   ══════════════════════════════════════════ */

/* ── Customer KPI Grid ── */
.cust-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .cust-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cust-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.cust-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--trans-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

.cust-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: all var(--trans-fast);
}

.cust-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cust-kpi-card.blue::before {
  background: linear-gradient(90deg, #2563EB, #60A5FA);
}

.cust-kpi-card.green::before {
  background: linear-gradient(90deg, #10B981, #34D399);
}

.cust-kpi-card.purple::before {
  background: linear-gradient(90deg, #8B5CF6, #A78BFA);
}

.cust-kpi-card.red::before {
  background: linear-gradient(90deg, #EF4444, #F87171);
}

.cust-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cust-kpi-card.blue .cust-kpi-icon {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.cust-kpi-card.green .cust-kpi-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cust-kpi-card.purple .cust-kpi-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.cust-kpi-card.red .cust-kpi-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cust-kpi-info {
  display: flex;
  flex-direction: column;
}

.cust-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.cust-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 3px 0 2px 0;
}

.cust-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* ── Customer Toolbar & Search Bar ── */
.cust-toolbar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cust-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 320px;
}

.cust-search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.cust-search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.cust-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 40px;
  font-size: 0.88rem;
  color: #fff;
  transition: all var(--trans-fast);
}

.cust-search-input:focus {
  border-color: var(--primary);
  background: rgba(9, 16, 33, 0.9);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.cust-search-input::placeholder {
  color: var(--text-muted);
}

.cust-filter-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  overflow-x: auto;
}

.cust-filter-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--trans-fast);
}

.cust-filter-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.cust-filter-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.cust-filter-tab.blacklist-tab.active {
  background: #DC2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.cust-tab-count {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}

.cust-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cust-sort-select {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.82rem;
  color: #fff;
  cursor: pointer;
}

.cust-add-btn {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all var(--trans-fast);
}

.cust-add-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ── Customer Table Elements ── */
.cust-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cust-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.cust-avatar.blacklist {
  background: linear-gradient(135deg, #991B1B, #EF4444);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.cust-name-meta {
  display: flex;
  flex-direction: column;
}

.cust-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cust-name-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cust-address-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.badge-repeat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-blacklist {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border: 1px solid #DC2626;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

.cust-phone-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cust-phone-main {
  font-size: 0.85rem;
  font-weight: 700;
  color: #E2E8F0;
  font-family: monospace;
}

.whatsapp-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  width: fit-content;
  transition: all var(--trans-fast);
}

.whatsapp-link-btn:hover {
  background: #25D366;
  color: #000;
}

.orders-count-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

.profit-text-cell {
  font-size: 0.88rem;
  font-weight: 800;
  color: #34D399;
}

.profit-margin-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.purchase-date-main {
  font-size: 0.84rem;
  font-weight: 600;
  color: #E2E8F0;
}

.purchase-rel-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Action buttons */
.cust-actions-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cust-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.cust-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.cust-action-btn.view:hover {
  background: rgba(37, 99, 235, 0.25);
  color: #60A5FA;
  border-color: #2563EB;
}

.cust-action-btn.edit:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #FBBF24;
  border-color: #F59E0B;
}

.cust-action-btn.blacklist:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #F87171;
  border-color: #EF4444;
}

.cust-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #F87171;
  border-color: #DC2626;
}

/* ── Customer Detail View Modal ── */
.cust-detail-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cust-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-card);
  gap: 16px;
  flex-wrap: wrap;
}

.cust-detail-user-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cust-detail-avatar-large {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.cust-detail-avatar-large.blacklist {
  background: linear-gradient(135deg, #991B1B, #EF4444);
}

.cust-detail-user-block h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cust-detail-user-block p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.cust-detail-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 650px) {
  .cust-detail-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cust-detail-kpi-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.cust-detail-kpi-cell .cell-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cust-detail-kpi-cell .cell-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.cust-detail-contact-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #E2E8F0;
}

.cust-detail-contact-box strong {
  color: var(--text-secondary);
  font-weight: 700;
  margin-right: 6px;
}

.blacklist-warning-alert {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid #DC2626;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #FCA5A5;
  font-size: 0.85rem;
}

.blacklist-warning-alert h5 {
  font-weight: 800;
  color: #EF4444;
  margin-bottom: 2px;
  font-size: 0.88rem;
}

/* ════════════════════════════════════════════
   CREATIVE MODERN ANALYTICS SUITE
   ════════════════════════════════════════════ */

.analytics-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.analytics-hero-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.analytics-hero-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.pulse-green-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: pulseSyncDot 2s infinite ease-in-out;
}

@keyframes pulseSyncDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.analytics-hero-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: #E2E8F0;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.analytics-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.analytics-refresh-btn:active {
  transform: translateY(0);
}

.analytics-kpi-grid-6,
.analytics-kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {

  .analytics-kpi-grid-6,
  .analytics-kpi-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {

  .analytics-kpi-grid-6,
  .analytics-kpi-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {

  .analytics-kpi-grid-6,
  .analytics-kpi-grid-5 {
    grid-template-columns: 1fr;
  }
}

.custom-date-range-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  flex-wrap: wrap;
}

.analytics-date-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 10px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.analytics-date-input:focus {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.analytics-apply-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.analytics-apply-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.payment-mini-summary-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.payment-mini-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.payment-mini-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.payment-mini-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.kpi-icon-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.kpi-icon-badge.pink {
  background: rgba(236, 72, 153, 0.15);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.kpi-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 4px;
}

.kpi-badge-pill.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-badge-pill.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.kpi-badge-pill.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ── Leaderboard Rank Badges ── */
.best-selling-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.rank-gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-silver {
  background: linear-gradient(135deg, #94A3B8, #64748B);
  color: #fff;
  box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-bronze {
  background: linear-gradient(135deg, #B45309, #92400E);
  color: #fff;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-default {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

.product-cat-mini-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  margin-left: 6px;
}

.category-donut-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 480px) {
  .category-donut-legend {
    grid-template-columns: 1fr;
  }
}

.category-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
}

.category-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.category-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-legend-val {
  font-weight: 700;
  color: #fff;
}

.analytics-empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}

.analytics-empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  opacity: 0.7;
}

.analytics-empty-state h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 6px;
}

.analytics-empty-state p {
  font-size: 0.82rem;
  max-width: 320px;
  margin: 0 auto 14px auto;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════
   ENTERPRISE REPORTS SUITE — HIGH-END EXECUTIVE STYLES
   ══════════════════════════════════════════════════════ */

.report-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: radial-gradient(ellipse 80% 50% at 20% -20%, rgba(59, 130, 246, 0.12), transparent), linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.report-hero-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), rgba(16, 185, 129, 0.6), transparent);
}

.report-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-icon-cube {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  color: #fff;
  flex-shrink: 0;
}

.report-hero-title-wrap {
  display: flex;
  flex-direction: column;
}

.report-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-hero-subtitle {
  font-size: 0.76rem;
  color: #94A3B8;
  font-weight: 400;
  margin-top: 2px;
}

.report-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.report-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Modern Segmented Time Range Selector */
.segmented-time-selector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.segmented-time-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.segmented-time-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.segmented-time-btn.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5);
}

/* Master Excel & CSV Export Buttons */
.btn-excel-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-excel-export:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.btn-excel-export:active {
  transform: translateY(0);
}

.btn-csv-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-csv-export:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ══════════════════════════════════════════
   PRO-MAX CLEAN FINANCIAL REPORTS STYLES
   ══════════════════════════════════════════ */

/* 4-Card Pro KPI Row */
.rpt-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .rpt-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 580px) {
  .rpt-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
}

@media (max-width: 360px) {
  .rpt-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.rpt-kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rpt-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.5);
}

.rpt-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.rpt-kpi-card:hover .rpt-kpi-icon {
  transform: scale(1.08);
}

.rpt-kpi-icon.blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(96, 165, 250, 0.15) 100%);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.25);
}

.rpt-kpi-icon.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(52, 211, 153, 0.15) 100%);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.rpt-kpi-icon.purple {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25) 0%, rgba(192, 132, 252, 0.15) 100%);
  color: #C084FC;
  border: 1px solid rgba(192, 132, 252, 0.3);
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.25);
}

.rpt-kpi-icon.cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(103, 232, 249, 0.15) 100%);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

.rpt-kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rpt-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.rpt-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

.rpt-kpi-value.blue { color: #60A5FA; }
.rpt-kpi-value.green { color: #34D399; }
.rpt-kpi-value.purple { color: #C084FC; }
.rpt-kpi-value.cyan { color: #38BDF8; }

.rpt-kpi-sub {
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 3px;
  font-weight: 500;
}

/* Table Card Enhancements */
.rpt-table-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.rpt-count-chip {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.35);
  padding: 2px 8px;
  border-radius: 9999px;
}

.rpt-table-sub {
  margin: 3px 0 0 0;
  font-size: 0.76rem;
  color: #94A3B8;
}

.rpt-export-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpt-empty-cell {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.rpt-cell-name {
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
}

.rpt-cell-sub {
  font-size: 0.72rem;
  color: #94A3B8;
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

.rpt-promo-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.74rem;
}

.rpt-mono-val {
  font-weight: 700;
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

.rpt-profit-val {
  font-weight: 800;
  color: #34D399;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

.rpt-mono-cell {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
}

.rpt-mono-cell.rpt-muted {
  color: #94A3B8;
}

.rpt-mono-cell.rpt-bold {
  font-weight: 700;
  color: #FFFFFF;
}

.rpt-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}

.rpt-status-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rpt-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rpt-status-pill.rejected,
.rpt-status-pill.disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.rpt-muted-strike {
  text-decoration: line-through;
  opacity: 0.6;
}

.order-id-chip.rejected {
  border-color: rgba(239, 68, 68, 0.4);
  color: #F87171;
  background: rgba(239, 68, 68, 0.08);
}

/* 5-Column Executive High-Impact KPI Grid */
.report-kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1280px) {
  .report-kpi-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .report-kpi-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .report-kpi-grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Clean Executive KPI Card with Subtle Accent Line */
.kpi-box-glow {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-box-glow:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
}

.kpi-box-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.kpi-box-glow.blue::before {
  background: linear-gradient(90deg, #2563EB, #60A5FA);
}

.kpi-box-glow.cyan::before {
  background: linear-gradient(90deg, #0284C7, #38BDF8);
}

.kpi-box-glow.green::before {
  background: linear-gradient(90deg, #059669, #34D399);
}

.kpi-box-glow.purple::before {
  background: linear-gradient(90deg, #7C3AED, #C084FC);
}

.kpi-box-glow.pink::before {
  background: linear-gradient(90deg, #DB2777, #F472B6);
}

.kpi-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kpi-icon-orb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.kpi-icon-orb.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #60A5FA;
}

.kpi-icon-orb.cyan {
  background: rgba(2, 132, 199, 0.12);
  color: #38BDF8;
}

.kpi-icon-orb.green {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
}

.kpi-icon-orb.purple {
  background: rgba(124, 58, 237, 0.12);
  color: #C084FC;
}

.kpi-icon-orb.pink {
  background: rgba(219, 39, 119, 0.12);
  color: #F472B6;
}

.kpi-margin-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

.kpi-val-display {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  margin: 4px 0 2px 0;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

.kpi-title-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-meta-sub {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 4px;
}

/* Modern Reports Toolbar Strip */
.report-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 7px 10px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.report-nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.report-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-tab-pill:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.report-tab-pill.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.report-tab-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1;
}

.report-tab-pill.active .report-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Sleek Search Pill */
.report-search-wrap {
  position: relative;
  min-width: 270px;
  max-width: 360px;
  flex: 1;
}

.report-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 9px 14px 9px 36px;
  font-size: 0.8rem;
  color: #FFFFFF;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.report-search-input:focus {
  border-color: #3B82F6;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.report-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  pointer-events: none;
  display: flex;
}

/* Premium Table Container Card */
.report-table-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin-bottom: 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.report-table-card .table-panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
}

.report-table-card .modern-table thead th {
  background: rgba(15, 23, 42, 0.75);
  color: #94A3B8;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-table-card .modern-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.15s ease;
}

.report-table-card .modern-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.045);
}

.report-table-card .modern-table td {
  padding: 13px 14px;
  vertical-align: middle;
}

/* Micro-Badges and Chips */
.order-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37, 99, 235, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cust-avatar-orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}

.promo-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px dashed rgba(168, 85, 247, 0.45);
  color: #C084FC;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.discount-val-sub {
  font-size: 0.72rem;
  color: #F87171;
  font-weight: 700;
  margin-top: 2px;
}

.margin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.margin-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.3);
}

.margin-pill.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-badge-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.status-badge-compact.cod {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-compact.bank {
  background: rgba(59, 130, 246, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.report-table-footer {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%) !important;
  font-weight: 800;
  color: #FFFFFF;
  border-top: 2px solid rgba(59, 130, 246, 0.45) !important;
}

.report-table-footer td {
  padding: 14px 14px !important;
}

.customer-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.customer-link-chip:hover .cust-name-text {
  color: #60A5FA;
  text-decoration: underline;
}

.items-breakdown-cell {
  max-width: 250px;
  line-height: 1.45;
}

.item-line-bullet {
  display: block;
  font-size: 0.77rem;
  color: #CBD5E1;
  margin-bottom: 2px;
}

.qty-tag {
  display: inline-block;
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
  font-weight: 800;
  margin-right: 4px;
}

/* ═══ Reports Responsive Enhancements ═══ */

@media (max-width: 1024px) {
  .report-hero-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 12px;
  }
  .report-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .segmented-time-selector {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .segmented-time-selector::-webkit-scrollbar { display: none; }
  .report-tabs-bar {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  .report-nav-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .report-nav-pills::-webkit-scrollbar { display: none; }
  .report-tab-pill {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .report-search-wrap {
    width: 100%;
    min-width: unset;
    max-width: 100%;
  }
  .report-table-card .table-panel-header {
    padding: 14px 16px;
  }
}

@media (max-width: 768px) {
  .report-hero-bar {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .report-icon-cube {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .report-hero-title {
    font-size: 1rem;
  }
  .report-sync-pill {
    font-size: 0.66rem;
    padding: 2px 8px;
  }
  .report-kpi-grid-5 {
    gap: 10px;
    margin-bottom: 14px;
  }
  .kpi-box-glow {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .kpi-val-display {
    font-size: 1.15rem;
  }
  .report-tabs-bar {
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 8px;
  }
  .report-tab-pill {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .report-table-card {
    border-radius: 12px;
    margin-bottom: 16px;
  }
  .report-table-card .modern-table thead th {
    padding: 10px 8px;
    font-size: 0.68rem;
  }
  .report-table-card .modern-table td {
    padding: 10px 8px;
  }
  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table-wrap::-webkit-scrollbar {
    height: 6px;
  }
  .data-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
  }
  .customer-link-chip {
    gap: 6px;
  }
  .cust-avatar-orb {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }
  .items-breakdown-cell {
    max-width: 180px;
  }
  .order-id-chip {
    font-size: 0.72rem;
    padding: 2px 6px;
  }
}

@media (max-width: 480px) {
  .report-hero-left {
    gap: 8px;
  }
  .report-hero-title {
    font-size: 0.9rem;
  }
  .report-hero-subtitle {
    font-size: 0.68rem;
  }
  .report-icon-cube {
    width: 30px;
    height: 30px;
  }
  .segmented-time-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }
  .kpi-box-glow {
    padding: 10px 12px;
  }
  .kpi-val-display {
    font-size: 1rem;
  }
  .kpi-title-sub {
    font-size: 0.68rem;
  }
  .report-table-card .table-panel-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .report-table-card .modern-table thead th {
    padding: 8px 6px;
    font-size: 0.65rem;
  }
  .report-table-card .modern-table td {
    padding: 8px 6px;
    font-size: 0.76rem;
  }
  .items-breakdown-cell {
    max-width: 130px;
    font-size: 0.72rem;
  }
}

/* ══════════════════════════════════════
   SETTINGS & DANGER ZONE STYLES
   ══════════════════════════════════════ */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  color: #FFFFFF !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.6);
  transform: translateY(-2px);
}

.btn-danger:active {
  transform: translateY(0);
}

.badge-status-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-status-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .admin-toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: calc(100vw - 32px);
    width: auto;
  }

  .topbar-alerts-dropdown {
    width: calc(100vw - 32px);
    right: -48px;
    max-height: 80vh;
  }
}

/* ==========================================================================
   ORDER VERIFICATION, OFFICIAL INVOICE, WARRANTY CLAIM & SYSTEM STATUS SUITE
   ========================================================================== */

/* --- Top KPI Bar --- */
.orders-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.order-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(18, 24, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.order-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.order-kpi-card.active-kpi {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.order-kpi-card.active-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6);
}

.order-kpi-card.kpi-delivered.active-kpi {
  border-color: rgba(139, 92, 246, 0.6);
}

.order-kpi-card.kpi-returned.active-kpi {
  border-color: rgba(249, 115, 22, 0.6);
}

.order-kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.order-kpi-icon-wrap.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.order-kpi-icon-wrap.confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.order-kpi-icon-wrap.shipped {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.order-kpi-icon-wrap.delivered {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.order-kpi-icon-wrap.returned {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.order-kpi-icon-wrap.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.order-kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.order-kpi-num {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: #F8FAFC;
  font-family: 'Space Grotesk', sans-serif;
}

.order-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 4px;
}

.order-kpi-sub {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
}

/* --- Toolbar, Search & Filter Tabs --- */
/* --- Orders Command Center & Filter Tabs (Pro Max) --- */
.ord-command-panel {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin-bottom: 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.ord-cmd-topbar {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.ord-cmd-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ord-cmd-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ord-cmd-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.ord-cmd-count {
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.35);
  padding: 3px 9px;
  border-radius: 9999px;
  line-height: 1.2;
}

.ord-cmd-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Segmented Filter Control */
.ord-seg-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  flex-wrap: wrap;
}

.ord-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.ord-seg-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.ord-seg-btn.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.ord-seg-num {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1;
}

.ord-seg-btn.active .ord-seg-num {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Legacy & Fallback buttons */
.orders-toolbar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(18, 24, 38, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.orders-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ord-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ord-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #F1F5F9;
  border-color: rgba(255, 255, 255, 0.15);
}

.ord-filter-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
  border-color: rgba(59, 130, 246, 0.5);
  color: #60A5FA;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.ord-filter-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
}

.ord-filter-btn.active .ord-filter-count {
  background: #3B82F6;
  color: #FFFFFF;
}

.filter-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 8px #F59E0B;
  animation: ordPulse 1.8s infinite;
}

@keyframes ordPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.5;
  }
}

.btn-ord-new-sale {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-ord-new-sale:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* ══════════════════════════════════════════
   ORDERS EMPTY STATE (PRO MAX)
   ══════════════════════════════════════════ */
.ord-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 68px 24px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.1) 75%);
  min-height: 340px;
}

.ord-empty-icon-ring {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ord-empty-state:hover .ord-empty-icon-ring {
  transform: scale(1.06) translateY(-3px);
}

.ord-empty-icon-ring.blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60A5FA;
  box-shadow: 0 0 35px -5px rgba(37, 99, 235, 0.35);
}

.ord-empty-icon-ring.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.08) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34D399;
  box-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.35);
}

.ord-empty-icon-ring.amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  box-shadow: 0 0 35px -5px rgba(245, 158, 11, 0.35);
}

.ord-empty-icon-ring.purple {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2) 0%, rgba(192, 132, 252, 0.08) 100%);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: #C084FC;
  box-shadow: 0 0 35px -5px rgba(147, 51, 234, 0.35);
}

.ord-empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  margin: 0 0 8px 0;
  font-family: 'Outfit', sans-serif;
}

.ord-empty-desc {
  font-size: 0.86rem;
  color: #94A3B8;
  max-width: 480px;
  margin: 0 auto 24px auto;
  line-height: 1.55;
}

.ord-empty-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-ord-empty-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ord-empty-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.btn-ord-empty-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-empty-new:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.22);
}

.orders-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.orders-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.orders-search-box svg,
.orders-search-box i {
  position: absolute;
  left: 12px;
  color: #64748B;
  pointer-events: none;
}

.orders-search-box input {
  padding: 8px 14px 8px 36px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #F8FAFC;
  font-size: 0.82rem;
  width: 220px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.orders-search-box input:focus {
  border-color: #3B82F6;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  width: 260px;
}

/* --- Orders Table --- */
.pending-order-row {
  background: rgba(245, 158, 11, 0.03) !important;
  border-left: 3px solid #F59E0B !important;
}

.pending-order-row:hover {
  background: rgba(245, 158, 11, 0.07) !important;
}

.rejected-order-row {
  background: rgba(239, 68, 68, 0.02) !important;
  border-left: 3px solid #EF4444 !important;
  opacity: 0.88;
}

.rejected-order-row:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.06) !important;
}

.ord-code-text {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 700;
  font-size: 0.88rem;
  color: #60A5FA;
  display: block;
}

.ord-sale-id {
  font-size: 0.72rem;
  color: #64748B;
  display: block;
  margin-top: 2px;
}

.ord-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  margin-top: 3px;
  transition: all 0.2s ease;
}

.ord-phone-link:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.ord-address {
  font-size: 0.72rem;
  color: #94A3B8;
  display: block;
  margin-top: 3px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Pills */
.ord-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
}

.ord-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ord-status-pill.confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ord-status-pill.shipped {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ord-status-pill.delivered {
  background: rgba(139, 92, 246, 0.15);
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.ord-status-pill.returned {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.ord-status-pill.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Interactive Status Select Dropdown */
.ord-status-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 5px 22px 5px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23CBD5E1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.ord-status-select:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.ord-status-select option {
  background: #0F172A;
  color: #F8FAFC;
  font-weight: 600;
  padding: 6px 10px;
}

.ord-status-select.ord-status-pending {
  background-color: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.4);
}

.ord-status-select.ord-status-confirmed {
  background-color: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.4);
}

.ord-status-select.ord-status-shipped {
  background-color: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.4);
}

.ord-status-select.ord-status-delivered {
  background-color: rgba(139, 92, 246, 0.18);
  color: #C084FC;
  border-color: rgba(139, 92, 246, 0.4);
}

.ord-status-select.ord-status-returned {
  background-color: rgba(249, 115, 22, 0.18);
  color: #FB923C;
  border-color: rgba(249, 115, 22, 0.4);
}

.ord-status-select.ord-status-rejected,
.ord-status-select.ord-status-cancelled {
  background-color: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-ord-deliver {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.btn-ord-deliver:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
}

.btn-ord-return {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.35);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-return:hover {
  background: rgba(249, 115, 22, 0.28);
  color: #FFFFFF;
  border-color: #F97316;
}

.btn-ord-pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.25) 100%);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ord-pending:hover {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #0F172A;
  border-color: #F59E0B;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

/* Order Action Buttons */
.btn-ord-confirm {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-ord-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.btn-ord-reject {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-reject:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #FFFFFF;
  border-color: #EF4444;
}

.btn-ord-call {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ord-call:hover {
  background: #25D366;
  color: #FFFFFF;
}

.btn-ord-invoice {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transition: all 0.2s ease;
}

.btn-ord-invoice:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-ord-label {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-label:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #F59E0B;
}

.btn-ord-delivery {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-delivery:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.5);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-ord-ship {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-ship:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3B82F6;
}

.btn-ord-warranty {
  background: rgba(139, 92, 246, 0.15);
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-warranty:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: #8B5CF6;
  color: #FFFFFF;
}

.btn-ord-restore {
  background: rgba(255, 255, 255, 0.08);
  color: #F1F5F9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ord-restore:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* --- Official Tax Invoice Document Styling --- */
.invoice-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #0F172A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  flex-wrap: wrap;
}

.inv-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-inv-edit-war {
  background: rgba(99, 102, 241, 0.18);
  color: #A5B4FC !important;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-inv-edit-war:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #FFFFFF !important;
  border-color: #818CF8;
  transform: translateY(-1px);
}

.btn-inv-wa {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF !important;
  border: none;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-inv-wa:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.btn-inv-print {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-inv-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.invoice-scroll-body {
  max-height: calc(88vh - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #E2E8F0;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.official-invoice-paper {
  background: #FFFFFF;
  color: #0F172A;
  width: 100%;
  max-width: 820px;
  min-height: 1080px;
  margin: 0 auto;
  padding: 42px 46px 36px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header & Brand */
.inv-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2.5px solid #0F172A;
}

.inv-brand-col {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.inv-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #0F172A;
  border: 2px solid #2563EB;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.inv-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-brand-text h1 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0 0 2px 0;
  line-height: 1.2;
}

.inv-tagline {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px 0;
}

.inv-contacts {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.inv-badge-col {
  text-align: right;
  flex-shrink: 0;
}

.inv-title-stamp {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #1E3A8A;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.inv-title-sub {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.inv-meta-line {
  font-size: 0.84rem;
  color: #334155;
  margin-bottom: 3px;
}

.inv-meta-line strong {
  color: #0F172A;
}

.inv-verified-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #DCFCE7;
  color: #15803D;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid #86EFAC;
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* Customer & Shipping Details Grid */
.inv-billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
  background: #F8FAFC;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.inv-bill-box h4,
.inv-pay-box h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-cust-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.inv-cust-row {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.45;
  margin-top: 3px;
}

/* Responsive Table Wrapper */
.inv-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.inv-items-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

.inv-items-table th {
  background: #0F172A;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  border: 1px solid #0F172A;
  text-align: left;
}

.inv-items-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.9rem;
  vertical-align: middle;
  color: #1E293B;
}

.inv-items-table tbody tr:nth-child(even) {
  background: #FAFAFA;
}

.inv-item-sub {
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 2px;
}

.inv-item-meta-sub {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.inv-meta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  font-size: 0.75rem;
  color: #334155;
  font-weight: 700;
}

.inv-warranty-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.inv-warranty-pill.extended {
  color: #6D28D9;
  background: #F5F3FF;
  border-color: #DDD6FE;
}

/* Dedicated Warranty Claim Certificate Card */
.inv-warranty-cert-box {
  background: linear-gradient(135deg, #F0F9FF 0%, #F8FAFC 100%);
  border: 1.5px solid #BAE6FD;
  border-radius: 8px;
  padding: 11px 15px;
  margin: 14px 0;
  box-sizing: border-box;
}

.inv-war-cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #BAE6FD;
  padding-bottom: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-war-claim-badge {
  font-size: 0.72rem;
  color: #0369A1;
  background: #E0F2FE;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid #7DD3FC;
  font-family: monospace;
}

.inv-war-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}

.inv-war-meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.war-meta-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.war-meta-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0F172A;
}

.war-meta-val.highlight-green {
  color: #059669;
  font-weight: 800;
}

.inv-war-terms-simple {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.7rem;
  color: #475569;
  line-height: 1.4;
}

/* Financial & Terms Bottom Grid */
.inv-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: flex-start;
  margin-top: 14px;
}

.inv-sign-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.inv-review-qr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.inv-qr-img-box {
  width: 64px;
  height: 64px;
  background: #FFFFFF;
  border: 1px solid #94A3B8;
  border-radius: 6px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-qr-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inv-qr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-qr-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 4px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inv-qr-heading {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A;
  margin-top: 1px;
}

.inv-qr-sub {
  font-size: 0.7rem;
  color: #64748B;
  line-height: 1.35;
}

.inv-security-stamp {
  margin-bottom: 12px;
}

.inv-stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
}

.inv-signature-box {
  margin-top: 12px;
}

.inv-sig-line {
  width: 170px;
  border-top: 1.5px dashed #94A3B8;
  margin-bottom: 4px;
}

.inv-signature-box span {
  font-size: 0.7rem;
  color: #64748B;
  font-weight: 600;
}

.inv-totals-col {
  background: #F8FAFC;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #475569;
}

.inv-total-line strong {
  color: #0F172A;
}

.inv-total-line.promo {
  color: #DC2626;
  font-weight: 600;
}

.inv-total-line.war-fee {
  color: #7C3AED;
  font-weight: 600;
}

.inv-grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.08rem;
  font-weight: 900;
  color: #0F172A;
  border-top: 2px solid #0F172A;
  padding-top: 8px;
  margin-top: 3px;
}

.inv-footer-bar {
  border-top: 1px dashed #CBD5E1;
  padding-top: 10px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #64748B;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==========================================================================
   WARRANTY MANAGEMENT & EXTENSION UI (Sales Suite)
   ========================================================================== */

.warranty-config-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.warranty-config-panel h4 {
  font-size: 0.92rem;
  color: #F8FAFC;
  font-weight: 700;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warranty-config-panel p.subtext {
  font-size: 0.78rem;
  color: #94A3B8;
  margin: 0 0 14px 0;
}

.war-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-war-preset {
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-war-preset:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #FFFFFF;
}

.btn-war-preset.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(29, 78, 216, 0.35));
  border: 1.5px solid #60A5FA;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.war-recalc-preview {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.war-recalc-preview strong {
  color: #60A5FA;
}

.btn-save-warranty {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-save-warranty:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   MOBILE & UNIVERSAL RESPONSIVE BREAKPOINTS (Invoice & Modals)
   ========================================================================== */

@media (max-width: 768px) {
  .invoice-modal-topbar {
    padding: 12px 14px;
    gap: 10px;
  }

  .inv-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .invoice-scroll-body {
    padding: 10px 8px;
  }

  .official-invoice-paper {
    padding: 22px 18px;
    border-radius: 8px;
  }

  .inv-head-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .inv-badge-col {
    text-align: left;
    width: 100%;
    border-top: 1px dashed #E2E8F0;
    padding-top: 12px;
  }

  .inv-billing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 16px;
  }

  .inv-bottom-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .inv-signature-box {
    margin-top: 16px;
  }
}

@media (max-width: 480px) {
  .invoice-modal-topbar h3 {
    font-size: 0.95rem !important;
  }

  .btn-inv-edit-war,
  .btn-inv-wa,
  .btn-inv-print {
    padding: 7px 11px;
    font-size: 0.76rem;
  }

  .inv-brand-col {
    gap: 12px;
  }

  .inv-logo-wrap {
    width: 50px;
    height: 50px;
  }

  .inv-brand-text h1 {
    font-size: 1.08rem;
  }

  .inv-title-stamp {
    font-size: 1.25rem;
  }
}

/* --- Warranty Claim Modal Styling --- */
.warranty-status-card {
  padding: 18px 22px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.warranty-status-card.active-warranty {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.warranty-status-card.expired-warranty {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(185, 28, 28, 0.08));
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.war-badge-pill {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.war-badge-pill.active {
  background: #10B981;
  color: #FFFFFF;
}

.war-badge-pill.expired {
  background: #EF4444;
  color: #FFFFFF;
}

.war-days-num {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  color: #10B981;
}

.war-days-num.expired {
  color: #EF4444;
}

.warranty-form-panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.warranty-claim-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.warranty-claim-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 8px;
}

/* --- System Status Low Stock Modal --- */
.sys-status-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.sys-kpi-box {
  padding: 16px 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

/* JS uses sys-kpi-title */
.sys-kpi-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin-bottom: 8px;
}

/* JS uses sys-kpi-val with color variants */
.sys-kpi-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: #F8FAFC;
  line-height: 1.1;
}

.sys-kpi-val.red {
  color: #F87171;
}

.sys-kpi-val.amber {
  color: #FBBF24;
}

.sys-kpi-val.green {
  color: #34D399;
}

.sys-kpi-val.blue {
  color: #60A5FA;
  font-size: 1.1rem;
}

/* Legacy aliases kept for backward compat */
.sys-kpi-box-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: #F8FAFC;
}

.sys-kpi-box-lbl {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 4px;
}

.low-stock-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.low-stock-alert-item:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

@media print {
  body * {
    visibility: hidden;
  }

  #admin-modal,
  #admin-modal * {
    visibility: visible;
  }

  #admin-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
  }

  .invoice-modal-topbar,
  .modal-backdrop {
    display: none !important;
  }

  .official-invoice-paper {
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   ORDER TABLE INNER LAYOUT CLASSES  (used by renderOrders)
   ========================================================================== */

/* ID cell */
.ord-id-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ord-date {
  font-size: 0.72rem;
  color: #64748B;
  display: block;
  margin-top: 2px;
}

/* Customer cell */
.ord-cust-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ord-cust-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #F1F5F9;
}

.ord-cust-loc {
  font-size: 0.73rem;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  line-height: 1.25;
}

.ord-loc-city {
  color: #38BDF8;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ord-loc-inst {
  color: #60A5FA;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ord-phone-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Items & Warranty cell */
.ord-items-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ord-item-names {
  font-size: 0.8rem;
  color: #CBD5E1;
  max-width: 200px;
  line-height: 1.35;
}

.ord-warranty-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #818CF8;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 2px;
}

.ord-claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #C084FC;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
}

/* Payment cell */
.ord-payment-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ord-total-amt {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F8FAFC;
}

.ord-pay-method {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.ord-pay-method.cod {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ord-pay-method.bank {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ord-promo-applied {
  font-size: 0.7rem;
  color: #34D399;
  display: block;
  margin-top: 2px;
}

/* Verification status cell */
.ord-verified-time {
  font-size: 0.7rem;
  color: #64748B;
  display: block;
  margin-top: 3px;
}

.ord-rejected-reason {
  font-size: 0.7rem;
  color: #F87171;
  display: block;
  margin-top: 3px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ord-tracking {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: #60A5FA;
  display: block;
  margin-top: 3px;
}

/* Actions cell */
.ord-actions-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* KPI card hint text */
.ord-kpi-hint {
  font-size: 0.7rem;
  color: #64748B;
  margin-top: 2px;
}

/* Pulsing amber dot for pending states */
.pulse-dot-amber {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 8px #F59E0B;
  animation: ordPulse 1.8s ease-in-out infinite;
  margin-right: 2px;
}

/* Delivered status pill */
.ord-status-pill.delivered {
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   COMPLETE MOBILE & MULTI-DEVICE RESPONSIVE SUITE: SALES & REPORTS
   Ensures 100% fluid, modern, touch-friendly UI on mobile, tablet & desktop
   ========================================================================== */

/* ── 1. Universal Container & Topbar Optimization ── */
@media (max-width: 768px) {
  .admin-topbar {
    padding: 12px 16px;
  }
  .topbar-left {
    gap: 10px;
  }
  .topbar-title {
    font-size: 1.2rem;
  }
  .topbar-breadcrumb {
    font-size: 0.68rem;
    letter-spacing: 0.5px;
  }
  .topbar-date {
    display: none;
  }
  .admin-content {
    padding: 14px 14px 36px 14px;
  }
  #topbar-primary-action .btn-excel-export,
  #topbar-primary-action .btn-csv-export,
  #topbar-primary-action .btn-primary-action {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .admin-topbar {
    padding: 10px 12px;
  }
  .topbar-title {
    font-size: 1.08rem;
  }
  .topbar-hamburger {
    width: 34px;
    height: 34px;
  }
  .admin-content {
    padding: 10px 10px 30px 10px;
  }
  #topbar-primary-action span {
    font-size: 0.74rem;
  }
}

/* ── 2. Sales & Orders: KPI Bar (2x2 Balanced Mobile Grid) ── */
@media (max-width: 1024px) {
  .orders-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
  .modern-table.orders-table {
    min-width: 760px;
  }
}

@media (max-width: 768px) {
  .orders-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  .order-kpi-card {
    padding: 12px 12px;
    border-radius: 12px;
    gap: 10px;
  }
  .order-kpi-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
  }
  .order-kpi-icon-wrap svg {
    width: 18px;
    height: 18px;
  }
  .order-kpi-num {
    font-size: 1.25rem;
    line-height: 1.1;
  }
  .order-kpi-label {
    font-size: 0.72rem;
  }

  /* Command Center Panel & Bar */
  .ord-command-panel {
    border-radius: 14px;
    margin-bottom: 18px;
  }
  .ord-cmd-topbar {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ord-cmd-left {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .ord-cmd-title-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .ord-cmd-heading {
    font-size: 0.98rem;
  }

  /* Segmented Filter Control: Native Touch Swipe Pill Bar */
  .ord-seg-control {
    display: flex;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .ord-seg-control::-webkit-scrollbar {
    display: none;
  }
  .ord-seg-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.76rem;
    gap: 6px;
    border-radius: 8px;
    white-space: nowrap;
  }
  .ord-seg-num {
    font-size: 0.68rem;
    padding: 1px 6px;
  }

  /* Command Actions: Full-Width Adaptive Search & Button */
  .ord-cmd-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .orders-search-box {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .orders-search-box input {
    width: 100% !important;
    font-size: 0.82rem;
    padding: 8px 12px 8px 34px;
    border-radius: 9px;
  }
  .orders-search-box input:focus {
    width: 100% !important;
  }
  .btn-ord-new-sale {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 9px;
  }

  /* Orders Table in Scroll Wrapper */
  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 14px 14px;
  }
  .data-table-wrap::-webkit-scrollbar {
    height: 5px;
  }
  .data-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
  }
  .modern-table.orders-table {
    min-width: 760px;
  }
  .modern-table.orders-table th {
    padding: 10px 10px;
    font-size: 0.68rem;
  }
  .modern-table.orders-table td {
    padding: 10px 10px;
  }
  .ord-cust-name {
    font-size: 0.84rem;
    max-width: 150px;
  }
  .ord-phone-link {
    font-size: 0.72rem;
  }
  .ord-item-names {
    max-width: 180px;
    font-size: 0.76rem;
  }
  .ord-total-amt {
    font-size: 0.88rem;
  }

  /* Touch-friendly Action Buttons */
  .ord-actions-flex {
    gap: 5px;
    flex-wrap: nowrap;
  }
  .btn-ord-confirm,
  .btn-ord-reject,
  .btn-ord-call,
  .btn-ord-warranty,
  .btn-ord-invoice,
  .btn-ord-label,
  .btn-ord-delivery,
  .btn-ord-ship,
  .btn-ord-restore {
    padding: 6px 8px;
    min-width: 30px;
    min-height: 30px;
    justify-content: center;
    border-radius: 7px;
  }
}

@media (max-width: 480px) {
  .orders-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .order-kpi-card {
    padding: 10px 10px;
    gap: 8px;
    border-radius: 10px;
  }
  .order-kpi-num {
    font-size: 1.15rem;
  }
  .order-kpi-label {
    font-size: 0.7rem;
  }
  .order-kpi-icon-wrap {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
  }
  .order-kpi-icon-wrap svg {
    width: 16px;
    height: 16px;
  }
  .btn-ord-new-sale {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .orders-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .order-kpi-card {
    padding: 8px 8px;
    gap: 6px;
  }
  .order-kpi-num {
    font-size: 1rem;
  }
  .order-kpi-label {
    font-size: 0.65rem;
  }
}

/* ── 3. Financial Reports: Responsive Architecture ── */
@media (max-width: 1024px) {
  .report-hero-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 12px;
  }
  .report-hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .report-hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .segmented-time-selector {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
  }
  .segmented-time-selector::-webkit-scrollbar {
    display: none;
  }
  .segmented-time-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .report-tabs-bar {
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
  }
  .report-nav-pills {
    display: flex;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }
  .report-nav-pills::-webkit-scrollbar {
    display: none;
  }
  .report-tab-pill {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 7px 12px;
    font-size: 0.75rem;
  }
  .report-search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .report-table-card .modern-table {
    min-width: 720px;
  }
}

@media (max-width: 768px) {
  /* Reports 2x2 Clean Mobile KPI Grid */
  .rpt-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .rpt-kpi-card {
    padding: 12px 12px !important;
    border-radius: 12px !important;
    gap: 10px !important;
    min-height: 72px;
  }
  .rpt-kpi-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
  }
  .rpt-kpi-icon svg {
    width: 18px !important;
    height: 18px !important;
  }
  .rpt-kpi-label {
    font-size: 0.68rem !important;
    font-weight: 700;
  }
  .rpt-kpi-value {
    font-size: 1.08rem !important;
    font-weight: 800;
    line-height: 1.2;
  }
  .rpt-kpi-sub {
    font-size: 0.65rem !important;
    margin-top: 2px;
  }

  /* Custom Date Range Bar on Mobile */
  .custom-date-range-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .custom-date-range-bar .analytics-date-input {
    flex: 1;
    min-width: 110px;
    font-size: 0.75rem;
    padding: 6px 8px;
    border-radius: 6px;
  }
  .custom-date-range-bar .analytics-apply-btn {
    padding: 6px 14px;
    font-size: 0.76rem;
    border-radius: 6px;
  }

  /* Report Table Card & Header */
  .report-table-card {
    border-radius: 14px;
    margin-bottom: 20px;
  }
  .report-table-card .table-panel-header {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .table-panel-title-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .rpt-table-heading {
    font-size: 0.98rem;
  }
  .rpt-table-sub {
    display: none;
  }
  .rpt-export-btns {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .rpt-export-btns .btn-excel-export,
  .rpt-export-btns .btn-csv-export {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
    text-align: center;
    border-radius: 8px;
  }

  /* Tables in Reports */
  .report-table-card .modern-table {
    min-width: 720px;
  }
  .report-table-card .modern-table thead th {
    padding: 10px 8px;
    font-size: 0.68rem;
  }
  .report-table-card .modern-table td {
    padding: 10px 8px;
    font-size: 0.78rem;
  }
  .items-breakdown-cell {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .report-hero-bar {
    padding: 10px 12px;
    border-radius: 12px;
  }
  .report-hero-title {
    font-size: 0.95rem;
  }
  .report-hero-subtitle {
    font-size: 0.68rem;
  }
  .report-icon-cube {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .report-icon-cube svg {
    width: 16px;
    height: 16px;
  }
  .segmented-time-btn {
    padding: 5px 9px;
    font-size: 0.7rem;
  }
  .custom-date-range-bar .analytics-apply-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-top: 4px;
    padding: 8px;
  }
  .report-tab-pill {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .rpt-kpi-row {
    gap: 8px !important;
  }
  .rpt-kpi-card {
    padding: 10px 8px !important;
    gap: 8px !important;
  }
  .rpt-kpi-value {
    font-size: 0.98rem !important;
  }
  .rpt-kpi-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }
  .rpt-kpi-icon svg {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 360px) {
  .rpt-kpi-row {
    gap: 6px !important;
  }
  .rpt-kpi-card {
    padding: 8px 6px !important;
    gap: 6px !important;
  }
  .rpt-kpi-value {
    font-size: 0.9rem !important;
  }
  .rpt-kpi-label {
    font-size: 0.62rem !important;
  }
}

/* ===================================================
   ORDER SOURCE CHANNEL INDICATORS (SYSTEM-ONLY)
   =================================================== */
.ord-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
  transition: all 0.2s ease;
  user-select: none;
}

.ord-source-badge svg {
  flex-shrink: 0;
}

/* WhatsApp Channel Badge - Vibrant Green Glow */
.ord-source-badge.ord-source-wa {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.28);
}
.ord-source-badge.ord-source-wa:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: rgba(37, 211, 102, 0.45);
}

/* Web Store Channel Badge - Modern Cyan / Blue Glow */
.ord-source-badge.ord-source-web {
  background: rgba(59, 130, 246, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.ord-source-badge.ord-source-web:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
}

/* POS / Direct Sale Badge - Purple / Violet Glow */
.ord-source-badge.ord-source-pos {
  background: rgba(168, 85, 247, 0.12);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.28);
}
.ord-source-badge.ord-source-pos:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.45);
}

/* Phone Call Order Badge - Amber Glow */
.ord-source-badge.ord-source-phone {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* Responsive New Sale Form Grid */
.sale-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.sale-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sale-form-row-prod {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .sale-form-row-3,
  .sale-form-row-2,
  .sale-form-row-prod {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .ord-source-badge {
    font-size: 0.62rem;
    padding: 2px 5px;
    gap: 3px;
  }
  .ord-source-badge svg {
    width: 10px;
    height: 10px;
  }
}

/* ABSOLUTE PROTECTION: Never show on printed bills or receipts */
@media print {
  .ord-source-badge {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════
   ORDERS BATCH BAR & MULTI-ORDER PRINT STYLES
   ════════════════════════════════════════════════ */
.btn-ord-quick-4 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 9px;
  color: #60A5FA;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-ord-quick-4:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3B82F6;
  color: #93C5FD;
  transform: translateY(-1px);
}

.orders-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  animation: slideDownFade 0.2s ease-out;
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.batch-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.batch-count-badge {
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 2px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}
.batch-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #CBD5E1;
}

.batch-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-batch-action {
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}
.btn-batch-select-4 {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
}
.btn-batch-select-4:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}
.btn-batch-print {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-batch-print:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  transform: translateY(-1px);
}
.btn-batch-clear {
  background: transparent;
  color: #94A3B8;
  border: 1px solid transparent;
}
.btn-batch-clear:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

.modern-table.orders-table input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #2563EB;
  border-radius: 4px;
  vertical-align: middle;
}