/* ==========================================================================
   CPT ASISTENTE - DESIGN SYSTEM & STYLESHEET (VANILLA CSS)
   ========================================================================== */

/* --- Custom Properties (Variables) --- */
:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-secondary: 'Outfit', sans-serif;

  /* Colors */
  --bg-dark-base: #060a13;
  --bg-dark-surface: #0f172a;
  --bg-dark-card: rgba(30, 41, 59, 0.45);
  --bg-dark-card-hover: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.15);

  --color-primary: #e11d48;
  --color-primary-hover: #f43f5e;
  --color-brand-grey: #475569;
  --color-emerald: #10b981;
  --color-emerald-hover: #34d399;
  --color-gold: #f59e0b;
  --color-gold-hover: #fbbf24;
  --color-danger: #ef4444;
  --color-danger-hover: #f87171;
  --color-purple: #a855f7;
  --color-purple-hover: #c084fc;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Effects */
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
}

/* --- Base Reset & Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Remove mobile grey highlights */
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark-base);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-base);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* --- Typography & Utility --- */
h1, h2, h3, h4 {
  font-family: var(--font-secondary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* --- Interactive Elements & Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  outline: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(225, 29, 72, 0.4);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(225, 29, 72, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-emerald {
  background-color: var(--color-emerald);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}
.btn-emerald:hover {
  background-color: var(--color-emerald-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-primary) 0%, #be123c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #e11d48 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}
.btn-danger:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
}
body.light-theme .btn:disabled {
  background: rgba(15, 23, 42, 0.04) !important;
  color: rgba(15, 23, 42, 0.3) !important;
  border: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.btn-secondary {
  background-color: var(--bg-dark-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--text-muted);
  border-color: var(--text-secondary);
}

.btn-secondary-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-secondary-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-danger-outline {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-danger);
}

.btn-icon-only {
  padding: 10px;
  border-radius: var(--border-radius-sm);
  width: 40px;
  height: 40px;
}

.btn-close-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.btn-close-icon:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.pill {
  background-color: var(--bg-dark-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.pill:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.pill.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-bono {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-regular {
  background-color: rgba(225, 29, 72, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(225, 29, 72, 0.3);
}
.badge-rented {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Glassmorphism Generic Card */
.glass-card {
  background: var(--bg-dark-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-lg);
}

/* --- LOADING SPINNER & TOAST --- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 10, 19, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner-container {
  text-align: center;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}
.spinner-container p {
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1e293b;
  border: 1px solid var(--color-emerald);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  z-index: 9999;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
  transition: var(--transition-bounce);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- LOGIN MODULE --- */
.auth-container {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 10% 20%, rgba(225, 29, 72, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
              var(--bg-dark-base);
}
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
}
.login-header {
  margin-bottom: 30px;
}
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: rgba(225, 29, 72, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: 16px;
  font-size: 2rem;
  margin-bottom: 16px;
}
.login-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.login-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-form {
  text-align: left;
}
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.input-wrapper {
  position: relative;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}
.input-wrapper input {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 14px 16px 14px 44px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
}
.input-wrapper input:focus {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.login-footer {
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- MAIN INTERFACE (APP CONTAINER) --- */
.app-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background-color: var(--bg-dark-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.2);
  color: var(--color-primary);
  font-size: 1.3rem;
  border-radius: 10px;
}
.brand-text h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}
.mobile-title {
  display: none !important;
}
.brand-badge {
  font-size: 0.72rem;
  color: var(--color-emerald);
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.user-profile i {
  color: var(--color-primary);
}
.user-phone {
  font-size: 0.88rem;
  font-weight: 600;
}

/* --- AUDIT LOGS DRAWER --- */
/* --- AUDIT LOGS DRAWER (ADMIN DASHBOARD) --- */
.logs-drawer {
  position: fixed;
  top: 73px;
  right: 0;
  width: 100%;
  max-width: 580px;
  height: calc(100vh - 73px);
  height: calc(100dvh - 73px);
  background: rgba(13, 14, 18, 0.82);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.7);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  animation: slide-in-right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.logs-drawer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.3), rgba(225, 29, 72, 0));
  z-index: 10;
}
@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 40%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-header h3 i {
  color: var(--color-primary);
  filter: drop-shadow(0 0 8px rgba(225, 29, 72, 0.5));
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.drawer-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 24px;
}

/* --- ADMIN PANEL TABS NAVIGATION --- */
.admin-tabs-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  flex-shrink: 0; /* PREVENT FLEXBOX SQUISHING BUG */
  min-height: 48px; /* ENSURE ROBUST HEIGHT */
}
.admin-tabs-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}
body.light-theme .admin-tabs-nav {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.admin-tabactive {
  flex: 1;
  min-width: max-content;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 10px 15px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
body.light-theme .admin-tabactive {
  color: rgba(15, 23, 42, 0.6);
}
.admin-tabactive i {
  font-size: 0.88rem;
  transition: transform 0.25s ease;
}
.admin-tabactive:hover i {
  transform: scale(1.15);
}
.admin-tabactive.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, #be123c 100%);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-0.5px);
}
.admin-tabactive:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
body.light-theme .admin-tabactive:hover:not(.active) {
  color: rgba(15, 23, 42, 0.9);
  background: rgba(0, 0, 0, 0.04);
}
.admin-tab-content {
  display: flex;
  flex-direction: column;
}
.admin-tab-content.hidden {
  display: none;
}

/* --- PREMIUM GLOWING DRAG & DROP UPLOAD ZONE --- */
.excel-upload-zone {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 38px 24px;
  text-align: center;
  background: radial-gradient(100% 100% at 50% 0%, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%), rgba(20, 20, 25, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.excel-upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.excel-upload-zone:hover, .excel-upload-zone.dragover {
  border-color: rgba(225, 29, 72, 0.45);
  background: radial-gradient(100% 100% at 50% 0%, rgba(225, 29, 72, 0.07) 0%, rgba(225, 29, 72, 0.01) 100%), rgba(20, 12, 16, 0.55);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 20px rgba(225, 29, 72, 0.08), inset 0 0 12px rgba(225, 29, 72, 0.03);
  transform: translateY(-2px);
}
body.light-theme .excel-upload-zone {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(15, 23, 42, 0.1);
}
body.light-theme .excel-upload-zone::before {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.01));
}
body.light-theme .excel-upload-zone:hover, body.light-theme .excel-upload-zone.dragover {
  background: rgba(225, 29, 72, 0.03);
  border-color: rgba(225, 29, 72, 0.4);
}
.excel-upload-zone .upload-icon {
  font-size: 2.6rem;
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 8px rgba(225, 29, 72, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.excel-upload-zone:hover .upload-icon {
  transform: translateY(-5px) scale(1.06);
  filter: drop-shadow(0 6px 14px rgba(225, 29, 72, 0.5));
}
.excel-upload-zone .upload-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}
.excel-upload-zone .upload-text strong {
  color: var(--color-primary);
  font-weight: 600;
}
.excel-upload-zone .upload-or {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 75%;
}
.excel-upload-zone .upload-or::before,
.excel-upload-zone .upload-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .excel-upload-zone .upload-or::before,
body.light-theme .excel-upload-zone .upload-or::after {
  background: rgba(15, 23, 42, 0.08);
}

/* --- OWNER FILES DASHBOARD & CARDS --- */
.owners-list-dashboard {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.25);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
body.light-theme .owners-list-dashboard {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
}
.owners-dashboard-title {
  margin: 0 0 12px 0;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.owners-dashboard-title i {
  color: var(--color-purple) !important;
}
.owners-files-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.72rem;
}
.owner-file-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
body.light-theme .owner-file-card {
  border-color: rgba(15, 23, 42, 0.06);
  background: rgba(15, 23, 42, 0.01);
}
.owner-file-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: transparent;
  transition: all 0.2s ease;
}
.owner-file-card.missing {
  background: rgba(239, 68, 68, 0.015);
  border-color: rgba(239, 68, 68, 0.05);
}
body.light-theme .owner-file-card.missing {
  background: rgba(239, 68, 68, 0.01);
  border-color: rgba(239, 68, 68, 0.08);
}
.owner-file-card.missing::before {
  background: #ef4444;
  opacity: 0.4;
}
.owner-file-card.loaded {
  background: rgba(168, 85, 247, 0.035);
  border-color: rgba(168, 85, 247, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
body.light-theme .owner-file-card.loaded {
  background: rgba(168, 85, 247, 0.02);
  border-color: rgba(168, 85, 247, 0.15);
}
.owner-file-card.loaded::before {
  background: var(--color-purple);
}
.owner-file-card:hover {
  transform: translateY(-1px);
}
.owner-file-card.loaded:hover {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.06), 0 0 8px rgba(168, 85, 247, 0.03);
}
.owner-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.owner-card-name {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}
.owner-card-status {
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.owner-card-status.loaded {
  color: var(--color-purple);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}
.owner-card-status.missing {
  color: #ef4444;
  opacity: 0.8;
}
.owner-card-filename {
  font-size: 0.64rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Upload Status & Progress */
.upload-status-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}
body.light-theme .upload-status-wrapper {
  background: rgba(0, 0, 0, 0.02);
}
.status-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
body.light-theme .progress-bar-bg {
  background: rgba(0, 0, 0, 0.1);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #ff4b72 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.status-message {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}
.status-message.success {
  color: #10b981;
  font-weight: 500;
}
.status-message.error {
  color: #ef4444;
  font-weight: 500;
}
.w-full {
  width: 100%;
}

.logs-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.log-card {
  background-color: var(--bg-dark-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
}
.log-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.log-phone {
  font-weight: 700;
  color: var(--text-primary);
}
.log-action {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.log-action.success { background-color: rgba(16, 185, 129, 0.1); color: var(--color-emerald); }
.log-action.failed { background-color: rgba(239, 68, 68, 0.1); color: var(--color-danger); }
.log-action.logout { background-color: rgba(148, 163, 184, 0.1); color: var(--text-secondary); }
.log-action.fetch { background-color: rgba(225, 29, 72, 0.1); color: var(--color-primary); }
.log-action.upload { background-color: rgba(168, 85, 247, 0.1); color: #a855f7; }
.log-action.export { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; }

.log-details {
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- FILTER SECTION --- */
.filter-section {
  background-color: var(--bg-dark-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 24px 40px;
  position: relative;
  z-index: 200;
}

/* Search Input */
.search-bar-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}
.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.3rem;
}
.search-bar-wrapper input {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 16px 54px 16px 54px;
  border-radius: var(--border-radius-lg);
  font-family: var(--font-primary);
  font-size: 1.05rem;
  outline: none;
  transition: var(--transition-smooth);
}
.search-bar-wrapper input:focus {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}
.btn-clear-search {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.btn-clear-search:hover {
  color: var(--text-primary);
}

/* Category Slider */
.category-slider-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 24px;
  scrollbar-width: none; /* Firefox hide scrollbar */
  -webkit-overflow-scrolling: touch;
  /* Premium horizontal fading edges indicator */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.category-slider {
  display: flex;
  gap: 10px;
  padding-bottom: 2px;
}

/* Advanced dropdowns grid */
.advanced-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.filter-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-dropdown-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.filter-dropdown-group select {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
.filter-dropdown-group select:focus {
  border-color: var(--color-primary);
}

/* Range input */
.range-header {
  display: flex;
  justify-content: space-between;
}
.range-header span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary-hover);
}
.filter-dropdown-group input[type="range"] {
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  outline: none;
  margin-top: 14px;
}
.filter-dropdown-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.filter-dropdown-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--color-primary-hover);
}

/* Status Bar */
.status-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 100;
}
.btn-link {
  background: transparent;
  border: none;
  color: var(--color-primary-hover);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  transition: var(--transition-smooth);
}
.btn-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.summary-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.export-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.btn-export {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, #107c41 0%, #1f9a55 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.25);
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: linear-gradient(135deg, #1f9a55 0%, #107c41 100%) !important;
  box-shadow: 0 6px 16px rgba(16, 124, 65, 0.4);
  transform: translateY(-1px);
}

.btn-export:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.2);
}

.btn-export i {
  font-size: 1rem;
  color: #ffffff !important;
}

.btn-export .dropdown-arrow {
  font-size: 0.75rem;
  color: #ffffff !important;
  transition: transform var(--transition-smooth);
}

.export-dropdown-wrapper.active .btn-export .dropdown-arrow {
  transform: rotate(180deg);
}

.export-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-dark-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
  z-index: 1000;
  min-width: 210px;
  padding: 6px 0;
  overflow: hidden;
  transform-origin: top right;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.export-dropdown-menu.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.export-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-family: var(--font-primary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.export-dropdown-item i {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.export-dropdown-item:hover {
  background: rgba(225, 29, 72, 0.08);
  color: var(--color-primary);
}

.export-dropdown-item:hover i {
  color: var(--color-primary);
}


/* --- PROPERTIES EXCEL SPREADSHEET LAYOUT (V3) --- */
.properties-excel-container {
  flex: 1;
  padding: 20px 40px 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Wrapper supporting horizontal scroll with elegant custom scrollbars */
.excel-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background: var(--bg-dark-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Styled HTML Table */
.excel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
  table-layout: auto;
}

/* Table cells */
.excel-table th,
.excel-table td {
  padding: 10px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  vertical-align: middle;
}

/* Remove last cell right border */
.excel-table th:last-child,
.excel-table td:last-child {
  border-right: none;
}

/* Table headers mimicking Excel columns */
.excel-table th {
  background: rgba(15, 23, 42, 0.8);
  font-family: var(--font-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--border-color);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  text-align: center;
}

.excel-table th i {
  color: var(--color-primary-hover);
  margin-right: 6px;
  font-size: 0.8rem;
}

/* Interactive rows mimicking spreadsheet selection */
.excel-row {
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

/* Zebra striping */
.excel-row:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

.excel-row:nth-child(odd) {
  background-color: transparent;
}

/* Hover highlights row exactly like an Excel focus row */
.excel-row:hover {
  background-color: rgba(225, 29, 72, 0.12) !important;
  color: #fff;
}

/* Cell-specific alignments and weights */
.cell-price {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  min-width: 95px;
}
.cell-code {
  font-family: var(--font-secondary);
  font-weight: 600;
  text-align: center;
  min-width: 80px;
}

.excel-row:hover .cell-price {
  color: var(--color-gold);
}

.cell-address {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

.cell-unit {
  font-family: var(--font-secondary);
  font-weight: 600;
  text-align: center;
  min-width: 70px;
}

.cell-empty {
  color: var(--text-muted);
  font-weight: 400;
}

.cell-city {
  min-width: 100px;
  text-align: center;
}

/* Spreadsheet city label */
.excel-city-tag {
  background-color: rgba(225, 29, 72, 0.1);
  color: var(--color-primary-hover);
  border: 1px solid rgba(225, 29, 72, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cell-zip {
  min-width: 90px;
  text-align: center;
}

/* Spreadsheet zip code label - elegant charcoal slate style */
.excel-zip-tag {
  background-color: rgba(71, 85, 105, 0.15);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--font-secondary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cell-beds, .cell-baths {
  font-size: 0.8rem;
  min-width: 85px;
  text-align: center;
}
.cell-lockbox {
  font-family: var(--font-secondary);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  min-width: 90px;
}

.cell-status {
  text-align: center;
  min-width: 140px;
}

.excel-status-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Ultracompact status badges for Excel columns */
.excel-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-block;
  text-align: center;
  border: 1px solid transparent;
  min-width: 80px;
}

.excel-status-badge.disponible {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

.excel-status-badge.listo {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-gold);
  border-color: rgba(245, 158, 11, 0.2);
}

.excel-status-badge.rentada {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
  text-decoration: line-through;
}
.excel-status-badge.bono {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-gold);
  border-color: rgba(245, 158, 11, 0.2);
}
.excel-status-badge.regular {
  background-color: rgba(225, 29, 72, 0.1);
  color: var(--color-primary);
  border-color: rgba(225, 29, 72, 0.2);
}

/* Section 8 Violet Badges */
.excel-status-badge.section-8,
.excel-status-badge.seccion-8,
.excel-status-badge.sección-8,
.row-status.section-8,
.row-status.seccion-8,
.row-status.sección-8,
.badge-section-8,
.badge-seccion-8,
.badge-sección-8 {
  background-color: rgba(147, 51, 234, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(147, 51, 234, 0.3) !important;
}

/* Property Code Custom Badges & Tags */
.card-code-badge {
  display: inline-block;
  background-color: rgba(14, 165, 233, 0.15); /* Sky blue */
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.row-code-badge {
  display: inline-block;
  background-color: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.excel-code-tag {
  background-color: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

/* Smooth elegant scrollbar for .excel-table-wrapper */
.excel-table-wrapper::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.excel-table-wrapper::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
}

.excel-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.excel-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Empty & Error States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 40px auto;
}
.empty-icon {
  font-size: 3.5rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* --- PREMIUM DIALOG (MODAL DETAILS) --- */
.property-detail-dialog {
  color: var(--text-primary);
  border: 1px solid var(--border-color-hover);
  width: 90%;
  max-width: 500px;
  position: fixed;
  inset: 0;
  margin: auto;
  transform: scale(0.9);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s var(--transition-smooth),
              visibility 0.3s var(--transition-smooth);
  display: flex;
  flex-direction: column;
  max-height: 80dvh;
}

/* CSS Open trigger via HTML Dialog */
.property-detail-dialog[open] {
  display: flex !important;
  flex-direction: column !important;
  transform: scale(1);
  opacity: 1;
  visibility: visible;
}

dialog::backdrop {
  background-color: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.property-detail-dialog[open]::backdrop {
  opacity: 1;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}
.dialog-scroll-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1 1 auto;
  min-height: 120px; /* Prevent Safari/iOS collapse */
  -webkit-overflow-scrolling: touch; /* Momentum scrolling on iOS Safari */
}

.dialog-address-block h2 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}
.dialog-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.dialog-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.metric-item {
  background-color: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--border-radius-md);
  text-align: center;
}
.metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.metric-value {
  font-size: 0.95rem;
  font-weight: 700;
}
.metric-value.price {
  color: var(--color-primary-hover);
  font-size: 1.15rem;
}

/* Secure Lockbox code card */
.secure-box-card {
  background: radial-gradient(100% 100% at 100% 0%, rgba(225, 29, 72, 0.12) 0%, transparent 100%),
              rgba(15, 23, 42, 0.7);
  border: 1.5px dashed rgba(225, 29, 72, 0.3);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-bottom: 24px;
}
.secure-box-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-hover);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.secure-badge {
  color: var(--color-danger);
}
.lockbox-code-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 10px;
}
.lockbox-code {
  font-family: var(--font-secondary);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.secure-warning {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Grid layout details inside dialog */
.dialog-detailed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.detail-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cell-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cell-label i {
  font-size: 0.85rem;
}
.cell-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Comments */
.dialog-comments-block {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-bottom: 10px;
}
.dialog-comments-block h4 {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comments-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: rgba(255, 255, 255, 0.02);
  padding: 14px;
  border-radius: var(--border-radius-sm);
  border-left: 3px solid var(--color-primary);
}

/* Footer dialog navigation buttons */
.dialog-actions-footer {
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- ANIMATIONS (PREMIUM EFFECTS) --- */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
.animate-slide-down {
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- LAYOUT SELECTOR BAR (SWITCHER) --- */
.layout-selector-bar {
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 40px;
}

.layout-selector-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.selector-label {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.selector-label i {
  color: var(--color-primary-hover);
}

.layout-selector-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  gap: 4px;
}

.layout-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.layout-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.layout-tab-btn.active {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.layout-tab-btn i {
  font-size: 0.9rem;
}

/* --- PROPERTIES GRID CONTAINER (V1) --- */
.properties-grid-container {
  flex: 1;
  padding: 20px 40px 40px;
}
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Individual Cards */
.property-card {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-bounce);
  overflow: hidden;
  height: 100%;
}
.property-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  background: var(--bg-dark-card-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.property-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 18px; /* Push it down after the label */
  margin-bottom: 12px;
}
.card-price {
  font-family: var(--font-secondary);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.card-rented-strike {
  text-decoration: line-through;
  color: var(--text-muted);
}
.card-area {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-address {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-unit {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-specs {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: auto; /* Pushes specs to the bottom */
}
.spec-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.spec-pill i {
  color: var(--text-muted);
}

/* --- PROPERTIES LIST CONTAINER (V2) --- */
.properties-list-container {
  flex: 1;
  padding: 20px 40px 40px;
}

.properties-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Individual list rows */
.property-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
  background: var(--bg-dark-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.property-row:hover {
  background: var(--bg-dark-card-hover);
  border-color: var(--border-color-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.property-row-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.row-price {
  font-family: var(--font-secondary);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  min-width: 90px;
  text-align: left;
}

.row-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.row-address {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-unit {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item i {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.meta-item.city-tag {
  color: var(--color-primary-hover);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.row-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

.row-status.disponible {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

.row-status.listo {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-gold);
  border-color: rgba(245, 158, 11, 0.2);
}

.row-status.rentada {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
  text-decoration: line-through;
}
.row-status.bono {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-gold);
  border-color: rgba(245, 158, 11, 0.2);
}
.row-status.regular {
  background-color: rgba(225, 29, 72, 0.1);
  color: var(--color-primary);
  border-color: rgba(225, 29, 72, 0.2);
}

.arrow-icon {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.property-row:hover .arrow-icon {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* --- RESPONSIVE MEDIA QUERIES (MOBILE-FIRST) --- */

@media (max-width: 768px) {
  /* Premium Responsive Header Decongestion */
  .navbar-logo {
    display: none !important; /* Hide logo completely on tablet/mobile */
  }
  .brand-badge {
    display: none !important; /* Hide URL badge on tablet/mobile */
  }
  .brand-update-badge {
    display: none !important; /* Hide header update badge on tablet/mobile */
  }
  .user-phone {
    display: none !important; /* Hide phone number text on tablet/mobile */
  }
  .desktop-title {
    display: none !important; /* Hide long desktop title */
  }
  .mobile-title {
    display: block !important; /* Show compact title on tablet/mobile */
    font-size: 0.95rem !important;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-brand {
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .brand-text {
    min-width: 0 !important;
    flex-shrink: 1 !important;
    overflow: hidden;
  }
  .main-header {
    padding: 8px 10px !important; /* Shorter padding on mobile */
    height: 52px !important; /* Lock header height */
  }
  .header-actions {
    gap: 4px !important; /* Reduce button gap to fit all action buttons */
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  /* Style all action buttons to be identical premium circular/square elements */
  .header-actions .btn, 
  .header-actions .user-profile {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    flex-shrink: 0 !important;
  }
  .header-actions .user-profile {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
  }
  body.light-theme .header-actions .user-profile {
    background-color: rgba(0, 0, 0, 0.03) !important;
  }
  /* Hide the text wrapper in Help and Logs toggles on mobile */
  .header-actions .btn span {
    display: none !important;
  }
  .hide-mobile {
    display: none !important;
  }
  
  /* Admin Panel Navigation Tabs Scrollable on Mobile */
  .admin-tabs-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 4px !important;
    justify-content: flex-start !important;
  }
  .admin-tabactive {
    flex: 0 0 auto !important; /* Prevent shrinking */
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }
  
  /* Filter adjustments */
  .filter-section {
    padding: 16px 16px;
  }
  .search-bar-wrapper {
    margin-bottom: 14px;
  }
  .search-bar-wrapper input {
    padding: 12px 42px;
    font-size: 0.95rem;
  }
  .search-icon {
    left: 14px;
    font-size: 1.1rem;
  }
  .btn-clear-search {
    right: 14px;
  }
  
  /* Compact 2-column filter grid */
  .advanced-filters {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .filter-dropdown-group.range-group {
    grid-column: span 2; /* Full width price slider */
  }
  .filter-dropdown-group select {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  /* Property Excel V3 Táctil adjustments */
  .status-summary {
    padding: 14px 16px 0;
  }
  .properties-excel-container {
    padding: 16px 16px 40px;
  }
  .excel-table-wrapper {
    -webkit-overflow-scrolling: touch; /* Inertial elastic scroll on iOS Safari */
  }
  .excel-table th,
  .excel-table td {
    padding: 12px 10px; /* Expanded tap targets to at least 44px */
    font-size: 0.78rem;
  }
  .cell-price {
    font-size: 0.88rem;
    padding-right: 14px !important;
    min-width: 80px;
  }
  .excel-status-badge {
    font-size: 0.62rem;
    padding: 2px 6px;
    min-width: 70px;
  }
  
  /* Dialog tweaks - Optimized for Android and compact mobile viewports */
  .property-detail-dialog {
    width: 92% !important;
    max-width: 420px !important;
    max-height: 82dvh !important;
  }
  .dialog-header {
    padding: 12px 16px !important;
  }
  .dialog-scroll-body {
    padding: 16px !important;
  }
  .dialog-address-block h2 {
    font-size: 1.2rem !important;
    line-height: 1.25 !important;
    margin-bottom: 2px !important;
  }
  .dialog-subtitle {
    font-size: 0.8rem !important;
  }
  .dialog-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin: 16px 0 !important;
  }
  .metric-item {
    padding: 8px 4px !important;
    border-radius: var(--border-radius-sm) !important;
  }
  .metric-label {
    font-size: 0.65rem !important;
    margin-bottom: 2px !important;
  }
  .metric-value {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }
  .metric-value.price {
    font-size: 0.95rem !important;
  }
  .secure-box-card {
    padding: 14px !important;
    margin-bottom: 16px !important;
  }
  .secure-box-header {
    font-size: 0.72rem !important;
    margin-bottom: 8px !important;
  }
  .lockbox-code-wrapper {
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
  }
  .lockbox-code {
    font-size: 1.35rem !important;
  }
  .secure-warning {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
  }
  .dialog-detailed-grid {
    grid-template-columns: 1fr !important; /* Stack detailed elements */
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .detail-cell {
    gap: 2px !important;
  }
  .cell-label {
    font-size: 0.72rem !important;
  }
  .cell-value {
    font-size: 0.82rem !important;
  }
  .dialog-comments-block {
    padding-top: 14px !important;
  }
  .dialog-comments-block h4 {
    font-size: 0.82rem !important;
    margin-bottom: 6px !important;
  }
  .comments-text {
    font-size: 0.82rem !important;
    padding: 10px 12px !important;
  }
  .dialog-actions-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
  }
  .dialog-actions-footer .btn {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }
  
  /* Drawers in Full-Screen Mode for immersive mobile feel */
  .logs-drawer {
    top: 0 !important;
    height: 100dvh !important;
    max-width: 100% !important;
    z-index: 1050 !important;
    border-left: none !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  /* Layout Selector Bar mobile styles */
  .layout-selector-bar {
    padding: 8px 16px;
  }
  .layout-selector-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .selector-label {
    font-size: 0.78rem;
    justify-content: center;
  }
  .layout-selector-tabs {
    width: 100%;
  }
  .layout-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.75rem;
    gap: 4px;
  }

  /* Property Grid (V1) mobile adjustments */
  .properties-grid-container {
    padding: 16px 16px 40px;
  }
  .properties-grid {
    grid-template-columns: 1fr; /* Single column layout for clean mobile list */
    gap: 14px;
  }

  /* Property List (V2) mobile adjustments */
  .properties-list-container {
    padding: 16px 16px 40px;
  }
  .property-row {
    padding: 12px 16px;
    gap: 10px;
  }
  .property-row-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .row-price {
    font-size: 1.25rem;
    min-width: auto;
    line-height: 1;
  }
  .row-address {
    font-size: 0.95rem;
    width: 100%;
  }
  .row-meta {
    gap: 8px 12px;
  }
  .property-row-right {
    gap: 8px;
  }
  .row-status {
    font-size: 0.65rem;
    padding: 2px 8px;
  }
  
  /* Mobile AI Chat Drawer styling */
  .btn-ai-chat-fab {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    right: calc(16px + env(safe-area-inset-right)) !important;
    width: 54px;
    height: 54px;
    font-size: 1.3rem;
  }
  .ai-chat-drawer {
    top: 0 !important;
    height: 100dvh !important;
    max-width: 100% !important; /* Full screen drawer on mobile */
    z-index: 1050 !important;
    border-left: none !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  /* --- Decongest chat for small mobile viewports to maximize visual workspace --- */
  .chat-drawer-header {
    padding: 10px 14px !important;
  }
  .chat-avatar {
    width: 32px !important;
    height: 32px !important;
  }
  .chat-header-text h3 {
    font-size: 0.9rem !important;
  }
  .chat-subtitle {
    font-size: 0.7rem !important;
  }
  .chat-body {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .chat-msg .msg-bubble {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
  }
  .chat-suggestions-container {
    padding: 6px 12px !important;
  }
  .suggestions-title {
    display: none !important; /* Hide "Preguntas sugeridas:" label on mobile to save vertical height */
  }
  .chat-suggestions {
    gap: 6px !important;
    padding-bottom: 2px !important;
  }
  .suggestion-pill {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
  }
  .chat-input-area {
    padding: 8px 12px !important;
  }
  .chat-input-wrapper input {
    padding: 10px 42px 10px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
  }
  .btn-chat-send {
    width: 30px !important;
    height: 30px !important;
    right: 6px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
  }
}

/* Note: Mobile header styles are now fully integrated and optimized inside the 768px query above */

/* Zillow-Style Card Layout V2 Stack & Login adjustments */
@media (max-width: 480px) {
  .login-card {
    padding: 24px 16px !important;
  }
  .logo-icon {
    width: 54px !important;
    height: 54px !important;
    font-size: 1.6rem !important;
  }
  
  /* V2 Stack Refactor */
  .property-row {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px !important;
    gap: 12px !important;
  }
  .property-row-left {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .row-info {
    width: 100% !important;
    align-items: stretch !important;
  }
  .row-price {
    font-size: 1.4rem !important;
    margin-bottom: 2px !important;
  }
  .row-address {
    font-size: 0.95rem !important;
    white-space: normal !important; /* Allow address to wrap to prevent clippings */
  }
  .row-meta {
    margin-top: 4px !important;
    gap: 6px 10px !important;
  }
  .property-row-right {
    border-top: 1px solid var(--border-color) !important;
    padding-top: 12px !important;
    margin-top: 4px !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 12px !important;
  }
  .row-status {
    font-size: 0.72rem !important;
    padding: 4px 10px !important;
  }
  .arrow-icon {
    font-size: 1.1rem !important;
  }
  
  /* Mobile Status summary & Export button stack */
  .status-summary {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    text-align: center !important;
    padding: 12px 16px 0 !important;
  }
  .summary-actions {
    justify-content: center !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .export-dropdown-wrapper {
    width: 100% !important;
  }
  .btn-export {
    width: 100% !important;
    justify-content: center !important;
  }
  .export-dropdown-menu {
    left: 0 !important;
    right: 0 !important;
    transform-origin: top center !important;
    min-width: unset !important;
  }
}

/* ==========================================================================
   AI CHAT ASSISTANT STYLES
   ========================================================================== */

/* Floating FAB */
.btn-ai-chat-fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  right: calc(24px + env(safe-area-inset-right));
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e1b4b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -5px rgba(225, 29, 72, 0.5), 0 0 20px 2px rgba(225, 29, 72, 0.2);
  cursor: pointer;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition-bounce);
}
.btn-ai-chat-fab:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 15px 30px -5px rgba(225, 29, 72, 0.6), 0 0 25px 5px rgba(225, 29, 72, 0.4);
}
.btn-ai-chat-fab:active {
  transform: scale(0.95);
}
.ai-badge-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background-color: var(--color-emerald);
  border: 2px solid var(--bg-dark-base);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulse-emerald 2s infinite;
}
@keyframes pulse-emerald {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Chat Drawer Layout */
.ai-chat-drawer {
  position: fixed;
  top: 73px;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(100%);
}
.ai-chat-drawer.open {
  transform: translateX(0);
}

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  background-color: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.2);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  overflow: hidden;
}
.chat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-status-dot.online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: var(--color-emerald);
  border: 2px solid var(--bg-dark-surface);
  border-radius: 50%;
}
.chat-header-text h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2px;
}
.chat-subtitle {
  font-size: 0.75rem;
  color: var(--color-primary-hover);
  font-weight: 500;
}

/* Chat timeline body */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: slide-up-chat 0.25s ease-out;
}
@keyframes slide-up-chat {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.chat-msg.assistant {
  align-self: flex-start;
}
.chat-msg.user {
  align-self: flex-end;
}

.chat-msg .msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.chat-msg.assistant .msg-bubble {
  background-color: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-top-left-radius: 4px;
}
.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--color-primary) 0%, #9f1239 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.chat-msg .msg-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}
.chat-msg.assistant .msg-time {
  align-self: flex-start;
}
.chat-msg.user .msg-time {
  align-self: flex-end;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background-color: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  border-top-left-radius: 4px;
  width: fit-content;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Rich formats in chat bubbles */
.msg-bubble p {
  margin-bottom: 8px;
}
.msg-bubble p:last-child {
  margin-bottom: 0;
}
.msg-bubble ul, .msg-bubble ol {
  margin: 6px 0 6px 20px;
  font-size: 0.88rem;
}
.msg-bubble li {
  margin-bottom: 4px;
}
.msg-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 0.82rem;
  border: 1px solid var(--border-color);
}
.msg-bubble th, .msg-bubble td {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.msg-bubble th {
  background-color: rgba(255,255,255,0.05);
  font-weight: 600;
}

/* Suggestions Container */
.chat-suggestions-container {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.4);
}
.suggestions-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.chat-suggestions::-webkit-scrollbar {
  height: 4px;
}
.suggestion-pill {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.suggestion-pill:hover {
  background-color: var(--bg-dark-card-hover);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* Chat Input Form */
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-dark-surface);
}
.chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.chat-input-wrapper input {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 48px 12px 16px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-smooth);
}
.chat-input-wrapper input:focus {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}
.btn-chat-send {
  position: absolute;
  right: 8px;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}
.btn-chat-send:hover {
  background-color: var(--color-primary-hover);
  transform: scale(1.05);
}
.btn-chat-send:active {
  transform: scale(0.95);
}

/* Audit log label for AI queries */
.log-action.ai {
  background-color: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

/* ==========================================================================
   ALQUILERES EN NEW JERSEY - PREMIUM BRANDING CUSTOM CSS
   ========================================================================== */
.brand-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px auto;
  filter: drop-shadow(0 4px 12px rgba(225, 29, 72, 0.3));
  transition: var(--transition-bounce);
}
.brand-logo-container:hover {
  transform: scale(1.05) rotate(1deg);
  filter: drop-shadow(0 6px 18px rgba(225, 29, 72, 0.45));
}
.brand-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.navbar-logo {
  width: 34px;
  height: 34px;
  margin: 0 12px 0 0;
  filter: drop-shadow(0 2px 6px rgba(225, 29, 72, 0.25));
}
.navbar-logo:hover {
  transform: scale(1.08);
}
.brand-title {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 40%, var(--color-primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 400;
}
.brand-swooshes-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  height: 14px;
}
.brand-swooshes {
  width: 80px;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(225, 29, 72, 0.3));
  animation: pulse-swoosh 3s ease-in-out infinite;
}
.brand-url-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: 20px;
  color: var(--color-primary-hover);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.25);
  font-family: var(--font-secondary);
  transition: var(--transition-smooth);
}
.brand-url-badge:hover {
  background: rgba(225, 29, 72, 0.14);
  border-color: rgba(225, 29, 72, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.header-brand h2 {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand-badge {
  background: rgba(225, 29, 72, 0.08) !important;
  color: var(--color-primary-hover) !important;
  border: 1px solid rgba(225, 29, 72, 0.15) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

@keyframes pulse-swoosh {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* ==========================================================================
   LIGHT MODE THEME SYSTEM
   ========================================================================== */
body.light-theme {
  --bg-dark-base: #e2e8f0; /* Soft slate gray base */
  --bg-dark-surface: #f1f5f9; /* Calm slate surface */
  --bg-dark-card: rgba(241, 245, 249, 0.75); /* Soft glassmorphism */
  --bg-dark-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(15, 23, 42, 0.12);
  --border-color-hover: rgba(15, 23, 42, 0.22);

  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #334155; /* Slate 800 */
  --text-muted: #475569; /* Slate 700 */

  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
}

/* Light Theme Component Overrides */
body.light-theme .glass-card {
  background: rgba(241, 245, 249, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05) !important;
}

body.light-theme input, 
body.light-theme select,
body.light-theme textarea {
  background-color: rgba(241, 245, 249, 0.85) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
}

body.light-theme input:focus, 
body.light-theme select:focus {
  background-color: #f1f5f9 !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15) !important;
}

body.light-theme .main-header {
  background: rgba(241, 245, 249, 0.8) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.light-theme .layout-selector-bar {
  background: rgba(226, 232, 240, 0.85) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .layout-tab-btn {
  color: #475569 !important;
}

body.light-theme .layout-tab-btn:hover {
  background-color: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

body.light-theme .layout-tab-btn.active {
  background-color: #f1f5f9 !important;
  color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .ai-chat-drawer {
  background: rgba(241, 245, 249, 0.95) !important;
  border-left: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .chat-msg.assistant .msg-bubble {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

body.light-theme .chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--color-primary), #be123c) !important;
  color: #ffffff !important;
}

body.light-theme .chat-input-wrapper {
  background-color: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.light-theme .chat-input-wrapper input {
  background-color: transparent !important;
  color: #0f172a !important;
}

body.light-theme .suggestion-pill {
  background-color: rgba(241, 245, 249, 0.8) !important;
  color: #475569 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.light-theme .suggestion-pill:hover {
  background-color: #f1f5f9 !important;
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

body.light-theme .pill {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #475569 !important;
}

body.light-theme .pill:hover {
  background: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}

body.light-theme .pill.active {
  background: var(--color-primary) !important;
  color: #ffffff !important;
}

body.light-theme .excel-table th {
  background: #cbd5e1 !important;
  color: #0f172a !important;
  border-bottom: 2px solid #94a3b8 !important;
  border-right: 1px solid #cbd5e1 !important;
}

body.light-theme .excel-table td {
  border-bottom: 1px solid #cbd5e1 !important;
  border-right: 1px solid #cbd5e1 !important;
}

body.light-theme .excel-table tbody tr:hover td {
  background-color: rgba(225, 29, 72, 0.08) !important;
}

body.light-theme .excel-table tbody tr.rented td {
  background-color: rgba(15, 23, 42, 0.04) !important;
  color: #64748b !important;
}

body.light-theme .excel-table tbody tr.selected td {
  background-color: rgba(225, 29, 72, 0.12) !important;
}

body.light-theme .property-card-compact {
  background: rgba(241, 245, 249, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

body.light-theme .property-card-compact:hover {
  background: #f1f5f9 !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.08) !important;
}

body.light-theme .export-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .export-dropdown-item {
  color: #334155 !important;
}

body.light-theme .export-dropdown-item:hover {
  background: rgba(225, 29, 72, 0.06) !important;
  color: var(--color-primary) !important;
}

body.light-theme .logs-drawer {
  background: rgba(241, 245, 249, 0.98) !important;
  border-left: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .log-item {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .log-item:hover {
  background-color: rgba(15, 23, 42, 0.04) !important;
}

body.light-theme .property-detail-dialog {
  background: #f1f5f9 !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2) !important;
}

body.light-theme .secure-box-card {
  background: rgba(226, 232, 240, 0.7) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body.light-theme .detail-cell {
  background: rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .dialog-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.25) !important;
}

body.light-theme .loading-overlay {
  background: rgba(241, 245, 249, 0.9) !important;
  color: #0f172a !important;
}

/* ==========================================================================
   TONY'S HOTLINE EMERGENCY SUPPORT STYLES
   ========================================================================== */
.support-card-wrapper {
  margin: 16px 0;
  width: 100%;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hotline-card {
  background: rgba(15, 23, 42, 0.4) !important; /* Elegant dark card backdrop */
  border: 1px solid rgba(225, 29, 72, 0.35) !important; /* Glimmering cherry-red alarm border */
  box-shadow: 0 8px 32px 0 rgba(225, 29, 72, 0.1), inset 0 0 12px rgba(225, 29, 72, 0.05) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  color: #f1f5f9 !important;
  max-width: 320px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Light Theme overrides for hotline card to maintain readability */
body.light-theme .hotline-card {
  background: rgba(241, 245, 249, 0.85) !important;
  border: 1px solid rgba(225, 29, 72, 0.45) !important;
  box-shadow: 0 8px 32px 0 rgba(225, 29, 72, 0.08), inset 0 0 12px rgba(225, 29, 72, 0.03) !important;
  color: #0f172a !important;
}

.hotline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.3);
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #e11d48;
  margin-bottom: 12px;
}

body.light-theme .hotline-badge {
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.hotline-badge-dot {
  width: 6px;
  height: 6px;
  background-color: #e11d48;
  border-radius: 50%;
  position: relative;
}

.hotline-badge-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border: 2px solid #e11d48;
  border-radius: 50%;
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.hotline-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.hotline-intro {
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1.4;
  margin-bottom: 14px;
}

body.light-theme .hotline-intro {
  color: #334155 !important;
}

.hotline-details {
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 14px;
  font-size: 0.8rem;
}

body.light-theme .hotline-details {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hotline-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.hotline-detail-row:last-child {
  margin-bottom: 0;
}

.hotline-detail-row i {
  color: #e11d48;
  margin-top: 2px;
  width: 12px;
  text-align: center;
}

.hotline-detail-row strong {
  font-weight: 600;
  margin-right: 4px;
  opacity: 0.95;
}

.hotline-detail-row span {
  opacity: 0.85;
}

body.light-theme .hotline-detail-row strong {
  color: #1e293b !important;
}
body.light-theme .hotline-detail-row span {
  color: #475569 !important;
}

.hotline-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-hotline {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-hotline.btn-wa {
  background: #16a34a !important; /* WhatsApp green */
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-hotline.btn-wa:hover {
  background: #15803d !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

.btn-hotline.btn-call {
  background: #e11d48 !important; /* Cherry red */
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}

.btn-hotline.btn-call:hover {
  background: #be123c !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.3);
}

/* Pulse animation keyframes */
@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.33);
    opacity: 0;
  }
  30% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

/* --- Agent Guide Modal Custom Styling --- */
.agent-guide-dialog {
  max-width: 550px !important;
}

.guide-step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.guide-step-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(225, 29, 72, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.light-theme .guide-step-item {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

body.light-theme .guide-step-item:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.guide-step-item p {
  color: var(--text-secondary);
}

.guide-step-item strong {
  color: var(--color-primary) !important;
  font-weight: 600;
}

body.light-theme .guide-step-item strong {
  color: var(--color-primary) !important;
}

.step-details h4 {
  transition: var(--transition-smooth);
}

.guide-step-item:hover .step-details h4 {
  color: var(--color-primary) !important;
}

/* --- Interactive Tour & Spotlight Styling --- */
.step-tour-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(225, 29, 72, 0.06);
  border: 1px solid rgba(225, 29, 72, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.guide-step-item:hover .step-tour-badge {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Tour Overlay Container */
.tour-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.tour-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.tour-svg-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tour-svg-mask rect {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glowing Border around targeted element */
.tour-glow-border {
  position: absolute;
  border: 2.5px solid var(--color-primary);
  border-radius: 12px;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 
    0 0 0 4px rgba(225, 29, 72, 0.15), 
    0 0 15px rgba(225, 29, 72, 0.4), 
    inset 0 0 8px rgba(225, 29, 72, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: tourGlowPulse 2s infinite ease-in-out;
}

@keyframes tourGlowPulse {
  0%, 100% {
    box-shadow: 
      0 0 0 2px rgba(225, 29, 72, 0.15), 
      0 0 10px rgba(225, 29, 72, 0.3), 
      inset 0 0 6px rgba(225, 29, 72, 0.15);
  }
  50% {
    box-shadow: 
      0 0 0 6px rgba(225, 29, 72, 0.25), 
      0 0 22px rgba(225, 29, 72, 0.55), 
      inset 0 0 10px rgba(225, 29, 72, 0.3);
  }
}

/* Glassmorphic Tour Tooltip Card */
.tour-tooltip-card {
  position: absolute;
  z-index: 10001;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
}

body.light-theme .tour-tooltip-card {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-step-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(225, 29, 72, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-secondary);
}

.tour-tooltip-body h4 {
  margin: 0 0 6px 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tour-tooltip-body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.tour-tooltip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.tour-tooltip-footer button {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Responsive Touchdown for Mobile Screens */
@media (max-width: 767px) {
  .tour-tooltip-card {
    position: absolute !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    left: 16px !important;
    transform: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
}

/* --- CUSTOM MULTISELECT DROPDOWN STYLES --- */
.custom-multiselect {
  position: relative;
  width: 100%;
}
.multiselect-btn {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}
.multiselect-btn:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}
body.light-theme .multiselect-btn {
  background-color: rgba(241, 245, 249, 0.85) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
}
body.light-theme .multiselect-btn:focus {
  background-color: #f1f5f9 !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15) !important;
}

.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--border-radius-md);
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform-origin: top;
}
.multiselect-dropdown.hidden {
  display: none;
}
body.light-theme .multiselect-dropdown {
  background: rgba(241, 245, 249, 0.98) !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.1) !important;
}

.multiselect-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  gap: 8px;
}
body.light-theme .multiselect-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: rgba(0, 0, 0, 0.03) !important;
}
.multiselect-action-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.multiselect-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}
body.light-theme .multiselect-action-btn {
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}
body.light-theme .multiselect-action-btn:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

.multiselect-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px 0;
}
.multiselect-options::-webkit-scrollbar {
  width: 6px;
}
.multiselect-options::-webkit-scrollbar-track {
  background: transparent;
}
.multiselect-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
body.light-theme .multiselect-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1) !important;
}

.multiselect-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}
.multiselect-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
body.light-theme .multiselect-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}
.multiselect-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--text-muted);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
}
.multiselect-item input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.multiselect-item input[type="checkbox"]:checked::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #fff;
  font-size: 0.75rem;
  position: absolute;
}
.multiselect-item span {
  font-size: 0.9rem;
  color: var(--text-primary);
}
body.light-theme .multiselect-item span {
  color: #0f172a !important;
}

/* --- GROUPED & SINGLE CITY HEADERS & BANNERS --- */
.grid-city-header {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 5px;
  padding: 12px 18px;
  background: rgba(225, 29, 72, 0.08);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.light-theme .grid-city-header {
  background: rgba(225, 29, 72, 0.04);
  color: var(--color-primary);
}

.list-city-header {
  width: 100%;
  margin-top: 15px;
  margin-bottom: 5px;
  padding: 12px 18px;
  background: rgba(225, 29, 72, 0.08);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.light-theme .list-city-header {
  background: rgba(225, 29, 72, 0.04);
  color: var(--color-primary);
}

.table-city-header-row {
  background-color: rgba(225, 29, 72, 0.06) !important;
  pointer-events: none;
}
.table-city-header-content {
  padding: 12px 16px;
  color: var(--color-primary-hover);
  font-weight: 700;
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.light-theme .table-city-header-row {
  background-color: rgba(225, 29, 72, 0.03) !important;
}

.single-city-banner {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(225, 29, 72, 0.04));
  border: 1px solid rgba(225, 29, 72, 0.15);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.single-city-banner span {
  font-weight: 700;
  color: var(--color-primary-hover);
  text-transform: uppercase;
}
body.light-theme .single-city-banner {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.06), rgba(225, 29, 72, 0.01));
  border: 1px solid rgba(225, 29, 72, 0.08);
  color: #0f172a;
}
body.light-theme .single-city-banner span {
  color: var(--color-primary);
}

.single-city-banner-row {
  pointer-events: none;
}
.single-city-banner-content {
  padding: 12px 20px;
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.single-city-banner-content span {
  font-weight: 700;
  color: var(--color-primary-hover);
  text-transform: uppercase;
}
body.light-theme .single-city-banner-content {
  color: #0f172a;
}
body.light-theme .single-city-banner-content span {
  color: var(--color-primary);
}

.confirm-alert-box {
  margin-top: 15px;
  padding: 10px 12px;
  background: rgba(225, 29, 72, 0.08);
  border: 1px dashed rgba(225, 29, 72, 0.3);
  border-radius: var(--border-radius-sm);
  color: #f43f5e;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* --- FIELD CAPTURE PHOTO PREVIEW & DRAG-AND-DROP --- */
#photoDropZone:hover, #photoDropZone.dragover {
  border-color: var(--color-primary-hover) !important;
  background: rgba(225, 29, 72, 0.06) !important;
  transform: scale(0.99);
}

.photo-preview-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color-hover);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  background: #0f172a;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-preview-item:hover img {
  transform: scale(1.1);
}

.btn-remove-preview-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  z-index: 10;
}

.btn-remove-preview-photo:hover {
  background: var(--color-danger);
  transform: scale(1.15);
}

/* --- MOBILE HEADER REDUNDANT BUTTON HIDING --- */
@media (max-width: 767px) {
  #btnLogsToggle, #btnManageUsersHeader {
    display: none !important;
  }
}

/* --- COLLAPSIBLE LOGS ACCORDION STYLES --- */
.log-group-card {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.log-group-card:hover {
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.05);
}
.log-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(15, 23, 42, 0.4);
  transition: background 0.2s ease;
}
.log-group-header:hover {
  background: rgba(225, 29, 72, 0.05);
}
.log-group-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.log-group-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 1px solid rgba(225, 29, 72, 0.2);
}
.log-group-phone {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.log-group-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.log-group-badge {
  background: rgba(225, 29, 72, 0.2);
  color: var(--color-primary);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid rgba(225, 29, 72, 0.3);
}
.log-group-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.log-group-chevron {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}
.log-group-card.expanded .log-group-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}
.log-group-body {
  display: none;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.2);
  flex-direction: column;
  gap: 8px;
}
.log-group-card.expanded .log-group-body {
  display: flex;
}

/* --- PRICE STEPPER CONTROLLER STYLES --- */
.price-stepper-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-stepper-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 4px;
  height: 48px; /* Safe mobile tap height */
}
.btn-step {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}
.btn-step:hover:not(:disabled) {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
  color: var(--color-primary);
}
.btn-step:active:not(:disabled) {
  transform: scale(0.95);
}
.price-stepper-value-container {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  user-select: none;
}
#rangePriceVal {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

/* Chat Clear Button premium hover styling */
.btn-clear-chat:hover {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

/* Custom highlight styles for Lockbox values in Cards (V1) and List (V2) */
.card-lockbox-pill {
  color: var(--color-gold) !important;
  font-weight: 700 !important;
  background-color: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
}
.card-lockbox-pill i {
  color: var(--color-gold) !important;
  font-size: 0.72rem !important;
}

.list-lockbox-item {
  color: var(--color-gold) !important;
  font-weight: 700 !important;
  background-color: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
}
.list-lockbox-item i {
  color: var(--color-gold) !important;
  font-size: 0.72rem !important;
}

/* === [MAP FEATURE - STYLING] === */
/* Leaflet dark theme customizations */
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--border-color-hover) !important;
  color: var(--text-primary) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--glass-shadow) !important;
}
.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid var(--border-color-hover) !important;
}
.leaflet-container a.leaflet-popup-close-button {
  color: var(--text-secondary) !important;
  padding: 8px !important;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* Custom Marker Styling */
.custom-map-pin {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.glowing-gold-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: rgba(245, 158, 11, 0.15);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  transition: var(--transition-smooth);
}
.glowing-gold-pin i {
  color: var(--color-gold);
  font-size: 11px;
}
.glowing-gold-pin:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.9);
  background-color: rgba(245, 158, 11, 0.35);
}

/* Popup internal card layout */
.map-popup-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  padding: 4px;
}
.map-popup-address {
  font-family: var(--font-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.map-popup-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-hover);
  margin: 2px 0;
}
.map-popup-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.map-popup-specs span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-popup-btn {
  margin-top: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.map-popup-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}
/* === [MAP FEATURE - STYLING END] === */

/* === [ADMIN INLINE ADDRESS EDITING] === */
.admin-editable-cell {
  cursor: pointer;
  position: relative;
  transition: background-color var(--transition-smooth);
}
.admin-editable-cell:hover {
  background-color: rgba(245, 158, 11, 0.08) !important;
  color: var(--color-gold) !important;
}
.admin-editable-cell::after {
  content: '\f303'; /* FontAwesome pencil icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--color-gold);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}
.admin-editable-cell:hover::after {
  opacity: 0.8;
}

.cell-address.is-editing {
  padding: 4px 8px !important;
  background-color: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid var(--color-gold) !important;
  box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.2);
}

.excel-inline-edit-input {
  width: 78%;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-smooth);
}
.excel-inline-edit-input:focus {
  border-color: var(--color-gold) !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.excel-inline-edit-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-inline-save,
.btn-inline-cancel {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: transform var(--transition-smooth), background-color var(--transition-smooth);
  color: #fff;
}

.btn-inline-save {
  background-color: var(--color-emerald) !important;
}
.btn-inline-save:hover:not(:disabled) {
  transform: scale(1.1);
  background-color: #059669 !important;
}

.btn-inline-cancel {
  background-color: var(--color-danger) !important;
}
.btn-inline-cancel:hover:not(:disabled) {
  transform: scale(1.1);
  background-color: #dc2626 !important;
}

.btn-inline-save:disabled,
.btn-inline-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cell-address.edit-success {
  animation: flash-emerald 1s ease-out;
}

@keyframes flash-emerald {
  0% {
    background-color: rgba(16, 185, 129, 0.3) !important;
  }
  100% {
    background-color: transparent !important;
  }
}
/* === [ADMIN INLINE ADDRESS EDITING END] === */

/* === [ADMIN DASHBOARD - FIELD REPORTS LISTING] === */
.field-report-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 10px;
  overflow: visible !important; /* Force overflow visible to completely prevent WebKit dynamic container height clipping bugs! */
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
  flex-shrink: 0; /* Prevent flex shrink squishing */
}

.field-report-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.05);
}

.field-report-card.is-expanded {
  background: rgba(15, 23, 42, 0.4);
  border-color: var(--color-gold);
  overflow: visible !important;
}

.report-card-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  user-select: none;
}

.report-card-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-category-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.report-address {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.report-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.report-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.report-card-expanded {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.78rem;
}

.report-detail-item {
  color: var(--text-secondary);
}

.report-detail-item strong {
  color: #fff;
  margin-right: 4px;
}

.report-price {
  color: var(--color-emerald) !important;
  font-weight: 700;
}

.report-comments-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
}

.report-comments-box h5 {
  margin: 0 0 6px 0;
  font-size: 0.75rem;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 5px;
}

.report-comments-box p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.report-media-gallery h5 {
  margin: 0 0 8px 0;
  font-size: 0.75rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-media-item {
  aspect-ratio: 4/3;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  background: #000;
}

.gallery-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition-smooth);
}

.gallery-media-item img:hover {
  transform: scale(1.05);
}

.gallery-media-item.video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-media-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-gold);
  font-size: 7.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.report-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.no-media {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 10px;
}
/* === [ADMIN DASHBOARD - FIELD REPORTS LISTING END] === */

/* === [ADVANCED FIELD FILTERS DROPDOWN STYLING] === */
.advanced-filter-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 350px;
  padding: 24px 24px 32px 24px !important; /* Spacious padding with extra bottom padding for elegant breathing room */
  z-index: 1000;
  background: rgba(15, 23, 42, 0.99) !important; /* 99% solid opaque background to block text bleed-through! */
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(225, 29, 72, 0.3) !important; /* Premium branding border */
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
  display: flex;
  flex-direction: column;
  gap: 18px !important; /* High breathing room between filter groups */
  max-height: 80vh !important; /* Bound height on smaller viewports to prevent overflow and cut-offs */
  overflow-y: auto !important; /* Enable smooth scrolling inside the card */
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform-origin: top right;
}

/* Custom premium scrollbar for advanced filters dropdown */
.advanced-filter-dropdown::-webkit-scrollbar {
  width: 6px;
}

.advanced-filter-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.advanced-filter-dropdown::-webkit-scrollbar-thumb {
  background: rgba(225, 29, 72, 0.2);
  border-radius: 3px;
}

.advanced-filter-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(225, 29, 72, 0.45);
}

.advanced-filter-dropdown.hidden {
  display: none !important;
}

/* Header inside dropdown */
.advanced-filter-dropdown .dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.advanced-filter-dropdown .dropdown-header span {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.advanced-filter-dropdown .dropdown-header span i {
  color: var(--color-primary);
}

.advanced-filter-dropdown .dropdown-header button {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.advanced-filter-dropdown .dropdown-header button:hover {
  background: rgba(225, 29, 72, 0.1);
}

/* Individual Filter Groups */
.advanced-filter-dropdown .filter-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 6px !important;
  width: 100%;
}

.advanced-filter-dropdown .filter-dropdown-group label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.advanced-filter-dropdown .filter-dropdown-group label i {
  color: var(--color-primary);
  font-size: 0.8rem;
}

/* Inputs and Selects styling inside dropdown */
.advanced-filter-dropdown select,
.advanced-filter-dropdown input {
  width: 100% !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  font-size: 0.84rem !important;
  transition: all 0.2s ease !important;
  height: 40px !important;
  outline: none !important;
}

.advanced-filter-dropdown select:focus,
.advanced-filter-dropdown input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15) !important;
  background: rgba(0, 0, 0, 0.5) !important;
}

/* Light Theme Overrides */
body.light-theme .advanced-filter-dropdown {
  background: rgba(248, 250, 252, 0.99) !important; /* Solid matte light background */
  border: 1px solid rgba(225, 29, 72, 0.2) !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12) !important;
}

body.light-theme .advanced-filter-dropdown .dropdown-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.light-theme .advanced-filter-dropdown .dropdown-header span {
  color: #0f172a;
}

body.light-theme .advanced-filter-dropdown .filter-dropdown-group label {
  color: #475569;
}

body.light-theme .advanced-filter-dropdown select,
body.light-theme .advanced-filter-dropdown input {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}

body.light-theme .advanced-filter-dropdown select:focus,
body.light-theme .advanced-filter-dropdown input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1) !important;
  background: #ffffff !important;
}
/* === [ADVANCED FIELD FILTERS DROPDOWN STYLING END] === */

/* === [PREMIUM UPDATE OVERLAY & CARD STYLING] === */
.premium-update-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 110000 !important; /* Stacked completely on top of everything */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.premium-update-card {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(225, 29, 72, 0.35) !important;
  border-radius: 20px !important;
  padding: 32px 24px 28px 24px !important;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(225, 29, 72, 0.25) !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.update-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 2.2rem;
  margin-bottom: 4px;
  animation: pulseGlow 2s infinite ease-in-out;
}

.premium-update-card h3 {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  font-family: var(--font-secondary);
  letter-spacing: -0.01em;
}

.premium-update-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-primary);
}

.btn-refresh-cta {
  width: 100% !important;
  height: 46px !important;
  background: var(--color-primary) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3) !important;
  transition: all 0.25s ease !important;
}

.btn-refresh-cta:hover {
  background: var(--color-primary-hover) !important;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5) !important;
  transform: translateY(-2px);
}

.btn-refresh-cta i {
  animation: spin 3s linear infinite;
}

.btn-dismiss-link {
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  opacity: 0.7;
  transition: all 0.2s ease !important;
}

.btn-dismiss-link:hover {
  opacity: 1;
  color: #ffffff !important;
}

/* Light Theme overrides for update modal card */
body.light-theme .premium-update-overlay {
  background: rgba(15, 23, 42, 0.3) !important;
}

body.light-theme .premium-update-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(225, 29, 72, 0.2) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15), 0 0 30px rgba(225, 29, 72, 0.15) !important;
}

body.light-theme .premium-update-card h3 {
  color: #0f172a;
}

body.light-theme .premium-update-card p {
  color: #475569;
}

body.light-theme .btn-dismiss-link:hover {
  color: #0f172a !important;
}

/* Animations helper classes */
.animate-scale-up {
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-scale-down {
  animation: scaleOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(225, 29, 72, 0);
  }
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes scaleOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.9); opacity: 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   PREMIUM LIGHTBOX CAROUSEL & SCROLL IMPROVEMENTS
   ========================================================================== */

/* Lightbox Wrapper */
.premium-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 99999; /* Top level above all drawers and navbars */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Glassmorphism Backdrop Overlay */
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: zoom-out;
}

/* Content Wrapper */
.lightbox-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  gap: 16px;
  pointer-events: none;
}

/* Media Holder */
.lightbox-media-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

/* Premium Media Elements */
.lightbox-media-element {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 40px rgba(225, 29, 72, 0.15);
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Filename Caption */
.lightbox-caption {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-primary);
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Premium Close Button */
.lightbox-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.lightbox-close-btn:hover {
  background: rgba(225, 29, 72, 0.25);
  border-color: rgba(225, 29, 72, 0.5);
  color: #ffffff;
  transform: rotate(90deg) scale(1.05);
}

/* Premium Navigation Arrows */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
  user-select: none;
}

.lightbox-nav-btn:hover {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.45);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-nav-btn.prev-btn {
  left: 24px;
}

.lightbox-nav-btn.next-btn {
  right: 24px;
}

/* Lightbox Counter indicator */
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 11, 15, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-gold);
  z-index: 20;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Fix reports listing scroll bounds clipping */
.reports-list-container {
  padding-bottom: 120px !important; /* Force a generous scroll offset to prevent WebKit drawer boundary clipping */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    max-height: 75vh;
  }
  .lightbox-media-element {
    max-height: 60vh;
  }
  .lightbox-close-btn {
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .lightbox-nav-btn.prev-btn {
      left: 10px;
  }
  .lightbox-nav-btn.next-btn {
    right: 10px;
  }
}

/* ==========================================================================
   RESERVED PROPERTIES & EXTERNAL FILE STYLING (YELLOW/AMBER)
   ========================================================================== */

/* --- V3 Spreadsheet Rows (Yellow/Gold) --- */
.excel-row.has-external-file td {
  background-color: rgba(234, 179, 8, 0.12) !important;
  color: #fef08a !important;
  border-bottom: 1px solid rgba(234, 179, 8, 0.2) !important;
  border-right: 1px solid rgba(234, 179, 8, 0.15) !important;
}
.excel-row.has-external-file:hover td {
  background-color: rgba(234, 179, 8, 0.22) !important;
}
.excel-row.has-external-file .cell-price {
  color: #fef08a !important;
}
.excel-status-badge.reserved {
  background-color: rgba(234, 179, 8, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

body.light-theme .excel-row.has-external-file td {
  background-color: rgba(254, 240, 138, 0.25) !important;
  color: #854d0e !important;
  border-bottom: 1px solid rgba(234, 179, 8, 0.3) !important;
  border-right: 1px solid rgba(234, 179, 8, 0.2) !important;
}
body.light-theme .excel-row.has-external-file:hover td {
  background-color: rgba(254, 240, 138, 0.38) !important;
}
body.light-theme .excel-row.has-external-file .cell-price {
  color: #854d0e !important;
}
body.light-theme .excel-status-badge.reserved {
  background-color: rgba(254, 240, 138, 0.4) !important;
  color: #854d0e !important;
  border: 1px solid rgba(234, 179, 8, 0.5) !important;
}

/* --- V2 List Rows (Yellow/Gold) --- */
.property-row.has-external-file {
  background: rgba(234, 179, 8, 0.05) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.25) !important;
}
.property-row.has-external-file:hover {
  background: rgba(234, 179, 8, 0.12) !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}
.property-row.has-external-file .row-price {
  color: #fbbf24 !important;
}
.row-status.reserved {
  background-color: rgba(234, 179, 8, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(234, 179, 8, 0.3) !important;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

body.light-theme .property-row.has-external-file {
  background: rgba(254, 240, 138, 0.2) !important;
  border-color: rgba(234, 179, 8, 0.35) !important;
}
body.light-theme .property-row.has-external-file:hover {
  background: rgba(254, 240, 138, 0.3) !important;
  border-color: rgba(234, 179, 8, 0.5) !important;
}
body.light-theme .property-row.has-external-file .row-price {
  color: #854d0e !important;
}
body.light-theme .row-status.reserved {
  background-color: rgba(254, 240, 138, 0.4) !important;
  color: #854d0e !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}

/* --- V1 Cards (Yellow/Gold) --- */
.property-card.has-external-file {
  background: rgba(234, 179, 8, 0.03) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.3) !important;
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.08) !important;
}
.property-card.has-external-file:hover {
  border-color: rgba(234, 179, 8, 0.7) !important;
  box-shadow: 0 8px 32px rgba(234, 179, 8, 0.18) !important;
}
.badge-reserved {
  background-color: rgba(234, 179, 8, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

body.light-theme .property-card.has-external-file {
  background: rgba(254, 240, 138, 0.1) !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.04) !important;
}
body.light-theme .property-card.has-external-file:hover {
  border-color: rgba(234, 179, 8, 0.6) !important;
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.12) !important;
}
body.light-theme .badge-reserved {
  background-color: rgba(254, 240, 138, 0.4) !important;
  color: #854d0e !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}

/* --- Detail Modal Warning Banner --- */
.dialog-reserved-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(234, 179, 8, 0.12);
  border: 1.5px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-family: var(--font-secondary);
}
body.light-theme .dialog-reserved-banner {
  background-color: rgba(254, 240, 138, 0.4);
  border-color: rgba(234, 179, 8, 0.4);
  color: #854d0e;
}

/* --- Leaflet glowing-yellow-pin map marker --- */
.glowing-yellow-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: rgba(234, 179, 8, 0.2);
  border: 2px solid #eab308;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.6);
  transition: var(--transition-smooth);
}
.glowing-yellow-pin i {
  color: #eab308;
  font-size: 11px;
}
.glowing-yellow-pin:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.9);
  background-color: rgba(234, 179, 8, 0.4);
}
.map-popup-reserved-badge {
  background-color: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fef08a;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
body.light-theme .map-popup-reserved-badge {
  background-color: rgba(254, 240, 138, 0.4);
  border-color: rgba(234, 179, 8, 0.4);
  color: #854d0e;
}


/* ==========================================================================
   NEW PROPERTIES STYLING (GREEN/EMERALD)
   ========================================================================== */

/* --- V3 Spreadsheet Rows (Green) --- */
.excel-row.is-new-property td {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #a7f3d0 !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2) !important;
  border-right: 1px solid rgba(16, 185, 129, 0.15) !important;
}
.excel-row.is-new-property:hover td {
  background-color: rgba(16, 185, 129, 0.22) !important;
}
.excel-row.is-new-property .cell-price {
  color: #a7f3d0 !important;
}
.excel-status-badge.new-prop {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

body.light-theme .excel-row.is-new-property td {
  background-color: rgba(209, 250, 229, 0.3) !important;
  color: #065f46 !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3) !important;
  border-right: 1px solid rgba(16, 185, 129, 0.2) !important;
}
body.light-theme .excel-row.is-new-property:hover td {
  background-color: rgba(209, 250, 229, 0.45) !important;
}
body.light-theme .excel-row.is-new-property .cell-price {
  color: #065f46 !important;
}
body.light-theme .excel-status-badge.new-prop {
  background-color: rgba(209, 250, 229, 0.5) !important;
  color: #065f46 !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

/* --- V2 List Rows (Green) --- */
.property-row.is-new-property {
  background: rgba(16, 185, 129, 0.05) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.25) !important;
}
.property-row.is-new-property:hover {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}
.property-row.is-new-property .row-price {
  color: #34d399 !important;
}
.row-status.new-prop {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

body.light-theme .property-row.is-new-property {
  background: rgba(209, 250, 229, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
body.light-theme .property-row.is-new-property:hover {
  background: rgba(209, 250, 229, 0.3) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}
body.light-theme .property-row.is-new-property .row-price {
  color: #065f46 !important;
}
body.light-theme .row-status.new-prop {
  background-color: rgba(209, 250, 229, 0.4) !important;
  color: #065f46 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* --- V1 Cards (Green) --- */
.property-card.is-new-property {
  background: rgba(16, 185, 129, 0.03) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08) !important;
}
.property-card.is-new-property:hover {
  border-color: rgba(16, 185, 129, 0.7) !important;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.18) !important;
}
.badge-new-prop {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

body.light-theme .property-card.is-new-property {
  background: rgba(209, 250, 229, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.04) !important;
}
body.light-theme .property-card.is-new-property:hover {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12) !important;
}
body.light-theme .badge-new-prop {
  background-color: rgba(209, 250, 229, 0.4) !important;
  color: #065f46 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* --- Detail Modal New Property Banner --- */
.dialog-new-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-family: var(--font-secondary);
}
body.light-theme .dialog-new-banner {
  background-color: rgba(209, 250, 229, 0.4);
  border-color: rgba(16, 185, 129, 0.4);
  color: #065f46;
}

/* --- Leaflet glowing-green-pin map marker --- */
.glowing-green-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transition: var(--transition-smooth);
}
.glowing-green-pin i {
  color: #10b981;
  font-size: 11px;
}
.glowing-green-pin:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.9);
  background-color: rgba(16, 185, 129, 0.4);
}
.map-popup-new-badge {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
body.light-theme .map-popup-new-badge {
  background-color: rgba(209, 250, 229, 0.4);
  border-color: rgba(16, 185, 129, 0.4);
  color: #065f46;
}

/* --- ADMIN RESERVATION CARDS --- */
.dialog-admin-res-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 15px;
  margin-bottom: 10px;
}

.admin-res-card {
  background: radial-gradient(100% 100% at 100% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 100%),
              rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.admin-res-card.reserved {
  background: radial-gradient(100% 100% at 100% 0%, rgba(239, 68, 68, 0.08) 0%, transparent 100%),
              rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.admin-res-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.admin-res-card.reserved .admin-res-header {
  color: var(--color-danger);
}

.admin-res-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-res-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.admin-res-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Light Theme overrides */
body.light-theme .admin-res-card {
  background: radial-gradient(100% 100% at 100% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 100%),
              rgba(255, 255, 255, 0.8);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

body.light-theme .admin-res-card.reserved {
  background: radial-gradient(100% 100% at 100% 0%, rgba(239, 68, 68, 0.1) 0%, transparent 100%),
              rgba(255, 255, 255, 0.8);
  border-color: rgba(239, 68, 68, 0.4);
}

body.light-theme .admin-res-header {
  border-bottom-color: rgba(0,0,0,0.06);
}

body.light-theme .date-input-wrapper {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

body.light-theme .date-input-wrapper input[type="date"] {
  color: #1e293b !important;
}

body.light-theme .date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0);
}

/* --- LIVE MAP DIALOG RESPONSIVE FIX (iOS/Safari Sizing) --- */
#mapDialog {
  height: 80vh !important;
  height: 80dvh !important;
  max-height: 90vh !important;
  max-height: 90dvh !important;
}

#mapDialog .dialog-scroll-body {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#mapDialog #njMap {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 300px !important;
}

@media (max-width: 768px) {
  #mapDialog {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* --- GPS AGENT LOCATION MARKER STYLE --- */
.agent-location-marker {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agent-location-marker .blue-dot {
  width: 14px;
  height: 14px;
  background-color: #3b82f6; /* Premium iOS blue */
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agent-location-marker .blue-dot i {
  font-size: 8px;
  color: white;
  display: none; /* simple blue dot by default, clean style */
}
.agent-location-marker .pulsing-halo {
  position: absolute;
  width: 36px;
  height: 36px;
  background-color: rgba(59, 130, 246, 0.25);
  border-radius: 50%;
  animation: agentPulse 2s infinite ease-out;
  z-index: 1;
  pointer-events: none;
}
@keyframes agentPulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Leaflet custom controls integration */
.leaflet-gps-control a {
  background-color: var(--bg-dark-card) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  width: 30px;
  height: 30px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}
body.light-theme .leaflet-gps-control a {
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(0,0,0,0.08) !important;
  color: #1e293b !important;
}
.leaflet-gps-control a:hover {
  background-color: var(--bg-dark-card-hover) !important;
  color: var(--color-primary) !important;
  border-color: var(--color-primary-hover) !important;
}
body.light-theme .leaflet-gps-control a:hover {
  background-color: #f1f5f9 !important;
  color: var(--color-primary) !important;
}
.leaflet-gps-control a i {
  font-size: 14px;
  transition: transform 0.2s ease;
}
.leaflet-gps-control a:active i {
  transform: scale(0.8);
}

/* --- APP UPDATE BADGES AND PULSING INDICATOR --- */
.brand-sub-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.brand-update-badge {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: rgba(16, 185, 129, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}
body.light-theme .brand-update-badge {
  color: #047857;
  background-color: rgba(4, 120, 87, 0.06);
  border-color: rgba(4, 120, 87, 0.15);
}
.mobile-update-badge {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 4px;
  width: 100%;
}
body.light-theme .mobile-update-badge {
  color: #047857;
}
@media (min-width: 769px) {
  .mobile-update-badge {
    display: none !important;
  }
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}
body.light-theme .pulse-dot {
  background-color: #059669;
}
@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* --- AUTOCOMPLETE SUGGESTIONS DROPDOWN --- */
.suggestions-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  margin-top: 4px;
}
.suggestions-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--color-text);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s ease;
}
.suggestions-item:last-child {
  border-bottom: none;
}
.suggestions-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .suggestions-dropdown {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
body.light-theme .suggestions-item {
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.05);
}
body.light-theme .suggestions-item:hover {
  background: rgba(0, 0, 0, 0.04);
}




