
/* ============================================
   LOPEZ COMPOUND RENTAL SYSTEM - GLOBAL STYLES
   ============================================ */

:root {
  /* ── Brand palette extracted from Lopez Compound logo ── */
  --primary: #3a4a1e;        /* deep forest green — "LOPEZ" text */
  --primary-light: #546b2c;  /* mid green */
  --primary-dark: #2d3916;   /* darker green */
  --secondary: #7a3b1e;      /* terracotta/rust — "COMPOUND" text */
  --secondary-light: #a0522d;
  --accent: #c8956c;         /* warm tan accent */
  --bg-cream: #f5efe8;       /* parchment background from logo */
  --danger: #c0392b;
  --success: #2e7d32;
  --warning: #f57c00;
  --info: #0277bd;
  --dark: #1c1c1c;
  --light: #f5efe8;
  --gray: #6b6b6b;
  --gray-light: #e8e0d5;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(58,74,30,0.08);
  --shadow-md: 0 4px 12px rgba(58,74,30,0.12);
  --shadow-lg: 0 8px 24px rgba(58,74,30,0.15);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Lato', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-cream);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* Headings — Playfair Display (matches "LOPEZ" serif weight) */
h1, h2, h3, h4, h5, h6,
.page-title, .modal-title, .card-title {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Spaced caps labels — Cinzel (matches "COMPOUND" small-caps style) */
.property-type, .badge, .sidebar-user-role,
.stat-info p, .nav-links a, .btn,
.form-label, .tab {
  font-family: 'Cinzel', 'Lato', sans-serif;
  letter-spacing: 0.02em;
}

/* Cinzel at small sizes needs a touch more breathing room */
.badge {
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}

.sidebar-menu a {
  font-family: 'Lato', sans-serif; /* sidebar stays Lato — Cinzel too wide at 0.9rem in tight spaces */
  letter-spacing: normal;
}

.property-type {
  letter-spacing: 0.12em;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 80px;
  width: auto;
  display: block;
}

/* Hide icon-based logo — replaced by image logo */
.logo-icon { display: none; }

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

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--dark);
}

.btn-secondary:hover {
  background: var(--secondary-light);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

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

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

.btn-warning {
  background: var(--warning);
  color: var(--dark);
}

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

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

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

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-light);
  background: #fafbfc;
}

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

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

.form-label .required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 74, 30, 0.12);
}

.form-control::placeholder {
  color: #adb5bd;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

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

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

.form-hint {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 4px;
}

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

/* ============================================
   TABLES
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  background: white;
}

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

.table th {
  background: #f8f9fa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--dark);
  border-bottom: 2px solid var(--gray-light);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8f9fa;
}

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

/* ============================================
   BADGES & STATUS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: #cce5ff; color: #004085; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-light);
  color: var(--dark);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: white;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.alert-danger { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--info); }

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: 1.5rem;
}

.tab {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray);
  position: relative;
  transition: var(--transition);
  font-size: 0.95rem;
}

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

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

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================
   SIDEBAR (Dashboard)
   ============================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 70px);
}

.sidebar {
  background: var(--dark);
  color: white;
  padding: 1.5rem 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.sidebar-user {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 1rem;
}

.sidebar-user-role {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.sidebar-menu {
  list-style: none;
  padding: 0 0.75rem;
}

.sidebar-menu li { margin-bottom: 4px; }

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.sidebar-menu a.active {
  background: var(--primary);
}

.sidebar-menu i {
  width: 20px;
  text-align: center;
}

.main-content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.green { background: #d4edda; color: var(--success); }
.stat-icon.blue { background: #cce5ff; color: var(--primary); }
.stat-icon.orange { background: #fff3cd; color: var(--accent); }
.stat-icon.red { background: #f8d7da; color: var(--danger); }
.stat-icon.purple { background: #e2d4f0; color: #6f42c1; }

.stat-info h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

.stat-trend {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 4px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ============================================
   PROPERTY CARDS
   ============================================ */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.property-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.property-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.property-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.property-card:hover .property-image img {
  transform: scale(1.05);
}

.property-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.property-price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.property-body {
  padding: 1.25rem;
}

.property-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.property-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.property-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.property-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.property-feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--gray);
}

.property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
}

.property-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.property-owner img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ============================================
   BILL CARDS
   ============================================ */
.bill-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.bill-card.overdue { border-left-color: var(--danger); }
.bill-card.paid { border-left-color: var(--success); }
.bill-card.pending { border-left-color: var(--warning); }

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

.bill-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.bill-period {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 2px;
}

.bill-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
}

.bill-breakdown {
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.bill-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}

.bill-item:not(:last-child) {
  border-bottom: 1px dashed var(--gray-light);
}

.bill-item.total {
  font-weight: 700;
  font-size: 1rem;
  border-top: 2px solid var(--dark);
  border-bottom: none;
  padding-top: 10px;
  margin-top: 6px;
}

/* ============================================
   PAYMENT PROOF UPLOAD
   ============================================ */
.upload-zone {
  border: 2px dashed var(--gray-light);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafbfc;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(26, 95, 60, 0.03);
}

.upload-zone.has-file {
  border-color: var(--success);
  background: rgba(40, 167, 69, 0.05);
}

.upload-zone i {
  font-size: 2.5rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.upload-zone p {
  color: var(--gray);
  font-size: 0.9rem;
}

.upload-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

/* ============================================
   INQUIRY CARDS
   ============================================ */
.inquiry-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.inquiry-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.inquiry-content {
  flex: 1;
}

.inquiry-name {
  font-weight: 700;
  margin-bottom: 2px;
}

.inquiry-meta {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.inquiry-message {
  color: var(--dark);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

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

/* ============================================
   PHOTO GALLERY
   ============================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-item .photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-overlay button {
  background: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gray-light);
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

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

/* ============================================
   PAGINATION
   ============================================ */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-light);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--gray);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--gray-light);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  color: var(--dark);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 700;
}

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

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--gray);
  font-size: 0.85rem;
  line-height: 34px;
}

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

/* Broad-brush fix: most pages use inline grid-template-columns for
   two/multi-column layouts (dashboards, detail pages, contact page, etc).
   These attribute selectors catch those patterns without needing to touch
   every single page's markup individually. */
@media (max-width: 900px) {
  [style*="grid-template-columns: 1fr 380px"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }

  .nav-container { height: 72px; }

  .mobile-nav-toggle {
    display: flex !important;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 1.5rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    z-index: 1000;
    padding: 0.5rem 0;
  }

  .sidebar-menu {
    display: flex;
    justify-content: space-around;
    padding: 0;
    overflow-x: auto;
  }

  .sidebar-menu li { margin: 0; flex-shrink: 0; }

  .sidebar-menu a {
    flex-direction: column;
    padding: 8px 12px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .sidebar-menu a span { display: none; }

  .sidebar-user { display: none; }

  .main-content {
    padding: 1rem;
    padding-bottom: 80px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-info h3 {
    font-size: 1.4rem;
  }

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

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

  .page-title {
    font-size: 1.4rem;
  }

  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-overlay {
    padding: 0;
  }

  .card-body {
    padding: 1.25rem;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: 70px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: repeat(5, 1fr)"],
  [style*="grid-template-columns: repeat(6, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .hero h1, [style*="font-size: 3rem"] { font-size: 1.9rem !important; }
  [style*="font-size: 2.5rem"] { font-size: 1.75rem !important; }
  [style*="font-size: 2rem"] { font-size: 1.4rem !important; }

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

  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: repeat(5, 1fr)"],
  [style*="grid-template-columns: repeat(6, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--dark);
  cursor: pointer;
  padding: 8px;
  order: -1;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gray { color: var(--gray); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* Image placeholder */
.img-placeholder {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 2rem;
}
