:root {
  --wolf-dark: #1a1a2e;
  --wolf-blue: #16213e;
  --wolf-accent: #e94560;
  --wolf-gold: #f5a623;
  --wolf-green: #27ae60;
  --wolf-light: #f8f9fa;
  --wolf-gray: #6c757d;
  --wolf-white: #ffffff;
  --wolf-border: #dee2e6;
  --wolf-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --wolf-radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--wolf-light);
  color: #333;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--wolf-dark), var(--wolf-blue));
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

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

.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.header-logo h1 {
  font-size: 18px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--wolf-white);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  z-index: 100;
  border-top: 1px solid var(--wolf-border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  color: var(--wolf-gray);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  border: none;
  background: none;
}

.nav-item.active, .nav-item:hover {
  color: var(--wolf-accent);
}

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

/* ===== CONTENT ===== */
.content {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
  background: var(--wolf-white);
  border-radius: var(--wolf-radius);
  box-shadow: var(--wolf-shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wolf-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--wolf-white);
  border-radius: var(--wolf-radius);
  box-shadow: var(--wolf-shadow);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--wolf-dark);
}

.stat-label {
  font-size: 12px;
  color: var(--wolf-gray);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card.accent .stat-value { color: var(--wolf-accent); }
.stat-card.green .stat-value { color: var(--wolf-green); }
.stat-card.gold .stat-value { color: var(--wolf-gold); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--wolf-accent);
  color: white;
}

.btn-primary:hover { background: #d63853; }

.btn-success {
  background: var(--wolf-green);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--wolf-border);
  color: var(--wolf-dark);
}

.btn-outline:hover { border-color: var(--wolf-accent); color: var(--wolf-accent); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  cursor: pointer;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wolf-dark);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--wolf-border);
  border-radius: 8px;
  font-size: 16px; /* Prevents zoom on iOS */
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--wolf-white);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--wolf-accent);
}

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

/* ===== LINE ITEMS ===== */
.line-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--wolf-border);
}

.line-item:last-child { border-bottom: none; }

.line-item-desc { font-size: 14px; }
.line-item-qty { font-size: 13px; color: var(--wolf-gray); }
.line-item-price { font-size: 14px; font-weight: 600; }
.line-item-remove {
  width: 28px; height: 28px;
  border: none; background: #fee; color: var(--wolf-accent);
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}

.line-item-input {
  display: grid;
  grid-template-columns: 1fr 60px 90px 36px;
  gap: 8px;
  margin-bottom: 8px;
}

.line-item-input input {
  padding: 10px;
  border: 2px solid var(--wolf-border);
  border-radius: 8px;
  font-size: 14px;
}

.line-item-input input:focus {
  outline: none;
  border-color: var(--wolf-accent);
}

/* ===== LIST ===== */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--wolf-white);
  border-radius: var(--wolf-radius);
  box-shadow: var(--wolf-shadow);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.1s;
}

.list-item:active { transform: scale(0.98); }

.list-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wolf-dark);
}

.list-item-subtitle {
  font-size: 12px;
  color: var(--wolf-gray);
}

.list-item-right {
  text-align: right;
}

.list-item-amount {
  font-size: 16px;
  font-weight: 700;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft { background: #eee; color: #666; }
.badge-sent { background: #e3f2fd; color: #1565c0; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-paid { background: #e8f5e9; color: #2e7d32; }
.badge-overdue { background: #fce4ec; color: #c62828; }
.badge-partial { background: #fff3e0; color: #e65100; }

/* ===== TOTALS ===== */
.totals {
  border-top: 2px solid var(--wolf-border);
  padding-top: 12px;
  margin-top: 12px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.totals-row.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--wolf-dark);
  border-top: 2px solid var(--wolf-dark);
  padding-top: 8px;
  margin-top: 8px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--wolf-gray);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal {
  background: var(--wolf-white);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border: none; background: var(--wolf-light);
  border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--wolf-light);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--wolf-gray);
  transition: all 0.2s;
}

.tab.active {
  background: var(--wolf-white);
  color: var(--wolf-dark);
  box-shadow: var(--wolf-shadow);
}

/* ===== SEARCH ===== */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 2px solid var(--wolf-border);
  border-radius: 10px;
  font-size: 16px;
}

.search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--wolf-gray);
}

/* ===== PROFIT VIZ ===== */
.profit-bar {
  height: 24px;
  background: var(--wolf-light);
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
}

.profit-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
}

.profit-positive { background: var(--wolf-green); }
.profit-negative { background: var(--wolf-accent); }

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wolf-accent);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: transform 0.2s;
}

.fab:active { transform: scale(0.9); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wolf-dark);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--wolf-white);
  border: 2px solid var(--wolf-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--wolf-border);
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover, .autocomplete-item.active {
  background: var(--wolf-light);
  color: var(--wolf-accent);
}

.autocomplete-item mark {
  background: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
}

/* ===== MIC BUTTONS ===== */
.input-with-mic {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-mic input,
.input-with-mic textarea {
  flex: 1;
  padding-right: 44px;
}

.mic-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--wolf-light);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
}

.mic-btn:hover { background: #e8e8e8; }

.mic-btn.mic-active {
  background: var(--wolf-accent);
  animation: micPulse 1s ease infinite;
}

.mic-recording {
  border-color: var(--wolf-accent) !important;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

@keyframes micPulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.1); }
}

.speech-interim {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wolf-dark);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 300;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ===== BOT PANEL ===== */
.bot-fab {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wolf-dark);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.4);
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: transform 0.2s;
}

.bot-fab:active { transform: scale(0.9); }

#bot-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--wolf-white);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: height 0.3s ease;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  pointer-events: none;
}

#bot-panel.bot-open {
  pointer-events: auto;
}

#bot-panel.bot-open {
  height: 65vh;
}

.bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--wolf-dark);
  color: white;
  flex-shrink: 0;
}

.bot-header h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-header-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

#bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-msg { display: flex; }
.bot-msg-bot { justify-content: flex-start; }
.bot-msg-user { justify-content: flex-end; }

.bot-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.bot-bubble-bot {
  background: var(--wolf-light);
  color: var(--wolf-dark);
  border-bottom-left-radius: 4px;
}

.bot-bubble-user {
  background: var(--wolf-accent);
  color: white;
  border-bottom-right-radius: 4px;
}

.bot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--wolf-border);
  flex-shrink: 0;
  background: white;
}

.bot-input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--wolf-border);
  border-radius: 20px;
  font-size: 16px;
  outline: none;
}

.bot-input-area input:focus {
  border-color: var(--wolf-accent);
}

.bot-input-area button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bot-send-btn {
  background: var(--wolf-accent);
  color: white;
}

.bot-mic-btn {
  background: var(--wolf-light);
}

.bot-mic-btn.mic-active {
  background: var(--wolf-accent);
  animation: micPulse 1s ease infinite;
}

/* ===== TOUR ===== */
#tour-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  pointer-events: none;
}

#tour-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  pointer-events: auto;
}

#tour-spotlight {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 30px 8px rgba(233, 69, 96, 0.5), 0 0 60px 15px rgba(233, 69, 96, 0.25);
  border: 3px solid var(--wolf-accent);
  z-index: 10001;
  pointer-events: none;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.08);
}

#tour-tooltip {
  position: fixed;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 10002;
  pointer-events: auto;
  max-width: 420px;
  animation: tourFade 0.3s ease;
}

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

#tour-step-count {
  font-size: 11px;
  color: var(--wolf-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

#tour-tooltip h3 {
  font-size: 17px;
  color: var(--wolf-dark);
  margin-bottom: 8px;
}

#tour-text {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 16px;
}

#tour-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#tour-skip {
  background: none;
  border: none;
  color: var(--wolf-gray);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
}

#tour-skip:hover { color: var(--wolf-accent); }

#tour-prev {
  background: var(--wolf-light);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--wolf-dark);
}

#tour-next {
  background: var(--wolf-accent);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#tour-next:hover { background: #d63853; }

/* ===== RESPONSIVE ===== */

/* --- MOBILE OPTIMIZATIONS (default) --- */

/* Prevent pull-to-refresh interfering with scroll */
html {
  overscroll-behavior-y: contain;
}

/* Tap highlight */
* {
  -webkit-tap-highlight-color: rgba(233, 69, 96, 0.15);
}

/* Ensure touch targets are at least 44px (Apple HIG) */
.btn, .form-input, .form-select, .nav-item, .tab {
  min-height: 44px;
}

/* Better spacing on small screens */
.list-item {
  padding: 14px 16px;
}

/* Full-width action buttons on mobile */
.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-actions .btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  padding: 10px 8px;
}

/* Bottom nav safe area for notched phones */
.bottom-nav {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

/* Modal full-width on mobile */
.modal-content {
  margin: 8px;
  max-height: calc(100vh - 16px);
  border-radius: 16px;
}

/* Stats grid 2 columns on mobile */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* Line items easier to read */
.line-item-row {
  padding: 10px 0;
}

/* Prevent text overflow */
.list-item-title, .list-item-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65vw;
}

/* Smooth scrolling */
.content {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* --- TABLET (768px+) --- */
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .content { padding: 24px; max-width: 900px; }
  
  .modal-content {
    margin: auto;
    max-width: 560px;
    margin-top: 10vh;
    border-radius: 16px;
  }
  
  .invoice-actions .btn {
    flex: 0 1 auto;
    min-width: 140px;
  }
  
  .list-item-title, .list-item-subtitle {
    max-width: none;
  }

  .bottom-nav {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
  }
}

/* --- DESKTOP (1024px+) --- */
@media (min-width: 1024px) {
  body {
    background: #f0f0f5;
  }

  .header {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 0 0 16px 16px;
  }

  .content {
    max-width: 1000px;
    padding: 32px;
  }

  /* Side-by-side layout for invoice detail */
  .invoice-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  /* Stats can be bigger */
  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  /* List items get hover effect on desktop */
  .list-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
  }

  .list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  /* Larger modals on desktop */
  .modal-content {
    max-width: 640px;
  }

  /* Bottom nav centered and floating */
  .bottom-nav {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }

  /* FAB position adjusted */
  #fab {
    bottom: 88px;
    right: calc(50% - 470px);
  }

  /* Bot panel wider */
  .bot-panel {
    max-width: 400px;
    right: calc(50% - 500px);
    left: auto;
  }
}

/* --- LARGE DESKTOP (1400px+) --- */
@media (min-width: 1400px) {
  .content {
    max-width: 1200px;
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --- SMALL PHONE (375px and below) --- */
@media (max-width: 375px) {
  .header h1 {
    font-size: 14px;
  }

  .header-logo img {
    width: 32px;
    height: 32px;
  }

  .stat-value {
    font-size: 20px;
  }

  .btn-icon {
    padding: 4px;
    font-size: 16px;
  }

  .list-item-amount {
    font-size: 14px;
  }

  .invoice-actions .btn {
    font-size: 12px;
    padding: 8px 6px;
  }
}

/* --- LANDSCAPE PHONE --- */
@media (max-height: 500px) and (orientation: landscape) {
  .bottom-nav {
    height: 48px;
  }

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

  .nav-item {
    font-size: 10px;
  }

  .content {
    padding-bottom: 56px;
  }
}

/* --- PRINT --- */
@media print {
  .header, .bottom-nav, #fab, .bot-fab, .bot-panel, .invoice-actions, #tour-overlay {
    display: none !important;
  }

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

  .list-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* --- ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
