:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --surface-soft: #f5f7fa;
  --text: #0a0a0a;
  --muted: #4a5565;
  --soft: #99a1af;
  --line: rgba(0, 0, 0, 0.1);
  --black: #000000;
  --gold: #f0b100;
  --gold-dark: #d08700;
  --gold-soft: #fef9c2;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --info-bg: #dbeafe;
  --info-text: #1d4ed8;
  --gray-bg: #f3f4f6;
  --gray-text: #374151;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --transition-fast: 0.18s ease-in-out;
  --transition-base: 0.24s ease-in-out;
  --transition-slow: 0.32s ease-in-out;
}

:root[data-theme="dark"] {
  --bg: #08111f;
  --surface: #0f1b2d;
  --surface-alt: #162338;
  --surface-soft: #0d1727;
  --text: #edf4ff;
  --muted: #aab7ca;
  --soft: #73839a;
  --line: rgba(148, 163, 184, 0.2);
  --black: #020817;
  --gold: #f4c542;
  --gold-dark: #ffdd73;
  --gold-soft: rgba(244, 197, 66, 0.16);
  --success-bg: rgba(34, 197, 94, 0.18);
  --success-text: #8df0b0;
  --warning-bg: rgba(245, 158, 11, 0.18);
  --warning-text: #ffd27a;
  --danger-bg: rgba(239, 68, 68, 0.18);
  --danger-text: #ffb4b4;
  --info-bg: rgba(59, 130, 246, 0.18);
  --info-text: #93c5fd;
  --gray-bg: rgba(148, 163, 184, 0.2);
  --gray-text: #d8e1ee;
  --shadow-sm: 0 8px 22px rgba(2, 6, 23, 0.28);
  --shadow-md: 0 18px 38px rgba(2, 6, 23, 0.34);
  --shadow-lg: 0 28px 64px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-base), color var(--transition-base);
}

body.admin-loading {
  overflow: hidden;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse-red {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(185, 28, 28, 0);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(240, 177, 0, 0.14);
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.admin-loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background:
    radial-gradient(circle at top, rgba(240, 177, 0, 0.12), rgba(8, 8, 8, 1) 40%),
    #050505;
  color: #fff;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.admin-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.admin-loader-mark {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.admin-loader-logo {
  width: min(92px, 70%);
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.admin-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--gold);
  animation: admin-loader-spin 0.9s linear infinite;
}

.admin-loader p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

@keyframes admin-loader-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.page-shell {
  min-height: 100vh;
}

.auth-screen {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-preview {
  display: none;
}

.auth-panel {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.auth-brand-lockup {
  justify-content: center;
  
  animation: fade-up 0.45s ease;
}

.auth-brand-logo {
  width: min(132px, 42vw);
  filter: drop-shadow(0 10px 20px rgba(240, 177, 0, 0.2));
}
  
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  animation: fade-up 0.50s ease;
}

.auth-panel h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
  color: #ffffff;
  animation: fade-up 0.55s ease;
}

.auth-copy {
  margin: 0 auto 2rem;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  animation: fade-up 0.65s ease;
}

.auth-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
  animation: fade-up 0.8s ease;
  box-shadow: var(--shadow-lg);
}

.auth-form label,
.stacked-form label,
.form-grid label {
  display: block;
  margin-bottom: 1rem;
}

.auth-form span,
.stacked-form span,
.form-grid span {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #364153;
  margin-bottom: 0.5rem;
}

.field-inline-message {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--warning-text);
}

.form-inline-warning {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--warning-bg), rgba(240, 177, 0, 0.08));
  border: 1px solid rgba(240, 177, 0, 0.2);
  color: var(--warning-text);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.input-invalid {
  border-color: rgba(217, 119, 6, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 177, 0, 0.14);
  background: #fffef8;
}

input::placeholder,
textarea::placeholder {
  color: var(--soft);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.form-message {
  /*min-height: 1.25rem;*/
  /*margin: 0 0 1rem;*/
  font-size: 0.9rem;
  color: var(--danger-text);
}

.helper-text {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  animation: fade-up 0.85s ease;
}

.primary-button,
.secondary-button,
.ghost-button,
.chip,
.filter-button,
.tab-button {
  border-radius: var(--radius-sm);
  padding: 0.82rem 1.05rem;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  will-change: transform;
}

.auth-form .primary-button {
  display: block;
  margin: 1rem auto 0;
}

.primary-button {
  background: var(--gold);
  color: #000;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(240, 177, 0, 0.18);
}

.primary-button:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(208, 135, 0, 0.22);
}

.secondary-button {
  background: #111827;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover {
  background: #1f2937;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.ghost-button {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ghost-button:hover {
  background: var(--surface-alt);
  border-color: rgba(240, 177, 0, 0.25);
  transform: translateY(-1px);
}

.danger-button {
  padding: 0.78rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast);
}

.danger-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(185, 28, 28, 0.24);
  filter: saturate(1.05);
}

button:disabled {
  cursor: not-allowed;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.86;
  pointer-events: none;
  cursor: wait;
}

button.is-loading:hover,
button.is-loading:active {
  transform: none;
}

.button-loading-spinner {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: button-loading-spin 0.7s linear infinite;
}

.action-link.is-loading {
  display: inline-flex;
  vertical-align: middle;
}

.small-button.is-loading {
  font-size: 0.9rem;
}

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

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.chip:active,
.filter-button:active,
.tab-button:active,
.action-link:active,
.project-filter-card:active,
.nav-item:active {
  transform: translateY(0) scale(0.985);
}

.dashboard {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  background: var(--black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(240, 177, 0, 0.24);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.ocular-notification-wrap {
  position: relative;
}

.ocular-notification-button {
  min-width: 0;
  padding-inline: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.ocular-notification-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(244, 197, 66, 0.35);
}

.ocular-notification-icon {
  font-size: 0.85rem;
  color: var(--gold);
}

.ocular-notification-label {
  font-weight: 700;
}

.ocular-notification-count {
  min-width: 22px;
  height: 22px;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #111;
  font-size: 0.78rem;
  font-weight: 800;
}

.ocular-notification-panel {
  position: absolute;
  top: calc(100% + 0.85rem);
  right: 0;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(72vh, 640px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 80;
}

.ocular-notification-panel-head {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.ocular-notification-panel-head p {
  margin: 0.3rem 0 0;
}

.ocular-notification-list {
  max-height: calc(min(72vh, 640px) - 78px);
  overflow-y: auto;
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.ocular-notification-item {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid transparent;
  color: var(--text);
  display: grid;
  gap: 0.4rem;
}

.ocular-notification-item:hover {
  border-color: rgba(240, 177, 0, 0.24);
  transform: translateY(-1px);
}

.ocular-notification-item.unread {
  background: linear-gradient(180deg, rgba(240, 177, 0, 0.14), rgba(240, 177, 0, 0.04));
  border-color: rgba(240, 177, 0, 0.2);
}

.ocular-notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ocular-notification-item-head strong {
  font-size: 0.96rem;
}

.ocular-notification-time,
.ocular-notification-meta,
.ocular-notification-preview {
  font-size: 0.84rem;
}

.ocular-notification-time,
.ocular-notification-meta {
  color: var(--muted);
}

.ocular-notification-preview {
  color: var(--text);
  opacity: 0.84;
}

.topbar-theme-toggle {
  min-width: 108px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.topbar-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(244, 197, 66, 0.35);
}

.topbar h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.topbar .eyebrow {
  margin: 0;
  color: var(--gold);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
}

.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 72px);
  align-items: stretch;
}

.sidebar {
  flex: 0 0 256px;
  width: 256px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 12;
  pointer-events: auto;
  background-image: linear-gradient(180deg, rgba(240, 177, 0, 0.04), rgba(255, 255, 255, 0) 20%);
}

.nav-list {
  padding: 1.2rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
  position: relative;
  z-index: 3;
  pointer-events: auto;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--surface-alt);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.nav-item:active {
  transform: translateX(2px) scale(0.985);
}

.nav-item.active {
  background: var(--gold-soft);
  color: var(--text);
  font-weight: 600;
  border-color: rgba(240, 177, 0, 0.2);
  box-shadow: 0 14px 30px rgba(240, 177, 0, 0.14);
  animation: nav-select 0.28s ease;
}

.nav-icon {
  width: 20px;
  text-align: center;
  color: var(--gold-dark);
}

.content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.25rem 2.5rem;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

#viewRoot {
  transform-origin: top center;
}

#viewRoot.section-transition {
  animation: section-switch 0.26s ease;
}

.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 0.25rem 0 0.5rem;
  animation: fade-up 0.35s ease;
}

@keyframes nav-select {
  0% {
    transform: translateX(0) scale(0.985);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes section-switch {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-strip h3 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.hero-strip .eyebrow {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 1rem;
  margin: 0;
}

.hero-actions,
.inline-actions,
.chips,
.filters,
.tab-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-actions {
  align-items: center;
}

.stats-grid,
.cards-grid,
.split-grid,
.content-grid,
.property-grid,
.project-browser-grid,
.project-modal-grid,
.settings-grid,
.form-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.75rem;
}

.cards-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.75rem;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.overview-hero {
  margin-bottom: 1.6rem;
}

.overview-hero h2 {
  margin: 0 0 0.45rem;
  font-size: 2.15rem;
  line-height: 1.08;
  font-weight: 800;
  color: #0a0a0a;
  letter-spacing: -0.04em;
}

.overview-hero p {
  margin: 0;
  font-size: 1rem;
  color: #55627a;
}

.overview-metric-grid,
.overview-status-grid {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.overview-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.overview-metric-card,
.overview-status-card,
.overview-feed-card {
  background: #ffffff;
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.overview-metric-card {
  padding: 1.6rem 1.55rem;
  position: relative;
  overflow: hidden;
}

.overview-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 26px 0 0 26px;
  background: #d4af37;
}

.overview-metric-card.green::before {
  background: #22c55e;
}

.overview-metric-card.blue::before {
  background: #3b82f6;
}

.overview-metric-card.purple::before {
  background: #a855f7;
}

.overview-metric-head,
.overview-status-head,
.overview-feed-head,
.overview-entry-head,
.overview-feed-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.overview-card-label {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  color: #475569;
}

.overview-card-value {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #0a0a0a;
}

.overview-card-meta {
  margin: 1rem 0 0;
  font-size: 0.98rem;
  color: #60708a;
}

.overview-metric-card.green .overview-card-meta {
  color: #16a34a;
}

.overview-metric-card.blue .overview-card-meta {
  color: #2563eb;
}

.overview-metric-card.purple .overview-card-meta {
  color: #9333ea;
}

.overview-metric-icon,
.overview-status-icon,
.overview-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.overview-metric-icon svg,
.overview-status-icon svg,
.overview-alert-icon svg,
.overview-payment-meta svg {
  width: 24px;
  height: 24px;
}

.overview-metric-card.amber .overview-metric-icon {
  color: #d08a00;
}

.overview-metric-card.green .overview-metric-icon {
  color: #10b981;
}

.overview-metric-card.blue .overview-metric-icon {
  color: #3b82f6;
}

.overview-metric-card.purple .overview-metric-icon {
  color: #a855f7;
}

.overview-status-card {
  padding: 1.05rem 1rem 0.95rem;
}

.overview-status-head {
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.7rem;
}

.overview-status-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef2ff;
}

.overview-status-card .overview-card-label {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.overview-status-card .overview-card-value {
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.overview-status-card.success .overview-status-icon {
  color: #16a34a;
  background: #dcfce7;
}

.overview-status-card.warning .overview-status-icon {
  color: #d99a00;
  background: #fef3c7;
}

.overview-status-card.neutral .overview-status-icon {
  color: #4b5563;
  background: #f3f4f6;
}

.overview-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.overview-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.overview-progress-fill.success {
  background: #16c443;
}

.overview-progress-fill.warning {
  background: #f5b000;
}

.overview-progress-fill.neutral {
  background: #6b7280;
}

.overview-status-card .overview-card-meta {
  margin-top: 0.65rem;
  font-size: 0.88rem;
}

.overview-feed-card {
  padding: 1.65rem;
  margin-bottom: 1.5rem;
}

.overview-feed-card.danger {
  padding-top: 1.35rem;
}

.overview-feed-head {
  margin-bottom: 1.25rem;
}

.overview-feed-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0a0a0a;
}

.overview-feed-title {
  align-items: center;
}

.overview-alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ef4444;
  background: #fee2e2;
  justify-content: center;
}

.overview-feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
}

.overview-feed-badge.new {
  background: #fde2e2;
  color: #b91c1c;
}

.overview-feed-badge.danger {
  background: #fde2e2;
  color: #b91c1c;
}

.overview-feed-list {
  display: grid;
  gap: 1rem;
}

.overview-entry-card {
  border-radius: 18px;
  border: 1px solid #f0c24b;
  background: linear-gradient(180deg, #fff8cc 0%, #fffbe3 100%);
  padding: 1.25rem 1.35rem;
}

.overview-entry-card.danger {
  border-color: #fca5a5;
  background: #fff4f4;
}

.overview-entry-head {
  margin-bottom: 0.75rem;
}

.overview-entry-head strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 1rem;
  color: #0a0a0a;
}

.overview-entry-head p,
.overview-entry-copy,
.overview-entry-date,
.overview-payment-meta {
  margin: 0;
  color: #64748b;
}

.overview-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.overview-entry-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.overview-entry-pill.new {
  background: #f5b000;
  color: #0a0a0a;
}

.overview-entry-pill.danger {
  background: #ff0b0b;
  color: #ffffff;
}

.overview-entry-date {
  font-size: 0.92rem;
}

.overview-entry-copy {
  font-size: 0.98rem;
  line-height: 1.6;
}

.overview-payment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.98rem;
}

.overview-payment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.overview-entry-card.danger .overview-payment-meta {
  color: #dc2626;
}

.content-grid {
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: start;
}

.property-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-browser-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.project-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.project-filter-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface-alt);
  text-align: left;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.project-filter-card strong {
  display: block;
  margin-bottom: 0.4rem;
}

.project-filter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.project-filter-card.active {
  background: var(--gold-soft);
  border-color: rgba(240, 177, 0, 0.3);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-change-panel {
  margin-bottom: 1rem;
}

.admin-management-panel {
  margin-bottom: 1rem;
}

.admin-create-icon {
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 0.5rem;
}

.settings-change-trigger {
  position: relative;
  min-width: 44px;
  padding: 0.5rem 0.65rem;
}

.settings-change-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.settings-change-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.settings-change-feed {
  display: grid;
  gap: 0.65rem;
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 0.8rem;
  padding-right: 0.25rem;
}

.settings-change-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #fff;
}

.settings-change-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid {
  margin-bottom: 1rem;
}

.stat-card,
.panel,
.list-card,
.table-card,
.timeline-card,
.inquiry-detail,
.settings-grid > article {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  animation: fade-up 0.45s ease;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: var(--shadow-sm);
}

.accent-left {
  border-left: 4px solid var(--gold);
}

.green-left {
  border-left: 4px solid #22c55e;
}

.blue-left {
  border-left: 4px solid #3b82f6;
}

.red-left {
  border-left: 4px solid #ef4444;
}

.panel h4,
.list-card h4,
.table-card h4,
.timeline-card h4,
.settings-grid h4,
.inquiry-detail h4,
.stat-card h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

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

.small {
  font-size: 0.9rem;
}

.metric {
  margin: 0.35rem 0;
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.list-item,
.timeline-item,
.message-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.list-item + .list-item,
.timeline-item + .timeline-item,
.message-card + .message-card {
  margin-top: 0.75rem;
}

.message-stack {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.message-card {
  cursor: pointer;
}

.list-item:hover,
.timeline-item:hover,
.message-card:hover,
.property-card:hover,
.panel:hover,
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.message-card.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.timeline-item.overdue-alert {
  background: var(--danger-bg);
  border-color: rgba(153, 27, 27, 0.22);
  animation: pulse-red 1.8s ease infinite;
}

.timeline-item.overdue-alert strong,
.timeline-item.overdue-alert .small {
  color: var(--danger-text);
}

.timeline-item.overdue-alert .muted {
  color: #7f1d1d;
}

.overview-list-card,
.overview-overdue-card {
  background: #ffffff;
}

.overview-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.overview-list-head h4 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.overview-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.overview-count-pill.new {
  background: #fde8ef;
  color: #9f1239;
}

.overview-count-pill.danger {
  background: #fde8e8;
  color: #9f1239;
}

.overview-inquiry-item.is-new {
  background: #f2efbe;
  border-color: #e6d97b;
}

.overview-inquiry-item.is-new .small,
.overview-inquiry-item.is-new strong,
.overview-inquiry-item.is-new .muted {
  color: #2f2a1d;
}

.overview-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.overview-item-date {
  font-size: 0.83rem;
  color: #8d90a0;
}

.overview-inquiry-item .status.new {
  background: #eeb500;
  color: #111827;
}

.overview-overdue-card .timeline-item.overdue-alert {
  background: #f9ebef;
  border-color: #f0c3cf;
  animation: none;
}

.overview-overdue-card .timeline-item.overdue-alert .muted {
  color: #7a2c3d;
}

:root[data-theme="dark"] .overview-list-card,
:root[data-theme="dark"] .overview-overdue-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

.detail-head,
.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar {
  align-items: center;
  margin-bottom: 1.25rem;
}

.search-field {
  flex: 1;
  min-width: 0;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-form input {
  flex: 1;
}

.search-button {
  min-width: 48px;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.payment-filters {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(240, 177, 0, 0.05), rgba(255, 255, 255, 0));
}

.payment-filter-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.payment-filter-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 0.85rem;
}

.payment-filter-field {
  display: grid;
  gap: 0.4rem;
}

.payment-filter-field span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.payment-filter-field select {
  background: var(--surface);
}

.chip,
.filter-button,
.tab-button {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.chip.active,
.filter-button.active,
.tab-button.active {
  background: var(--gold);
  color: #000;
  box-shadow: 0 10px 22px rgba(240, 177, 0, 0.18);
}

/* ── Inquiry Controls: segmented tabs + filter pills ── */
.inquiry-controls {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.inquiry-view-tabs {
  display: flex;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.inq-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.inq-tab:not(:last-child) {
  border-right: 1px solid var(--line);
}

.inq-tab:hover:not(.active) {
  background: var(--surface-alt);
  color: var(--text);
}

.inq-tab.active {
  background: var(--gold);
  color: #000;
}

.inq-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0,0,0,0.12);
  color: inherit;
  line-height: 1;
}

.inq-tab.active .inq-tab-count {
  background: rgba(0,0,0,0.18);
}

.inquiry-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  flex-wrap: wrap;
}

.inquiry-filter-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.inquiry-filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.inq-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.4;
}

.inq-pill:hover:not(.active) {
  background: var(--surface-soft);
  color: var(--text);
  border-color: rgba(0,0,0,0.15);
}

.inq-pill.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(240, 177, 0, 0.28);
}

.inq-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0,0,0,0.1);
  color: inherit;
  line-height: 1;
}

.inq-pill.active .inq-pill-count {
  background: rgba(0,0,0,0.18);
}

:root[data-theme="dark"] .inq-tab.active {
  color: #000;
}

:root[data-theme="dark"] .inq-pill.active {
  color: #000;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table-card,
.list-card,
.timeline-card,
.inquiry-detail {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  padding: 1rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.85rem;
  color: #364153;
  font-weight: 600;
  background: var(--surface-alt);
  letter-spacing: 0.01em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-row:hover td {
  background: #fffdf5;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status.new,
.status.pending,
.status.available,
.status.active {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status.paid,
.status.responded {
  background: var(--success-bg);
  color: var(--success-text);
}

.status.read,
.status.reserved {
  background: var(--info-bg);
  color: var(--info-text);
}

.status.overdue,
.status.inactive,
.status.trash {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status.sold,
.status.archived {
  background: var(--gray-bg);
  color: var(--gray-text);
}

.property-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
  animation: fade-up 0.45s ease;
}

.project-browser-card,
.project-modal-property-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.project-browser-card {
  cursor: pointer;
}

.project-browser-card:hover,
.project-modal-property-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-browser-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(240, 177, 0, 0.14),
    var(--shadow-md);
}

.project-browser-media,
.project-modal-property-media {
  position: relative;
}

.project-browser-media img,
.project-modal-property-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.project-browser-media .status,
.project-modal-property-media .status {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.project-browser-copy,
.project-modal-property-copy {
  padding: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.project-browser-copy h4,
.project-modal-property-copy h4 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.property-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.property-copy {
  padding: 1.25rem 1.25rem 1.35rem;
  display: grid;
  gap: 0.8rem;
}

.property-copy h4 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.property-copy p {
  margin: 0;
}

.banner-preview {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-alt);
}

.banner-preview img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.gallery-preview-block {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-alt);
}

.gallery-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

.gallery-preview-item {
  margin: 0;
}

.gallery-preview-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.gallery-preview-item figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.property-gallery-manager {
  min-height: 170px;
}

.property-gallery-empty {
  min-height: 138px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1.25rem;
}

.property-gallery-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.property-gallery-editor-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.property-gallery-editor-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.property-gallery-editor-caption {
  padding: 0.85rem;
  display: grid;
  gap: 0.8rem;
}

.property-gallery-editor-caption strong {
  display: block;
  margin-bottom: 0.2rem;
}

.property-gallery-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.property-gallery-editor-actions .small-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 250, 251, 0.9));
}

.action-link {
  background: transparent;
  color: var(--gold-dark);
  padding: 0.15rem 0;
  font-weight: 600;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.action-link:hover {
  color: var(--gold);
  transform: translateX(2px);
}

.stacked-form {
  display: grid;
  gap: 1rem;
}

.stacked-form .primary-button,
.stacked-form .secondary-button,
.stacked-form .ghost-button,
.form-grid .primary-button,
.form-grid .secondary-button,
.form-grid .ghost-button {
  margin-top: 0.25rem;
}

.password-field-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-row {
  position: relative;
  align-items: center;
}

.password-row input {
  width: 100%;
  padding-right: 45px; 
}

.password-row {
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid #ccc; /* Match your theme's border */
  border-radius: 4px;
}

.password-row input {
  flex: 1;
  border: none; /* Remove internal border so row looks like one unit */
  padding: 8px;
  outline: none;
}

.ghost-button.small-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: #666; /* Adjust color to fit your design */
}

.ghost-button.small-button:hover {
  color: #000;
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.password-toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--soft);
  z-index: 2;
}

.password-toggle-btn:hover {
  color: var(--gold);
}

.eye-icon-svg.hidden {
  display: none;
}

.small-button {
  padding: 0.75rem 0.75rem;
  white-space: nowrap;
  font-size: 25px;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.modal-root.active {
  pointer-events: auto;
}

.layered-modal-root {
  z-index: 80;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  animation: fade-up 0.18s ease;
}

.modal {
  position: relative;
  z-index: 1;
  margin: 2.5rem auto;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-lg);
  animation: modal-pop 0.24s ease;
}

.modal.large {
  width: min(960px, calc(100vw - 2rem));
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.confirm-modal {
  width: min(560px, calc(100vw - 2rem));
}

.confirm-modal-copy {
  display: grid;
  gap: 1rem;
}

.confirm-modal-copy p {
  margin: 0;
}

.confirm-modal-note {
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--warning-bg), rgba(240, 177, 0, 0.08));
  border: 1px solid rgba(240, 177, 0, 0.22);
}

.confirm-modal-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--warning-text);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.confirm-modal-note p {
  color: var(--warning-text);
}

.info-modal {
  width: min(540px, calc(100vw - 2rem));
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 249, 0.98));
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.info-modal.warning {
  border-color: rgba(240, 177, 0, 0.25);
}

.info-modal-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--warning-bg), rgba(240, 177, 0, 0.22));
  color: var(--warning-text);
  font-size: 1.45rem;
  font-weight: 800;
}

.info-modal-header {
  margin-bottom: 0.75rem;
}

.info-modal-copy {
  display: grid;
  gap: 0.9rem;
}

.info-modal-copy p {
  margin: 0;
}

.info-modal-note {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.info-modal-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--warning-text);
  font-size: 0.92rem;
}

.info-modal-note p {
  color: var(--muted);
}

.client-property-selector-block {
  display: grid;
  gap: 0.8rem;
}

.client-property-selector {
  display: grid;
  gap: 1rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.client-property-group {
  display: grid;
  gap: 0.65rem;
}

.client-property-group h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-strong);
}

.client-property-group-dropdown {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.client-property-group-trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-strong);
}

.client-property-group-trigger::-webkit-details-marker {
  display: none;
}

.client-property-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.client-property-group-title::before {
  display: none;
}

.client-property-group-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.client-property-grid {
  display: grid;
  gap: 0.7rem;
  padding: 0 0.85rem 0.85rem;
}

.client-property-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.client-property-option:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.client-property-option.selected {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.12);
}

.client-property-option input[type="checkbox"] {
  margin-top: 0.15rem;
}

.client-property-option-copy {
  display: grid;
  gap: 0.18rem;
}

.client-property-option-copy strong {
  color: var(--text-strong);
}

.client-property-option-copy small {
  color: var(--muted);
}

/* Improved client property selection styles */
.client-property-selection-container {
  display: grid;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.client-property-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.client-property-groups-wrapper {
  display: grid;
  gap: 0.75rem;
}

.client-property-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.client-property-group-chevron {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform var(--transition-fast);
}

.client-property-group-dropdown[open] .client-property-group-chevron {
  transform: rotate(180deg);
}

.client-property-list {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.85rem 0.85rem;
  max-height: 300px;
  overflow-y: auto;
}

.client-property-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.client-property-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  background: var(--surface-2);
}

.client-property-card.selected {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.02));
}

.client-property-card.sold {
  opacity: 0.6;
}

.client-property-card.sold .client-property-status-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.client-property-checkbox-wrapper {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.client-property-checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.client-property-checkmark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  background: var(--surface);
  transition: all var(--transition-fast);
}

.client-property-checkbox-wrapper input[type="checkbox"]:checked + .client-property-checkmark {
  background: linear-gradient(135deg, #d4af37, #b8941f);
  border-color: #d4af37;
  color: white;
}

.client-property-card.selected .client-property-checkmark {
  background: linear-gradient(135deg, #d4af37, #b8941f);
  border-color: #d4af37;
  color: white;
}

.client-property-info {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.client-property-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-strong);
  line-height: 1.3;
}

.client-property-location {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.client-property-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.client-property-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #d4af37;
}

.client-property-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.client-property-status-badge.reserved {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.client-property-status-badge.archived {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.success-popup-root {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.success-popup-root.active {
  opacity: 1;
  transform: translateY(0);
}

.success-popup-card {
  min-width: min(360px, calc(100vw - 2rem));
  max-width: min(420px, calc(100vw - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.success-popup-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.28));
  color: #15803d;
  font-size: 1.05rem;
  font-weight: 800;
}

.success-popup-copy {
  display: grid;
  gap: 0.2rem;
}

.success-popup-copy strong {
  color: var(--text-strong);
  font-size: 0.98rem;
  line-height: 1.3;
}

.success-popup-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.close-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--line);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.close-button:hover {
  background: #fff8e3;
  color: var(--gold-dark);
  transform: rotate(90deg);
}

:root[data-theme="dark"] .auth-form span,
:root[data-theme="dark"] th {
  color: #d2deef;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .list-item,
:root[data-theme="dark"] .timeline-item,
:root[data-theme="dark"] .message-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .close-button {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--line);
}

/* Fix dark mode text visibility for inquiry cards */
:root[data-theme="dark"] .message-card h4,
:root[data-theme="dark"] .message-card p,
:root[data-theme="dark"] .message-card .muted {
  color: var(--text) !important;
}

:root[data-theme="dark"] .message-card .inquiry-meta {
  color: var(--soft) !important;
}

/* More specific rules for inquiry text elements */
:root[data-theme="dark"] .message-card > div > h4,
:root[data-theme="dark"] .message-card > div > p,
:root[data-theme="dark"] .message-card > div > .muted {
  color: var(--text) !important;
}

:root[data-theme="dark"] .message-card > div > .inquiry-meta {
  color: var(--soft) !important;
}

/* Force text color for all text inside message cards in dark mode */
:root[data-theme="dark"] .message-card,
:root[data-theme="dark"] .message-card * {
  color: var(--text) !important;
}

/* Override specific muted text in dark mode */
:root[data-theme="dark"] .message-card .muted,
:root[data-theme="dark"] .message-card .inquiry-meta {
  color: var(--soft) !important;
}

/* Fix dark mode text visibility for admin update cards */
:root[data-theme="dark"] .settings-change-item,
:root[data-theme="dark"] .settings-change-item * {
  color: var(--text) !important;
}

:root[data-theme="dark"] .settings-change-item strong,
:root[data-theme="dark"] .settings-change-item .settings-change-item-head strong {
  color: var(--text) !important;
}

:root[data-theme="dark"] .settings-change-item p,
:root[data-theme="dark"] .settings-change-item .small,
:root[data-theme="dark"] .settings-change-item .muted {
  color: var(--text) !important;
}

:root[data-theme="dark"] .settings-change-item .muted.small {
  color: var(--soft) !important;
}

/* Target specific elements in inquiry cards */
:root[data-theme="dark"] .message-card strong,
:root[data-theme="dark"] .message-card .detail-head strong {
  color: var(--text) !important;
}

:root[data-theme="dark"] .message-card .detail-head {
  color: var(--text) !important;
}

:root[data-theme="dark"] .message-card p,
:root[data-theme="dark"] .message-card .muted.small {
  color: var(--text) !important;
}

:root[data-theme="dark"] .message-card .status {
  color: var(--text) !important;
}

:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
  background: rgba(244, 197, 66, 0.08);
}

:root[data-theme="dark"] .secondary-button {
  background: #1d2b42;
  color: #f8fbff;
}

:root[data-theme="dark"] .secondary-button:hover {
  background: #263754;
}

:root[data-theme="dark"] .sidebar {
  background-image: linear-gradient(180deg, rgba(244, 197, 66, 0.08), rgba(8, 17, 31, 0) 24%);
}

:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .project-filter-card.active,
:root[data-theme="dark"] .message-card.active,
:root[data-theme="dark"] .chip.active,
:root[data-theme="dark"] .filter-button.active,
:root[data-theme="dark"] .tab-button.active {
  color: #fff7db;
}

:root[data-theme="dark"] .table-row:hover td {
  background: rgba(244, 197, 66, 0.08);
}

:root[data-theme="dark"] .empty-state {
  background: linear-gradient(180deg, rgba(22, 35, 56, 0.96), rgba(15, 27, 45, 0.96));
}

:root[data-theme="dark"] .topbar-theme-toggle {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .close-button:hover {
  background: rgba(244, 197, 66, 0.14);
}

:root[data-theme="dark"] .payment-filters {
  background: linear-gradient(180deg, rgba(244, 197, 66, 0.08), rgba(15, 27, 45, 0.35));
}

.form-grid,
.stacked-form,
.auth-form {
  gap: 0.25rem 1rem;
}

.form-grid label:last-of-type,
.stacked-form label:last-of-type,
.auth-form label:last-of-type {
  margin-bottom: 0.75rem;
}

.inline-actions {
  align-items: center;
}

.helper-text,
.muted.small {
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .stats-grid,
  .cards-grid.three,
  .overview-metric-grid,
  .overview-status-grid,
  .property-grid,
  .project-browser-grid,
  .project-modal-grid,
  .content-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 1.5rem 1.5rem 2rem;
  }

  .payment-filter-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content,
  .topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .topbar-logo {
    width: 36px;
    height: 36px;
  }

  .topbar h2 {
    font-size: 1.05rem;
  }

  .hero-strip,
  .toolbar,
  .detail-head,
  .overview-feed-head,
  .overview-entry-head {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .cards-grid.three,
  .split-grid,
  .overview-metric-grid,
  .overview-status-grid,
  .content-grid,
  .property-grid,
  .project-browser-grid,
  .project-modal-grid,
  .settings-grid,
  .form-grid.two,
  .project-filter-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 1rem auto;
    width: min(100vw - 1rem, 960px);
    max-height: calc(100vh - 2rem);
    padding: 1.25rem;
  }

  .payment-filter-selects {
    grid-template-columns: 1fr;
  }

  .overview-entry-meta,
  .overview-payment-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar h2 {
    display: none;
  }

  .topbar-logo {
    width: 34px;
    height: 34px;
  }
}