/* ==========================================================================
   WEBSIRG MOBILE CONTROLLER SAAS - REUSABLE UI COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-bright));
  color: white;
  box-shadow: 0 2px 6px var(--brand-orange-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-orange-600), var(--brand-orange));
  box-shadow: 0 4px 12px var(--brand-orange-glow);
  color: white;
}

.btn-navy {
  background: var(--brand-navy-800);
  color: white;
}

.btn-navy:hover {
  background: var(--brand-navy-700);
  color: white;
}

.btn-secondary {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-medium);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-surface-secondary);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

.btn-danger-outline {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger-bg);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  gap: 5px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-medium);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hero / Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--brand-navy-900) 0%, var(--brand-navy-800) 60%, #172554 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--brand-orange-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
  word-break: break-word;
}

.welcome-subtitle {
  font-size: 0.92rem;
  color: #94A3B8;
  max-width: 650px;
  line-height: 1.5;
  word-break: break-word;
}

.quick-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .welcome-banner {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }
  .welcome-title {
    font-size: 1.25rem;
  }
  .welcome-subtitle {
    font-size: 0.82rem;
  }
  .quick-action-strip .btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 10px;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .quick-action-strip .btn {
    flex: 1 1 100%;
  }
}

/* KPI Stat Cards & Responsive Balanced Grids */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* 5-Column Grid for Mobile Store Tenants (Prevents single orphan card on row 2) */
.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1360px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .kpi-grid-5 {
    grid-template-columns: 1fr;
  }
}

/* 4-Column Balanced Grid for Financial KPIs */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1200px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .kpi-grid-4 {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-orange-bright);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

.kpi-card:active {
  transform: translateY(-1px);
}

.kpi-card.highlight-orange {
  border-top: 4px solid var(--brand-orange-bright);
}
.kpi-card.highlight-green {
  border-top: 4px solid var(--success);
}
.kpi-card.highlight-blue {
  border-top: 4px solid var(--brand-blue);
}
.kpi-card.highlight-danger {
  border-top: 4px solid var(--danger);
}
.kpi-card.highlight-warning {
  border-top: 4px solid var(--warning);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.kpi-val {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 8px;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.kpi-click-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-orange-bright);
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.kpi-card:hover .kpi-click-hint {
  opacity: 1;
  transform: translateX(2px);
}

/* Status Badges - Sleek Soft Pill Aesthetic */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: all var(--transition-fast);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success {
  background-color: #DCFCE7;
  color: #15803D;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.badge-warning {
  background-color: #FEF3C7;
  color: #B45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-danger {
  background-color: #FEE2E2;
  color: #B91C1C;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-info {
  background-color: #E0F2FE;
  color: #0369A1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-primary {
  background-color: #FFEDD5;
  color: #C2410C;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

.badge-neutral {
  background-color: var(--bg-surface-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

[data-theme="dark"] .badge-success {
  background-color: rgba(34, 197, 94, 0.16);
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.28);
}

[data-theme="dark"] .badge-warning {
  background-color: rgba(245, 158, 11, 0.16);
  color: #FCD34D;
  border-color: rgba(252, 211, 77, 0.28);
}

[data-theme="dark"] .badge-danger {
  background-color: rgba(239, 68, 68, 0.16);
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.28);
}

[data-theme="dark"] .badge-info {
  background-color: rgba(6, 182, 212, 0.16);
  color: #67E8F9;
  border-color: rgba(103, 232, 249, 0.28);
}

/* Data Tables - Crisp, High Legibility Typography */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  letter-spacing: -0.011em;
}

.data-table th {
  background-color: var(--table-head-bg);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: 0.88rem;
}

.data-table td strong,
.data-table td .item-code,
.data-table td .amount-bold {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: var(--table-row-hover);
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-glow);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Radio Button Modern Styling */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-medium, #cbd5e1);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  margin: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  vertical-align: middle;
  background-color: var(--bg-surface, #ffffff);
  flex-shrink: 0;
}

input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background-color: var(--brand-orange, #ea580c);
}

input[type="radio"]:checked {
  border-color: var(--brand-orange, #ea580c);
  background-color: var(--bg-surface, #ffffff);
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="radio"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}

/* Switch / Toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-medium);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--brand-orange-bright);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.modal-container.modal-lg {
  max-width: 850px;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* 5-Step Wizard Progress Tracker */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 28px;
  padding: 0 10px;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.wizard-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.wizard-step-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-medium);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.wizard-step-item.active .wizard-step-bubble {
  border-color: var(--brand-orange-bright);
  background: var(--brand-orange-bright);
  color: white;
  box-shadow: 0 0 0 4px var(--brand-orange-glow);
}

.wizard-step-item.completed .wizard-step-bubble {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.wizard-step-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.wizard-step-item.active .wizard-step-title {
  color: var(--brand-orange);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--brand-orange);
}

.tab-btn.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange-bright);
}

.tab-pill-nav {
  display: inline-flex;
  background: var(--bg-surface-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.tab-pill-btn {
  border: none;
  background: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-pill-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
}

.search-input-wrap input {
  padding-left: 38px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 6px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--brand-orange-bright);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--info); }

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Global Search Modal */
.global-search-modal .modal-container {
  max-width: 600px;
}

.search-input-giant {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.15rem;
  border: none;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  margin-bottom: 16px;
}

.search-results-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 12px 0 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
}

.search-result-item:hover {
  background: var(--bg-surface-secondary);
}

/* Gateway Integrations Item Component */
.gateway-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  gap: 14px;
  transition: all var(--transition-fast);
}
.gateway-item:hover {
  border-color: var(--border-medium);
  background-color: var(--bg-surface-tertiary);
  transform: translateY(-1px);
}
.gateway-item-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gateway-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.gateway-item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gateway-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
}
.gateway-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Notifications List Items */
.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
  transition: background-color var(--transition-fast);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background-color: var(--bg-surface-secondary);
}
.notif-item.unread {
  background-color: rgba(249, 115, 22, 0.04);
}
.notif-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
}
.notif-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notif-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.notif-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.notif-time {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* KPI Drill-Down Modal Styles */
.drilldown-metric-banner {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.drilldown-metric-val {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
}
.drilldown-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

/* ==========================================================================
   WEBSIRG DESIGN SYSTEM - SKELETON LOADERS
   ========================================================================== */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.8) 25%, rgba(241, 245, 249, 0.95) 37%, rgba(226, 232, 240, 0.8) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  border-radius: 4px;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
  vertical-align: middle;
}

[data-theme="dark"] .skeleton,
.dark-theme .skeleton {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.8) 25%, rgba(51, 65, 85, 0.95) 37%, rgba(30, 41, 59, 0.8) 63%);
  background-size: 200% 100%;
}

.skeleton-text {
  height: 1.1em;
  width: 100%;
  border-radius: 4px;
}

.skeleton-kpi {
  height: 28px;
  width: 60px;
  border-radius: 6px;
}

.skeleton-sub {
  height: 14px;
  width: 90px;
  border-radius: 4px;
}

.skeleton-badge {
  display: inline-block;
  height: 18px;
  width: 32px;
  border-radius: 9999px;
}

.skeleton-table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}


