/* ============================================================
   Morro Bay House — Main Stylesheet
   Ocean & coastal tones: deep navy, Pacific blue, seafoam, sand
   ============================================================ */

:root {
  --navy:          #0d2b45;
  --navy-mid:      #1a4a6e;
  --navy-light:    #2a6a9a;
  --ocean:         #1e7eb0;
  --ocean-light:   #3aa8d8;
  --seafoam:       #4dc9b0;
  --seafoam-light: #8ee8d4;
  --sand:          #f0ede6;
  --sand-dark:     #ddd8cc;
  --cream:         #f8f6f2;
  --driftwood:     #7a6a55;
  --driftwood-dark:#4a3e30;
  --white:         #ffffff;
  --success:       #1e8a4a;
  --danger:        #b02020;
  --warning:       #b87a10;
  --radius:        8px;
  --shadow:        0 2px 12px rgba(13,43,69,0.10);
  --shadow-deep:   0 6px 30px rgba(13,43,69,0.18);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--navy);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--ocean); text-decoration: none; }
a:hover { color: var(--navy-mid); }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.28);
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q20 5 40 20 Q60 35 80 20' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='2'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
  position: relative;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-logo:hover { color: var(--seafoam-light); }
.logo-icon { font-size: 1.5rem; }
.site-logo-wrap { display: flex; flex-direction: column; gap: 2px; }
.welcome-text {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  padding-left: 36px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}
.welcome-row { display: flex; align-items: center; gap: 8px; padding-left: 42px; }
.welcome-row .welcome-text { padding-left: 0; }
.welcome-edit {
  font-size: 0.65rem;
  color: var(--seafoam-light);
  white-space: nowrap;
  border: 1px solid rgba(100,200,220,0.35);
  border-radius: 4px;
  padding: 1px 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.6;
}
.welcome-edit:hover { background: rgba(100,200,220,0.15); color: #fff; }

/* Calendar sharing typeahead */
.share-typeahead { position: relative; }
.share-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.share-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ocean); color: #fff;
  padding: 5px 8px 5px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
}
.share-chip small { font-weight: 400; opacity: 0.8; font-size: 0.78rem; }
.share-chip-remove {
  background: none; border: none; color: rgba(255,255,255,0.75);
  cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 0 2px; margin-left: 2px;
  transition: color 0.1s;
}
.share-chip-remove:hover { color: #fff; }
.share-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--sand-dark); border-radius: var(--radius);
  font-size: 0.95rem; background: #fff; color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.share-input:focus {
  outline: none; border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(30,100,180,0.1);
}
.share-dropdown {
  position: fixed;
  background: #fff; border: 1px solid var(--sand-dark);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 500; max-height: 280px; overflow-y: auto;
}
.share-dropdown-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; cursor: pointer; transition: background 0.1s;
  border-bottom: 1px solid var(--sand);
}
.share-dropdown-item:last-child { border-bottom: none; }
.share-dropdown-item:hover { background: var(--sand); }
.share-item-name { font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.share-item-user { color: var(--driftwood); font-size: 0.82rem; }
.sidebar-toggle {
  display: none;
  position: fixed;
  right: 18px;
  top: 78px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.sidebar-toggle:hover { background: var(--ocean); }
.section-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 299;
}
.section-overlay.open { display: block; }
.section-sidebar {
  position: fixed;
  right: -280px;
  top: 0;
  width: 260px;
  height: 100vh;
  background: var(--navy);
  z-index: 300;
  transition: right 0.25s ease;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.section-sidebar.open { right: 0; }
.section-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  background: var(--navy);
}
.sidebar-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.sidebar-close:hover { color: #fff; }
.section-sidebar-list { list-style: none; padding: 12px 0; margin: 0; }
.section-sidebar-list li { margin: 0; }
.sidebar-link {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-left-color: var(--seafoam);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.main-nav a {
  color: rgba(255,255,255,0.82);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.main-nav .nav-admin { color: var(--seafoam-light); }
.btn-nav {
  border: 1px solid rgba(255,255,255,0.3) !important;
  padding: 6px 14px !important;
}
.btn-nav.btn-primary {
  background: var(--ocean) !important;
  border-color: var(--ocean) !important;
  color: #fff !important;
}
.btn-nav.btn-primary:hover { background: var(--navy-mid) !important; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; margin-left: auto; }
.mobile-auth-btns { display: none; align-items: center; gap: 6px; margin-left: auto; }
.mobile-auth-btn { color: #fff; font-size: 0.85rem; font-weight: 700; padding: 7px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.35); white-space: nowrap; }
.mobile-auth-btn--primary { background: var(--ocean); border-color: var(--ocean); }

/* ── Main content ── */
.site-main { flex: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }

/* ── Hero (homepage) ── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 40%, var(--ocean) 75%, var(--seafoam) 100%);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='120' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 Q30 15 60 40 Q90 65 120 40' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 50 Q30 25 60 50 Q90 75 120 50' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1.5'/%3E%3C/svg%3E") repeat;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60 L0 30 Q150 0 300 30 Q450 60 600 30 Q750 0 900 30 Q1050 60 1200 30 L1200 60 Z' fill='rgba(248,246,242,0.15)'/%3E%3C/svg%3E") no-repeat bottom;
  pointer-events: none;
}
.hero-sunflower-left { display: none; }
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: #fff; margin-bottom: 16px; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.hero p  { font-size: 1.15rem; color: rgba(255,255,255,0.88); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 2px solid transparent;
  letter-spacing: 0.03em;
}
.btn-primary   { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.btn-primary:hover { background: var(--navy-mid); border-color: var(--navy-mid); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline   { background: transparent; color: var(--ocean); border-color: var(--ocean); }
.btn-outline:hover { background: var(--ocean); color: #fff; }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger    { background: var(--danger);  color: #fff; border-color: var(--danger); }
.btn-sm        { padding: 6px 14px; font-size: 0.82rem; }
.btn-full      { width: 100%; text-align: center; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header { background: var(--sand); padding: 20px 28px; border-bottom: 1px solid var(--sand-dark); }
.card-header h2 { font-size: 1.3rem; color: var(--navy); }
.card-body { padding: 28px; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 700; font-size: 0.88rem; color: var(--navy-mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--sand-dark);
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(30,126,176,0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.8rem; color: var(--driftwood); margin-top: 4px; }
.form-error { font-size: 0.85rem; color: var(--danger); margin-top: 4px; }

/* ── Auth pages ── */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(160deg, var(--sand) 0%, var(--cream) 100%); }
.auth-card { background: var(--white); border-radius: 12px; box-shadow: var(--shadow-deep); width: 100%; max-width: 440px; overflow: hidden; }
.auth-card-header { background: linear-gradient(135deg, var(--navy-mid), var(--ocean)); padding: 32px 36px 28px; text-align: center; }
.auth-card-header h1 { color: #fff; font-size: 1.7rem; margin-bottom: 4px; }
.auth-card-header p  { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.auth-card-body { padding: 32px 36px; }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.88rem; }

/* ── Flash messages ── */
.flash {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin: 20px auto;
  max-width: 1100px;
  font-weight: 700;
  font-size: 0.9rem;
}
.flash-success { background: #e0f5ea; color: #0e5c2a; border: 1px solid #a0d8b8; }
.flash-error   { background: #fdecea; color: #8b1a1a; border: 1px solid #f0b8b8; }
.flash-info    { background: #e0f0fa; color: #0a3a6a; border: 1px solid #90c8e8; }
.flash-warning { background: #fdf5e0; color: #7a4f00; border: 1px solid #e8d090; }

/* ── Calendar ── */
.calendar-wrap { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); overflow: visible; }
.calendar-scroll { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; border-radius: 0 0 12px 12px; touch-action: pan-x; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%); color: #fff; position: relative; overflow: hidden; }
.calendar-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='120' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 Q30 15 60 40 Q90 65 120 40' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='2'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.calendar-nav h2 { font-size: 1.4rem; color: #fff; margin: 0; position: relative; z-index: 1; }
.cal-day-select-start, .cal-day-select-end { background: var(--ocean) !important; color: #fff !important; border-radius: 6px; }
.cal-day-select-start .day-num, .cal-day-select-end .day-num { color: #fff !important; font-weight: 800; }
.cal-day-select-range { background: rgba(26,115,232,0.15) !important; border-radius: 0; }
.cal-day-select-start { border-radius: 6px 0 0 6px !important; }
.cal-day-select-end   { border-radius: 0 6px 6px 0 !important; }
.cal-day-preview-end  { background: rgba(26,115,232,0.45) !important; border-radius: 0 6px 6px 0 !important; }
.cal-day-preview-range { background: rgba(26,115,232,0.1) !important; border-radius: 0; }
.cal-day[data-date] { cursor: pointer !important; transition: background 0.1s; }
.cal-day[data-date]:hover:not(.cal-day-select-start):not(.cal-day-select-end):not(.cal-day-select-range):not(.cal-day-preview-end):not(.cal-day-preview-range) { background: rgba(26,115,232,0.08); border-radius: 6px; }
.cal-nav-btn { background: none; border: none; color: #fff; cursor: pointer; font-size: 3.5rem; line-height: 1; display: block; text-align: center; text-decoration: none; flex-shrink: 0; padding: 0; margin: 0; opacity: 0.85; transition: opacity 0.15s; position: relative; z-index: 1; }
.cal-nav-btn:hover { opacity: 1; color: #fff; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(52px, 1fr)); min-width: 364px; }
.cal-day-name { background: var(--sand); text-align: center; padding: 10px 4px; font-size: 0.78rem; font-weight: 700; color: var(--navy-mid); text-transform: uppercase; letter-spacing: 0.08em; }
.cal-day { min-height: 90px; border: 1px solid var(--sand-dark); padding: 6px 4px; position: relative; vertical-align: top; background: var(--white); transition: background 0.12s; overflow: hidden; min-width: 0; }
.cal-day:hover { background: var(--sand); }
.cal-day.other-month { background: #f4f2ef; }
.cal-day.other-month .day-num { color: #a0a898; }
.cal-day.today { background: #e8f4fc; }
.cal-day.today .day-num { background: var(--ocean); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.day-num { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.res-block { font-size: 0.68rem; padding: 2px 3px; border-radius: 3px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; max-width: 100%; display: block; }
.res-approved { background: #c8e8d0; color: #0e5c2a; }
.res-pending  { background: #cce8f8; color: #0a3a6a; }
.res-denied   { background: #f8d8d8; color: #7a1818; opacity: 0.5; }
.cal-legend { display: flex; gap: 20px; padding: 16px 28px; flex-wrap: wrap; border-top: 1px solid var(--sand-dark); }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.legend-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }

/* ── Gallery ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; background: var(--sand); }
.gallery-item .gallery-img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; display: block; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption { padding: 10px 14px; font-size: 0.83rem; color: var(--driftwood); background: var(--white); }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 20px; right: 28px; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ── Webcam / Weather ── */
.webcam-frame { width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-deep); aspect-ratio: 16/9; background: var(--navy); }
.webcam-frame iframe { width: 100%; height: 100%; border: none; }
.weather-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 20px; }
.weather-day { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 10px; text-align: center; }
.weather-day .day-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; color: var(--driftwood); letter-spacing: 0.05em; }
.weather-day .weather-icon { font-size: 1.8rem; margin: 6px 0; }
.weather-day .temp-hi { font-size: 1.1rem; font-weight: 700; color: var(--ocean); }
.weather-day .temp-lo { font-size: 0.88rem; color: var(--driftwood); }
.weather-day .desc { font-size: 0.72rem; color: var(--driftwood); margin-top: 4px; }

/* ── Admin ── */
.admin-header { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--ocean) 100%); padding: 28px 32px; border-radius: var(--radius); color: #fff; margin-bottom: 28px; position: relative; overflow: hidden; }
.admin-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='120' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 Q30 15 60 40 Q90 65 120 40' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.admin-header h1 { color: var(--seafoam-light); font-size: 1.6rem; position: relative; z-index: 1; }
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-nav a { padding: 8px 18px; background: var(--sand); border-radius: var(--radius); font-size: 0.88rem; font-weight: 700; color: var(--navy-mid); border: 1px solid var(--sand-dark); transition: all 0.15s; }
.admin-nav a:hover, .admin-nav a.active { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { background: var(--sand); padding: 10px 12px; text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy-mid); border-bottom: 2px solid var(--sand-dark); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--sand-dark); vertical-align: middle; }
.data-table tr:hover td { background: var(--sand); }
.data-table tr:hover td[style*="sticky"] { background: var(--sand) !important; }
.data-table th[style*="sticky"][style*="left"],  .data-table td[style*="sticky"][style*="left"]  { box-shadow:  3px 0 6px rgba(0,0,0,0.08); }
.data-table th[style*="sticky"][style*="right"], .data-table td[style*="sticky"][style*="right"] { box-shadow: -3px 0 6px rgba(0,0,0,0.08); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-pending  { background: #cce8f8; color: #0a3a6a; }
.badge-approved { background: #c8e8d0; color: #0e5c2a; }
.badge-denied   { background: #f8d8d8; color: #7a1818; }
.badge-admin    { background: #d0e8f8; color: #0a3060; }

/* ── Section titles ── */
.section-title { font-size: 1.8rem; color: var(--navy); margin-bottom: 8px; }
.section-sub   { color: var(--driftwood); margin-bottom: 32px; }
.divider { height: 1px; background: var(--sand-dark); margin: 40px 0; }

/* ── Footer ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 40px 24px 28px; text-align: center; margin-top: auto; position: relative; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--seafoam-light); margin-bottom: 4px; }
.footer-sub   { font-size: 0.88rem; margin-bottom: 12px; }
.footer-copy  { font-size: 0.78rem; opacity: 0.6; }
.footer-updated { position: absolute; bottom: 10px; right: 16px; font-size: 0.7rem; opacity: 0.45; font-style: italic; }

/* ── 2FA Setup ── */
.qr-container { text-align: center; padding: 20px; background: var(--sand); border-radius: var(--radius); }
.qr-container img { margin: 0 auto; border: 4px solid #fff; border-radius: 4px; }
.backup-codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.backup-code { background: var(--sand); border: 1px dashed var(--sand-dark); padding: 8px; text-align: center; font-family: monospace; font-size: 0.9rem; border-radius: 4px; letter-spacing: 0.1em; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted  { color: var(--driftwood); font-size: 0.88rem; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Admin dropdown nav ── */
.nav-alert-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #e53935; color: #fff; font-size: 0.65rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  margin-left: 5px; vertical-align: middle; line-height: 1;
  box-shadow: 0 1px 4px rgba(229,57,53,0.5);
  animation: badge-pulse 2s ease-in-out infinite;
}
.dropdown-alert-badge {
  display: inline-block; background: #e53935; color: #fff;
  font-size: 0.65rem; font-weight: 700; padding: 1px 6px;
  border-radius: 8px; margin-left: 6px; vertical-align: middle;
  white-space: nowrap;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(229,57,53,0.5); }
  50%       { box-shadow: 0 1px 10px rgba(229,57,53,0.85); }
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  margin-top: 4px;
}
.nav-dropdown-menu a {
  display: block !important;
  padding: 10px 16px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.88rem !important;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.1) !important; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

@media (max-width: 768px) {
  /* ── Header & Nav ── */
  .site-header { position: relative; }
  .header-inner { position: relative; padding: 0 16px; }
  .site-logo { font-size: 1.1rem; }
  .welcome-text { display: none; }
  .welcome-row { display: none; }
  .sidebar-toggle { right: 10px; top: 72px; width: 38px; height: 38px; font-size: 1.1rem; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.6rem; }
  .mobile-auth-btns { display: flex; }

  /* Hide the login/register links inside the nav on mobile — shown as always-visible buttons instead */
  .main-nav .btn-nav:not(.nav-admin) { display: none; }

  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy);
    padding: 12px;
    gap: 6px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .main-nav.open { display: flex; }

  /* Big tap targets for all nav links */
  .main-nav a {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 1.05rem;
    display: block;
  }

  /* Register and Login get extra prominent treatment */
  .main-nav .btn-nav {
    padding: 14px 18px !important;
    font-size: 1.05rem !important;
    text-align: center;
    margin-top: 4px;
  }
  .main-nav .btn-nav.btn-primary {
    background: var(--ocean) !important;
    font-size: 1.1rem !important;
    padding: 16px 18px !important;
    border-radius: 8px !important;
  }

  /* Admin dropdown becomes flat list on mobile */
  .nav-dropdown { position: static; }
  .nav-dropdown-menu {
    display: block !important;
    position: static;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    box-shadow: none;
    margin: 0;
    padding: 4px;
  }
  .nav-dropdown-menu a {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.95rem !important;
    border-radius: 6px !important;
  }

  /* ── Layout ── */
  .form-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-wrap { padding: 20px 14px; }

  /* ── Auth cards ── */
  .auth-wrap { padding: 20px 12px; align-items: flex-start; }
  .auth-card { border-radius: 10px; }
  .auth-card-header { padding: 24px 20px 20px; }
  .auth-card-header h1 { font-size: 1.5rem; }
  .auth-card-body { padding: 24px 20px; }
  .btn-full { padding: 15px; font-size: 1rem; }

  /* ── Calendar ── */
  .calendar-scroll { border-radius: 0; }
  .calendar-grid { font-size: 0.68rem; min-width: 364px; }
  .cal-day { min-height: 56px; padding: 3px 2px; }
  .cal-day-name { font-size: 0.62rem; padding: 6px 2px; letter-spacing: 0; }
  .cal-legend { gap: 10px; padding: 10px 14px; font-size: 0.75rem; }
  .calendar-nav { padding: 10px 14px; }
  .calendar-nav h2 { font-size: 1rem; }
  .cal-nav-btn { font-size: 2.2rem; }
  .res-block { font-size: 0.62rem; padding: 1px 2px; }

  /* ── Cards ── */
  .card-header { padding: 16px 18px; }
  .card-body { padding: 18px; }

  /* ── Hero ── */
  .hero { padding: 48px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; padding: 14px; font-size: 1rem; }

  /* ── Admin ── */
  .admin-header { padding: 20px 18px; border-radius: 8px; }
  .admin-nav { gap: 8px; }
  .admin-nav a { padding: 10px 14px; font-size: 0.85rem; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 8px 10px; }

  /* ── Weather ── */
  .weather-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }

  /* ── 2FA ── */
  .backup-codes { grid-template-columns: repeat(2, 1fr); }

  /* ── Buttons ── */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; padding: 8px 14px; }

  /* ── Forms ── */
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=number], input[type=date], input[type=time], select, textarea {
    font-size: 1rem;
    padding: 12px 14px;
  }
  label { font-size: 0.85rem; }
}
