/* =============================================
   PURCHASE REQUEST APP — DESIGN SYSTEM
   Based on brand.sonance.com guidelines
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Sonance Brand Colors */
  --sonance-charcoal: #333F48;
  --sonance-blue: #00A3E1;
  --sonance-green: #00B2A9;
  --sonance-light-gray: #D9D9D6;

  /* Gray Scale */
  --gray-50: #f8f9fa;
  --gray-100: #f0f2f3;
  --gray-200: #D9D9D6;
  --gray-300: #b8bfc4;
  --gray-400: #8f999f;
  --gray-500: #6b7780;
  --gray-600: #515c64;
  --gray-700: #424c54;
  --gray-800: #3a444c;
  --gray-900: #333F48;

  /* Feedback */
  --success: #2E7D32;
  --error: #C62828;
  --warning: #F57C00;
  --info: #1565C0;

  /* Light Mode (default) */
  --bg: #FFFFFF;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f2f3;
  --fg: #333F48;
  --fg-secondary: #515c64;
  --fg-muted: #6b7780;
  --border: #D9D9D6;
  --primary: #333F48;
  --primary-hover: #424c54;
  --accent: #00A3E1;
  --surface: #FFFFFF;
  --surface-elevated: #f8f9fa;
  --input-bg: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(51, 63, 72, 0.06);
  --shadow-md: 0 4px 12px rgba(51, 63, 72, 0.08);
  --shadow-lg: 0 8px 24px rgba(51, 63, 72, 0.12);

  /* Typography */
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --bg: #1a1f24;
  --bg-secondary: #242a31;
  --bg-tertiary: #2d343c;
  --fg: #FFFFFF;
  --fg-secondary: #D9D9D6;
  --fg-muted: #8f999f;
  --border: #3a444c;
  --primary: #FFFFFF;
  --primary-hover: #D9D9D6;
  --accent: #00A3E1;
  --surface: #242a31;
  --surface-elevated: #333F48;
  --input-bg: #2d343c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--font-normal);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-medium);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
}

h1 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: var(--font-light); }
h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }
h4 { font-size: 1rem; font-weight: var(--font-semibold); }

.text-xs { font-size: clamp(0.625rem, 1vw, 0.75rem); }
.text-sm { font-size: clamp(0.75rem, 1.2vw, 0.875rem); }
.text-base { font-size: clamp(0.875rem, 1.3vw, 1rem); }
.text-lg { font-size: clamp(1rem, 1.5vw, 1.125rem); }
.text-muted { color: var(--fg-muted); }
.text-secondary { color: var(--fg-secondary); }

/* ---- Layout ---- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--fg-muted);
  font-size: 0.875rem;
}

/* ---- Navbar ---- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  height: 28px;
}

.navbar-brand span {
  font-weight: var(--font-semibold);
  font-size: 0.875rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: var(--font-medium);
  color: var(--fg-muted);
  transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--fg);
  background: var(--bg-tertiary);
  opacity: 1;
}

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

.user-name {
  font-size: 0.8125rem;
  font-weight: var(--font-medium);
  color: var(--fg-secondary);
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  padding: 0 3px;
}

.theme-toggle::after {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--fg);
  border-radius: 50%;
  transition: transform var(--transition);
  transform: translateX(0);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(19px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  font-size: 10px;
  pointer-events: none;
}

.theme-toggle .icon-sun { left: 5px; }
.theme-toggle .icon-moon { right: 5px; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.card-title {
  font-size: 0.8125rem;
  font-weight: var(--font-semibold);
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: 1.75rem;
  font-weight: var(--font-light);
  letter-spacing: -0.02em;
}

/* ---- Budget Progress Bar ---- */
.budget-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-bar-fill.safe { background: var(--success); }
.budget-bar-fill.warn { background: var(--warning); }
.budget-bar-fill.danger { background: var(--error); }

.budget-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: var(--font-semibold);
  line-height: 1;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 40px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-accent:hover:not(:disabled) { opacity: 0.9; }

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}
.btn-success:hover:not(:disabled) { opacity: 0.9; }

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
}
.btn-danger:hover:not(:disabled) { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--fg);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-height: 32px;
  border-radius: var(--radius-sm);
}

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

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: var(--font-semibold);
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: var(--font-normal);
  color: var(--fg);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  min-height: 44px;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 163, 225, 0.12);
}

.form-input::placeholder { color: var(--fg-muted); }

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7780' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

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

.form-hint {
  font-size: 0.6875rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.6875rem;
  color: var(--error);
  margin-top: 0.25rem;
}

/* ---- Toggle Switch ---- */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.toggle input { display: none; }

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  transition: background var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

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

.toggle-label {
  font-size: 0.875rem;
  font-weight: var(--font-medium);
  color: var(--fg);
}

/* ---- Tables ---- */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto; /* horizontal scroll when wide (breaks sticky thead, but tabs/toolbar still stick) */
}

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

.table-header h3 {
  font-size: 0.9375rem;
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-secondary);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-secondary);
}

.table-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: var(--font-semibold);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-pending {
  background: rgba(245, 124, 0, 0.1);
  color: var(--warning);
}

.badge-approved {
  background: rgba(0, 163, 225, 0.1);
  color: var(--accent);
}

.badge-ordered {
  background: rgba(0, 178, 169, 0.1);
  color: var(--sonance-green);
}

.badge-partial {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
  font-weight: 600;
}

.badge-received {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.badge-delivered {
  background: rgba(46, 125, 50, 0.15);
  color: var(--success);
}

.badge-rejected {
  background: rgba(198, 40, 40, 0.1);
  color: var(--error);
}

.badge-deferred {
  background: rgba(107, 119, 128, 0.15);
  color: var(--fg-muted);
}

.badge-pm_approval {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.badge-dept_approval {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

/* ---- Priority Badges ---- */
.priority-asap {
  background: rgba(198, 40, 40, 0.1);
  color: var(--error);
}

.priority-1_week {
  background: rgba(245, 124, 0, 0.1);
  color: var(--warning);
}

.priority-2_3_weeks {
  background: rgba(0, 163, 225, 0.1);
  color: var(--accent);
}

.priority-4_plus_weeks {
  background: rgba(107, 119, 128, 0.1);
  color: var(--fg-muted);
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0.125rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  /* Freeze under the navbar (60px tall) */
  position: sticky;
  top: 60px;
  z-index: 90;
  background: var(--bg);
  padding-top: 0.5rem;
}

/* Sticky search bar inside a tab panel — stays under tabs */
.tab-panel > div:has(> input[type="search"]) {
  position: sticky;
  top: 116px;
  background: var(--bg);
  z-index: 89;
  padding: 0.5rem 0;
  margin-bottom: 0;
}

/* Sticky filter pills — stack below search (or directly under tabs if no search) */
.tab-panel > .filter-pills {
  position: sticky;
  top: 168px;
  background: var(--bg);
  z-index: 88;
  padding: 0.5rem 0;
  margin-bottom: 0;
}


.tab {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: var(--font-medium);
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
}

.tab:hover { color: var(--fg); }

.tab.active {
  color: var(--fg);
  border-bottom-color: var(--primary);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: var(--font-bold);
  background: var(--bg-tertiary);
  color: var(--fg-muted);
  border-radius: 10px;
  margin-left: 0.375rem;
}

.tab.active .tab-count {
  background: var(--primary);
  color: var(--bg);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---- Filter Pills ---- */
.filter-pills {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-pill {
  padding: 0.375rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: var(--font-medium);
  color: var(--fg-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill:hover {
  border-color: var(--fg-muted);
}

.filter-pill.active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* ---- Modal / Overlay ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  transition: transform var(--transition);
}

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

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

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

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 1.125rem;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--fg);
}

.modal-actions {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ---- Toast Notifications ---- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  font-weight: var(--font-medium);
  animation: slideIn 300ms ease-out;
  max-width: 380px;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--info); }

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

/* ---- Login Page ---- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  margin-bottom: 2rem;
}

.login-logo img {
  height: 32px;
  margin-bottom: 1rem;
}

.login-logo h2 {
  font-size: 1.25rem;
  font-weight: var(--font-light);
  letter-spacing: -0.02em;
}

.login-logo p {
  color: var(--fg-muted);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.login-form .form-group {
  text-align: left;
}

.login-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.login-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ---- Empty States ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.empty-state p {
  color: var(--fg-muted);
  font-size: 0.8125rem;
  max-width: 320px;
}

/* ---- Loading Spinner ---- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* ---- Utility Classes ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* ---- Line Items ---- */
.line-item {
  transition: all var(--transition);
}

.line-item + .line-item {
  margin-top: 0.75rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .main-content {
    padding: 1.25rem 1rem;
  }

  .navbar {
    padding: 0 1rem;
  }

  .navbar-nav {
    display: none;
  }

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

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

  table {
    font-size: 0.75rem;
  }

  thead th, tbody td {
    padding: 0.5rem 0.75rem;
  }

  .tabs {
    gap: 0;
  }

  .tab {
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
  }

  .modal {
    width: 95%;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
