/* =============================================
   ImmoGest – Styles principaux
   ============================================= */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #64748b;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0891b2;
  --info-light: #cffafe;

  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --sidebar-width: 240px;
  --sidebar-collapsed: 68px;
  --header-height: 64px;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.03);

  --transition: .2s ease;
}

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

html { font-size: 15px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.logo i { font-size: 1.4rem; color: var(--primary); flex-shrink: 0; }
.logo-text { font-weight: 700; font-size: 1.1rem; white-space: nowrap; transition: opacity var(--transition); }
.sidebar.collapsed .logo-text { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-footer span { opacity: 0; }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem; padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.08); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.sidebar-nav ul { list-style: none; }
.sidebar-nav ul li { margin-bottom: 2px; }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 10px 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin: 0 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
}
.nav-link i { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-link span { transition: opacity var(--transition); }
.sidebar.collapsed .nav-link span { opacity: 0; width: 0; overflow: hidden; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: var(--primary); }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .75rem;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition);
}

/* =============================================
   MAIN WRAPPER
   ============================================= */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-collapsed); }

/* =============================================
   TOP HEADER
   ============================================= */
.top-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--text-secondary); padding: 6px; border-radius: var(--radius-sm); }
.menu-btn:hover { color: var(--text); background: var(--bg); }

.page-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }

.header-right { display: flex; align-items: center; gap: 14px; }
.header-date { font-size: .85rem; color: var(--text-secondary); }

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

/* =============================================
   CARDS & LAYOUT
   ============================================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

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

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

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* =============================================
   STAT CARDS (Dashboard)
   ============================================= */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }

.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: .8rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-sub { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn-sm { padding: 6px 13px; font-size: .8rem; }
.btn-xs { padding: 4px 10px; font-size: .75rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #0e7490; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* =============================================
   BADGES & STATUS
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--border); color: var(--text-secondary); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* =============================================
   TABLE
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

thead th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

tbody td {
  padding: 12px 16px;
  color: var(--text);
  vertical-align: middle;
}

.td-actions { display: flex; gap: 6px; align-items: center; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }

label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
label .req { color: var(--danger); margin-left: 2px; }

input, select, textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; cursor: pointer; }

.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; }
.modal-overlay[style*="none"] { display: none !important; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(16px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-lg { max-width: 820px; }
.modal-xl { max-width: 960px; }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; padding: 4px; border-radius: 4px; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }

.modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0; }

/* =============================================
   SEARCH & FILTERS
   ============================================= */
.search-bar {
  position: relative;
}
.search-bar i {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem; pointer-events: none;
}
.search-bar input { padding-left: 34px; }

.filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 14px; opacity: .4; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: .875rem; margin-bottom: 20px; }

/* =============================================
   TOAST
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  font-size: .875rem;
  animation: slideInToast .25s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--info); }
.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 1rem; padding: 2px; }
.toast-close:hover { color: #fff; }

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

/* =============================================
   PAGE SECTIONS
   ============================================= */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 { font-size: 1.3rem; font-weight: 700; }

/* =============================================
   BIEN CARD
   ============================================= */
.bien-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
  cursor: pointer;
}
.bien-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bien-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.bien-card-title { font-weight: 700; font-size: .95rem; margin-bottom: 3px; }
.bien-card-address { font-size: .82rem; color: var(--text-muted); }
.bien-card-meta { display: flex; gap: 14px; font-size: .82rem; color: var(--text-secondary); margin-top: 10px; }
.bien-card-meta span { display: flex; align-items: center; gap: 5px; }
.bien-card-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-top: 10px; }
.bien-card-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* =============================================
   LOCATAIRE CARD
   ============================================= */
.locataire-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
  flex-shrink: 0;
}

/* =============================================
   QUITTANCE PREVIEW
   ============================================= */
.quittance-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.quittance-header-band {
  background: var(--primary);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quittance-header-band h2 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.quittance-body { padding: 24px; }
.quittance-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.quittance-info-block h4 { font-size: .75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: .05em; margin-bottom: 6px; font-weight: 600; }
.quittance-info-block p { font-size: .9rem; color: var(--text); line-height: 1.6; }
.quittance-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; }
.quittance-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: .78rem; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--border); }
.quittance-table td { padding: 10px 14px; border: 1px solid var(--border); }
.quittance-total { font-weight: 700; font-size: 1.1rem; }
.quittance-signature { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.quittance-signature-box { text-align: center; }
.quittance-mention { font-size: .78rem; color: var(--text-muted); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); line-height: 1.6; }

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .4s ease; }
.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* =============================================
   DASHBOARD RECENT
   ============================================= */
.recent-list { display: flex; flex-direction: column; gap: 0; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.recent-item:last-child { border-bottom: none; }
.recent-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.recent-info { flex: 1; min-width: 0; }
.recent-info strong { display: block; font-size: .87rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-info span { font-size: .78rem; color: var(--text-muted); }
.recent-amount { font-weight: 700; font-size: .95rem; color: var(--success); flex-shrink: 0; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; }
.page-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; font-size: .85rem; font-weight: 500; transition: all var(--transition); }
.page-btn:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* =============================================
   DETAIL VIEW
   ============================================= */
.detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.detail-back { background: none; border: none; cursor: pointer; color: var(--text-secondary); font-size: 1rem; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-sm); transition: all var(--transition); font-family: inherit; font-size: .875rem; }
.detail-back:hover { background: var(--bg); color: var(--text); }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-item label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 4px; }
.info-item p { font-size: .9rem; color: var(--text); font-weight: 500; }

/* =============================================
   TABS
   ============================================= */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 10px 18px; background: none; border: none; cursor: pointer; font-size: .875rem; font-weight: 500; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition); font-family: inherit; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* =============================================
   LOADING
   ============================================= */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
  font-size: .9rem;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   ALERT
   ============================================= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info { background: var(--info-light); color: var(--info); }
.alert-success { background: var(--success-light); color: var(--success); }
.alert-warning { background: var(--warning-light); color: var(--warning); }
.alert-danger { background: var(--danger-light); color: var(--danger); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .menu-btn { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .content-area { padding: 16px; }
  .quittance-info-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .top-header { padding: 0 14px; }
  .page-title { font-size: 1rem; }
  .stat-value { font-size: 1.3rem; }
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }
