/* ==========================================================================
   Novadell HOA Community Portal — "Warm Earthy & Natural" Theme
   500 Novadell Way, Hopkinsville, KY 42240
   ========================================================================== */

:root {
  /* Warm Earthy & Natural Palette */
  --bg-sand: #F6F3EC;
  --bg-cream: #FDFBF7;
  --bg-stone: #EBE5D8;
  --bg-card: #FFFFFF;

  --sage-900: #1E3124;
  --sage-800: #2A4432;
  --sage-700: #3A5A44;
  --sage-600: #4B7256;
  --sage-500: #628B6E;
  --sage-200: #D5E2D8;
  --sage-100: #EAF1EC;

  --wood-700: #7C5836;
  --wood-600: #9C7048;
  --wood-500: #B8895C;
  --wood-200: #EADBC9;
  --wood-100: #F5EFE6;

  --text-main: #232722;
  --text-muted: #5A6258;
  --text-light: #7E877C;

  --border-subtle: #DFD8C8;
  --border-strong: #C7BFA9;

  --amber-bg: #FEF6E6;
  --amber-border: #F2C97D;
  --amber-text: #8A5A10;

  --danger-bg: #FDF0EE;
  --danger-border: #E6A89E;
  --danger-text: #9E2F20;

  --info-bg: #EEF4F8;
  --info-border: #B3CEE2;
  --info-text: #285473;

  --shadow-sm: 0 2px 6px rgba(30, 49, 36, 0.05);
  --shadow-md: 0 8px 24px rgba(30, 49, 36, 0.08);
  --shadow-lg: 0 18px 40px rgba(30, 49, 36, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-sand);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .serif {
  font-family: var(--font-serif);
  color: var(--sage-900);
  line-height: 1.25;
  font-weight: 600;
}

a {
  color: var(--sage-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--wood-700);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* ==========================================================================
   Demo Mode Switcher Bar (Top Pitch Bar for the Board Presentation)
   ========================================================================== */
.demo-pitch-bar {
  background: var(--sage-900);
  color: #EAE6DF;
  font-size: 0.82rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.demo-pitch-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.demo-pitch-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.demo-pill {
  background: var(--wood-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.demo-pitch-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.demo-switch-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #F6F3EC;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-switch-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.demo-switch-btn.active {
  background: var(--wood-500);
  color: #fff;
  border-color: var(--wood-500);
  font-weight: 600;
}

/* ==========================================================================
   Site Alert Banner
   ========================================================================== */
.community-alert-banner {
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-border);
  color: var(--amber-text);
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
}

.community-alert-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ==========================================================================
   Main Header & Navigation
   ========================================================================== */
.site-header {
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.brand-crest {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--sage-800), var(--sage-700));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(42, 68, 50, 0.22);
  border: 1.5px solid var(--wood-500);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sage-900);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wood-700);
  font-weight: 600;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.nav-btn:hover {
  color: var(--sage-900);
  background: var(--bg-stone);
}

.nav-btn.active {
  color: var(--sage-900);
  background: var(--sage-100);
  font-weight: 600;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
  margin: 0 0.35rem;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--sage-800);
  color: #fff;
  box-shadow: 0 2px 8px rgba(42, 68, 50, 0.2);
}

.btn-primary:hover {
  background: var(--sage-900);
  color: #fff;
  transform: translateY(-1px);
}

.btn-wood {
  background: var(--wood-600);
  color: #fff;
}

.btn-wood:hover {
  background: var(--wood-700);
  color: #fff;
}

.btn-outline {
  background: var(--bg-cream);
  color: var(--sage-800);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-stone);
  border-color: var(--sage-700);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.83rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-sage {
  background: var(--sage-100);
  color: var(--sage-800);
  border: 1px solid var(--sage-200);
}

.badge-wood {
  background: var(--wood-100);
  color: var(--wood-700);
  border: 1px solid var(--wood-200);
}

.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.main-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(30, 49, 36, 0.92), rgba(58, 90, 68, 0.85)),
              radial-gradient(circle at 80% 20%, rgba(184, 137, 92, 0.35), transparent 60%);
  color: var(--bg-cream);
  border-radius: var(--radius-xl);
  padding: 3.25rem 2.75rem;
  margin-bottom: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(184, 137, 92, 0.35);
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 137, 92, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--wood-200);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero-banner h1 {
  color: #FFFFFF;
  font-size: clamp(2rem, 4vw, 2.9rem);
  max-width: 720px;
  margin-bottom: 0.9rem;
}

.hero-banner p {
  color: rgba(246, 243, 236, 0.9);
  font-size: 1.08rem;
  max-width: 650px;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Grids & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.35rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--wood-500);
}

.card-cream {
  background: var(--bg-cream);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.65rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Resident Portal Sub-Navigation Layout
   ========================================================================== */
.portal-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.portal-sidebar {
  background: var(--bg-cream);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: sticky;
  top: 86px;
}

.portal-mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  .portal-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portal-sidebar {
    position: static;
    padding: 0.75rem 1rem;
  }

  .portal-user-card,
  .portal-menu {
    display: none !important;
  }

  .portal-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}

.portal-user-card {
  padding: 0.75rem 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.85rem;
}

.portal-user-name {
  font-weight: 700;
  color: var(--sage-900);
  font-size: 1rem;
}

.portal-user-lot {
  font-size: 0.83rem;
  color: var(--wood-700);
  font-weight: 600;
  margin-top: 2px;
}

.portal-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.portal-tab-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-tab-btn:hover {
  background: var(--bg-stone);
  color: var(--sage-900);
}

.portal-tab-btn.active {
  background: var(--sage-800);
  color: #fff;
  font-weight: 600;
}

.portal-tab-btn-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   Forms, Inputs & Tables
   ========================================================================== */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sage-900);
  margin-bottom: 0.38rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--sage-700);
  box-shadow: 0 0 0 3px rgba(58, 90, 68, 0.14);
}

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

.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* Directory & Document Rows */
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-cream);
  margin-bottom: 0.75rem;
}

.doc-item:hover {
  border-color: var(--wood-500);
  background: #fff;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
}

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

.data-table th {
  background: var(--bg-stone);
  color: var(--sage-900);
  text-align: left;
  padding: 0.8rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-cream);
}

/* Map Frame */
.map-frame-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-stone);
  height: 360px;
  position: relative;
}

.map-frame-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 34, 26, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 200;
}

.modal-card {
  background: var(--bg-cream);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.65rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--sage-900);
  color: #fff;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--wood-500);
  font-size: 0.9rem;
  max-width: 360px;
}

/* Footer */
.site-footer {
  background: var(--sage-900);
  color: rgba(246, 243, 236, 0.78);
  padding: 2.75rem 1.25rem;
  margin-top: auto;
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.hidden {
  display: none !important;
}
