/* 亮色科技主题 */
:root {
  --bg: #f8fafc;
  --bg-secondary: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-hover: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --accent: #6366f1;
  --accent-light: rgba(99, 102, 241, 0.1);
  --accent-hover: #4f46e5;
  --cyan: #06b6d4;
  --cyan-light: rgba(6, 182, 212, 0.1);
  --green: #10b981;
  --green-light: rgba(16, 185, 129, 0.1);
  --orange: #f59e0b;
  --orange-light: rgba(245, 158, 11, 0.1);
  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.1);
  --purple: #8b5cf6;
  --purple-light: rgba(139, 92, 246, 0.1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }

#app { min-height: 100vh; }

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  animation: fadeInUp 0.5s ease-out;
}

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

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 24px;
}

h1, h2, h3, h4 { color: var(--text); font-weight: 600; }
h1 { font-size: 24px; line-height: 1.3; }
h2 { font-size: 18px; line-height: 1.4; }
h3 { font-size: 16px; }
.subtle { color: var(--text-secondary); }
.subtle.small { font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text); }

.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}
.textarea { min-height: 100px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.input::placeholder { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--text); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--panel-hover); color: var(--text); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-warning { background: var(--orange); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; min-height: 44px; min-width: 44px; }

/* Layout */
.shell { min-height: 100vh; display: flex; }

.sidebar {
  width: 260px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.side-brand .brand-mark { width: 40px; height: 40px; font-size: 16px; margin: 0; }
.side-brand strong { font-size: 15px; display: block; }
.side-brand span { font-size: 12px; color: var(--text-muted); }

.nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s ease;
}
.nav-item:hover { background: var(--panel-hover); color: var(--text); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.nav-item svg { width: 20px; height: 20px; }

.main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { font-size: 20px; }

.user-menu { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--gradient);
  font-size: 14px;
  font-weight: 600;
}

.content { padding: 24px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Welcome Banner */
.welcome-banner {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.welcome-banner h1 { font-size: 32px; margin-bottom: 8px; color: #fff; }
.welcome-banner p { font-size: 18px; opacity: 0.9; }
.welcome-banner .time-greeting { font-size: 16px; opacity: 0.8; margin-top: 12px; }

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { margin: 0; }

/* Grid */
.grid { display: grid; gap: 16px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Metrics */
.metric { display: flex; flex-direction: column; gap: 8px; }
.metric-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.metric-value { font-size: 32px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.metric-desc { font-size: 12px; color: var(--text-muted); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); }
td { font-size: 14px; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--panel-hover); }
tbody tr:last-child td { border-bottom: none; }

/* Pills/Badges */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pill-default { background: var(--border-light); color: var(--text-secondary); }
.pill-blue { background: var(--accent-light); color: var(--accent); }
.pill-green { background: var(--green-light); color: var(--green); }
.pill-orange { background: var(--orange-light); color: var(--orange); }
.pill-red { background: var(--red-light); color: var(--red); }
.pill-purple { background: var(--purple-light); color: var(--purple); }
.pill-cyan { background: var(--cyan-light); color: var(--cyan); }

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar .input, .toolbar .select { width: auto; min-width: 200px; }

/* Tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--border-light);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.tab:hover { background: var(--border); color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  transition: all 0.2s ease;
}
.timeline-item:hover { background: var(--border-light); }
.timeline-date { font-size: 13px; color: var(--text-muted); min-width: 80px; }
.timeline-content { flex: 1; }
.timeline-title { font-weight: 500; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); }

/* Empty State */
.empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-text { font-size: 15px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.2s ease;
  padding: 16px;
}

.modal {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: scaleIn 0.2s ease;
}
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.modal-header h3 { font-size: 16px; }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--panel);
}

/* Checkbox */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 44px;
}
.checkbox-item:hover { border-color: var(--accent); background: var(--accent-light); }
.checkbox-item.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.checkbox-item input[type="checkbox"] { display: none; }

/* Quick Date Select */
.quick-date-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.quick-date-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  background: var(--border-light);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
}
.quick-date-btn:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* Filter Section */
.filter-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.filter-section .field { margin-bottom: 0; }

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  padding: 8px;
  color: var(--text);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.mobile-menu-btn:hover { background: var(--panel-hover); }
.mobile-menu-btn svg { width: 24px; height: 24px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9;
}

/* Attachment Thumbnails */
.attachments-cell { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.attach-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}
.attach-thumb:hover { transform: scale(1.1); }
.attach-more {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Image Preview Modal */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
}
.preview-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Hidden */
.hidden { display: none !important; }

/* Mobile table card helper styles */
.mobile-card-table thead { display: none; }
.mobile-card-table tbody { display: flex; flex-direction: column; gap: 12px; }
.mobile-card-table tbody tr {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.mobile-card-table tbody tr td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: none;
  font-size: 14px;
  gap: 12px;
}
.mobile-card-table tbody tr td::before {
  content: attr(data-label);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  min-width: 60px;
}
.mobile-card-table tbody tr td[data-label=""]::before {
  display: none;
}
/* If cell has no data-label, make it full width */
.mobile-card-table tbody tr td:not([data-label]) {
  flex-direction: column;
  align-items: flex-start;
}
/* Make action buttons full width in card mode */
.mobile-card-table tbody tr td .btn {
  width: 100%;
  justify-content: center;
}
/* Ensure pills wrap nicely in cards */
.mobile-card-table tbody tr td .pill {
  word-break: break-all;
}

/* ========== Responsive: Tablet (768px - 1024px) ========== */
@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .welcome-banner h1 { font-size: 26px; }
  .welcome-banner { padding: 32px; }
}

/* ========== Responsive: Mobile (< 768px) ========== */
@media (max-width: 768px) {
  /* Minimum font size for readability */
  body { font-size: 15px; }
  .subtle.small { font-size: 13px; }

  /* Sidebar as drawer */
  .mobile-menu-btn { display: flex; }
  .sidebar {
    display: flex;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open {
    display: block;
    z-index: 15;
  }

  /* Main layout */
  .main { margin-left: 0; }

  /* Topbar */
  .topbar {
    padding: 12px 16px;
    gap: 12px;
  }
  .topbar h1 {
    font-size: 17px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Content */
  .content { padding: 16px; }

  /* Welcome Banner */
  .welcome-banner {
    padding: 24px;
    border-radius: var(--radius);
  }
  .welcome-banner h1 { font-size: 22px; }
  .welcome-banner p { font-size: 15px; }
  .welcome-banner .time-greeting { font-size: 14px; }

  /* Grid: all single column on mobile */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card { padding: 16px; }
  .card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-header h2 { font-size: 16px; }

  /* Metric values */
  .metric-value { font-size: 26px; }

  /* Toolbar */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar .input,
  .toolbar .select {
    width: 100%;
    min-width: auto;
  }

  /* Filter section */
  .filter-section {
    flex-direction: column;
    padding: 12px;
  }

  /* Tabs */
  .tabs { gap: 6px; }
  .tab {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Forms */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-grid .full { grid-column: 1; }

  /* Input/Select/Textarea touch targets */
  .input, .select, .textarea {
    padding: 12px 14px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 44px;
  }
  .textarea { min-height: 90px; }

  /* Button touch targets */
  .btn {
    min-height: 44px;
    padding: 10px 16px;
  }
  .btn-sm {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
  }
  .btn-block { width: 100%; }

  /* Tables: horizontal scroll fallback + card mode */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 600px;
  }
  th, td {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Modal: nearly full screen on mobile */
  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: slideUpModal 0.3s ease;
  }
  @keyframes slideUpModal {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .modal-header { padding: 16px 20px; }
  .modal-body { padding: 20px; }
  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }
  .modal-footer .btn { width: 100%; }

  /* Timeline */
  .timeline-item {
    flex-direction: column;
    gap: 6px;
    padding: 12px;
  }
  .timeline-date {
    min-width: auto;
    font-size: 12px;
  }

  /* Checkbox group */
  .checkbox-group { gap: 6px; }
  .checkbox-item {
    padding: 10px 14px;
    font-size: 14px;
  }

  /* Quick date buttons */
  .quick-date-btns { gap: 6px; }
  .quick-date-btn {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
  }

  /* Auth card */
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius);
  }

  /* Section headings */
  h1 { font-size: 20px; }
  h2 { font-size: 16px; }

  /* Kanban board columns */
  [style*="grid-template-columns:repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
  }

  /* Field groups */
  .field { margin-bottom: 14px; }
  .field label { font-size: 14px; }

  /* Action buttons in table rows - stack vertically on mobile */
  td > div[style*="display:flex"] {
    flex-wrap: wrap;
    gap: 6px;
  }
  td > div[style*="display:flex"] .btn {
    flex: 1;
    min-width: 60px;
    justify-content: center;
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Select inside table (status update) */
  td select.select {
    width: 100%;
    min-width: 100%;
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Attachment cells */
  .attachments-cell { gap: 6px; }
  .attach-thumb { width: 40px; height: 40px; }
  .attach-more { width: 40px; height: 40px; }

  /* Toast */
  .toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: none;
    max-width: none;
    animation: fadeInUp 0.3s ease;
  }

  /* Preview overlay */
  .preview-overlay img {
    max-width: 95vw;
    max-height: 85vh;
  }

  /* Empty state */
  .empty { padding: 32px 16px; }
  .empty-icon { font-size: 36px; }
  .empty-text { font-size: 14px; }
}

/* ========== Responsive: Small phones (< 480px) ========== */
@media (max-width: 480px) {
  .content { padding: 12px; }

  .welcome-banner {
    padding: 20px;
  }
  .welcome-banner h1 { font-size: 19px; }
  .welcome-banner p { font-size: 14px; }

  .card { padding: 14px; }
  .card-header h2 { font-size: 15px; }

  .metric-value { font-size: 22px; }

  .topbar { padding: 10px 12px; }
  .topbar h1 { font-size: 15px; }

  .btn { padding: 10px 14px; font-size: 13px; }
  .btn-sm { padding: 8px 12px; font-size: 12px; }

  th, td { padding: 8px 10px; font-size: 12px; }

  .modal { max-height: calc(100vh - 8px); }
  .modal-overlay { padding: 4px; }
  .modal-header { padding: 14px 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 10px 16px; }

  .auth-card { padding: 24px 16px; }

  .tab { padding: 7px 12px; font-size: 12px; }

  .pill { font-size: 11px; padding: 3px 8px; }

  .filter-section { padding: 10px; }
}

/* ========== Print styles ========== */
@media print {
  .sidebar, .sidebar-overlay, .mobile-menu-btn, .topbar { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
