/* ==========================================================================
   DataCent Portal — Ultra-Premium SaaS Design System (Shopeers Reference Aesthetic)
   Single Source of Truth for Typography, Palette, Surfaces & Reusable Components
   ========================================================================== */

/* 1. Central Design System Tokens */
:root {
  /* Typography Stacks */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: var(--font-sans);

  /* Surfaces & Canvas (Shopeers Light Cloud Theme) */
  --bg-app: #f4f6fa;             /* Light Cloud Modern Canvas */
  --bg-card: #ffffff;            /* Pure White Card Surface */
  --bg-subtle: #f8fafc;          /* Cool Slate Sub-card / Inner Surface */
  --bg-sidebar: #ffffff;         /* Pure White Fixed Sidebar */
  --bg-hover: #f1f5f9;           /* Soft Slate Hover Surface */
  --bg-input: #ffffff;           /* Crisp White Input */
  
  /* Typography Colors */
  --text-main: #0f172a;          /* Deep Slate Primary Text */
  --text-muted: #64748b;         /* Cool Slate Muted Text */
  --text-light: #94a3b8;         /* Subtle Light Slate Text / Placeholders */
  --text-inverse: #ffffff;       /* Pure White Text */
  
  /* Brand Primary & Electric Accents */
  --primary: #2563eb;            /* Electric Royal Blue */
  --primary-hover: #1d4ed8;      /* Deep Royal Blue */
  --primary-light: #eff6ff;      /* Super-light Blue Tint */
  --primary-subtle: #dbeafe;     /* Soft Blue Mist */
  --primary-glow: rgba(37, 99, 235, 0.15);
  --brand: #2563eb;              /* Primary Brand Color */
  
  /* Consolidated 5 Semantic Status Groups (Neutral, Info, Success, Warning, Danger) */
  --status-neutral-bg: #f1f5f9;
  --status-neutral-text: #475569;
  --status-neutral-border: #e2e8f0;

  --status-info-bg: #e0f2fe;
  --status-info-text: #0284c7;
  --status-info-border: #bae6fd;

  --status-success-bg: #dcfce7;
  --status-success-text: #15803d;
  --status-success-border: #bbf7d0;

  --status-warning-bg: #fef3c7;
  --status-warning-text: #b45309;
  --status-warning-border: #fde68a;

  --status-danger-bg: #fee2e2;
  --status-danger-text: #dc2626;
  --status-danger-border: #fecaca;

  /* Backward Compatibility Aliases for Status Variables */
  --status-paid-bg: var(--status-success-bg);
  --status-paid-text: var(--status-success-text);
  --status-paid-border: var(--status-success-border);

  --status-approved-bg: var(--status-success-bg);
  --status-approved-text: var(--status-success-text);
  --status-approved-border: var(--status-success-border);

  --status-pending-bg: var(--status-warning-bg);
  --status-pending-text: var(--status-warning-text);
  --status-pending-border: var(--status-warning-border);

  --status-draft-bg: var(--status-neutral-bg);
  --status-draft-text: var(--status-neutral-text);
  --status-draft-border: var(--status-neutral-border);

  /* Backward Compatibility Aliases */
  --success: #10b981;
  --success-bg: var(--status-success-bg);
  --success-text: var(--status-success-text);
  --success-light: var(--status-success-bg);

  --warning: #f59e0b;
  --warning-bg: var(--status-warning-bg);
  --warning-text: var(--status-warning-text);
  --warning-light: var(--status-warning-bg);

  --danger: #ef4444;
  --danger-light: var(--status-danger-bg);
  --info: #0284c7;
  --info-light: var(--status-info-bg);
  --indigo: #6366f1;
  --indigo-light: #e0e7ff;

  /* Borders & Dividers */
  --border-color: #f1f5f9;       /* Soft Inner Divider */
  --border-subtle: #e2e8f0;      /* Crisp Outer Card & Input Border */
  --border-focus: #2563eb;       /* Active Input Focus Border */

  /* Border Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-dropdown: 0 18px 40px -4px rgba(15, 23, 42, 0.14), 0 6px 16px -2px rgba(15, 23, 42, 0.05);
  --shadow-modal: 0 24px 64px -12px rgba(15, 23, 42, 0.2), 0 12px 28px -4px rgba(37, 99, 235, 0.08);
}

/* 2. Global Reset & Typography */
html, body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Tabular Numbers Utility */
.num {
  font-variant-numeric: tabular-nums;
}

/* Universal Monospace Class — Neutralized with tabular numbers */
.font-monospace, .font-mono {
  font-family: var(--font-sans) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
}

/* 3. Bootstrap Button & Color Overrides */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38) !important;
  transform: translateY(-1.5px);
}

.btn-outline-primary {
  color: var(--primary) !important;
  border: 1.5px solid var(--border-subtle) !important;
  background-color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--radius-pill) !important;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--primary-light) !important;
  border-color: #93c5fd !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
  transform: translateY(-1px);
}

.btn-light {
  background-color: #f1f5f9 !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
  font-weight: 600;
  border-radius: var(--radius-pill) !important;
  transition: all 0.2s ease;
}

.btn-light:hover, .btn-light:focus, .btn-light:active {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: var(--text-main) !important;
}

.text-primary { color: var(--primary) !important; }
.text-brand { color: var(--brand) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-subtle { background-color: var(--primary-light) !important; color: var(--primary) !important; }
.border-primary-subtle { border-color: #bfdbfe !important; }

.text-success, .text-status-paid, .text-status-settled { color: var(--status-paid-text) !important; }
.bg-success-subtle { background-color: var(--status-paid-bg) !important; color: var(--status-paid-text) !important; }
.border-success-subtle { border-color: var(--status-paid-border) !important; }

.text-warning, .text-status-pending, .text-status-outstanding, .text-status-due { color: var(--status-pending-text) !important; }
.bg-warning-subtle { background-color: var(--status-pending-bg) !important; color: var(--status-pending-text) !important; }
.border-warning-subtle { border-color: var(--status-pending-border) !important; }

.text-danger, .text-status-rejected, .text-status-danger { color: var(--status-danger-text) !important; }
.bg-danger-subtle { background-color: var(--status-danger-bg) !important; color: var(--status-danger-text) !important; }
.border-danger-subtle { border-color: var(--status-danger-border) !important; }

.text-dark { color: var(--text-main) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-app { background-color: var(--bg-app) !important; }

/* 4. Global Form Controls */
.form-control, .form-select {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  background-color: var(--bg-card);
  font-size: 0.885rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3.5px var(--primary-glow);
  outline: none;
  background-color: var(--bg-card);
}

.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* 5. Modern Unified Search Box (Shopeers Keyboard Shortcut Style) */
.search-box-saas {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0 0.85rem;
  height: 42px;
  min-width: 260px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box-saas:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-glow);
  background-color: #ffffff;
}

.search-box-saas i {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-right: 0.6rem;
  flex-shrink: 0;
  pointer-events: none;
}

.search-box-saas input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-main);
  width: 100%;
  height: 100%;
}

.search-box-saas input::placeholder {
  color: var(--text-light);
  font-size: 0.84rem;
}

.search-shortcut-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  background-color: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  letter-spacing: 0.02em;
  pointer-events: none;
  flex-shrink: 0;
  margin-left: 0.4rem;
}

/* 6. Standardized Status Pills & Role Chips */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  line-height: 1.25;
  white-space: nowrap;
}

/* 5 Semantic Status Groups + Legacy Class Aliases */
.status-pill.neutral, .status-pill.draft, .status-pill.created, .status-pill.vendor_onboarding, .status-pill.unclaimed {
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  border-color: var(--status-neutral-border);
}

.status-pill.info, .status-pill.viewed, .status-pill.sent, .status-pill.active, .status-pill.link_shared {
  background-color: var(--status-info-bg);
  color: var(--status-info-text);
  border-color: var(--status-info-border);
}

.status-pill.success, .status-pill.paid, .status-pill.settled, .status-pill.approved, .status-pill.completed, .status-pill.inflow {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.status-pill.warning, .status-pill.pending, .status-pill.due, .status-pill.outstanding, .status-pill.submitted, .status-pill.under_review, .status-pill.payment_pending, .status-pill.payment_due, .status-pill.low_stock, .status-pill.adjust {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
  border-color: var(--status-warning-border);
}

.status-pill.danger, .status-pill.rejected, .status-pill.failed, .status-pill.overdue, .status-pill.cancelled, .status-pill.outflow, .status-pill.out_of_stock {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

/* Role Chips (Visibly distinct from Status Pills: compact rounded-rectangle geometry) */
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--status-neutral-border);
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  line-height: 1.3;
  white-space: nowrap;
}

.role-chip.owner,
.role-chip.admin,
.role-chip.role-owner,
.role-chip.role-admin {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-subtle);
}

.role-chip.neutral,
.role-chip.viewer,
.role-chip.member,
.role-chip.role-viewer,
.role-chip.role-member {
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  border-color: var(--status-neutral-border);
}

/* 7. Sidebar Navigation (Shopeers Grouped Layout) */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content {
  margin-left: 260px;
  padding: 1.5rem 2rem;
  min-width: 0;
  min-height: 100vh;
}

@media (max-width: 991.98px) {
  .sidebar { transform: translate3d(-100%, 0, 0); }
  .sidebar.show { transform: translate3d(0, 0, 0); }
  .main-content { margin-left: 0; padding: 1rem; }
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem 1.25rem 0.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.brand-logo span.accent {
  color: var(--primary);
}

.sidebar-toggle-btn {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Sidebar Section Headers */
.nav-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0.85rem 0.75rem 0.35rem 0.75rem;
  margin: 0;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.885rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-link-custom:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link-custom.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 700;
}

.nav-link-custom.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3.5px;
  background-color: var(--primary);
  border-radius: 0 4px 4px 0;
}

.nav-link-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link-custom i {
  font-size: 1.1rem;
}

.nav-counter-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Sidebar Bottom Quick Card */
.sidebar-bottom-card {
  margin-top: auto;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.sidebar-bottom-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

/* 8. Top Navigation Bar */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.03em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

.btn-icon-header {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-icon-header:hover {
  border-color: #bfdbfe;
  color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-icon-header .notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.35rem 1rem 0.35rem 0.4rem;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-profile-pill:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* 9. Shopeers Modern KPI Metric Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  position: relative;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.stat-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
}

.stat-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-icon-neutral { background-color: var(--bg-hover) !important; color: var(--text-muted) !important; }
.stat-icon-blue { background-color: #eff6ff !important; color: #2563eb !important; }
.stat-icon-cyan { background-color: #ecfeff !important; color: #0891b2 !important; }
.stat-icon-indigo { background-color: #e0e7ff !important; color: #4f46e5 !important; }
.stat-icon-amber { background-color: #fef3c7 !important; color: #d97706 !important; }
.stat-icon-emerald { background-color: #dcfce7 !important; color: #16a34a !important; }
.stat-icon-rose { background-color: #ffe4e6 !important; color: #e11d48 !important; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.65rem;
  letter-spacing: -0.03em;
}

.stat-footer-flex {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Shopeers Trend Percentage Pill */
.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.trend-pill.positive {
  background-color: #dcfce7;
  color: #15803d;
}

.trend-pill.negative {
  background-color: #fee2e2;
  color: #dc2626;
}

.trend-pill.neutral {
  background-color: #f1f5f9;
  color: #64748b;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* 10. Dashboard Bento Cards & Content Surfaces */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

.card-subheading {
  font-size: 0.785rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0 0;
}

.card-link-action {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.card-link-action:hover {
  text-decoration: underline;
}

/* 11. Live Activity Timeline (Shopeers Style) */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3.5px rgba(0, 0, 0, 0.04);
}

.activity-dot.green { background-color: #10b981; }
.activity-dot.blue { background-color: #2563eb; }
.activity-dot.purple { background-color: #8b5cf6; }
.activity-dot.amber { background-color: #f59e0b; }
.activity-dot.red { background-color: #ef4444; }

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.activity-time {
  font-size: 0.725rem;
  color: var(--text-light);
}

/* 12. Standardized SaaS Tables */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  background-color: transparent;
}

.table-custom td {
  font-size: 0.85rem;
  padding: 1rem 1.15rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tbody tr {
  transition: background-color 0.15s ease;
}

.table-custom tbody tr:hover td {
  background-color: var(--bg-hover);
}

.hover-underline:hover {
  text-decoration: underline !important;
}

/* Table Pagination Component */
.table-pagination-container {
  padding: 0.95rem 1.35rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

.row-size-selector-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 2.5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.row-size-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.row-size-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.5);
}

.row-size-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Custom Pagination Component */
.custom-pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-page-item {
  display: inline-flex;
}

.custom-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.custom-page-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

.custom-page-item.active .custom-page-link {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.custom-page-item.disabled .custom-page-link {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

/* Ensure table container does not show unnecessary vertical scrollbars */
.table-responsive {
  overflow-y: visible;
}

/* 13. Status Filter Buttons */
.po-filter-btn {
  background: #ffffff;
  color: var(--text-muted);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 600;
}

.po-filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

.po-filter-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #93c5fd;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

/* Action Pill Buttons */
.btn-action-pdf {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn-action-pdf:hover {
  background-color: var(--status-danger-text);
  color: #ffffff;
  border-color: var(--status-danger-text);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.btn-action-po {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn-action-po:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-action-payment {
  background-color: var(--status-paid-bg);
  color: var(--status-paid-text);
  border: 1px solid var(--status-paid-border);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn-action-payment:hover {
  background-color: var(--status-paid-text);
  color: #ffffff;
  border-color: var(--status-paid-text);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
  transform: translateY(-1px);
}

.btn-action-edit {
  background-color: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn-action-edit:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-action-delete {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn-action-delete:hover {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.btn-action-pill {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 1.15rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.btn-action-pill:hover {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-action-outline {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.btn-action-outline:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

/* 14. Bento Metadata Tiles (Vendor Profile & Overview) */
.vendor-identity-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.vendor-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.vendor-meta-tile {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.95rem 1.15rem;
  transition: all 0.2s ease;
}

.vendor-meta-tile:hover {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}

.vendor-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vendor-meta-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

/* Sliding Window Segmented Tab Switcher */
.sliding-tabs-nav-wrapper {
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  padding: 4px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.sliding-tab-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sliding-tab-btn:hover {
  color: var(--primary);
}

.sliding-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* 15. Create Purchase Order Modal & Line Items Grid */
#createPOModal .modal-dialog {
  max-width: 1140px;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

#createPOModal .modal-content {
  border-radius: var(--radius-2xl);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  background: #ffffff;
}

#createPOModal .modal-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.75rem;
}

.po-modal-icon-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.po-draft-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.po-meta-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
}

.po-meta-input {
  background-color: #ffffff !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  height: 44px;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.po-meta-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3.5px var(--primary-glow) !important;
}

/* Create PO Modal Dialog Sizing */
#createPOModal .modal-dialog {
  max-width: 1220px;
  width: 95%;
  margin: 1.75rem auto;
}

.po-line-items-wrapper {
  width: 100%;
  overflow: visible !important;
  box-sizing: border-box;
}

.po-line-items-grid {
  display: grid;
  grid-template-columns: 3.2fr 1.1fr 0.75fr 0.85fr 1.25fr 0.95fr 1.25fr 34px;
  gap: 0.5rem;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
}

.po-line-items-grid > div {
  min-width: 0;
}

.po-line-items-header,
.po-line-item-row {
  width: 100%;
  box-sizing: border-box;
}

.po-line-items-header {
  background: linear-gradient(90deg, #f1f5f9 0%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.po-line-item-row {
  background-color: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.po-line-item-row input,
.po-line-item-row select,
.po-line-item-row .input-group {
  min-width: 0;
  width: 100%;
}

.po-line-item-row:hover,
.po-line-item-row:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px -2px rgba(37, 99, 235, 0.1);
}

.po-item-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  transition: all 0.18s ease;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.po-item-delete-btn:hover {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
  transform: scale(1.06);
}

.po-summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}

.btn-create-po-submit {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 0.65rem 1.75rem !important;
  font-weight: 700 !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3) !important;
  transition: all 0.2s ease !important;
}

.btn-create-po-submit:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%) !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4) !important;
  transform: translateY(-1.5px);
}

/* 16. Typeaheads & Live Dropdowns */
.po-vendor-search-wrapper { position: relative; }

.po-vendor-input-box {
  background-color: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  height: 44px;
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.po-vendor-input-box:focus-within {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3.5px var(--primary-glow);
}

.po-vendor-input-box input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-main);
  background: transparent;
  width: 100%;
  height: 100%;
}

.po-vendor-input-box input::placeholder {
  color: var(--text-light);
  font-size: 0.84rem;
}

.po-vendor-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 380px);
  max-width: 480px;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  z-index: 1090;
  box-shadow: var(--shadow-dropdown);
  padding: 0.5rem;
}

.po-vendor-dropdown::-webkit-scrollbar { width: 5px; }
.po-vendor-dropdown::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}

.po-dropdown-header {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem 0.25rem 0.65rem;
}

.po-dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.4rem 0.25rem;
}

.po-vendor-item {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 2px;
}

.po-vendor-item:hover, .po-vendor-item.active {
  background-color: #f1f5f9;
}

.po-vendor-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.po-vendor-avatar-self {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #15803d;
  border-color: #bbf7d0;
}

.po-vendor-item-title {
  font-weight: 700;
  font-size: 0.865rem;
  color: var(--text-main);
  line-height: 1.3;
}

.po-vendor-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.25;
}

.po-selected-vendor-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Product Preset Dropdowns */
.po-item-cell { position: relative; }

.po-preset-btn {
  background: #f8fafc;
  border-color: var(--border-subtle);
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  transition: all 0.15s ease;
}

.po-preset-btn:hover, .po-preset-btn.active {
  background-color: var(--primary-light);
  border-color: #93c5fd;
  color: var(--primary);
}

.po-preset-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 380px;
  width: max(100%, 380px);
  max-width: 520px;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  z-index: 1250;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  padding: 0.4rem;
}

.po-dropdown-header {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.po-preset-dropdown-menu::-webkit-scrollbar { width: 5px; }
.po-preset-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}

.po-preset-option {
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 2px;
}

.po-preset-option:hover, .po-preset-option.selected {
  background-color: #f1f5f9;
}

.po-preset-option-title {
  font-weight: 700;
  font-size: 0.835rem;
  color: var(--text-main);
  line-height: 1.25;
}

.po-preset-option-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* 17. Authentication Layout */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-app);
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-modal);
}

/* 18. Toast Engine */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ui-toast {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 0.75rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.865rem;
  color: var(--text-main);
  min-width: 280px;
  max-width: 400px;
  animation: slideInUp 0.25s ease;
}

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

/* 19. Truncation Utilities */
.cell-truncate-sm {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.cell-truncate-md {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.cell-truncate-lg {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* 20. Reusable Modal & Document Preview Helpers */
.sidebar-brand-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.doc-preview-modal-dialog {
  max-width: 1140px;
}

.doc-preview-modal-content {
  border-radius: var(--radius-2xl);
  background: #ffffff;
}

.doc-preview-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.doc-preview-icon-pdf {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.doc-preview-icon-img {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #6d28d9;
}

.doc-preview-canvas {
  background-color: var(--bg-app);
}

.doc-preview-loader {
  min-height: 520px;
}

.doc-preview-container {
  height: 75vh;
  min-height: 520px;
  border-color: var(--border-subtle) !important;
}

.doc-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.doc-preview-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.03);
}

.doc-preview-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.doc-preview-error-badge {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

.doc-preview-error-msg {
  max-width: 400px;
}

.po-detail-content {
  border-radius: var(--radius-2xl);
  background: #ffffff;
}

.po-detail-title {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.po-approval-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.po-payment-box {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
}

.proof-upload-box {
  background-color: #ffffff;
  border: 1.5px dashed var(--border-subtle);
  transition: all 0.2s ease;
}

.proof-upload-box:hover {
  border-color: var(--primary);
  background-color: var(--bg-subtle);
}

.btn-white {
  background-color: #ffffff !important;
  color: var(--text-main) !important;
  border-color: var(--border-subtle) !important;
}

.btn-white:hover {
  background-color: var(--bg-subtle) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.po-notice-box {
  border-radius: 10px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.po-desc-textarea {
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  font-size: 0.88rem;
}

.po-summary-box {
  min-width: 320px;
  max-width: 380px;
}

.share-modal-icon {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

/* 21. Sliding Window Carousel for Vendor Details */
.sliding-window-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.sliding-window-track {
  display: flex;
  width: 300%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sliding-window-pane {
  width: 33.333333%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-circle-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.18s ease;
}

.modal-desc-box {
  white-space: pre-wrap;
  line-height: 1.6;
  min-height: 60px;
}

/* 22. Ledger View Styles */
.ledger-date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ledger-po-ref-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border-radius: 9999px;
  padding: 0.15rem 0.5rem;
  width: fit-content;
}

.ledger-due-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.ledger-desc-truncate {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.btn-action-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-action-pdf:hover {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-action-po {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-action-po:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.ledger-table-summary-row {
  background-color: #fefce8;
  border-top: 2px solid #fef08a;
}

/* 23. Company Settings Logo Styles */
.company-logo-preview-box {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.company-logo-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.company-signature-preview-box {
  width: 100%;
  max-width: 240px;
  height: 90px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-color);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  padding: 6px;
}

.company-signature-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* 24. Public Sourcing Portal Styles */
.public-portal-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 0;
}

.req-hero-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.form-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-custom {
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  border: 1.5px solid var(--border-subtle);
  font-size: 0.9rem;
  background-color: #ffffff;
  color: var(--text-main);
}

.input-custom:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-glow);
}

/* 25. Centralized Toast Notification Styles */
.toast-container-custom {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1090;
  pointer-events: none;
}

.toast-item-custom {
  pointer-events: auto;
  background-color: #ffffff;
  min-width: 320px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-subtle) !important;
}

.toast-header-custom {
  background: transparent;
}

.toast-body-custom {
  font-size: 0.92rem;
}

.toast-progress-custom {
  height: 3px;
  border-radius: 0 0 10px 10px;
  background: rgba(0, 0, 0, 0.05);
}

.toast-progress-bar-custom {
  width: 100%;
}

/* 26. Sourcing & Live Bidding Cockpit Styles */
.sticky-submission-console {
  position: sticky;
  top: 1.5rem;
  z-index: 10;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulseAnim 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes livePulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.leaderboard-rank-1-row {
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.8) 0%, rgba(240, 253, 250, 0.4) 100%);
  border-left: 3px solid #10b981;
}

.bidding-kpi-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 1rem 1.25rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bidding-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.bidding-kpi-lowest {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #a7f3d0;
}

.quote-comparison-alert {
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
  transition: all 0.25s ease;
}

/* 27. Fractional Spacing Utilities */
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.p-2\.5 { padding: 0.625rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.px-3\.5 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.mt-0\.5 { margin-top: 0.125rem !important; }
.mb-2\.5 { margin-bottom: 0.625rem !important; }

/* 28. Advance / Purple Badge Utilities */
.text-purple { color: #7c3aed !important; }
.bg-purple-subtle { background-color: #ede9fe !important; }
.border-purple-subtle { border-color: #ddd6fe !important; }

