/* ============================================
   OLLO MANAGER — Design System
   ============================================ */

:root {
  --primary:        #1a1a1a;
  --primary-hover:  #333333;
  --accent:         #2563EB;
  --accent-hover:   #1D4ED8;
  --accent-light:   #EFF6FF;
  --accent-mid:     #BFDBFE;
  --danger:         #DC2626;
  --danger-hover:   #B91C1C;
  --danger-light:   #FEE2E2;
  --success:        #166534;
  --success-light:  #DCFCE7;
  --text-primary:   #1a1a1a;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --border:         #E5E7EB;
  --border-hover:   #D1D5DB;
  --bg:             #ffffff;
  --bg-subtle:      #f5f5f5;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
}

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

html { font-size: 15px; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-subtle);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page { background: var(--bg-subtle); min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.login-container { width: 100%; max-width: 420px; padding: 24px 16px; }

.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.login-form { display: flex; flex-direction: column; gap: 0; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .logo-mark {
  background: var(--accent);
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: 8px;
}

.navbar .logo-text {
  font-size: 16px;
  color: #fff;
}

.badge-admin {
  background: rgba(37,99,235,0.2);
  color: #93C5FD;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.navbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
}

.navbar .btn-ghost {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.15);
  background: transparent;
}

.navbar .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  text-decoration: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumb-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 500;
}

.breadcrumb-link:hover { text-decoration: underline; }

.breadcrumb-sep { color: var(--border-hover); }

/* ============================================
   STATS
   ============================================ */
.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #86EFAC;
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #FCA5A5;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input:disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}

.input-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  text-decoration: none;
  color: #fff;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #FCA5A5;
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-monthly-active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent-mid);
}
.btn-monthly-active:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
  border-color: var(--accent);
}

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

.btn-icon { padding: 7px; border-radius: 6px; }

.btn-full { width: 100%; margin-top: 4px; padding: 11px 18px; }

/* ============================================
   LABEL WITH BUTTON (monthly toggle)
   ============================================ */
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* ============================================
   PARKING CARDS (dashboard)
   ============================================ */
.parkings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.parking-card { transition: box-shadow 0.2s; }
.parking-card:hover { box-shadow: var(--shadow-md); }

.parking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  gap: 12px;
}

.parking-info { display: flex; align-items: center; gap: 14px; }

.parking-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.parking-icon-sm {
  width: 34px;
  height: 34px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.parking-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.2px;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, text-decoration 0.15s;
}
.parking-name:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.parking-name-link-table {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.parking-name-link-table:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.parking-page-title-block {
  display: flex;
  align-items: center;
  gap: 16px;
}
.parking-page-title-block .parking-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
}

.parking-sim {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.tenant-count-bar {
  padding: 8px 20px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tenant-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tenant-empty {
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.tenant-list { list-style: none; }

.tenant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background 0.12s;
}

.tenant-item:last-child { border-bottom: none; }
.tenant-item:hover { background: var(--bg-subtle); }

.tenant-details { display: flex; flex-direction: column; gap: 3px; }

.tenant-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tenant-phone {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   TABLE
   ============================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead { background: var(--bg-subtle); }

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-subtle); }

.text-muted { color: var(--text-secondary); }

.client-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 34px;
  height: 34px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.sim-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-primary);
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--bg);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius);
}

.empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state small {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   FORM LAYOUT
   ============================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.required { color: var(--danger); font-weight: 700; }

/* ============================================
   TENANT TABLE CELLS
   ============================================ */
.tenant-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tenant-fullname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tenant-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.tenant-spot {
  font-size: 11px;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.badge-spot {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.lease-dates {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.lease-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-active    { background: #EFF6FF; color: #2563EB; }
.status-expired   { background: #FEE2E2; color: #DC2626; }
.status-upcoming  { background: #FEF9C3; color: #854D0E; }
.status-undefined { background: #F3F4F6; color: #6B7280; }

.rent-cell {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  white-space: nowrap;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: modalIn 0.2s ease;
}

.modal-lg {
  max-width: 600px;
}

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

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}

.modal-close:hover { color: var(--text-primary); background: var(--bg-subtle); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ============================================
   PAGE TRANSITION
   ============================================ */
body { animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

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

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  max-width: 380px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
  pointer-events: all;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.toast-in { opacity: 1; transform: translateY(0) scale(1); }
.toast.toast-out { opacity: 0; transform: translateY(4px) scale(0.97); }

.toast-success { background: #fff; border: 1px solid #86EFAC; color: #166534; }
.toast-error   { background: #fff; border: 1px solid #FCA5A5; color: #DC2626; }
.toast-info    { background: #fff; border: 1px solid #BFDBFE; color: #1D4ED8; }

.toast-icon { flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  font-size: 16px; line-height: 1; color: inherit; opacity: 0.5;
  border-radius: 4px; transition: opacity 0.12s;
  flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

/* ============================================
   CONFIRM MODAL
   ============================================ */
#confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
#confirm-modal.active { display: flex; }
.confirm-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 100%;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.18s ease;
}
.confirm-icon {
  width: 44px; height: 44px;
  background: #FEE2E2; color: #DC2626;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.confirm-title { font-size: 17px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.confirm-msg   { font-size: 14px; color: #6B7280; margin-bottom: 24px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================
   SEARCH BAR
   ============================================ */
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.search-input {
  padding: 8px 14px 8px 36px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  width: 240px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

/* ============================================
   PROGRESS BAR (occupation)
   ============================================ */
.occ-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.occ-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-width: 80px;
}
.occ-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.occ-bar-fill.occ-full  { background: #DC2626; }
.occ-bar-fill.occ-high  { background: #F59E0B; }
.occ-bar-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* ============================================
   WELCOME HEADER (dashboard)
   ============================================ */
.welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.welcome-left {}
.welcome-title { font-size: 26px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.5px; }
.welcome-sub   { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.welcome-date  { font-size: 14px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }

/* ============================================
   EXPIRING LEASES SECTION
   ============================================ */
.expiring-section { margin-top: 28px; }
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.expiring-list { display: flex; flex-direction: column; gap: 8px; }
.expiring-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.expiring-name   { font-weight: 600; font-size: 14px; color: #1a1a1a; }
.expiring-detail { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.days-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.days-red    { background: #FEE2E2; color: #DC2626; }
.days-orange { background: #FEF3C7; color: #D97706; }
.days-green  { background: #DCFCE7; color: #16A34A; }

/* ============================================
   BADGE NOUVEAU (admin)
   ============================================ */
.badge-new {
  display: inline-block;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid #86EFAC;
  vertical-align: middle;
  margin-left: 6px;
}

/* ============================================
   SORTABLE TABLE HEADERS
   ============================================ */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
th.sortable .sort-icon { display: inline-block; margin-left: 4px; opacity: 0.4; }
th.sortable.asc  .sort-icon { opacity: 1; }
th.sortable.desc .sort-icon { opacity: 1; transform: scaleY(-1); display: inline-block; }

/* ============================================
   STATUS BADGE — Expire bientôt & Mensuel
   ============================================ */
.status-expiring { background: #FEF3C7; color: #D97706; }
.status-monthly  { background: #EFF6FF; color: #2563EB; }

/* ============================================
   NAVBAR NAV LINKS (admin)
   ============================================ */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 20px;
}
.navbar-nav-link {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.navbar-nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.navbar-nav-link.active { color: #fff; background: rgba(255,255,255,0.15); }

/* ============================================
   MRR CHART (admin, simulated)
   ============================================ */
.mrr-chart-section { margin-bottom: 28px; }
.mrr-chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.mrr-chart-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.mrr-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100px;
}
.mrr-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.mrr-bar {
  width: 100%;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s;
}
.mrr-bar.current { background: var(--accent); border-color: var(--accent); }
.mrr-bar:hover { opacity: 0.85; }
.mrr-bar-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ============================================
   FOOTER
   ============================================ */
body { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; }

.footer {
  text-align: center;
  padding: 20px 32px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: 48px;
}
.footer a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: var(--text-secondary); text-decoration: none; }
.footer-sep { margin: 0 8px; opacity: 0.5; }

/* Login page: override body flex to keep old centering */
.login-page { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ============================================
   USER DROPDOWN (navbar)
   ============================================ */
.user-dropdown { position: relative; }

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}
.user-dropdown-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.user-dropdown-toggle .chevron { transition: transform 0.18s; }
.user-dropdown.open .user-dropdown-toggle .chevron { transform: rotate(180deg); }

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 196px;
  z-index: 400;
  padding: 6px;
  animation: fadeIn 0.12s ease;
}
.user-dropdown.open .user-dropdown-menu { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.1s;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  box-sizing: border-box;
}
.dropdown-item:hover { background: var(--bg-subtle); text-decoration: none; color: var(--text-primary); }
.dropdown-item-muted { color: var(--text-secondary); font-weight: 400; font-size: 13px; cursor: default; }
.dropdown-item-muted:hover { background: none; }
.dropdown-item-danger { color: var(--danger); }
.dropdown-item-danger:hover { background: var(--danger-light); color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--border); margin: 5px 0; }

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-avatar-lg {
  width: 80px;
  height: 80px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -1px;
  flex-shrink: 0;
  border: 3px solid var(--accent-mid);
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.profile-name { font-size: 22px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.4px; }
.profile-email { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.profile-role-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.profile-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

/* ============================================
   LOGO LINK
   ============================================ */
.navbar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}
.navbar-brand-link:hover { text-decoration: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .navbar-inner { padding: 0 16px; }
  .main-content { padding: 24px 16px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .parkings-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .stats-row { flex-wrap: wrap; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .actions-cell { flex-wrap: wrap; }
  .modal { padding: 24px; }
}
