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

body {
  font-family: 'DM Sans', sans-serif;
  background: #FAF8F5;
  color: #1A1410;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAF8F5;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(26,20,16,0.08);
}

.auth-logo { text-align: center; margin-bottom: 32px; }

.auth-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: #1A1410;
  margin-top: 12px;
}

.auth-subtitle { color: #6B6460; font-size: 14px; margin-top: 4px; }

.auth-form .form-group { margin-bottom: 20px; }

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1A1410;
  margin-bottom: 6px;
}

.auth-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #E8E4DF;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #1A1410;
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus { border-color: #E8773A; }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6B6460;
}

.auth-switch a { color: #E8773A; text-decoration: none; font-weight: 600; }

/* ── Portal Layout ── */
.portal-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid #F0EDE8;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 4px; }

.sidebar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #1A1410;
}

.sidebar-company {
  font-size: 12px;
  color: #6B6460;
  padding: 0 8px;
  margin-bottom: 24px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #6B6460;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-item:hover { background: #FAF8F5; color: #1A1410; }
.nav-item.active { background: #FEF0E8; color: #E8773A; }

.sidebar-logout {
  display: block;
  padding: 10px 12px;
  color: #6B6460;
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid #F0EDE8;
  margin-top: 16px;
  padding-top: 16px;
}

.sidebar-logout:hover { color: #E53935; }

/* ── Main Content ── */
.portal-main {
  margin-left: 240px;
  padding: 40px;
  flex: 1;
  max-width: 1200px;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: #1A1410;
  margin-bottom: 4px;
}

.page-subtitle { color: #6B6460; font-size: 15px; }

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

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
}

.link-orange { color: #E8773A; text-decoration: none; font-size: 14px; font-weight: 600; }

/* ── Buttons ── */
.btn-primary {
  background: #E8773A;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; text-align: center; }

.btn-secondary {
  background: white;
  color: #1A1410;
  border: 1.5px solid #E8E4DF;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-outline {
  background: white;
  color: #E8773A;
  border: 1.5px solid #E8773A;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-large { padding: 16px 32px; font-size: 16px; }

/* ── Flash Messages ── */
.flash-message {
  background: #FEF0E8;
  border: 1px solid #E8773A;
  color: #1A1410;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #1A1410;
  margin-bottom: 4px;
}

.stat-value.activated { color: #4CAF50; }
.stat-value.pending { color: #F2C94C; }
.stat-value.cost { color: #E8773A; font-size: 28px; }
.stat-label { font-size: 13px; color: #6B6460; }

/* ── Table ── */
.table-card {
  background: white;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #6B6460;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #F0EDE8;
  background: #FAF8F5;
}

.data-table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid #F0EDE8;
  vertical-align: middle;
}

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

.text-muted { color: #6B6460; }

.empty-state {
  text-align: center;
  padding: 48px 20px !important;
  color: #6B6460;
}

.empty-state a { color: #E8773A; text-decoration: none; font-weight: 600; }

/* ── Code Pills ── */
.code-pill {
  background: #FEF0E8;
  color: #E8773A;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.code-user {
  background: #EEF2FF;
  color: #4A6FA5;
}

/* ── Status Badge ── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.pending { background: #FFF8E1; color: #F59E0B; }
.status-badge.verified { background: #FEF0E8; color: #E8773A; }
.status-badge.activated { background: #E8F5E9; color: #4CAF50; }

/* ── Action Buttons ── */
.action-btn-verify {
  background: none;
  border: 1.5px solid #4CAF50;
  color: #4CAF50;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.action-btn-verify:hover { background: #4CAF50; color: white; }

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid #E8E4DF;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  background: white;
}

.search-input:focus { border-color: #E8773A; }

.filter-select {
  padding: 10px 16px;
  border: 1.5px solid #E8E4DF;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  background: white;
  color: #1A1410;
  min-width: 160px;
}

/* ── Portal Form Card ── */
.portal-form-card {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
  overflow: hidden;
}

.form-section {
  padding: 32px 40px;
  border-bottom: 1px solid #F0EDE8;
}

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 4px;
}

.form-section-desc {
  font-size: 14px;
  color: #6B6460;
  margin-bottom: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1A1410;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #E8E4DF;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #1A1410;
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus { border-color: #E8773A; }

.form-group textarea { resize: vertical; min-height: 80px; }

.form-actions {
  padding: 32px 40px;
  text-align: center;
}

.form-note {
  font-size: 13px;
  color: #6B6460;
  margin-top: 12px;
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed #E8E4DF;
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: #E8773A;
  background: #FEF0E8;
}

.upload-zone p { margin-top: 12px; font-size: 14px; color: #6B6460; }

.upload-link {
  color: #E8773A;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.upload-hint { font-size: 12px; color: #9E9A96; margin-top: 8px; }

.file-name {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #E8773A;
}

/* ── Map Card ── */
.map-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
  margin-bottom: 24px;
}

.map-header { margin-bottom: 16px; }
.map-header h2 { font-family: 'Playfair Display', serif; font-size: 22px; }

/* ── Analytics Grid ── */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.chart-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  margin-bottom: 20px;
}

.donut-chart { display: flex; flex-direction: column; gap: 12px; }

.donut-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.donut-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-dot.activated { background: #4CAF50; }
.donut-dot.verified { background: #E8773A; }
.donut-dot.pending-dot { background: #F2C94C; }

.inquiry-list { display: flex; flex-direction: column; gap: 14px; }

.inquiry-item {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.inquiry-bar {
  height: 8px;
  background: #E8773A;
  border-radius: 4px;
  display: block;
}

/* ── Billing ── */
.billing-grid { display: flex; flex-direction: column; gap: 32px; }

.card {
  background: white;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.plan-badge {
  display: inline-block;
  background: #FEF0E8;
  color: #E8773A;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.billing-stat { margin-bottom: 24px; }

.billing-number {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: #1A1410;
}

.billing-label { font-size: 14px; color: #6B6460; margin-left: 8px; }

.billing-breakdown { border-top: 1px solid #F0EDE8; padding-top: 16px; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #6B6460;
}

.breakdown-row.total {
  border-top: 1px solid #F0EDE8;
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  color: #1A1410;
}

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

.plan-card {
  background: white;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
  position: relative;
  overflow: visible;
}

.plan-card.featured { border: 2px solid #E8773A; }

.plan-card.active { box-shadow: 0 0 0 2px #E8773A, 0 4px 16px rgba(232,119,58,0.15); }

.plan-badge-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #E8773A;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 4px;
}

.plan-price {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: #E8773A;
  margin-bottom: 20px;
}

.plan-price span { font-family: 'DM Sans', sans-serif; font-size: 14px; color: #6B6460; }

.plan-features {
  list-style: none;
  margin-bottom: 24px;
}

.plan-features li {
  padding: 6px 0;
  font-size: 14px;
  color: #6B6460;
}

.plan-features li::before {
  content: '✓';
  color: #E8773A;
  font-weight: 700;
  margin-right: 8px;
}

/* ── Help ── */
.help-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
}

.faq-section h2, .support-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 20px;
}

.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1A1410;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover { color: #E8773A; }

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 14px;
  color: #6B6460;
  line-height: 1.7;
}

.support-form {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26,20,16,0.06);
}

.support-form .form-group { margin-bottom: 16px; }

/* ── Add Home Layout ── */
.add-home-layout { display: flex; flex-direction: column; gap: 24px; }
.upload-panel { width: 100%; }
.upload-card { background: white; border-radius: 16px; padding: 28px; box-shadow: 0 2px 8px rgba(26,20,16,0.06); }
.upload-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 6px; }
.upload-desc { font-size: 13px; color: #6B6460; margin-bottom: 20px; }
.upload-zone { border: 2px dashed #E8E4DF; border-radius: 12px; padding: 32px 20px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.drag-over { border-color: #E8773A; background: #FEF0E8; }
.upload-zone-text { font-size: 15px; font-weight: 600; color: #1A1410; margin: 12px 0 4px; }
.upload-zone-sub { font-size: 13px; color: #6B6460; }
.upload-link { color: #E8773A; cursor: pointer; font-weight: 600; }
.upload-limit { font-size: 11px; color: #6B6460; margin-top: 8px; }
.file-list { margin-top: 16px; }
.file-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #1A1410; }
.clear-btn { background: none; border: none; color: #E53935; font-size: 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #FAF8F5; border-radius: 8px; margin-bottom: 6px; }
.file-item-name { flex: 1; font-size: 12px; color: #1A1410; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { font-size: 11px; color: #6B6460; }
.file-remove { background: none; border: none; color: #6B6460; cursor: pointer; font-size: 16px; padding: 0 4px; }

.property-panel { width: 100%; }
.property-card { background: white; border-radius: 16px; padding: 32px; box-shadow: 0 2px 8px rgba(26,20,16,0.06); min-height: 400px; display: flex; flex-direction: column; }
.card-state { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; text-align: center; }
.state-icon { margin-bottom: 20px; }
.state-title { font-family: 'Playfair Display', serif; font-size: 24px; color: #1A1410; margin-bottom: 10px; }
.state-desc { font-size: 14px; color: #6B6460; max-width: 320px; line-height: 1.6; }

.processing-animation { margin-bottom: 24px; }
.swirl-spin { animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.progress-bar-container { width: 100%; max-width: 300px; height: 6px; background: #F0EDE8; border-radius: 3px; margin: 16px auto 10px; overflow: hidden; }
.progress-bar { height: 100%; background: #E8773A; border-radius: 3px; transition: width 0.5s ease; }

.section-indicator { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #F0EDE8; width: 100%; }
.section-dots { display: flex; gap: 6px; }
.section-dot { width: 8px; height: 8px; border-radius: 50%; background: #E8E4DF; cursor: pointer; transition: all 0.2s; }
.section-dot.active { background: #E8773A; width: 20px; border-radius: 4px; }
.section-dot.done { background: #4CAF50; }
.section-label { font-size: 13px; font-weight: 600; color: #1A1410; margin-left: auto; }

.section-content { flex: 1; width: 100%; overflow-y: auto; padding-right: 4px; }
.field-row { margin-bottom: 14px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: #6B6460; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; }
.field-input { width: 100%; padding: 10px 12px; border: 1.5px solid #E8E4DF; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; color: #1A1410; outline: none; background: white; transition: border-color 0.2s; }
.field-input:focus { border-color: #E8773A; }
.field-input:disabled { background: #FAF8F5; color: #1A1410; }
.field-textarea { min-height: 80px; resize: vertical; }

.list-section { width: 100%; }
.list-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.list-row-fields { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.field-sm { min-width: 80px; flex: 1; padding: 8px 10px; }
.row-remove { background: none; border: none; color: #E53935; font-size: 18px; cursor: pointer; padding: 0 4px; flex-shrink: 0; }
.btn-add-row { background: none; border: 1.5px dashed #E8773A; color: #E8773A; padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; margin-top: 8px; font-family: 'DM Sans', sans-serif; }
.btn-add-row:hover { background: #FEF0E8; }
.empty-hint { font-size: 13px; color: #6B6460; text-align: center; padding: 20px; }
.validation-error { background: #FFF0F0; border: 1px solid #E53935; color: #C62828; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.subsection-title { font-size: 13px; font-weight: 600; color: #1A1410; text-transform: uppercase; letter-spacing: 0.04em; margin: 16px 0 10px; }

.section-nav { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid #F0EDE8; margin-top: 20px; width: 100%; }
.btn-edit { background: none; border: 1.5px solid #E8E4DF; color: #6B6460; padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: 'DM Sans', sans-serif; }
.btn-edit:hover { border-color: #E8773A; color: #E8773A; }
.nav-arrows { display: flex; gap: 8px; }
.arrow-btn { display: flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; background: #FAF8F5; color: #1A1410; transition: all 0.15s; }
.arrow-btn:hover { background: #F0EDE8; }
.arrow-btn-primary { background: #E8773A; color: white; }
.arrow-btn-primary:hover { opacity: 0.9; }
.arrow-btn-final { background: #4CAF50; color: white; padding: 10px 24px; }
.arrow-btn-final:hover { opacity: 0.9; }

/* ── Dot Menu ── */
.dot-menu-wrap { position: relative; }
.dot-menu-btn {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: #6B6460; padding: 4px 8px; border-radius: 6px; line-height: 1;
  font-family: 'DM Sans', sans-serif;
}
.dot-menu-btn:hover { background: #FAF8F5; color: #1A1410; }
.dot-menu-dropdown {
  display: none; position: absolute; right: 0; bottom: 100%; margin-bottom: 4px;
  background: white; border-radius: 10px; box-shadow: 0 4px 20px rgba(26,20,16,0.12);
  min-width: 170px; z-index: 50; padding: 4px 0;
}
.dot-menu-dropdown.open { display: block; }
.dot-menu-dropdown button {
  display: block; width: 100%; padding: 10px 16px; background: none; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #1A1410;
  text-align: left; cursor: pointer;
}
.dot-menu-dropdown button:hover { background: #FAF8F5; }
.dot-menu-dropdown .dot-menu-danger { color: #E53935; }
.dot-menu-dropdown .dot-menu-danger:hover { background: #FFF0F0; }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,20,16,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-card {
  background: white; border-radius: 16px; width: 100%; max-width: 480px;
  box-shadow: 0 16px 48px rgba(26,20,16,0.2); max-height: 90vh; display: flex; flex-direction: column;
  margin: 20px;
}
.modal-large { max-width: 740px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 28px 0;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 22px; }
.modal-close {
  background: none; border: none; font-size: 24px; color: #6B6460;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.modal-close:hover { color: #1A1410; }
.modal-body { padding: 20px 28px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 28px 24px; display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid #F0EDE8;
}

/* ── Edit Modal ── */
.edit-grid { display: flex; flex-direction: column; gap: 24px; }
.edit-section h4 {
  font-family: 'Playfair Display', serif; font-size: 16px;
  margin-bottom: 12px; color: #1A1410;
}
.edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-field label {
  display: block; font-size: 11px; font-weight: 600; color: #6B6460;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.edit-field input, .edit-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #E8E4DF; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #1A1410;
  outline: none; background: white;
}
.edit-field input:focus, .edit-input:focus, .edit-textarea:focus { border-color: #E8773A; }
.edit-field-full { grid-column: 1 / -1; }
.edit-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #E8E4DF; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #1A1410;
  outline: none; background: white; resize: vertical; min-height: 60px;
}
.edit-list-row { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #F0EDE8; }
.edit-list-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.edit-empty { font-size: 13px; color: #6B6460; padding: 8px 0; }

/* ── Delete Modal ── */
.delete-warning { font-size: 14px; color: #E53935; margin-bottom: 16px; line-height: 1.6; }
.delete-address { font-size: 16px; font-weight: 600; color: #1A1410; margin-bottom: 16px; }
.delete-prompt { font-size: 14px; color: #6B6460; margin-bottom: 10px; }
.delete-error { font-size: 13px; color: #E53935; margin-top: 8px; }
.btn-danger {
  background: #E53935; color: white; border: none; padding: 12px 24px;
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: #C62828; }

/* ── Property Address Link ── */
.prop-address-link {
  color: #1A1410; text-decoration: none; transition: all 0.15s;
}
.prop-address-link:hover { text-decoration: underline; color: #E8773A; }

/* ── View Modal ── */
.view-section { margin-bottom: 24px; }
.view-section:last-child { margin-bottom: 0; }
.view-section-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #F0EDE8;
}
.view-icon { font-size: 18px; flex-shrink: 0; }
.view-section-header h4 {
  font-family: 'Playfair Display', serif; font-size: 16px; color: #1A1410;
}
.view-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px;
}
.view-field { display: flex; flex-direction: column; gap: 2px; }
.view-label {
  font-size: 11px; font-weight: 600; color: #6B6460;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.view-value { font-size: 14px; color: #1A1410; }
.view-list-item {
  padding: 10px 0; border-bottom: 1px solid #F0EDE8;
}
.view-list-item:last-child { border-bottom: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .add-home-layout { max-width: 100%; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .portal-main { margin-left: 0; padding: 24px; }
  .page-header { flex-direction: column; gap: 16px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .list-row-fields { flex-direction: column; }
}
