/*
 * Anahuac RV Park Management System
 * Copyright © 2026 Anahuac RV Park LLC. All Rights Reserved.
 * Proprietary and Confidential.
 * Unauthorized copying, distribution, or use is strictly prohibited.
 */
/* === PREMIUM UI - Anahuac RV Park Management === */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== LARGE ACCESSIBLE SCROLLBARS EVERYWHERE ===== */
html, body, * { scrollbar-width: auto !important; }
::-webkit-scrollbar { width: 20px !important; height: 20px !important; }
::-webkit-scrollbar-track { background: #e5e7eb !important; border-radius: 10px !important; border: 2px solid #d1d5db !important; margin: 4px !important; }
::-webkit-scrollbar-thumb { background: #1a5c32 !important; border-radius: 10px !important; border: 4px solid #e5e7eb !important; min-height: 40px !important; min-width: 40px !important; }
::-webkit-scrollbar-thumb:hover { background: #f59e0b !important; }
::-webkit-scrollbar-corner { background: #e5e7eb !important; }
/* Override ANY element that might be shrinking scrollbars */
.table-container::-webkit-scrollbar,
.billing-scroll::-webkit-scrollbar,
.billing-page-card::-webkit-scrollbar,
.scrollable-table-card::-webkit-scrollbar,
.page-card::-webkit-scrollbar,
main::-webkit-scrollbar,
#content::-webkit-scrollbar { width: 20px !important; height: 20px !important; }
/* Firefox */
html, .table-container, .billing-scroll, .billing-page-card, main, #content {
  scrollbar-width: auto !important; scrollbar-color: #1a5c32 #e5e7eb !important;
}

:root {
  /* Brand Colors - Texas Bayou */
  --brand-primary: #1a5c32;
  --brand-secondary: #2d8a52;
  --brand-accent: #f59e0b;
  --brand-accent-dark: #d97706;
  --brand-warm: #92400e;

  /* Legacy aliases */
  --primary: #1a5c32;
  --primary-dark: #145228;

  /* Neutrals */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Semantic Colors */
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0284c7;
  --info-light: #e0f2fe;

  /* Shadows - Premium depth */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-bg: linear-gradient(180deg, #0f3d22 0%, #1a5c32 40%, #0f3d22 100%);
}

/* === TYPOGRAPHY === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.login-page {
  background-image: url('https://images.unsplash.com/photo-1439066615861-d1af74d74000?w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.post-login-btn { display: flex !important; }
.login-page .post-login-btn { display: none !important; }
a { text-decoration: none; color: inherit; }

/* === PAGE TRANSITIONS === */
#page-content {
  animation: pageFadeIn 0.35s ease-out;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === SKELETON LOADING === */
.skeleton-pulse {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === HELP PANEL === */
.help-panel { margin: 0 0 1rem 0; }
.help-toggle {
  width: 100%;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  transition: var(--transition);
}
.help-toggle:hover { background: var(--brand-secondary); }
.help-toggle .help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fff;
  color: var(--brand-primary);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}
.help-toggle .help-caret { margin-left: auto; font-size: 0.8rem; }
.help-body {
  background: #fff;
  border: 2px solid var(--brand-primary);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem 1.25rem;
  margin-top: -4px;
  color: var(--gray-900);
  font-size: 0.9rem;
  line-height: 1.55;
}
.help-body ol, .help-body ul { padding-left: 1.25rem; margin: 0.5rem 0; }
.help-body li { margin-bottom: 0.35rem; }
.help-body p { margin: 0.5rem 0; }
.help-body strong { color: var(--brand-primary); }

/* === LOGIN === */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.35);
}
.login-box {
  background: rgba(255, 253, 240, 0.92);
  padding: 2.75rem 2.5rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: loginFadeIn 0.6s ease-out;
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo {
  display: block;
  margin: 0 auto 1rem;
  max-height: 160px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(180, 90, 20, 0.25));
}
.login-box h1 {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c2410c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.3px;
}
.login-subtitle {
  text-align: center;
  color: #92400e;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  letter-spacing: 0.5px;
}
.login-box .form-group label {
  color: #78350f;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-box .form-group input {
  border: 1.5px solid #fed7aa;
  background: #fffbf5;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-box .form-group input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
  background: #fff;
}
.login-box .btn-primary {
  background: linear-gradient(135deg, #f59e0b, #c2410c);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 18px rgba(194, 65, 12, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  border-radius: var(--radius-full);
}
.login-box .btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(194, 65, 12, 0.45);
}
.login-box .btn-primary:active { transform: translateY(0); }
.login-footer {
  text-align: center;
  color: #92400e;
  font-size: 0.8rem;
  margin-top: 1.5rem;
  font-weight: 500;
}
.login-box .forgot-link a { color: #c2410c; }
.login-box .forgot-link a:hover { color: #9a3412; }
.login-box .recover-title {
  background: linear-gradient(135deg, #c2410c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-text { color: var(--danger); text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.success-text { color: var(--success); text-align: center; margin-top: 1rem; font-size: 0.9rem; }

/* === INLINE EDITABLE CELLS === */
.editable-cell { position: relative; cursor: pointer; }
.editable-cell .edit-pencil {
  display: none;
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--brand-primary);
  pointer-events: none;
}
.editable-cell:hover { background: #f0fdf4; }
.editable-cell:hover .edit-pencil { display: inline; }
.editable-cell.editing { background: #fff; padding: 2px 4px; }
.inline-edit-input {
  width: 100%;
  min-width: 70px;
  padding: 0.25rem 0.4rem;
  border: 1.5px solid var(--brand-primary);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.editable-text { min-width: 140px; }
.muted { color: var(--gray-500); }

/* === INVOICE QR === */
.invoice-qr-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
  padding: 0.75rem;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.invoice-qr-section strong { font-size: 0.95rem; color: var(--gray-900); }

/* === PWA INSTALL === */
.pwa-install-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1500;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: pwaInstallPulse 2s ease-in-out infinite;
  transition: var(--transition);
}
.pwa-install-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
@keyframes pwaInstallPulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 6px 28px rgba(26, 92, 50, 0.5); }
}

/* === RESERVATION CALENDAR === */
.cal-table { border-collapse: collapse; min-width: 900px; }
.cal-table th, .cal-table td { text-align: center; padding: 0.25rem 0.15rem; font-size: 0.72rem; border: 1px solid var(--gray-200); }
.cal-lot-col { text-align: left !important; padding: 0.3rem 0.5rem !important; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 50px; }
.cal-table thead .cal-lot-col { background: var(--gray-50); z-index: 2; }
.cal-day-col { min-width: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50px; }
.cal-table td[style*="background"] { color: #fff; font-size: 0.6rem; font-weight: 700; }

.table-container { position: relative; }
.table-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

/* === MOBILE METER ENTRY === */
.mobile-meter { max-width: 520px; margin: 0 auto; }
.mobile-meter-progress {
  width: 100%; height: 8px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 0.35rem;
}
.mobile-meter-progress-bar { height: 100%; background: var(--brand-secondary); transition: width 0.3s ease; border-radius: var(--radius-full); }
.mobile-meter-progress-text { text-align: center; font-size: 0.85rem; color: var(--gray-500); margin-bottom: 1rem; }
.mobile-meter-card {
  background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.5rem;
  transition: border-color 0.3s;
  border: 2px solid var(--gray-200);
}
.mobile-meter-card.done { border-color: var(--success); }
.mobile-meter-header {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mobile-meter-lot {
  font-size: 1.5rem; font-weight: 800; color: var(--brand-primary);
  background: #f0fdf4; padding: 0.3rem 0.8rem; border-radius: var(--radius);
}
.mobile-meter-tenant { font-size: 1rem; color: var(--gray-700); font-weight: 600; }
.mobile-meter-photo-area {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.mobile-meter-preview {
  width: 100px; height: 75px; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer;
}
.mobile-meter-camera-btn { display: inline-flex !important; align-items: center; gap: 0.4rem; font-size: 1rem; }
.mobile-meter-calc {
  background: var(--warning-light); border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 0.6rem 1rem; font-size: 0.95rem; color: var(--brand-warm); margin: 0.75rem 0;
}
.mobile-meter-nav { display: flex; justify-content: space-between; align-items: center; }
.mobile-meter-counter { font-weight: 600; color: var(--gray-500); }
.mobile-meter .form-group input {
  font-size: 1.3rem; padding: 0.85rem; text-align: center; font-weight: 700;
}
.mobile-meter .form-group label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); }

/* === UNDO TOAST === */
.undo-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  padding: 0.85rem 1.1rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 2000;
  font-size: 0.9rem;
  min-width: 280px;
  max-width: 90vw;
  animation: undoToastIn 0.25s ease-out;
  overflow: hidden;
}
@keyframes undoToastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.undo-toast.hiding { opacity: 0; transition: opacity 0.2s; }
.undo-toast-msg { flex: 1; }
.undo-toast-btn {
  background: var(--brand-accent);
  color: var(--gray-900);
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.undo-toast-btn:hover { background: #fbbf24; }
.undo-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.undo-toast-close:hover { color: #fff; }
.undo-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--brand-accent);
  transform-origin: left;
  animation: undoToastProgress 10s linear forwards;
}
@keyframes undoToastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* === PASSWORD === */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 2.5rem; }
.password-toggle {
  position: absolute; top: 50%; right: 0.5rem; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--gray-500); padding: 0.25rem 0.4rem; line-height: 1;
}
.password-toggle:hover { color: var(--brand-primary); }
.password-toggle.active { color: var(--brand-primary); }
.forgot-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.forgot-link a { color: var(--brand-primary); cursor: pointer; }
.forgot-link a:hover { text-decoration: underline; }
.recover-title { text-align: center; color: var(--brand-primary); font-size: 1.15rem; margin-bottom: 1rem; }

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: #fff;
  color: var(--gray-900);
  transition: var(--transition);
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 92, 50, 0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* === BUTTONS === */
.btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  box-shadow: 0 2px 8px rgba(26, 92, 50, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 92, 50, 0.35);
  filter: brightness(1.05);
}
.btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35); }
.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: white;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}
.btn-warning:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35); }
.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.btn-danger:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.btn-outline {
  background: white;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Button ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
}
.btn:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: 0s;
}

/* === SIDEBAR === */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}
/* Subtle texture overlay */
#sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20c0-11.046-8.954-20-20-20v20h20z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
#sidebar > * { position: relative; z-index: 1; }

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-header h2 {
  font-size: 1.05rem;
  color: var(--brand-accent);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
.menu-btn { display: none; background: none; border: none; color: rgba(255,255,255,0.8); font-size: 1.5rem; cursor: pointer; transition: var(--transition); }
.menu-btn:hover { color: var(--brand-accent); }

.nav-menu {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.5rem;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255,255,255,0.1) transparent !important;
}
.nav-menu::-webkit-scrollbar { width: 6px !important; height: 6px !important; }
.nav-menu::-webkit-scrollbar-track { background: transparent !important; border: none !important; }
.nav-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15) !important; border: none !important; }
.nav-section {
  color: #fbbf24 !important;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  margin-top: 1.2rem;
  margin-bottom: 0.2rem;
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.nav-link {
  display: block;
  padding: 0.7rem 1rem;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
  font-size: 0.78rem;
  position: relative;
  border-radius: var(--radius);
  margin: 1px 0;
  font-weight: 500;
}
.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  transform: translateX(3px);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
  color: var(--brand-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand-accent);
}
.nav-link::before { display: none; }

/* Collapsible nav group */
.nav-group .nav-sub { list-style: none; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.nav-group.open .nav-sub { max-height: 200px; }
.nav-group .nav-sub .nav-link { padding-left: 2.25rem; font-size: 0.83rem; }
.nav-caret { float: right; transition: transform 0.2s; font-size: 0.7rem; }
.nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-group-toggle { cursor: pointer; }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer .btn {
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
}
.sidebar-footer .btn:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.2);
}

/* === CELEBRATION OVERLAY === */
.celebration-overlay {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.celebration-overlay.visible { opacity: 1; }
.celebration-content { text-align: center; animation: celebrationPop 0.5s ease-out; }
.celebration-emoji { font-size: 4rem; margin-bottom: 0.5rem; }
.celebration-text { font-size: 1.5rem; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
@keyframes celebrationPop {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* === STATUS TOAST === */
.status-toast {
  background: var(--gray-900); color: #fff; padding: 0.7rem 1rem 0.7rem 1.5rem; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  box-shadow: var(--shadow-xl); transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 0.5rem; max-width: 90vw;
  transform: translateY(-1rem);
}
.status-toast.stacked.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.status-toast-content { flex: 1; }
.status-toast-close {
  background: none; border: none; color: rgba(255,255,255,0.6); font-size: 1.2rem; cursor: pointer;
  padding: 0 0.25rem; line-height: 1; flex-shrink: 0; transition: color 0.15s;
}
.status-toast-close:hover { color: #fff; }

/* === DASHBOARD ANIMATIONS === */
.dash-fade-in { animation: dashFadeIn 0.5s ease-out both; }
@keyframes dashFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === DASHBOARD WEATHER === */
.dash-weather {
  background: linear-gradient(135deg, #0f3d22, #1a5c32);
  color: #fff; border-radius: var(--radius-lg); padding: 0.6rem 1.25rem;
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 1rem; font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}
.dash-weather strong { font-size: 0.95rem; }
.dash-weather-sep { opacity: 0.4; }
.dash-weather-detail { opacity: 0.9; }

/* === DASHBOARD STATS === */
.dash-top-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem;
}
.dash-top-item {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition-slow);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}
.dash-top-item::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.06;
  pointer-events: none;
}
.dash-top-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.dash-border-green { border-left-color: var(--brand-primary); }
.dash-border-green::before { background: var(--brand-primary); }
.dash-border-blue { border-left-color: var(--info); }
.dash-border-blue::before { background: var(--info); }
.dash-border-red { border-left-color: var(--danger); }
.dash-border-red::before { background: var(--danger); }
.dash-border-purple { border-left-color: #7c3aed; }
.dash-border-purple::before { background: #7c3aed; }
.dash-top-icon { font-size: 1.75rem; margin-bottom: 0.35rem; }
.dash-top-val {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}
.dash-top-label {
  display: block;
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
  font-weight: 600;
}
.dash-trend {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

/* === DASHBOARD CHARTS === */
.dash-charts-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.dash-chart-card {
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  border-radius: var(--radius-lg);
}
.dash-chart-card h3 { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--gray-700); }
.dash-chart-card canvas { max-height: 220px; }
.dash-chart-small { position: relative; }
.dash-donut-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -10%);
  font-size: 1.4rem; font-weight: 800; color: var(--gray-700); pointer-events: none;
}

/* === DASHBOARD ACTIONS === */
.dash-actions {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; margin-bottom: 1.5rem;
}
.dash-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1rem 0.5rem; background: white; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); cursor: pointer; font-size: 0.78rem; font-weight: 600;
  color: var(--gray-700); transition: var(--transition); position: relative;
  box-shadow: var(--shadow-sm);
}
.dash-action-btn:hover {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.dash-action-btn:active { transform: translateY(0); }
.dash-portal-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0d1a50 !important;
  border: 2px solid #d97706 !important;
  font-weight: 700;
  grid-column: span 1;
  animation: portalPulse 2.5s ease-in-out infinite;
}
.dash-portal-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-color: #f59e0b !important;
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4) !important;
}
@keyframes portalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}
.dash-action-icon { font-size: 2rem; }
.dash-action-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 800;
  padding: 1px 5px; border-radius: var(--radius-full); min-width: 18px; text-align: center;
}

/* === DASHBOARD BOTTOM === */
.dash-bottom-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.dash-bottom-row .card { overflow: hidden; }
.dash-activity { max-height: 280px; overflow-y: auto; }
.dash-activity-item {
  display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0.6rem;
  border-bottom: 1px solid var(--gray-100); font-size: 0.85rem;
  border-left: 3px solid transparent; transition: var(--transition); border-radius: var(--radius-sm);
}
.dash-activity-item:hover { background: var(--gray-50); }
.dash-activity-payment { border-left-color: var(--success); }
.dash-activity-checkin { border-left-color: var(--info); }
.dash-activity-checkout { border-left-color: var(--warning); }
.help-box { background:#eff6ff; border-left:3px solid #3b82f6; padding:0.5rem 0.75rem; border-radius:6px; margin-bottom:0.85rem; font-size:0.82rem; color:var(--gray-700); line-height:1.45; }
.field-hint { display:block; font-size:0.76rem; color:var(--gray-500); margin-top:0.2rem; line-height:1.35; }
.dash-activity-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.dash-activity-text { color: var(--gray-700); }
.dash-activity-date { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.1rem; }
.dash-reservation-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.25rem; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: var(--transition);
}
.dash-reservation-item:hover { background: #f0fdf4; border-radius: var(--radius-sm); }
.dash-res-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; flex-shrink: 0;
}
.dash-res-countdown { font-size: 0.75rem; font-weight: 700; white-space: nowrap; }

/* === BIBLE VERSE === */
.dash-bible {
  background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
  color: #fff; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-bottom: 1rem; box-shadow: var(--shadow-md);
  border-left: 4px solid var(--brand-accent);
}
.dash-bible-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; margin-bottom: 0.4rem; }
.dash-bible-text { font-style: italic; font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.4rem; }
.dash-bible-ref { font-weight: 700; font-size: 0.85rem; color: #fbbf24; }

/* === HEALTH CARDS === */
.health-card {
  flex: 1; min-width: 130px; background: var(--gray-50); border-radius: var(--radius);
  padding: 0.6rem 0.75rem; border-left: 3px solid var(--success);
  transition: var(--transition);
}
.health-card.health-warning { border-left-color: var(--warning); background: var(--warning-light); }
.health-card.health-error { border-left-color: var(--danger); background: var(--danger-light); }

/* === DAILY TIP === */
.daily-tip {
  background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a;
  border-radius: var(--radius-lg); padding: 0.85rem 1.25rem; font-size: 0.85rem; color: var(--brand-warm);
  margin-top: 1rem; box-shadow: var(--shadow-sm);
  line-height: 1.5;
}

/* === SIDEBAR SEARCH === */
.sidebar-search { padding: 0.5rem 0.75rem; }
.sidebar-search input {
  width: 100%; padding: 0.55rem 0.75rem; border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); background: rgba(255,255,255,0.08); color: #fff;
  font-size: 0.85rem; outline: none; transition: var(--transition);
}
.sidebar-search input::placeholder { color: rgba(255,255,255,0.5); }
.sidebar-search input:focus { border-color: var(--brand-accent); background: rgba(255,255,255,0.12); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15); }
.search-results {
  position: absolute; left: 0.5rem; right: 0.5rem; top: 100%;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xl);
  max-height: 400px; overflow-y: auto; z-index: 200; display: none;
  color: var(--gray-900);
}
.sidebar-search { position: relative; }
.search-results.open { display: block; }
.search-group-label { padding: 0.4rem 0.75rem; font-size: 0.7rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.search-result {
  padding: 0.55rem 0.75rem; cursor: pointer; font-size: 0.85rem;
  border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; gap: 0.5rem;
  transition: var(--transition);
}
.search-result:hover, .search-result.active { background: #f0fdf4; }
.search-result .sr-icon { font-size: 1rem; flex-shrink: 0; }
.search-result .sr-title { font-weight: 600; }
.search-result .sr-sub { font-size: 0.75rem; color: var(--gray-500); }
.search-no-results { padding: 1rem; text-align: center; color: var(--gray-400); font-size: 0.85rem; }

/* === MAIN CONTENT === */
#content {
  margin-left: var(--sidebar-width);
  padding: 1.75rem 2rem;
  min-height: 100vh;
  background: var(--gray-100);
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

/* === CARDS === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  padding-left: 0.75rem;
  border-left: 3px solid var(--brand-accent);
  margin-bottom: 0.75rem;
}
.billing-page-card { max-height: calc(100vh - 180px); display: flex; flex-direction: column; overflow: hidden; }
.billing-page-card .billing-scroll { flex: 1; min-height: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--brand-primary); font-variant-numeric: tabular-nums; }
.stat-card .stat-label { color: var(--gray-500); font-size: 0.8rem; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }

/* Scrollable table card */
.scrollable-table-card { max-height: calc(100vh - 220px); display: flex; flex-direction: column; overflow: hidden; }
.scrollable-table-card .table-container { flex: 1; min-height: 0; }

/* === TABLES === */
.table-container {
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.table-container table thead th { position: sticky; top: 0; background: var(--gray-50); z-index: 2; }
.table-container table th:first-child, .table-container table td:first-child {
  position: sticky; left: 0; background: #fff; z-index: 1;
}
.table-container table thead th:first-child { background: var(--gray-50); z-index: 3; }

.billing-table { width: 765px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.billing-table th, .billing-table td { padding: 4px 6px; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #d6d3d1; line-height: 1.3; }
.billing-table th { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.03em; }
.billing-table td.bt-guest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.billing-table tr.month-header-row td { white-space: normal; overflow: visible; text-overflow: clip; padding: 0 !important; }

/* Header row — dark green with white text */
.billing-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--brand-primary, #1a5c32); color: #fff; font-weight: 700;
  padding: 6px 6px;
  border-bottom: 3px solid #0d3d1a;
}

/* Alternating row colors */
.billing-table tbody tr:nth-child(even) > td { background: #f0f0f0; }
.billing-table tbody tr:nth-child(odd) > td { background: #ffffff; }
.billing-table tbody tr:hover > td { background: #e8f5e9 !important; }

.billing-scroll {
  overflow-x: auto;
  overflow-y: scroll;
  max-height: calc(100vh - 240px);
  -webkit-overflow-scrolling: touch;
}

table { width: 100%; border-collapse: collapse; }
th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gray-200);
}
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}
tr { transition: var(--transition); }
tr:hover { background: var(--gray-50); }
tbody tr:nth-child(even) { background: rgba(250, 250, 249, 0.5); }
tbody tr:nth-child(even):hover { background: var(--gray-50); }

/* === STATUS BADGES === */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-success { background: var(--success-light); color: #166534; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #075985; }
.badge-gray { background: var(--gray-200); color: var(--gray-600); }

/* === SITE MAP === */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.85rem; }
.lot-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-slow);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: white;
  box-shadow: var(--shadow-sm);
}
.lot-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-lg); }
.lot-card.occupied { border-color: var(--brand-primary); background: #f0fdf4; border-top: 3px solid var(--brand-primary); }
.lot-card.vacant { border-color: var(--success); background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.lot-card.owner_reserved { border-color: var(--gray-400); background: var(--gray-50); }
.lot-card.pending_checkout { border-color: #f59e0b; background: #fefce8; border-top: 3px solid #f59e0b; }
.lot-card .lot-id { font-weight: 800; font-size: 1.15rem; color: var(--gray-900); }
.lot-card .lot-tenant { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-card .lot-status { font-size: 0.7rem; margin-top: 0.3rem; }
.sitemap-legend { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; padding: 0.75rem 1rem; background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 500; }
.legend-dot { width: 14px; height: 14px; border-radius: var(--radius-sm); }
.sitemap-row-label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-700);
  margin: 1.25rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--brand-primary);
  display: inline-block;
  padding-right: 2rem;
}

/* Payment flag overlays */
.lot-card.flag-overdue, .lot-card.flag-unpaid { border-color: var(--danger) !important; border-width: 3px; box-shadow: 0 0 0 1px var(--danger) inset, 0 0 12px rgba(220, 38, 38, 0.15); }
.lot-card.flag-partial { border-color: #eab308 !important; border-width: 3px; box-shadow: 0 0 0 1px #eab308 inset; }
.lot-flag-badge {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px;
  border-radius: 50%; color: white; font-weight: 900; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white; box-shadow: var(--shadow);
}
.lot-flag-badge.red { background: var(--danger); }
.lot-flag-badge.yellow { background: #eab308; color: var(--gray-900); }
.lot-card .lot-balance { font-size: 0.7rem; font-weight: 700; color: var(--danger); margin-top: 2px; }

/* === LOT DETAIL TABS === */
.tab-bar { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1rem; }
.tab-btn {
  background: none; border: none; padding: 0.6rem 1rem; cursor: pointer;
  font-weight: 600; color: var(--gray-500); border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { background: var(--gray-50); color: var(--gray-700); }
.tab-btn.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab-pane h4 { margin: 0.5rem 0 0.4rem; font-size: 0.95rem; color: var(--gray-700); }
.tab-pane p { margin: 0.25rem 0; font-size: 0.875rem; }
.notice-item { padding: 0.6rem; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 0.5rem; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: flex-start; padding-top: 5vh; z-index: 1000; overflow-y: auto;
  animation: modalOverlayIn 0.2s ease-out;
}
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 600px;
  margin-bottom: 2rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; background: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 1;
}
.modal-header h3 { font-weight: 700; color: var(--gray-900); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-400); transition: var(--transition); }
.modal-close:hover { color: var(--gray-700); }
#modal-body { padding: 1.5rem; }

/* === INVOICE PRINT === */
.invoice-print {
  max-width: 750px;
  margin: 0 auto;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #111827;
}
.invoice-print .invoice-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-900);
}
.invoice-print .invoice-header img {
  max-height: 70px;
  width: auto;
}
.invoice-print h2 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.invoice-print h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.invoice-print p { margin: 0.15rem 0; }
.invoice-print .line-items { margin: 0.75rem 0; }
.invoice-print .line-items table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.invoice-print .line-items th, .invoice-print .line-items td { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--gray-200); }
.invoice-print .total-row { font-weight: 700; border-top: 2px solid var(--gray-900) !important; }
.invoice-print .invoice-standard-notes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ccc;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #374151;
}
.invoice-print .invoice-standard-notes p { margin: 0.2rem 0; }
.invoice-print .invoice-standard-notes ul { margin: 0.4rem 0 0.4rem 1.1rem; padding: 0; }
.invoice-print .invoice-standard-notes li { margin-bottom: 0.2rem; }
.invoice-qr-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.invoice-qr-section img { width: 90px; height: 90px; }
.invoice-qr-section strong { font-size: 0.9rem; }

/* Tax report: wider modal so the 11-column table fits on screen */
.modal:has(#tax-report-content) { width: 95vw; max-width: 1300px; }

/* Tax report: room for 11 columns (override the 750px invoice cap), tight rows, no number wrap */
#tax-report-printable { max-width: 1120px; }
#tax-report-printable td { white-space: nowrap; }
#tax-report-printable th, #tax-report-printable td { padding: 4px 8px; }

/* === PRINT === */
@media print {
  #sidebar, .no-print, .modal-header button,
  #refreshBtn, #desktop-notif-bell, #portalQuickBtn,
  .help-fab, #help-fab, #help-button,
  .mobile-header { display: none !important; }
  #content { margin-left: 0 !important; }
  .modal-overlay { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: 100%; max-height: none; overflow: visible; }
  .invoice-print { max-width: 100%; font-size: 0.78rem; }
  .invoice-print .invoice-header img { max-height: 60px; }
  .invoice-print .invoice-standard-notes { font-size: 0.7rem; }
  .invoice-qr-section img { width: 80px; height: 80px; }
  @page { margin: 0.5in; size: letter portrait; }
}

/* === MOBILE HEADER === */
.mobile-header { display: none; }
.mobile-menu-btn {
  background: none; border: none; color: white;
  font-size: 1.6rem; cursor: pointer; padding: 0.25rem 0.5rem;
  line-height: 1;
}
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 99;
}
.sidebar-backdrop.open { display: block; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  #sidebar { transform: translateX(-100%); width: 80vw; max-width: 300px; }
  #sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.5); }
  .menu-btn { display: block; }
  #content { margin-left: 0; padding: 1rem 0.75rem; padding-top: 0.5rem; }
  .sidebar-header { position: relative; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 0.85rem; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h2 { font-size: 1.3rem; }
  .mobile-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #0f3d22, #1a5c32);
    color: white;
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-md);
  }
  .mobile-header h2 { font-size: 1rem; margin: 0; color: var(--brand-accent); }

  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
  .table-container::after { opacity: 1; }
  table { font-size: 0.78rem; }
  th, td { padding: 0.5rem 0.5rem; }
  .billing-table th, .billing-table td { padding: 0.35rem 0.4rem; font-size: 0.72rem; }

  .modal { width: 100%; max-width: 100%; max-height: 100vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin-bottom: 0; }
  .modal-overlay { padding-top: 0; align-items: flex-end; }
  #modal-body { padding: 1rem; }

  .btn-group { gap: 0.4rem; }
  .btn { padding: 0.6rem 1rem; font-size: 0.85rem; min-height: 44px; }
  .btn-sm { padding: 0.4rem 0.65rem; font-size: 0.75rem; min-height: 36px; }

  .login-box { padding: 1.75rem 1.25rem; }
  .login-logo { max-height: 120px; max-width: 120px; }

  .sitemap-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.6rem; }
  .lot-card { min-height: 80px; padding: 0.6rem; }
  .lot-card .lot-id { font-size: 1rem; }

  .filter-bar select, .filter-bar input { flex: 1 1 130px; min-width: 0; }

  .dash-top-bar { grid-template-columns: repeat(2, 1fr); }
  .dash-charts-row { grid-template-columns: 1fr; }
  .dash-actions { grid-template-columns: repeat(3, 1fr); }
  .dash-bottom-row { flex-direction: column; }
  .dash-top-val { font-size: 1.3rem; }
  .dash-weather { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
  .dash-weather-detail { display: none; }
  .dash-weather-sep { display: none; }

  .pwa-install-btn { bottom: 1rem; right: 1rem; font-size: 0.85rem; padding: 0.65rem 1rem; }

  .billing-table tr.month-header-row td { padding: 0.5rem; }

  .page-header .btn-group { width: 100%; }
  .page-header .btn-group .btn { flex: 1; justify-content: center; text-align: center; }
  #toast-container { top: auto; bottom: 70px; flex-direction: column-reverse; }
}

@media (max-width: 768px) {
  #charts-grid { grid-template-columns: 1fr !important; }
  #portalQuickBtn { bottom: 80px !important; right: 15px !important; font-size: 0.8rem !important; padding: 10px 16px !important; }
  #desktop-notif-bell { display: none !important; }
}
@media (min-width: 769px) {
  #desktop-notif-bell.post-login-btn { display: flex !important; }
}
/* ===== ENHANCED MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* Base font — ensure minimum readable size */
  body { font-size: 0.92rem; }

  /* Tables — always horizontally scrollable with visible hint */
  .table-container, .billing-scroll, .scrollable-table-card {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    position: relative;
  }
  table { font-size: 0.8rem; }
  th, td { padding: 0.5rem; white-space: nowrap; }

  /* Billing action buttons — tappable on mobile */
  .inv-act-btn { min-height: 32px; font-size: 0.75rem; padding: 4px 12px; }

  /* Form inputs — full width, tappable */
  input, select, textarea {
    font-size: 1rem !important; /* prevents iOS zoom on focus */
    min-height: 44px;
  }
  .form-group label { font-size: 0.85rem; margin-bottom: 0.3rem; display: block; }
  .form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.75rem;
  }
  .form-row { grid-template-columns: 1fr !important; gap: 0.5rem; }

  /* Modals — full width bottom sheet */
  .modal { width: 100% !important; max-width: 100% !important; max-height: 90vh;
    border-radius: 16px 16px 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  #modal-body { padding: 1rem; max-height: 75vh; overflow-y: auto; }

  /* Buttons — min tap target */
  .btn { min-height: 44px; font-size: 0.85rem; }
  .btn-sm { min-height: 38px; font-size: 0.78rem; }
  .btn-group { flex-wrap: wrap; gap: 0.35rem; }

  /* Page header — stack on mobile */
  .page-header { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .page-header h2 { font-size: 1.25rem; }
  .page-header .btn-group { width: 100%; flex-wrap: wrap; }
  .page-header .btn-group .btn { flex: 1; min-width: 0; text-align: center; justify-content: center; }

  /* Dashboard cards — 2 col on phone, stack at 375px */
  .dash-top-bar { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .dash-top-item { padding: 0.7rem; }
  .dash-top-val { font-size: 1.1rem; }
  .dash-top-label { font-size: 0.68rem; }
  .dash-charts-row { grid-template-columns: 1fr; }
  .dash-actions { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .dash-bottom-row { flex-direction: column; }
  .dash-bible { padding: 0.6rem 0.75rem; font-size: 0.82rem; }
  .daily-tip { font-size: 0.82rem; padding: 0.6rem 0.75rem; }

  /* Filter bar — stack controls */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar select, .filter-bar input, .filter-bar .btn { width: 100%; }

  /* Site map — smaller lot cards */
  .sitemap-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.4rem; }
  .lot-card { min-height: 70px; padding: 0.5rem; }
  .lot-card .lot-id { font-size: 0.9rem; }

  /* Card padding reduction */
  .card { padding: 0.75rem; }

  /* Floating buttons — avoid overlap with bottom nav or each other */
  #supportBtn { bottom: 15px !important; left: 10px !important; width: 40px; height: 40px; font-size: 1rem; }
  #portalQuickBtn { bottom: 70px !important; right: 10px !important; padding: 10px 14px !important; font-size: 0.8rem !important; z-index: 999 !important; }

  /* Billing table → mobile card layout */
  .billing-table, .billing-table thead, .billing-table tbody, .billing-table tr, .billing-table th, .billing-table td { display: block; width: 100% !important; }
  .billing-table { width: 100% !important; table-layout: auto !important; }
  .billing-table colgroup { display: none; }
  .billing-table thead { display: none; }
  .billing-table tr.month-header-row { margin-bottom: 0.5rem; display: block !important; }
  .billing-table tr.month-header-row td { display: block !important; padding: 0 !important; }
  .billing-table tr.invoice-row {
    border: 1.5px solid #d6d3d1; border-radius: 10px; margin-bottom: 0.5rem;
    padding: 0.6rem 0.75rem; position: relative;
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.1rem 0.5rem;
  }
  .billing-table tr.invoice-row td { border: none !important; padding: 0.15rem 0 !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  .billing-table tr.invoice-row td::before { content: attr(data-label); display: block; font-size: 0.6rem; font-weight: 700; color: #78716c; text-transform: uppercase; letter-spacing: 0.04em; }
  .billing-table tr.invoice-actions-row { margin-bottom: 0.75rem; margin-top: -0.5rem; }
  .billing-table tr.invoice-actions-row td { border: none !important; padding: 0.5rem !important; background: #f5f5f5; border-radius: 0 0 10px 10px; }
  .billing-scroll { overflow-x: hidden !important; }

  /* Community strip — wrap gracefully */
  #dash-community-strip > div { font-size: 0.75rem; }

  /* Branding page — single column */
  #branding-grid { grid-template-columns: 1fr !important; }

  /* Scrollable table card — full bleed on mobile */
  .scrollable-table-card { border-radius: 0; margin-left: -0.75rem; margin-right: -0.75rem; padding: 0; }
}

/* Extra small phones (iPhone SE, 375px) */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header .btn-group { flex-direction: column; }
  .page-header .btn-group .btn { width: 100%; }
  .dash-actions { grid-template-columns: repeat(2, 1fr); }
  .dash-top-bar { grid-template-columns: 1fr 1fr; }
  .dash-top-val { font-size: 1rem; }

  /* Weekly widget cards */
  #weekly-calendar { overflow-x: auto; }

  /* Lot cards even smaller */
  .sitemap-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .lot-card { min-height: 65px; }

  /* Nav-sub links — more padding for finger taps */
  .nav-sub .nav-link { min-height: 44px; display: flex; align-items: center; }
}

/* === UTILITIES === */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-500);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.5rem; }
.empty-state-text { font-size: 0.9rem; color: var(--gray-500); margin-bottom: 1.5rem; line-height: 1.5; }

.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.filter-bar select, .filter-bar input {
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: white;
  transition: var(--transition);
}
.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 92, 50, 0.1);
}

/* === DOCUMENT SCANNER === */
.doc-scan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.doc-scan-btn {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem;
  background: #fff; border: 2px solid var(--gray-200, #e7e5e4); border-radius: 12px;
  cursor: pointer; transition: all 0.15s; min-height: 56px;
}
.doc-scan-btn:hover { border-color: var(--brand-primary, #1a5c32); background: #f0fdf4; }
.doc-scan-btn:active { transform: scale(0.97); }
.doc-scan-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-scan-label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700, #44403c); flex: 1; }
.doc-scan-status { font-size: 0.72rem; flex-shrink: 0; }
.doc-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.doc-preview-item { text-align: center; }
@media (max-width: 768px) {
  .doc-scan-grid { grid-template-columns: 1fr; }
  .doc-scan-btn { min-height: 60px; font-size: 1rem; }
  .doc-scan-label { font-size: 1rem; }
  .doc-preview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === METER PHOTO THUMBNAILS === */
.meter-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200, #e7e5e4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
}
.meter-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* Dual photo lightbox */
.meter-dual-photos { display: flex; gap: 1rem; }
@media (max-width: 600px) { .meter-dual-photos { flex-direction: column; } }

/* === CALCULATOR === */
.calc-btn {
  min-height: 60px;
  border: none;
  border-radius: var(--radius, 10px);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: var(--gray-900, #1c1917);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
}
.calc-btn:hover { filter: brightness(0.95); }
.calc-btn:active { transform: scale(0.95); box-shadow: none; }
.calc-gold { background: linear-gradient(135deg, #f59e0b, #d97706) !important; color: #fff !important; }
.calc-green { background: linear-gradient(135deg, #16a34a, #22c55e) !important; color: #fff !important; }
.calc-red { background: #fee2e2 !important; color: #dc2626 !important; }
.calc-gray { background: var(--gray-100, #f5f5f4) !important; color: var(--gray-700, #44403c) !important; }
.calc-wide { grid-column: span 2; }

/* === BACK BUTTON === */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.75rem;
  background: #fff;
  color: var(--brand-primary, #1a5c32);
  border: 1.5px solid var(--brand-primary, #1a5c32);
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
}
.back-btn:hover {
  background: var(--brand-primary, #1a5c32);
  color: #fff;
}
.back-btn:active { transform: scale(0.96); }

/* === REFRESH BUTTON === */
.refresh-btn {
  width: 44px; height: 44px;
  border: 1.5px solid var(--brand-primary, #1a5c32);
  background: #fff;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.refresh-btn:hover { border-color: var(--brand-accent, #f59e0b); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.refresh-btn:active { transform: scale(0.92); }
.refresh-btn.spinning { animation: refreshSpin 0.6s ease-in-out; pointer-events: none; }
@keyframes refreshSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Fixed position for desktop (hidden on mobile, mobile header has its own) */
.refresh-btn-fixed {
  position: fixed; top: 1rem; right: 1.5rem; z-index: 50;
}
.mobile-header .refresh-btn {
  margin-left: auto;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.mobile-header .refresh-btn:hover { border-color: var(--brand-accent, #f59e0b); background: rgba(255,255,255,0.2); }
@media (max-width: 768px) {
  .refresh-btn-fixed { display: none; }
}
@media (min-width: 769px) {
  .mobile-header .refresh-btn { display: none; }
}

/* === LOADING SPINNER === */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === GATOR CHECK-IN CELEBRATION === */
@keyframes gatorConfettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 0.8; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes gatorRun {
  0% { left: -80px; }
  100% { left: calc(100% + 80px); }
}
@keyframes gatorBounce {
  0% { transform: translateY(0) scaleX(1) rotate(-5deg); }
  100% { transform: translateY(-18px) scaleX(1.05) rotate(5deg); }
}
@keyframes gatorDust {
  0% { opacity: 0.5; transform: scale(1) translateX(0); }
  100% { opacity: 0; transform: scale(1.5) translateX(-10px); }
}
@keyframes gatorBurst {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(2.5); opacity: 0.8; }
  100% { transform: scale(3.5); opacity: 0; }
}
@keyframes gatorSparkle {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0.3); opacity: 0; }
}
@keyframes gatorMsgIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  60% { transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes gatorMsgBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* === NUMBER FORMATTING === */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* === STAGGERED CARD ANIMATION === */
.card-animate {
  animation: cardFadeIn 0.4s ease-out both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === INTER FONT IMPORT === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === DATA TABLE === */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--gray-50); color: var(--gray-600); font-weight: 600; text-align: left; padding: 0.6rem 0.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table td { padding: 0.5rem; border-bottom: 1px solid var(--gray-100); font-size: 0.85rem; }

/* === IMPORT HELP PANEL === */
/* Hide default <summary> disclosure markers across browsers — the "?" icon
   and summary text serve as the affordance. */
.import-help-panel > summary::-webkit-details-marker { display: none; }
.import-help-panel > summary { list-style: none; }
.import-help-panel > summary:hover { background: var(--gray-50, #f3f4f6); }
.import-help-panel[open] > summary { border-bottom: 1px solid #e5e7eb; }

/* === BRANDING PAGE === */
/* The sidebar-header is already flex. This ensures the h2 truncates gracefully
   when a custom logo image is inserted before it. */
.sidebar-header h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Collapse branding grid to single column on small screens */
@media (max-width: 820px) {
  #branding-grid { grid-template-columns: 1fr !important; }
}

/* === MOBILE-ONLY CALL BUTTONS === */
/* Hide tel: call buttons on desktop — only show on mobile devices */
@media (min-width: 769px) { .mobile-call-btn { display: none !important; } }

/* === INVOICE ACTION BUTTONS (horizontal row) === */
.inv-act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; border: 1px solid var(--gray-200, #e7e5e4);
  background: #fff; border-radius: 4px; cursor: pointer;
  font-size: 0.75rem; font-weight: 600; color: var(--gray-700, #44403c);
  font-family: inherit; white-space: nowrap;
  transition: background 0.15s; line-height: 1.2;
}
.inv-act-btn:hover { background: var(--gray-100, #f5f5f4); }
.inv-act-btn:active { transform: scale(0.97); }
.inv-act-green { background: #dcfce7; color: #16a34a; border-color: #a7f3d0; }
.inv-act-green:hover { background: #bbf7d0; }
.inv-act-red { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.inv-act-red:hover { background: #fecaca; }
.inv-act-orange { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.inv-act-orange:hover { background: #fde68a; }


/* Guest Lookup tabs */
.guest-tab { background: none; border: none; padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.guest-tab:hover { color: var(--gray-800); }
.guest-tab.active { color: var(--brand-primary, #1a5c32); border-bottom-color: var(--brand-primary, #1a5c32); }
