    :root {
      /* Core palette (trustworthy) */
      --primary-600: #1E3A8A; /* Navy Blue */
      --primary-700: #1E293B; /* Deep Navy */
      --secondary-600: #B45309; /* Golden Brass */
      --accent-500: #7F1D1D;  /* Burgundy */

      /* Neutrals */
      --ink: #0F172A; /* text */
      --muted: #475569; /* muted text */
      --border: #CBD5E1; /* lines */
      --cloud: #F8FAFC; /* page bg */
      --card: #FFFFFF; /* surfaces */

      --radius: 14px;
      --shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
    }

    html { scroll-behavior: smooth; }
    body { margin: 0; background: var(--cloud); color: var(--ink); font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
    .container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

    .flash-banner {
      background: #FEF3C7;
      border-bottom: 1px solid #FCD34D;
      color: #92400E;
    }
    .flash-banner .container {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 20px;
      font-weight: 600;
    }
    .flash-banner strong {
      font-family: "Space Grotesk", Inter, sans-serif;
      font-size: 15px;
    }

    /* Header / Nav */
body > header { position: sticky; top: 0; z-index: 2000; background: rgba(255,255,255,0.9); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
    .nav { display: flex; align-items: center; gap: 18px; height: 64px; }
    .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--primary-700); }
    .brand .word { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; letter-spacing: -0.02em; font-size: 20px; }
    .logo svg { width: 32px; height: 32px; display: block; }

.nav .brand { order: 1; }
.menu { display: flex; gap: 20px; align-items: center; position: relative; z-index: 2000; margin-left: auto; order: 2; }
.menu a { color: var(--primary-700); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 10px; }
.menu a:hover { background: #EEF2FF; }
.menu a[aria-current="page"] {
  background: #EEF2FF;
  color: var(--primary-700);
  box-shadow: 0 0 0 2px rgba(30,58,138,0.12) inset;
}
.menu-dropdown { position: relative; }
.menu-trigger {
  background: transparent;
  border: none;
  color: var(--primary-700);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.menu-trigger:after { content: "▾"; margin-left: 6px; font-size: 12px; }
.menu-trigger:focus-visible { outline: 2px solid var(--primary-300); outline-offset: 2px; }
.menu .menu-dropdown .submenu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border:1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: none !important;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  z-index: 2100;
}
.menu .menu-dropdown:hover .submenu,
.menu .menu-dropdown:focus-within .submenu {
  display: flex !important;
}
.menu-dropdown .submenu a { padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.menu-dropdown .submenu a:hover { background:#EEF2FF; }
.hamburger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 10px; order: 4; }
.hamburger span { display:block; width:22px; height:2px; background: var(--primary-700); margin:5px 0; transition: transform 0.2s ease; }
.user-menu{position:relative;margin-left:18px;order:3;}

@media (max-width: 880px) {
  .nav { position: relative; flex-wrap: wrap; gap: 12px; height: auto; padding: 12px 0; }
  .hamburger { display: inline-flex; flex-direction: column; justify-content: center; }
  .menu { display: none; position: absolute; top: 56px; right: 0; left: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); flex-direction: column; gap: 10px; z-index: 2000; order: 4; margin-left: 0; }
  .menu.open { display: flex; }
  .user-menu { order: 2; margin-left: 0; }
  .hamburger { order: 3; margin-left: auto; }
}

    /* Hero */
    .hero {
      /* Calm base gradient */
      --noise: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="matrix" values="0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.03 0"/></filter><rect width="60" height="60" filter="url(%23n)"/></svg>');
      --circle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="360" height="360" viewBox="0 0 360 360"><circle cx="300" cy="60" r="140" fill="%231E3A8A" fill-opacity="0.08"/></svg>');
      background:
        var(--circle) right -80px top -80px / 360px 360px no-repeat,
        var(--noise) center / 300px 300px repeat,
        linear-gradient(180deg, rgba(30,58,138,0.05) 0%, rgba(248,250,252,1) 100%);
    }
    .headline { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; letter-spacing: -0.02em; font-size: clamp(32px, 6vw, 56px); margin: 0 0 10px; color: var(--primary-700); }
    .subhead { color: var(--muted); max-width: 720px; margin: 0 0 24px; }
    .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--primary-600); color: #fff; box-shadow: 0 6px 16px rgba(30,58,138,0.25); }
.btn.primary:hover { background: var(--primary-700); }
.btn.secondary { background: var(--secondary-600); color: #fff; box-shadow: 0 6px 16px rgba(180,83,9,0.25); }
.btn.ghost { background: transparent; color: var(--primary-700); border-color: var(--border); }
/* OAuth buttons (match Google default sizing) */
.oauth-btn {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  box-shadow: none;
}
.oauth-btn:hover { background: #f8f9fa; }
.oauth-btn__icon { width: 20px; height: 20px; }
.oauth-btn span { flex: 1; text-align: center; font-weight: 500; }
.oauth-btn--wide {
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  min-height: 42px;
}
.oauth-btn--wide .oauth-btn__icon { margin-right: 10px; }
.oauth-btn--wide:hover { border-color: #d2d5da; background: #f8f9fa; }
.oauth-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.oauth-stack > .g_id_signin { width: 100%; display: block; }
.oauth-stack > .g_id_signin > div { width: 100% !important; }
.oauth-stack > div.g_id_signin iframe { border: none !important; box-shadow: none !important; width: 100% !important; min-height: 42px; border-radius: 4px; }

    .hero-card { margin-top: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-item { padding: 12px; border: 1px dashed var(--border); border-radius: 12px; }
    @media (max-width: 800px) { .hero-card { grid-template-columns: 1fr; } }

    /* Sections */
    section { padding: 32px 0 24px; /* less top/bottom space */ }
    .section-title { font-family: "Space Grotesk", Inter, sans-serif; font-size: 28px; font-weight: 700; color: var(--primary-700); margin: 0 0 10px; }
    .section-lead { color: var(--muted); margin: 0 0 24px; }

    /* Backgrounds */
    /* Hero: calm gradient retained */
    .hero {
      background: linear-gradient(180deg, rgba(30,58,138,0.05) 0%, rgba(248,250,252,1) 100%);
    }

    /* Features: top banner illustration (centered), no text shift */
    .features { position: relative; background: linear-gradient(180deg, rgba(180,83,9,0.02) 0%, rgba(248,250,252,1) 100%); }
    .features::before { content: none; }

    /* Why Us: top banner motif (shield + pillars), no text shift */
    .whysec { position: relative; background: linear-gradient(180deg, rgba(127,29,29,0.02) 0%, rgba(248,250,252,1) 100%); }
    .whysec::before { content: none; }

    /* About: soft brass bands */
    .aboutsec {
      background:
        radial-gradient(800px 300px at 80% -10%, rgba(180,83,9,0.10), transparent 60%),
        repeating-linear-gradient(-45deg, rgba(180,83,9,0.07) 0 12px, transparent 12px 32px);
    }

    /* removed banner-specific media queries */
      .features::before { height: 160px; }
      .whysec { padding-top: 220px; }
      .whysec::before { height: 180px; }
    }

    /* removed banner-specific media queries */
      .features::before { height: 120px; }
      .whysec { padding-top: 180px; }
      .whysec::before { height: 140px; }
    }

    /* Features */
    .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;  }
    @media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
    @media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr);} }
    @media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
    .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
    .card h3 { margin: 6px 0 8px; font-size: 18px; font-weight: 700; color: var(--primary-700); font-family: "Space Grotesk", Inter, sans-serif; }
    .pill {
    display: inline-block; padding: 4px 8px; border-radius: 999px; font-weight: 600; font-size: 11px; 
    color: var(--primary-700);
    background: rgba(30,41,59,0.06);
    border: 1px solid var(--border);
    box-shadow: none;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

    /* Why Us */
    .why { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
    .why ul { margin: 0; padding-left: 20px; }
    .why li { margin-bottom: 10px; }
    @media (max-width: 900px) { .why { grid-template-columns: 1fr; } }

    .quote { background: linear-gradient(140deg, rgba(127,29,29,0.08), rgba(30,41,59,0.06)); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
    .quote strong { color: var(--accent-500); }

    /* About */
    .about { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .about .stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
    .about .stat .num { font-weight: 800; font-size: 28px; color: var(--primary-700); font-family: "Space Grotesk"; }

    /* Footer */
    footer { padding: 36px 0 60px; border-top: 1px solid var(--border); color: var(--muted); }

    /* Anchor offsets (for sticky header) */
    .anchor { position: relative; top: -80px; visibility: hidden; }
    /* Icons */
    .card .icon { display:inline-flex; width:22px; height:22px; margin: 0 6px 0 0; vertical-align: middle; color: var(--primary-700); }
    .card h3 { display:flex; align-items:center; gap:6px; }
  /* Presence Illustrations */
    .hero { position: relative; overflow: hidden; }
    /* hero art removed */

    .features { position: relative; overflow: hidden; }
    /* features art removed; using top banner instead */

    .whysec { position: relative; overflow: hidden; }
    /* why art removed; using top banner instead */

    /* ensure content stays readable */
    .hero .container, .features .container, .whysec .container { position: relative; z-index: 1; padding-left: 20px; padding-right: 20px; }
    /* safe padding so art doesn't collide with text */
    .features .container { position: relative; z-index: 1; padding-left: 20px; padding-right: 20px; }
    .whysec .container { padding-right: min(420px, 32vw); }

    @media (max-width: 1024px) { /* reset padding overrides for mid screens */ }
      .whysec .container { padding-right: min(300px, 36vw); }
    }
    @media (max-width: 760px) { .hero-art { opacity: 0.18; width: 70vw; } }
      .features .container, .whysec .container { padding-left: 20px; padding-right: 20px; }
    }
  }

    @media (max-width: 760px) {
      .hero-art, .features-art, .why-art { opacity: 0.18; width: 70vw; }
    }  /* --- Features grid override (force 2 cols on desktop) --- */
    .features .grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 20px; align-items: stretch; }
    @media (max-width: 1024px) { .features .grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); } }
    @media (max-width: 900px) { .features .grid { grid-template-columns: 1fr; } }


    /* Calendar */
.calendar { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-title { font-weight: 800; color: var(--primary-700); font-family: "Space Grotesk", Inter, sans-serif; }
.cal-nav { display: inline-flex; gap: 6px; }
.cal-btn { border: 1px solid var(--border); background:#fff; border-radius: 10px; padding: 6px 8px; font-weight: 700; cursor: pointer; font-size: 16px; }
.cal-btn:hover { background:#FAFAFA; }


.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;  }
.day { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary-700); background:#fff; position: relative; font-size: 13px; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.day.muted { color: #94A3B8; background: #F1F5F9; }
.day.holiday { background: #f4efff; color: #4b3ba8; border-color: #c3b3ff; }
.holiday-hint { margin-top: 6px; font-size: 12px; color: #4b3ba8; }
.holiday-inline-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.holiday-inline-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.holiday-inline-items { display: flex; flex-direction: column; gap: 4px; }
.holiday-inline-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #f4efff; color: #4b3ba8; border: 1px solid #c3b3ff; font-size: 12px; font-weight: 600; }
.day.today { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.day.has-few { border-color:#16a34a; background:#dcfce7; color:#166534; }
.day.has-mid { border-color:#f97316; background:#ffedd5; color:#c2410c; }
.day.has-many { border-color:#dc2626; background:#fee2e2; color:#991b1b; }
.day[data-count]:hover { transform: translateY(-2px); }


/* Agenda */
.agenda-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.agenda-day { padding-top: 10px; border-top: 1px solid var(--border); }
.agenda-day:first-child { border-top: none; padding-top: 0; }
.agenda-day-label { font-weight: 700; font-size: 15px; color: var(--primary-700); margin-bottom: 8px; }
.agenda-items { display: flex; flex-direction: column; gap: 10px; }
.agenda-item { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; text-align: left; background: #fff; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease; }
.agenda-item:hover, .agenda-item:focus-visible { border-color: var(--primary-400); box-shadow: 0 4px 12px rgba(15,23,42,0.08); transform: translateY(-1px); }
.agenda-item.is-active { border-color: var(--primary-600); box-shadow: 0 6px 16px rgba(15,23,42,0.15); }
.agenda-item-static { cursor: default; opacity: 0.95; }
.agenda-item-static[disabled] { border-color: #c3b3ff; background: #f6f1ff; color: var(--ink); }
.agenda-item-static .agenda-service { color: var(--ink); }
.agenda-time { font-weight: 700; font-size: 14px; min-width: 92px; color: var(--primary-700); }
.agenda-meta { display: flex; flex-direction: column; gap: 2px; }
.agenda-service { font-weight: 600; color: var(--ink); }
.agenda-member { color: var(--muted); font-size: 13px; }
.agenda-empty { color: var(--muted); font-size: 14px; margin-top: 10px; }
.agenda-helper { color: var(--muted); font-size: 13px; margin-top: 12px; }
.agenda-detail { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.agenda-detail h3 { margin-bottom: 10px; }
.agenda-detail-list { display: flex; flex-direction: column; gap: 8px; }
.agenda-detail-row { display: flex; gap: 8px; font-size: 14px; }
.agenda-detail-label { width: 120px; color: var(--muted); font-weight: 600; }
.agenda-detail-value { flex: 1; color: var(--ink); }
.agenda-detail-empty { color: var(--muted); font-style: italic; }

.agenda-detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.agenda-detail-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: min(480px, 100%);
  max-height: calc(100% - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  animation: agendaDetailIn 160ms ease;
}

.agenda-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.agenda-detail-header .close-btn {
  font-size: 20px;
  line-height: 1;
  width: 36px;
  height: 36px;
  padding: 0;
}

.agenda-detail-overlay[hidden] {
  display: none;
}

@keyframes agendaDetailIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .agenda-item { flex-direction: column; align-items: flex-start; }
  .agenda-time { min-width: auto; }
  .agenda-detail-row { flex-direction: column; }
  .agenda-detail-label { width: auto; }
  .agenda-detail-card { max-width: 100%; padding: 18px; }
}


/* Settings */
.settings { display: grid; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid var(--border); padding: 12px 14px; cursor: pointer; background: #fff; color: var(--ink); }
.btn:hover { background:#FAFAFA; }


/* ---- Dashboard-only calendar sizing (scoped) ---- */
.page-dashboard .grid {
  /* make calendar ~45% and right column ~55% on desktop */
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.page-dashboard .calendar {
  /* cap visual width so it never dominates */
  max-width: 480px;
}

@media (max-width: 980px) {
  .page-dashboard .grid {
    grid-template-columns: 1fr; /* stack on tablet/mobile */
  }
  .page-dashboard .calendar {
    max-width: none; /* use full width on small screens */
  }
}

/* Tighter mini-calendar UI */
.page-dashboard .cal-title { font-size: 16px; }
.page-dashboard .cal-weekdays { font-size: 11px; }
.page-dashboard .cal-grid { gap: 4px; }
.page-dashboard .day {
  border-radius: 8px;
  font-size: 13px;
}

/* ---- Dashboard layout: calendar + analytics side-by-side ---- */
.page-dashboard .top-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr; /* Calendar bigger than Analytics */
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .page-dashboard .top-row {
    grid-template-columns: 1fr; /* stack vertically on small screens */
  }
}

/* keep calendar compact */
.page-dashboard .calendar {
  max-width: 520px;
}

/* ensure agenda fills column */
.page-dashboard #agendaCard {
  display: flex;
  flex-direction: column;
}
.page-dashboard #agendaCard .agenda-list {
  flex-grow: 1;
}


/* ---- Dashboard top row equal height layout ---- */
.page-dashboard .top-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 24px;
  align-items: stretch; /* ensure same height */
  margin-bottom: 28px;
}

/* Both cards fill available height */
.page-dashboard .top-row .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Allow calendar grid to expand naturally */
.page-dashboard .calendar {
  max-width: 520px;
  flex-grow: 1;
}

/* Agenda alignment */
.page-dashboard #agendaCard {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}
.page-dashboard #agendaCard .agenda-list {
  margin-top: 16px;
}

/* Responsive stacking */
@media (max-width: 900px) {
  .page-dashboard .top-row {
    grid-template-columns: 1fr;
  }
  .page-dashboard .top-row .card {
    height: auto;
  }
}

/* Restore spacing between top-row (calendar+analytics) and settings */
.page-dashboard .grid {
  display: grid;
  gap: 32px; /* add consistent vertical gap between stacked sections */
}

.page-dashboard .top-row {
  margin-bottom: 0; /* remove manual bottom margin; grid gap handles it now */
}

/* --- Dashboard container must be a single column --- */
.page-dashboard .grid {
  display: grid;
  grid-template-columns: 1fr !important; /* override global .grid */
  gap: 32px; /* vertical spacing between top-row and settings */
}

/* Top row: calendar + analytics side-by-side */
.page-dashboard .top-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .page-dashboard .top-row {
    grid-template-columns: 1fr; /* stack on small screens */
  }
}

/* Ensure visual spacing between top-row (Calendar+Analytics) and Settings */
.page-dashboard .top-row {
  margin-bottom: 32px; /* reintroduce clean spacing below the top section */
}

/* Optional: extra space on small screens for breathing room */
.page-dashboard .calendar {
  cursor: pointer;
  position: relative;
}

.no-scroll {
  overflow: hidden;
}

.schedule-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 400;
}

.schedule-overlay.is-open {
  display: flex;
}

.schedule-dialog {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.35);
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.schedule-header h2 {
  margin: 0;
  font: 700 20px/1.2 "Space Grotesk", Inter, sans-serif;
  color: var(--primary-700);

}

.schedule-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.view-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.view-btn.is-active {
  background: var(--primary-600);
  color: #fff;
}

.schedule-controls .full-link {
  padding: 8px 16px;
}

.view-btn:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

.close-btn {
  font-size: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.schedule-calendar {
  padding: 0 24px 24px 24px;
}

.schedule-calendar .fc {
  height: 100%;
}

.schedule-calendar .fc-scrollgrid {
  border-radius: 12px;
  overflow: hidden;
}

.page-schedule .schedule-container {
  padding: 64px 0 80px;
  display: grid;
  gap: 32px;
}

.page-schedule .schedule-surface {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  overflow: hidden;
}

.page-schedule .schedule-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.page-schedule .schedule-title {
  margin: 0;
  font: 600 18px/1.3 "Space Grotesk", Inter, sans-serif;
  color: var(--primary-700);
  text-align: center;
}

.page-schedule .schedule-nav {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.page-schedule .schedule-nav .btn {
  min-width: 44px;
  justify-content: center;
}

.page-schedule .schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.page-schedule .schedule-calendar {
  padding: 16px 24px 24px 24px;
}

@media (max-width: 768px) {
  .page-schedule .schedule-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: left;
  }
  .page-schedule .schedule-title {
    text-align: left;
  }
  .page-schedule .schedule-actions {
    justify-content: flex-start;
  }
  .page-schedule .schedule-calendar {
    padding: 12px;
  }
}

@media (max-width: 880px) {
  .page-schedule .schedule-container {
    padding-top: 96px;
  }
}

.schedule-calendar .fc-toolbar-title {
  font-size: 18px;
}

.schedule-calendar .fc-timegrid-slot {
  height: 40px !important;
}

.event-modal-card {
  background: #fff;
  border-radius: 16px;
  width: min(480px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.event-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.event-modal-header h3 {
  margin: 0;
  font: 700 18px/1.2 "Space Grotesk", Inter, sans-serif;
  color: var(--primary-700);
}

.event-modal-body {
  flex: 1 1 auto;
  padding: 12px 18px 18px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 45%) 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.event-detail-row:last-child {
  border-bottom: none;
}

.event-detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-detail-value {
  font-size: 13px;
  color: var(--primary-700);
  text-align: right;
  word-break: break-word;
}

.event-detail-empty {
  font-size: 13px;
  color: var(--muted);
}

.event-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px 18px;
}

.event-modal-actions .btn {
  flex: 1 1 140px;
  justify-content: center;
}

.event-modal-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.danger {
  background: var(--accent-500);
  color: #fff;
  border-color: transparent;
}

.btn.danger:hover {
  background: #991b1b;
}

.event-reschedule {
  display: grid;
  gap: 10px;
  padding: 0 18px 12px 18px;
}

@media (max-width: 320px) {
  .schedule-overlay {
    align-items: flex-start;
    padding: 0;
  }
  .schedule-overlay.is-open {
    display: flex;
  }
  .event-modal-card {
    width: 100%;
    margin-top: calc(env(safe-area-inset-top, 0px) + 48px);
    border-radius: 18px;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - 24px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
  }
  .event-modal-header {
    padding: 10px 16px;
  }
  .event-modal-body {
    padding: 10px 16px 12px 16px;
  }
  .event-modal-actions,
  .event-reschedule {
    padding: 0 12px 8px 12px;
  }

  .event-detail-row {
    grid-template-columns: 1fr;
  }
  .event-detail-value {
    text-align: left;
    font-size: 12px;
    width: 100%;
  }
  .event-modal-actions .btn {
    flex: 1 1 48%;
    font-size: 13px;
    padding: 10px 12px;
  }
}

.event-reschedule[hidden] {
  display: none;
}

.event-reschedule label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--muted);
}

.event-reschedule input {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.event-reschedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.event-reschedule.is-loading {
  opacity: 0.6;
}

.event-action-status {
  display: block;
  margin: 12px 24px 24px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
  background: #f4f6fb;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.event-action-status.error {
  color: #9f1239;
  background: #fff1f2;
  border-left-color: #be123c;
}

.event-action-status:empty {
  display: none;
}

.embed-copy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary-700);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.25);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2500;
}

.embed-copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.schedule-calendar .fc-event {
  border-radius: 10px;
  border: none;
  padding: 6px 8px;
  background: rgba(30, 58, 138, 0.1);
  color: var(--primary-700);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 40px;
  overflow: hidden;
  cursor: pointer;
}

.schedule-calendar .fc-service {
  font-weight: 600;
  color: var(--primary-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-calendar .fc-member {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

.schedule-calendar .fc-confirmation {
  color: var(--primary-600);
  font-size: 11px;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .schedule-dialog {
    border-radius: 12px;
    max-height: 96vh;
  }
  .schedule-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .schedule-controls {
    justify-content: space-between;
  }
  .schedule-calendar {
    padding: 0 12px 12px 12px;
  }
  .view-btn {
    padding: 8px 12px;
  }
}
@media (max-width: 900px) {
  .page-dashboard .top-row {
    margin-bottom: 40px;
  }
}


/* Settings layout */
.settings-layout{display:grid;grid-template-columns:260px 1fr;gap:24px;padding:28px 0 60px}
@media (max-width: 900px){.settings-layout{grid-template-columns:1fr}}
.settings-mobile-nav{display:none;margin-top:-4px;margin-bottom:16px}
.settings-mobile-chips{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding:4px 2px;}
.settings-mobile-chips::-webkit-scrollbar{display:none;}
.settings-mobile-chips .seg-btn{flex:0 0 auto;padding:9px 14px;border-radius:999px;border:1px solid var(--border);background:#fff;font-weight:700;color:var(--primary-700);box-shadow:var(--shadow);white-space:nowrap;text-decoration:none;cursor:pointer;}
.settings-mobile-chips .seg-btn.active{border-color:var(--primary-600);background:#eef2ff;color:var(--primary-800);box-shadow:0 0 0 2px rgba(30,58,138,0.12) inset;}

.side{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;position:relative}
.side h2{margin:6px 10px 10px;font:700 16px/1 "Space Grotesk";color:var(--primary-700)}
.side .list-wrapper{position:relative;}
.side .list{display:grid;gap:6px}
.settings-nav-toggle{display:none;}
.settings-nav-backdrop{display:none;}
.side a{display:block;text-decoration:none;border:1px solid var(--border);background:#fff;color:var(--primary-700);padding:10px 12px;border-radius:10px;font-weight:700;position:relative}
.side a:hover{background:#FAFAFA}
.side a[aria-current="page"], .side a.active{border-color:var(--primary-600);box-shadow:0 0 0 2px rgba(30,58,138,0.15) inset;background:#EEF2FF}
.side a[aria-current="page"]::before, .side a.active::before{content:"";position:absolute;left:6px;top:6px;bottom:6px;width:4px;border-radius:4px;background:var(--accent-500)}
.settings-nav-label{display:block;border:1px dashed var(--border);color:var(--muted);border-radius:10px;padding:10px 12px;font-weight:600;text-align:center;background:#f8fafc;}

@media (max-width: 768px){
  body.settings-nav-open{overflow:hidden;}
  .settings-layout{display:flex; flex-direction:column; gap:18px; padding:20px 0 48px;}
  .side{display:none !important;}
  .settings-mobile-nav{display:block;}
  .settings-nav-toggle{display:none !important;}
  .settings-nav-backdrop{display:none !important;}
}

.settings-alert{border:1px solid rgba(37,99,235,0.2);background:rgba(219,234,254,0.7);color:var(--primary-700);padding:12px 16px;border-radius:12px;font-weight:600;margin-bottom:18px;box-shadow:0 8px 18px rgba(15,23,42,0.05);}
.settings-alert::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--primary-500);display:inline-block;margin-right:10px;box-shadow:0 0 0 4px rgba(59,130,246,0.2);}
.manage-alert{border:1px solid rgba(37,99,235,0.25);background:#dbeafe;color:var(--primary-800);padding:12px 16px;border-radius:12px;font-weight:600;margin-top:16px;box-shadow:0 8px 22px rgba(15,23,42,0.08);}
.manage-alert::before{content:"";display:inline-flex;width:8px;height:8px;border-radius:999px;background:var(--primary-600);margin-right:8px;position:relative;top:-1px;}


.panel{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;min-height:320px}
.panel h3{margin:0 0 10px;font:700 20px/1.2 "Space Grotesk";color:var(--primary-700)}
.panel p{color:var(--muted)}

.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.member-list { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
@media (max-width: 1200px){ .member-list { grid-template-columns: 1fr; }}

.member-card { display:grid; grid-template-columns: 56px 1fr auto; gap:12px; align-items:center; border:1px solid var(--border); border-radius:12px; padding:12px; background:#fff; box-shadow: var(--shadow); }
.avatar-sm { width:56px; height:56px; border-radius:12px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:800; color:var(--primary-700); background:#F8FAFF; }
.member-meta h4 { margin:0 0 4px; font:700 16px/1.2 "Space Grotesk"; color:var(--primary-700); }
.member-meta .days { color:var(--muted); font-size:14px; }
.member-services { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.org-map { margin: 16px 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.org-map-interactive { margin: 16px 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; height: 260px; box-shadow: var(--shadow); }
.address-input-row { display:flex; gap:12px; align-items:center; }
.address-input-row input { flex:1; }
.address-status { margin-top:6px; font-size:13px; color:var(--muted); }
.address-status[data-state="success"] { color: #15803d; }
.address-status[data-state="error"] { color: var(--accent-500); }
.org-edit .form-grid { display:grid; gap:20px; }
.org-edit .row { display:flex; gap:18px; flex-wrap:wrap; margin-bottom:8px; }
.org-edit .field { margin-bottom:12px; }
.override-form { margin: 12px 0 10px; }
.override-grid { display:grid; grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 0.9fr) minmax(220px, 1.2fr) minmax(180px, 0.9fr); gap:12px; align-items:center; }
.override-grid label { font-weight:700; color:var(--primary-700); font-size:14px; display:flex; flex-direction:column; gap:4px; margin:0; }
.override-grid input, .override-grid select { width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font:inherit; background:#fff; color:var(--ink); height:44px; box-sizing:border-box; }
.override-actions { display:flex; align-items:center; justify-content:flex-end; align-self:center; }
.override-actions .btn { height:44px; min-width:148px; max-width:180px; padding:0 16px; width:auto; align-self:center; }
.overrides-section { margin-top:24px; }
.override-list { margin-top:10px; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.override-row { display:grid; grid-template-columns: 140px 120px 1fr 320px; gap:10px; padding:10px 12px; border-bottom:1px solid var(--border); align-items:center; }
.override-row:last-child { border-bottom:none; }
.override-head { background:#F8FAFF; font-weight:700; color:var(--primary-700); }
.override-row span { display:block; }
.override-row .inline { margin:0; display:flex; align-items:center; gap:8px; justify-content:flex-end; flex-wrap:nowrap; }
.override-row .inline select { width:120px; height:40px; }
.override-row .inline input[type="text"] { width:190px; height:40px; }
.override-row .inline .btn { height:40px; }
.override-row .edit-view { display:none; }
.override-row.is-editing .edit-view { display:flex; }
.override-row.is-editing .read-view { display:none; }
.override-row button { padding:8px 14px; height:40px; }
.overrides-section { margin-top:24px; }

@media (max-width: 640px) {
  .override-grid { grid-template-columns: 1fr; gap:8px; }
  .override-actions { justify-content: stretch; }
  .override-actions .btn { width: 100%; }
  .override-row { grid-template-columns: 1fr; gap:8px; align-items:flex-start; }
  .override-row span:last-child { display:flex; flex-direction:column; gap:6px; }
  .override-row .inline { display:flex; flex-direction:column; gap:6px; width:100%; }
  .override-row .inline input,
  .override-row .inline select,
  .override-row .inline .btn { width:100%; }
}

/* --- Error Page --- */
body.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
}

.error-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px;
}

.error-card {
  max-width: 560px;
  text-align: center;
  padding: 48px;
  border: none;
  box-shadow: 0 25px 80px rgba(29, 41, 82, 0.12);
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary-500);
  margin-bottom: 16px;
}

.error-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.error-logo svg {
  width: 72px;
  height: 72px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}
.powered-by-google { font-size:11px; color:var(--muted); margin-top:6px; text-transform:uppercase; letter-spacing:0.08em; }

.docs-layout { display:grid; gap:20px; padding:40px 0 60px; }
.doc-card { padding:24px; border:1px solid var(--border); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); }
.doc-card ul { margin:12px 0 0; padding-left:20px; line-height:1.7; }
.doc-card a { color:var(--primary-600); text-decoration:none; }
.doc-card a:hover { text-decoration:underline; }
.doc-content { padding:40px 0 80px; }
.doc-body h1, .doc-body h2, .doc-body h3 { margin-top:24px; color:var(--primary-700); }
.doc-body h1:first-child { margin-top:0; }
.doc-body p { margin:12px 0; color:var(--ink); }
.doc-body ul { padding-left:20px; margin:12px 0; }


/* --- Team Edit Form --- */
.form { display:grid; gap:16px; max-width: 880px; }
.field label { display:block; font-weight:700; color:var(--primary-700); margin-bottom:6px; }
.input, .select { width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font:inherit; background:#fff; color:var(--ink); }
.select[multiple] { min-height: 180px; padding: 8px; overflow-y: auto; }
.select[multiple] option { padding: 8px 10px 8px 34px; line-height: 1.4; border-radius: 8px; margin: 2px 0; background-repeat: no-repeat; background-position: 12px center; background-size: 14px; }
.select[multiple] option:checked { background-color: rgba(30, 58, 138, 0.18) !important; color: var(--primary-700); font-weight: 600; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%231E3A8A' d='M7.7 13.3L4.4 10l-1.4 1.4l4.7 4.7L17 6.7L15.6 5.3z'/%3E%3C/svg%3E"); box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.25); }
.help { color:var(--muted); font-size:12px; margin-top:4px; }

.checkbox-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:12px; margin-top:8px; }
.checkbox-pill { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:0 6px 14px rgba(15,23,42,0.06); transition:border 0.2s ease, box-shadow 0.2s ease; }
.checkbox-pill:hover { border-color: var(--primary-600); box-shadow:0 10px 20px rgba(30,58,138,0.12); }
.checkbox-pill input { width:16px; height:16px; accent-color: var(--primary-600); }
.checkbox-pill span { font-weight:600; color:var(--primary-700); }
.checkbox-pill input:checked + span { color: var(--primary-600); }
@media (max-width: 640px){
  .checkbox-grid { grid-template-columns: 1fr; }
  .checkbox-pill { width:100%; }
}

.team-schedule-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:16px; margin-top:8px; }
.team-schedule-card { border:1px solid var(--border); border-radius:16px; background:#fff; box-shadow:0 12px 24px rgba(15,23,42,0.08); padding:16px; display:grid; gap:14px; transition: border 0.2s ease, box-shadow 0.2s ease; }
.team-schedule-card header { display:flex; justify-content:space-between; align-items:center; gap:12px; font-weight:700; color:var(--primary-700); }
.team-schedule-card .weekday-toggle { font-family:"Space Grotesk", Inter, sans-serif; cursor:pointer; font-weight:700; color:var(--primary-700); }
.team-schedule-card .day-toggle,
.team-schedule-card .active-toggle { display:flex; align-items:center; gap:8px; font-weight:600; color:var(--muted); cursor:pointer; }
.team-schedule-card .day-toggle input,
.team-schedule-card .active-toggle input { width:16px; height:16px; accent-color: var(--primary-600); }
.team-schedule-card .periods { display:grid; gap:12px; }
.team-schedule-card .period { background:#F8FAFF; border:1px solid rgba(148,163,184,0.4); border-radius:12px; padding:12px; display:grid; gap:10px; }
.team-schedule-card .time-field label { display:grid; gap:6px; font-weight:600; color:var(--primary-700); }
.time-input { font-family:"Space Grotesk", Inter, sans-serif; letter-spacing:0.02em; text-transform:uppercase; }
.team-schedule-card .time-field .time-input,
.team-schedule-card .time-field input { width:100%; max-width:140px; padding:10px 12px; border:1px solid rgba(148,163,184,0.6); border-radius:10px; background:#fff; font-weight:700; color:var(--ink); transition:border 0.2s ease, box-shadow 0.2s ease; }
.team-schedule-card .time-field input::placeholder { color:#94A3B8; }
.team-schedule-card .time-field input:focus { outline:2px solid rgba(30,58,138,0.35); }
.team-schedule-card .periods { min-height: 64px; }
.team-schedule-card .periods .time-field { display:grid; gap:6px; }
.team-schedule-card .periods .time-field + .time-field { margin-top:0; }
.team-schedule-card .add-period { justify-self:flex-start; }
.team-schedule-card.disabled { opacity:0.55; }
.team-schedule-card.disabled .periods input,
.team-schedule-card.disabled .add-period { pointer-events:none; }
@media (max-width: 640px){
  .team-schedule-grid { grid-template-columns: 1fr; }
}

.time-input.is-invalid { border-color:#dc2626 !important; box-shadow:0 0 0 2px rgba(220,38,38,0.15); background:rgba(220,38,38,0.08); color:#991b1b; }
.time-input.is-invalid::placeholder { color:#dc2626; }

.add-period { border:1px dashed var(--border); background:#fff; border-radius:10px; padding:10px 14px; cursor:pointer; font-weight:600; color:var(--primary-700); transition: background 0.2s ease, border 0.2s ease; }
.add-period:hover { background:#EEF2FF; border-color:var(--primary-600); }


.actions { display:flex; gap:10px; align-items:center; }
.actions .btn.danger { margin-left:auto; }

.lang-switch { display:inline-flex; align-items:center; gap:8px; margin-left:16px; font-size:12px; color:var(--muted); }
.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-700);
}
.lang-option:hover {
  border-color: var(--primary-600);
}
.lang-option.active,
.lang-option[aria-current="true"] {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
  cursor: default;
}
.user-trigger{border:none;background:#fff;border:1px solid var(--border);width:42px;height:42px;border-radius:999px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;box-shadow:var(--shadow);}
.user-trigger img{width:100%;height:100%;object-fit:cover;border-radius:999px;}
.user-trigger span{font-weight:700;color:var(--primary-700);letter-spacing:0.04em;}
.user-menu-card{position:absolute;right:0;top:calc(100% + 10px);background:#fff;border:1px solid var(--border);box-shadow:0 18px 36px rgba(15,23,42,0.25);border-radius:14px;min-width:220px;padding:14px;display:none;z-index:300;}
.user-menu-card .user-name{margin:0;font-weight:700;color:var(--primary-700);}
.user-menu-card .user-org{margin:4px 0 0;color:var(--muted);font-size:13px;}
.user-menu:hover .user-menu-card,
.user-menu.is-open .user-menu-card{display:block;}
.user-menu:hover .user-trigger,
.user-menu.is-open .user-trigger{border-color:var(--primary-500);}

@media (max-width: 880px){
  .user-menu-card{left:0;right:auto;min-width:200px;transform:translateX(0);}
}

.legal-page .hero { padding:56px 0; border-bottom:1px solid var(--border); }
.legal-content { padding:48px 0 72px; display:grid; gap:32px; }
.legal-card h2 { margin-top:28px; }
.legal-card h2:first-child { margin-top:0; }
.legal-card ul { padding-left:20px; margin:12px 0; }
.legal-card .note { font-size:13px; color:var(--muted); margin-top:20px; }

.page-manage .manage-container { padding: 40px 0 80px; }
.page-manage .manage-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:20px; }
.manage-card { display:grid; gap:12px; text-decoration:none; border:1px solid var(--border); border-radius:var(--radius); padding:18px; color:var(--ink); box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.manage-card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(15,23,42,0.15); }
.manage-card h2 { margin:0; font:700 18px/1.3 "Space Grotesk", Inter, sans-serif; color: var(--primary-700); }
.manage-card p { margin:0; color: var(--muted); font-size:14px; }
.logs-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.logs-card { min-height: 320px; }
.log-table { display:grid; gap:8px; margin-top:16px; font-size:13px; }
.log-row { display:grid; grid-template-columns: 0.9fr 1fr 1fr auto; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; align-items:center; }
.log-header { background:#F1F5F9; font-weight:700; color: var(--primary-700); }
.log-date { font-family:"Space Grotesk", Inter, sans-serif; font-weight:600; }
.log-email { word-break:break-all; }
.log-message { color:var(--muted); }
.log-view { border:1px solid var(--border); background:#fff; color:var(--primary-700); border-radius:8px; padding:6px 10px; font-size:12px; cursor:pointer; }
.log-view:hover { background:#EEF2FF; }
.log-modal { position:fixed; inset:0; background:rgba(15,23,42,0.55); display:none; z-index:400; align-items:center; justify-content:center; padding:24px; }
.log-modal.is-open { display:flex; }
.log-modal__card { background:#fff; border-radius:14px; max-width:720px; width:100%; padding:20px; box-shadow:0 24px 60px rgba(15,23,42,0.35); display:grid; gap:12px; }
.log-modal__card pre { max-height:480px; overflow:auto; background:#0f172a; color:#e2e8f0; padding:16px; border-radius:10px; font-size:12px; }
.log-modal__card header { display:flex; align-items:center; justify-content:space-between; }
.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; font-weight:700; text-decoration:none; border:1px solid var(--border); background:#fff; color:var(--ink); cursor:pointer; }
.btn.primary { background: var(--primary-600); color:#fff; border-color:transparent; }
.btn.primary:hover { background: var(--primary-700); }
.btn.secondary { background: var(--secondary-600); color:#fff; border-color:transparent; box-shadow:0 6px 16px rgba(180,83,9,0.25); }
.btn.secondary:hover { background:#9a4308; }
.btn.ghost { background:transparent; }
.organizations-table {
  --org-col-name: minmax(260px, 2fr);
  --org-col-num: 120px;
  --org-col-actions: 140px;
}
.organizations-table .log-row,
.organizations-table .log-header {
  display: grid;
  grid-template-columns: var(--org-col-name) var(--org-col-num) var(--org-col-num) var(--org-col-num) var(--org-col-actions);
  column-gap: 8px;
  align-items: center;
}
.organizations-table .log-row > span,
.organizations-table .log-header > span {
  padding: 10px 10px;
}
.organizations-table .log-name { text-align: left; }
.organizations-table .log-row > span:not(.log-name),
.organizations-table .log-header > span:not(:first-child) {
  text-align: center;
}
.organizations-table .log-row { background:#fff; }
.organizations-table .log-row + .log-row { border-top: 1px solid var(--border); }
.organizations-table .log-header { text-transform: uppercase; font-size:12px; }
.organizations-table .log-count { font-variant-numeric: tabular-nums; font-weight:600; color: var(--primary-700); }
.organizations-table .log-actions { text-align: center; }
.organizations-table .log-actions form { margin:0; }
.organizations-table .log-name { word-break: break-word; }

#team-edit .field input#m_name {
  width: 90%;
  max-width: 480px;
}




/* Services display-only styles */
.service-card { grid-template-columns: 72px 1fr auto; }
.svc-thumb { width:72px; height:72px; border-radius:12px; border:1px solid var(--border); overflow:hidden; background:#fff; display:flex; align-items:center; justify-content:center; font-weight: 800; color:var(--muted); }
.svc-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.svc-thumb.none { background:#F8FAFF; }
.svc-desc { color: var(--ink); font-size:14px; margin:2px 0 6px; }
.svc-links { margin:6px 0 10px; display:flex; gap:8px; flex-wrap:wrap; }
.svc-links a { font-size:13px; font-weight:600; color:var(--primary-600); text-decoration:none; }
.svc-links a:hover { text-decoration:underline; }
.svc-resources { display:flex; flex-wrap:wrap; gap:6px; }
.svc-resources .pill { background: rgba(30,41,59,0.06); }

/* Resources list */
.resources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
@media (max-width: 900px){ .resources-grid { grid-template-columns: 1fr; }}
.resource-card { grid-template-columns: 64px 1fr auto; }
.resource-thumb { width:64px; height:64px; border-radius:12px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:800; color:var(--primary-700); background:#F8FAFF; }
.resource-services { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.empty-state { color: var(--muted); margin:14px 0; }

/* Booking page */
.booking-page { background: var(--cloud); color: var(--ink); min-height: 100vh; display:flex; flex-direction:column; }
.booking-hero { position: relative; padding: 48px 0 32px; background: linear-gradient(160deg, rgba(30,58,138,0.08), rgba(12,74,110,0.12)); }
.booking-content { padding: 0 0 72px; display:grid; gap:32px; }
.booking-org { display:flex; align-items:center; gap:24px; padding:20px 0 12px 0; flex-wrap:wrap; }
.booking-org__logo { width:88px; height:88px; border-radius:24px; border:1px solid var(--border); background:#fff; box-shadow:0 8px 20px rgba(15,23,42,0.08); display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto; }
.booking-org__logo img { width:100%; height:100%; object-fit:cover; display:block; }
.booking-org__initials { font:700 28px/1 "Space Grotesk"; color:var(--primary-700); letter-spacing:0.04em; }
.booking-org__meta { display:grid; gap:8px; }
.booking-lang {
  position:absolute;
  top:16px;
  right:16px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.booking-lang__options { display:inline-flex; gap:6px; }
.booking-lang .lang-option { border-radius: 10px; }
.booking-org__meta .muted-note { margin:0; }
@media (max-width: 720px){
  .booking-org { flex-direction:column; align-items:flex-start; padding-top:12px; }
  .booking-org__logo { width:72px; height:72px; border-radius:20px; }
  .booking-lang { top:12px; right:12px; }
}
.booking-intro { display:grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap:24px; align-items:start; }
@media (max-width: 900px){ .booking-intro { grid-template-columns: 1fr; }}
.booking-form { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding:24px; display:grid; gap:18px; }
.booking-form h2 { margin:0; font:700 20px/1.2 "Space Grotesk"; color:var(--primary-700); }
.booking-form label { display:block; font-weight:600; color:var(--primary-700); margin-bottom:6px; }
.booking-form select { width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font:inherit; background:#fff; color:var(--ink); }
.booking-form .muted-note { margin:0; font-size:14px; }
.booking-form button { align-self:start; }
.mode-banner { border-radius: 12px; padding: 12px 16px; background: rgba(10, 122, 196, 0.12); border-left: 4px solid #0a7ac4; color: #0f172a; font-weight: 600; }
.mode-banner.is-hidden { display: none; }
.mode-banner--warning { background: rgba(220, 38, 38, 0.12); border-left-color: #dc2626; color: #7f1d1d; }
.mode-banner--success { background: rgba(22, 163, 74, 0.12); border-left-color: #16a34a; color: #14532d; }
.mode-banner .banner-sub { display:block; margin-top:6px; font-weight:500; font-size:14px; }
.cancel-card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding:24px; display:grid; gap:18px; }
.cancel-actions { display:flex; gap:12px; flex-wrap:wrap; }
.btn.danger { background:#dc2626; color:#fff; border-color:#dc2626; }
.btn.danger:hover { background:#b91c1c; border-color:#b91c1c; }
.is-hidden { display:none !important; }
.slots-list li.is-current { border-color:#16a34a; background:rgba(22,163,74,0.12); }
.slots-list li.is-current .slot-status { color:#166534; }
.cancel-modal__card { gap:16px; }
.cancel-modal__actions { display:flex; gap:12px; justify-content:flex-end; flex-wrap:wrap; }
.booking-page--cancel .booking-layout { display:none; }
.booking-page--cancel .booking-feedback { display:none; }
.booking-page--cancel .booking-intro { grid-template-columns: 1fr; }
.service-summary { border:1px solid var(--border); border-radius:12px; padding:16px; background:#fff; display:flex; gap:16px; align-items:flex-start; }
.service-summary.is-empty { justify-content:center; color:var(--muted); font-style:italic; }
.service-summary__avatar { width:64px; height:64px; border-radius:16px; border:1px solid var(--border); background:#F1F5F9; display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--primary-700); flex:0 0 auto; overflow:hidden; }
.service-summary__avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.service-summary__avatar--initials { font-size:20px; letter-spacing:0.04em; }
.service-summary__text { display:grid; gap:6px; }
.service-summary__title { margin:0; font:600 16px/1.3 "Space Grotesk"; color:var(--primary-700); }
.service-summary__desc { margin:0; font-size:14px; color:var(--muted); line-height:1.45; }
.booking-help { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding:24px; box-shadow: var(--shadow); position:relative;}
.booking-help h2 { margin:0 0 12px; font:700 18px/1.3 "Space Grotesk"; color:var(--primary-700); }
.booking-help ol { margin:0 0 12px; padding-left:20px; }
.booking-help .close-outline{display:none;}
.booking-layout { display:grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap:24px; align-items:start; }
@media (max-width: 1024px){ .booking-layout { grid-template-columns: 1fr; }}
.booking-help{position:relative;}
.booking-help .close-outline{display:none; position:absolute; top:12px; right:12px; width:14px; height:14px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); opacity:0.5;}
.booking-help .close-outline::before{content:""; position:absolute; top:0; left:0; width:14px; height:14px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(90deg);}
.booking-card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding:24px; display:grid; gap:18px; }
.card-head h2 { margin:0; font:700 18px/1.2 "Space Grotesk"; color:var(--primary-700); }
.calendar-shell { min-height: 480px; }
.slots-list { list-style:none; margin:0; padding:0; display:grid; gap:10px; max-height:400px; overflow-y:auto; }
.slots-list li { border:1px solid var(--border); border-radius:12px; padding:10px 12px; background:#fff; display:flex; justify-content:space-between; align-items:center; font-weight:600; color:var(--primary-700); cursor:pointer; transition:background 0.2s, color 0.2s, border-color 0.2s; }
.slots-list li:hover { background:#EEF2FF; }
.slots-list li.is-available { border-color: var(--primary-600); }
.slots-list li.is-unavailable { color:var(--muted); cursor:not-allowed; background:#F3F4F6; }
.slots-list li.is-unavailable:hover { background:#F3F4F6; }
.slots-placeholder { color:var(--muted); font-weight:500; justify-content:flex-start; cursor:default; }
.slots-placeholder:hover { background:#fff; }
.slot-time { font-size:14px; font-weight:600; }
.slot-status { font-size:12px; font-weight:600; }
.is-available .slot-status { color:var(--primary-600); }
.is-unavailable .slot-status { color:var(--muted); }
.booking-feedback { font-weight:600; color:var(--primary-700); }
.booking-feedback pre { background:#0f172a; color:#e2e8f0; padding:16px; border-radius:12px; overflow:auto; max-height:220px; font-size:12px; }
.booking-modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,0.4); backdrop-filter: blur(6px); z-index:90; align-items:center; justify-content:center; padding:24px; }
.booking-modal.is-open { display:flex; }
.booking-modal__card { background:var(--card); border-radius:var(--radius); box-shadow:0 24px 40px rgba(15,23,42,0.25); border:1px solid var(--border); padding:24px; width:min(520px, 94vw); display:grid; gap:16px; box-sizing:border-box; }
.booking-modal__card--form { width:min(480px, 94vw); }
.booking-modal__card h3 { margin:0; font:700 20px/1.2 "Space Grotesk"; color:var(--primary-700); }
.booking-modal__form { display:grid; gap:16px; }
.booking-modal__form .input { width:100%; box-sizing:border-box; font-size:16px; }
.booking-form-actions { justify-content:space-between; }
.booking-modal__actions { display:flex; gap:12px; justify-content:flex-end; }
.booking-legal { font-size: 12px; color: var(--muted); margin: 4px 0 0; line-height: 1.35; }
.booking-legal a { color: var(--primary-700); text-decoration: underline; }
.booking-legal a:hover { color: var(--primary-900); }
.booking-success-details { border:1px solid var(--border); border-radius:12px; padding:12px 14px; background:#f8fafc; display:grid; gap:8px; }
.booking-success-details .detail-row { display:grid; grid-template-columns:120px 1fr; gap:8px; padding:4px 0; border-bottom:1px solid #e2e8f0; font-size:14px; }
.booking-success-details .detail-row:last-child { border-bottom:0; }
.booking-success-details .label { color: var(--muted); font-weight:600; }
.booking-success-details .value { color: var(--ink); font-weight:600; }
.booking-success-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; width:100%; }
.booking-success-actions .btn { width:100%; box-sizing:border-box; }
.booking-success-actions .btn.primary { grid-column: 1 / -1; }
.booking-page footer { margin-top:auto; }
.booking-page .fc .fc-daygrid-day { cursor:pointer; border-radius:12px; transition:background 0.2s ease, box-shadow 0.2s ease; }
.booking-page .fc .fc-daygrid-body table { border-collapse:separate; border-spacing:5px 3px; }
.booking-page .fc .fc-daygrid-day { padding:0; }
.booking-page .fc .fc-daygrid-day-frame { border-radius:4px; padding:0; min-height:14px; }
.booking-page .fc .fc-daygrid-day-number { font-size:0.85rem; font-weight:600; }
.booking-page .fc { --fc-daygrid-row-height: 18px; }
.booking-page .fc .custom-selected-day { background: #dbe3ff !important; color:#1e3a8a !important; box-shadow:inset 0 0 0 2px #9aabd9; border:2px solid transparent; }
.booking-page .fc .fc-day-past { background: rgba(148,163,184,0.12) !important; color: var(--muted) !important; cursor:not-allowed; }
.booking-page .fc .fc-daygrid-day.fc-day-unavailable { opacity:0.4; cursor:not-allowed; }
.booking-page .fc .fc-daygrid-day.fc-day-unavailable .fc-daygrid-day-number { color: var(--muted); }
.booking-page .fc .fc-daygrid-day.fc-day-available:not(.fc-day-unavailable) {
  background: #9aabd9;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(154, 171, 217, 0.35);
}
.booking-page .fc .fc-daygrid-day.fc-day-available:not(.fc-day-unavailable):hover {
  background: #274bb3;
  color: #fff;
}
.booking-page .fc .fc-daygrid-day.fc-day-available .fc-daygrid-day-number { font-weight:600; }
.booking-page .fc .fc-daygrid-day.fc-day-today:not(.fc-day-unavailable):not(.custom-selected-day) { border:2px dashed var(--primary-400); }
.booking-page .fc .fc-daygrid-day.fc-holiday,
.booking-page .fc .fc-timegrid-col.fc-holiday,
.fc .fc-daygrid-day.fc-holiday,
.fc .fc-timegrid-col.fc-holiday {
  background: #f4efff !important;
  color: #4b3ba8;
  border-color: #c3b3ff !important;
}
.booking-page .fc .fc-daygrid-day.fc-holiday .fc-daygrid-day-number,
.fc .fc-daygrid-day.fc-holiday .fc-daygrid-day-number,
.fc-holiday .fc-col-header-cell-cushion {
  color: #4b3ba8;
  font-weight: 700;
}
.fc .fc-daygrid-day.fc-holiday .fc-daygrid-day-frame,
.fc .fc-daygrid-day.fc-holiday .fc-daygrid-day-top {
  background: transparent !important;
}
.page-dashboard .fc .fc-daygrid-day.fc-holiday,
.page-dashboard .fc .fc-timegrid-col.fc-holiday {
  background: #f4efff !important;
  color: #4b3ba8;
  border-color: #c3b3ff !important;
}
.page-dashboard .fc .fc-holiday .fc-daygrid-day-number,
.page-dashboard .fc .fc-holiday .fc-col-header-cell-cushion {
  color: #4b3ba8;
  font-weight: 700;
}
.fc-holiday-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e4d9ff;
  color: #4b3ba8;
  border: 1px solid #c3b3ff;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.fc-holiday-chip { display: none; }
@media (max-width: 768px) {
  .fc-holiday-chip { display: inline-flex; }
}

.booking-card.booking-success { text-align:center; display:grid; gap:16px; }
.booking-card.booking-success .muted-note { margin:0; }

@media (max-width: 900px) {
  .booking-help { display:none; }
  .booking-hero .muted-note { display:none; }
}

@media (max-width: 640px) {
  .booking-modal__card { width:min(560px, 94vw); padding:20px; gap:14px; }
  .booking-modal__card--form { width:min(480px, 94vw); }
  .booking-success-details .detail-row { grid-template-columns: 1fr; }
  .booking-success-actions { grid-template-columns: 1fr; }
  .booking-success-actions .btn.primary { grid-column: 1 / -1; }
  .booking-form-actions { flex-direction: column; }
  .booking-form-actions .btn { width:100%; }
}

.booking-page .fc .fc-toolbar { display:flex; flex-wrap:nowrap; gap:10px; align-items:center; justify-content:space-between; }
.booking-page .fc .fc-toolbar > * { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.booking-page .fc .fc-toolbar .fc-toolbar-chunk { display:flex; align-items:center; gap:8px; }
.booking-page .fc .fc-toolbar-title { font-size:18px; font-weight:700; color:var(--primary-700); }
@media (max-width: 480px) {
  .booking-page .fc .fc-toolbar { flex-wrap:wrap; gap:6px; }
  .booking-page .fc .fc-toolbar .fc-toolbar-chunk:first-child { order:1; width:100%; justify-content:space-between; }
  .booking-page .fc .fc-toolbar .fc-toolbar-chunk:nth-child(2) { width:100%; flex:1; justify-content:center; }
  .booking-page .fc .fc-toolbar .fc-toolbar-chunk:last-child { order:3; width:100%; justify-content:space-between; }
  .booking-page .fc .fc-toolbar-title { flex:1; text-align:center; font-size:16px; }
}

@media (max-width: 600px){
  .booking-page .fc { --fc-daygrid-row-height: auto; }
  .booking-page .fc .fc-daygrid-body table { border-spacing: 4px; }
  .booking-page .fc .fc-daygrid-day-frame {
    aspect-ratio: 1 / 1;
    min-height: auto;
    padding: 6px;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
  }
  .booking-page .fc .fc-daygrid-day-number { display:flex !important; align-items:center !important; justify-content:center !important; width:100%; margin:0 !important; padding:0 !important; }
  .booking-page .fc .fc-daygrid-day-top { width:100%; display:flex !important; justify-content:center !important; padding:0 !important; flex:0 0 100%; }
  .booking-page .fc .fc-daygrid-day-top .fc-daygrid-day-number { flex:1; margin:0 !important; text-align:center; padding:0 !important; }
  .booking-page .fc .fc-daygrid-day-events { display:none !important; }
}
.org-edit textarea.textarea-large { min-height: 4.5em; width: 100%; }

.section-note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.cal-legend { display:flex; align-items:center; gap:12px; margin-top:8px; font-size:12px; color: var(--muted); flex-wrap: wrap; }
.legend-item { display:flex; align-items:center; gap:6px; }
.legend-swatch { width:16px; height:10px; border-radius:4px; display:inline-block; border:1px solid var(--border); pointer-events:none; }
.legend-swatch.light { background:#d1fae5; border-color:#34d399; }
.legend-swatch.amber { background:#fef3c7; border-color:#f59e0b; }
.legend-swatch.red { background:#fecdd3; border-color:#f87171; }
.legend-swatch.holiday { background:#e4d9ff; border-color:#7f5bd5; }
