/* ============================================================
   FrutShop - Dark Modern Theme
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg: #0b1220;
  --bg-card: rgba(16, 26, 45, 0.75);
  --bg-card-solid: #101a2d;
  --bg-hover: rgba(78, 161, 255, 0.08);
  --bg-input: rgba(11, 18, 32, 0.6);
  --text: #e8eefc;
  --text-heading: #ffffff;
  --muted: #9bb0da;
  --border: #223252;
  --accent: #4ea1ff;
  --accent2: #8b5cf6;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.45);
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #7bbfff;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}


/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #0d1528 0%, #0b1220 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  flex-shrink: 0;
  line-height: 0;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4ea1ff, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: rgba(78, 161, 255, 0.12);
  color: var(--accent);
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 14px;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-version {
  font-size: 0.75rem;
  color: var(--border);
}


/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #0d1528;
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

.mobile-nav-item.active {
  color: var(--accent);
}


/* ============================================================
   TOP BAR
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

.topbar-left {
  flex: 1;
}

.page-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.week-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
}

.week-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.week-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding-right: 4px;
}

.week-select option {
  background: var(--bg-card-solid);
  color: var(--text);
}


/* ============================================================
   BADGES
   ============================================================ */
.week-badge,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.badge-muted {
  background: rgba(155, 176, 218, 0.12);
  color: var(--muted);
}

.badge-accent {
  background: rgba(78, 161, 255, 0.15);
  color: var(--accent);
}


/* ============================================================
   CONTENT AREA
   ============================================================ */
.content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
}

.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

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

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}


/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: var(--radius) var(--radius) 0 0;
}

.kpi-card.kpi-accent2::before {
  background: linear-gradient(90deg, var(--accent2), #c084fc);
}

.kpi-card.kpi-success::before {
  background: linear-gradient(90deg, var(--success), #6ee7b7);
}

.kpi-card.kpi-warning::before {
  background: linear-gradient(90deg, var(--warning), #fde68a);
}

.kpi-card.kpi-danger::before {
  background: linear-gradient(90deg, var(--danger), #fca5a5);
}

.kpi-card:hover {
  border-color: rgba(78, 161, 255, 0.25);
  transform: translateY(-2px);
}

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

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}


/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: rgba(78, 161, 255, 0.15);
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.card-body {
  padding: 20px 24px;
}

.card-body:empty {
  padding: 0;
}


/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table thead th {
  position: sticky;
  top: 0;
  background: rgba(11, 18, 32, 0.95);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(34, 50, 82, 0.4);
  vertical-align: middle;
}

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

.table tbody tr:hover:not(.empty-row) {
  background: var(--bg-hover);
}

.table .text-right {
  text-align: right;
}

.table .text-center {
  text-align: center;
}

.table .text-right,
.text-right {
  text-align: right;
}

.table .text-center,
.text-center {
  text-align: center;
}

.table .mono {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
}


/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.col-span-2 {
  grid-column: span 2;
}

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

.input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.15);
}

.input::placeholder {
  color: rgba(155, 176, 218, 0.5);
}

.input-search {
  max-width: 220px;
  padding-left: 12px;
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239bb0da' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #3b93f0;
  box-shadow: 0 4px 16px rgba(78, 161, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(78, 161, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: rgba(155, 176, 218, 0.3);
}

.btn-danger {
  color: var(--danger) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.1) !important;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text);
}


/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}

.tab {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.tab.active {
  background: var(--accent);
  color: #fff;
}


/* ============================================================
   CHARTS
   ============================================================ */
.chart-container {
  position: relative;
  height: 280px;
}

.chart-container.chart-wide {
  height: 340px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}


/* ============================================================
   UPLOAD AREA
   ============================================================ */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(78, 161, 255, 0.05);
}

.upload-area svg {
  color: var(--muted);
  transition: color var(--transition);
}

.upload-area:hover svg {
  color: var(--accent);
}

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.upload-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.upload-preview {
  margin-top: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(78, 161, 255, 0.08);
  border: 1px solid rgba(78, 161, 255, 0.2);
  border-radius: var(--radius-sm);
}

.preview-filename {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}


/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.25s ease;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 {
  font-size: 1.05rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

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

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


/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  font-size: 0.9rem;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

.toast.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast.toast-info {
  border-left: 4px solid var(--accent);
}

.toast.toast-out {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}


/* ============================================================
   LOADING SPINNER
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}


/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state svg {
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 300px;
}

.empty-state-sm {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}


/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden {
  display: none !important;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }


/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #111;
  }

  .sidebar,
  .mobile-nav,
  .topbar,
  .page-actions,
  .btn,
  #toast-container,
  .loading-overlay,
  .modal-overlay {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .content {
    padding: 0;
    max-width: 100%;
  }

  .card {
    background: #fff;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .kpi-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
  }

  .kpi-card::before {
    display: none;
  }

  .kpi-value {
    color: #111;
  }

  .kpi-label,
  .kpi-sub {
    color: #555;
  }

  .table thead th {
    background: #f0f0f0;
    color: #333;
  }

  .table tbody td {
    border-bottom-color: #ddd;
  }

  .page {
    display: block !important;
    page-break-before: always;
  }

  .page:first-child {
    page-break-before: auto;
  }
}


/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .content {
    padding: 20px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: span 1;
  }
}


/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  .mobile-nav {
    display: flex;
  }

  .main-wrapper {
    padding-bottom: 72px;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 0 16px;
  }

  .week-selector {
    padding: 4px 10px;
  }

  .week-select {
    font-size: 0.8rem;
    max-width: 130px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .kpi-card {
    padding: 16px;
  }

  .kpi-value {
    font-size: 1.3rem;
  }

  .card-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .card-body {
    padding: 14px 16px;
  }

  .page-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .table {
    font-size: 0.8rem;
  }

  .table thead th,
  .table tbody td {
    padding: 10px 10px;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
    margin: 12px;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .input-search {
    max-width: 100%;
  }
}


/* ============================================================
   RESPONSIVE - VERY SMALL
   ============================================================ */
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .week-badge {
    display: none;
  }
}
