@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-main: #070d1e;
  --bg-surface: #0c152e;
  --bg-card: #111d3d;
  --bg-card-hover: #16244d;
  --bg-card-glass: rgba(17, 29, 61, 0.75);
  
  --border-color: rgba(59, 130, 246, 0.18);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --status-approved-bg: rgba(16, 185, 129, 0.15);
  --status-approved-text: #34d399;
  --status-approved-border: rgba(16, 185, 129, 0.3);
  
  --status-pending-bg: rgba(245, 158, 11, 0.15);
  --status-pending-text: #fbbf24;
  --status-pending-border: rgba(245, 158, 11, 0.3);
  
  --status-rejected-bg: rgba(239, 68, 68, 0.15);
  --status-rejected-text: #f87171;
  --status-rejected-border: rgba(239, 68, 68, 0.3);

  --status-hold-bg: rgba(139, 92, 246, 0.15);
  --status-hold-text: #a78bfa;
  --status-hold-border: rgba(139, 92, 246, 0.3);
  
  --status-review-bg: rgba(6, 182, 212, 0.15);
  --status-review-text: #38bdf8;
  --status-review-border: rgba(6, 182, 212, 0.3);

  --sidebar-width: 260px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Mesh Gradients */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
}

/* App Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

/* Sidebar Drawer Overlay for Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sidebar-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: #fff;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  letter-spacing: 0.2px;
  font-weight: 500;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
}

.sidebar-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  padding: 10px 10px 4px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-card);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15));
  color: #60a5fa;
  font-weight: 600;
  border-left: 3px solid #3b82f6;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(7, 13, 30, 0.6);
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area - FIXED DESKTOP CALCULATION */
.app-main {
  flex: 1 1 auto;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Top Navbar */
.app-navbar {
  height: 68px;
  background: rgba(12, 21, 46, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mobile-toggle {
  display: none;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.header-text-group {
  min-width: 0;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.notif-bell {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notif-bell:hover {
  color: #fff;
  border-color: var(--primary);
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Page Body */
.app-content {
  flex: 1 1 auto;
  padding: 24px 28px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Responsive Grid Utilities */
.grid-2-1 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.grid-1-1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

/* Glass & Card Design */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.kpi-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.kpi-icon.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.kpi-icon.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.kpi-icon.red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.kpi-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-approved, .status-success, .status-active, .status-operational, .status-delivered {
  background: var(--status-approved-bg);
  color: var(--status-approved-text);
  border: 1px solid var(--status-approved-border);
}

.status-pending, .status-processing, .status-retrying {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

.status-rejected, .status-failed, .status-suspended, .status-blocked, .status-error {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  border: 1px solid var(--status-rejected-border);
}

.status-hold, .status-partially_released, .status-revoked {
  background: var(--status-hold-bg);
  color: var(--status-hold-text);
  border: 1px solid var(--status-hold-border);
}

.status-review, .status-under_review, .status-degraded {
  background: var(--status-review-bg);
  color: var(--status-review-text);
  border: 1px solid var(--status-review-border);
}

/* Tables Responsive Isolation */
.table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  border-radius: 8px;
  box-sizing: border-box;
}

.custom-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: rgba(12, 21, 46, 0.95);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 13px 16px;
  font-size: 12.5px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  white-space: nowrap;
}

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

.custom-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

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

.form-control {
  width: 100%;
  max-width: 100%;
  background: rgba(7, 13, 30, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: white;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 11.5px;
  border-radius: 7px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
}

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 13px;
}

.search-input-wrap .form-control {
  padding-left: 36px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  padding: 16px;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

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

.modal-dialog {
  background: #0f1936;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  overflow: hidden;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  transform: scale(1.08);
}

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

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(7, 13, 30, 0.4);
  flex-shrink: 0;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast-message {
  pointer-events: auto;
  background: #111d3d;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  min-width: 260px;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideIn 0.3s ease forwards;
}

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

.toast-message.success { border-left: 4px solid #10b981; }
.toast-message.error { border-left: 4px solid #ef4444; }
.toast-message.info { border-left: 4px solid #3b82f6; }

/* Code & Documentation Styles */
.code-box {
  background: #070d1e;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #38bdf8;
  overflow-x: auto;
  position: relative;
}

.code-box pre {
  margin: 0;
  white-space: pre;
}

.copy-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-badge:hover {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* RESPONSIVE BREAKPOINTS AUDIT */

/* Laptops & Small Desktops (<= 1200px) */
@media (max-width: 1200px) {
  .grid-2-1 {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

/* Tablets (<= 1024px) */
@media (max-width: 1024px) {
  .grid-2-1, .grid-1-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* Mobile & Tablet Drawer Transition (<= 992px) */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: block;
  }
  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .grid-1-1 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mobile Phones (<= 768px) */
@media (max-width: 768px) {
  .app-navbar {
    padding: 0 16px;
    height: 62px;
  }
  .app-content {
    padding: 16px 14px;
  }
  .page-title {
    font-size: 16px;
  }
  .page-subtitle {
    display: none;
  }
  .live-badge span:last-child {
    display: none;
  }
  .btn-logout span {
    display: none;
  }
  .btn-logout {
    padding: 7px 9px;
  }
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }
  .kpi-card {
    padding: 14px 16px;
  }
  .kpi-value {
    font-size: 18px;
  }
  .kpi-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-header {
    padding: 14px 16px;
  }
  .card-body {
    padding: 16px;
  }
}

/* Extra Small Phones (<= 430px) */
@media (max-width: 430px) {
  .app-navbar {
    padding: 0 12px;
  }
  .app-content {
    padding: 14px 10px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .search-input-wrap {
    flex: 1 1 100%;
  }
  .filter-bar .form-control, .filter-bar select {
    width: 100% !important;
  }
}
