:root {
  --teal: #009ca6;
  --deep: #0c4050;
  --ink: #17363d;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #d5e2e1;
  --muted: #607377;
  --coral: #e56f4c;
  --gold: #d9a441;
  --leaf: #4d8b6f;
  --danger: #a43e3e;
  --shadow: 0 18px 48px rgba(8, 46, 55, .16);
}

.conditional-field {
  display: grid;
  gap: 8px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #cfe2e4;
  border-radius: 999px;
  color: #31575b;
  background: #f5fafb;
  font-size: .78rem;
  font-weight: 800;
}

.role-pill.company-role {
  color: #8b441f;
  border-color: #f2c5a5;
  background: #fff4ec;
}

.company-admin-head,
.company-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.company-admin-head {
  margin-bottom: 22px;
}

.company-admin-head h3,
.company-form-title h3 {
  margin: 2px 0 5px;
}

.company-admin-head p,
.company-form-title p {
  margin: 0;
}

.company-form {
  max-width: none;
  margin-bottom: 24px;
  border: 1px solid #c9e1e3;
  background: linear-gradient(135deg, #ffffff 0%, #f3faf9 100%);
}

.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.company-form-grid label {
  display: grid;
  gap: 8px;
}

.company-logo-hint {
  margin: 14px 0 0;
  color: #647b7e;
  font-size: .86rem;
}

.company-data-panel {
  min-height: 250px;
}

.company-logo-thumb {
  display: block;
  width: 78px;
  height: 48px;
  object-fit: contain;
  padding: 4px;
  border: 1px solid #d7e5e6;
  border-radius: 6px;
  background: #fff;
}

.company-logo-empty {
  color: #718689;
  font-size: .76rem;
}

@media (max-width: 760px) {
  .company-admin-head,
  .company-form-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-form-grid {
    grid-template-columns: 1fr;
  }
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: .78rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.login-body { background: #082d34; color: white; }

.staff-login {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  grid-template-rows: auto 1fr;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
}

.login-background {
  position: fixed;
  z-index: -2;
  inset: -3%;
  background: url("login-bg.jpg") center 46% / cover no-repeat;
  animation: gentle-zoom 24s ease-in-out infinite alternate;
}

.login-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--mask) 0%, color-mix(in srgb, var(--mask) 92%, transparent) 58%, color-mix(in srgb, var(--mask) 78%, transparent) 100%);
}

@keyframes gentle-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

.login-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(24px, 4vw, 64px);
}

.brand-mini, .app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mini img, .app-brand img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
}

.back-link {
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  font-weight: 600;
  text-underline-offset: 4px;
}

.welcome-copy {
  align-self: center;
  max-width: 900px;
  padding: 40px clamp(24px, 7vw, 110px) 120px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .48), 0 1px 2px rgba(0,0,0,.75);
}

.welcome-copy .eyebrow { color: #c6fff2; }

.welcome-copy h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2.15rem, 4.1vw, 4.8rem);
  line-height: 1.13;
  letter-spacing: 0;
}

.current-time {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
  color: rgba(255,255,255,.9);
}

.current-time span { font-size: .98rem; text-transform: capitalize; }
.current-time strong { font-size: 1.4rem; }

.access-panel {
  align-self: center;
  width: min(520px, calc(100% - 48px));
  margin: 24px auto 80px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px;
  background: rgba(249, 251, 248, .92);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.access-panel h2 { margin: 0 0 24px; font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.2; }

.login-form { display: grid; gap: 10px; }
.login-form label, .form-panel label { margin-top: 7px; color: var(--deep); font-size: .88rem; font-weight: 700; }

input, select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  outline: none;
}

input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0,156,166,.13); }

.password-field { position: relative; }
.password-field input { padding-right: 62px; }
.password-field .icon-button { position: absolute; top: 5px; right: 5px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.84);
  color: var(--deep);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}

.remember-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; color: var(--muted) !important; font-weight: 500 !important; }
.remember-row input { width: 18px; min-height: 18px; accent-color: var(--teal); }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.primary-button { background: var(--deep); color: white; }
.primary-button:hover { background: #092f3a; }
.secondary-button { border-color: var(--line); background: white; color: var(--deep); }
.button-link { width: fit-content; }
.security-note { margin: 15px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.crm-login-entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #b6d8da;
  border-radius: 7px;
  background: linear-gradient(105deg, #eaf8f5, #f8fbfa);
  color: var(--deep);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.crm-login-entry:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 10px 25px rgba(5, 75, 82, .12); }
.crm-login-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--deep); color: white; font-size: .7rem; font-weight: 800; }
.crm-login-entry strong, .crm-login-entry small { display: block; }
.crm-login-entry small { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.crm-login-arrow { color: var(--teal); font-size: 1.4rem; }

.alert, .form-feedback {
  padding: 11px 13px;
  border: 1px solid #b8dcd4;
  border-radius: 6px;
  background: #edf8f4;
  color: #255d50;
  font-size: .88rem;
}
.alert { margin-bottom: 14px; }
.alert-error, .form-feedback.error { border-color: #ecc5c5; background: #fff1f1; color: var(--danger); }
.form-feedback:empty { display: none; }
.form-feedback { margin-top: 8px; }

.dashboard-body { background: linear-gradient(135deg, #f4f8f7, #fbf8f2 55%, #f0f5f5); }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 10px clamp(18px, 4vw, 60px);
  border-bottom: 1px solid rgba(213,226,225,.9);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
}

.app-brand img { width: 54px; height: 54px; }
.app-brand span { display: grid; }
.app-brand small, .user-chip small { color: var(--muted); font-size: .74rem; font-weight: 500; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.header-clock { display: grid; justify-items: end; font-size: .78rem; color: var(--muted); }
.header-clock strong { color: var(--deep); font-size: 1rem; }
.user-chip { display: grid; padding-left: 16px; border-left: 1px solid var(--line); text-align: right; }

.dashboard { width: min(1480px, calc(100% - 36px)); margin: 0 auto; padding: clamp(28px, 5vw, 64px) 0 70px; }

.dashboard-intro { max-width: 900px; }
.dashboard-intro h1 { margin: 0 0 12px; font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.08; }
.dashboard-intro > p:last-of-type { max-width: 720px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

.summary-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.summary-strip span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.75); color: var(--muted); font-size: .86rem; }
.summary-strip strong { color: var(--deep); }

.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }

.portal-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  align-items: center;
  gap: 18px;
  min-height: 190px;
  overflow: hidden;
  padding: 26px;
  border: 0;
  border-radius: 8px;
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.portal-card:hover { transform: translateY(-3px); box-shadow: 0 24px 58px rgba(8,46,55,.22); }
.portal-card::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .17; background: url("login-bg.jpg") center / cover; transition: transform 8s ease; }
.portal-card:hover::before { transform: scale(1.06); }
.portal-card > * { position: relative; z-index: 1; }
.staff-card { background: linear-gradient(125deg, #0c4050, #176a71); }
.travelers-card { background: linear-gradient(125deg, #73522a, #a45141); }
.dates-card { background: linear-gradient(125deg, #1f6549, #c07b37); }
.series-card { background: linear-gradient(125deg, #294f80, #6d5aa6); }
.portal-icon { display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; background: rgba(255,255,255,.16); font-weight: 700; }
.portal-card small { display: block; margin-bottom: 6px; color: rgba(255,255,255,.76); }
.portal-card strong { display: block; font-family: "Libre Baskerville", Georgia, serif; font-size: 1.55rem; }
.portal-card p { margin: 8px 0 0; color: rgba(255,255,255,.82); line-height: 1.45; }
.portal-arrow { font-size: 1.8rem; }

.workspace-panel { margin-top: 28px; padding: clamp(20px, 3.5vw, 42px); border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); scroll-margin-top: 96px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0 0 7px; font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(1.6rem, 2.6vw, 2.5rem); }
.panel-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }

.workspace-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; margin-top: 26px; }
.form-panel, .data-panel, .instructions-panel, .export-panel { padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfa; }
.form-panel { display: grid; align-content: start; gap: 8px; }
.form-panel h3, .data-panel h3, .instructions-panel h3, .export-panel h3 { margin: 0 0 12px; color: var(--deep); font-size: 1.14rem; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }

.data-panel { min-width: 0; background: white; }
.data-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.data-toolbar h3, .data-toolbar p { margin: 0; }
.data-toolbar p { color: var(--muted); font-size: .82rem; }
.search-toolbar input { width: min(420px, 50%); }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid #e9efee; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; background: #eff5f4; color: var(--deep); font-size: .76rem; text-transform: uppercase; }
td.name-cell { min-width: 190px; white-space: normal; font-weight: 600; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions .action-circle { width: 30px; height: 30px; flex: 0 0 30px; box-shadow: 0 4px 10px rgba(12,64,80,.12); }
.row-actions .trash-glyph { transform: scale(.82); }
.table-button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--deep); font-size: .76rem; font-weight: 700; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e6f5ef; color: #28634f; font-size: .72rem; font-weight: 700; }
.status-pill.off { background: #f1eded; color: #795050; }

.dates-workspace { display: grid; grid-template-columns: minmax(290px, 350px) minmax(0, 1fr); gap: 24px; margin-top: 26px; }
.date-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.date-form-head h3 { margin-bottom: 0; }
.date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.timeline-panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(135deg, #ffffff, #f7fbfa); }
.dates-timeline { position: relative; display: grid; gap: 24px; margin-top: 18px; }
.dates-timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(0,156,166,.12), rgba(12,64,80,.55), rgba(217,164,65,.18));
}
.month-lane { --month-main: #0c4050; --month-soft: #e8f3f2; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
.month-tone-0 { --month-main: #0c6974; --month-soft: #e5f5f5; }
.month-tone-1 { --month-main: #ad6c2f; --month-soft: #fff2e4; }
.month-tone-2 { --month-main: #356f53; --month-soft: #eaf5ee; }
.month-tone-3 { --month-main: #80629b; --month-soft: #f1ecf7; }
.month-tone-4 { --month-main: #b24f4a; --month-soft: #faecea; }
.month-tone-5 { --month-main: #315f89; --month-soft: #eaf2f8; }
.month-marker { position: relative; z-index: 1; display: grid; align-content: start; gap: 7px; padding-left: 58px; padding-right: 10px; color: var(--muted); }
.month-marker span { position: absolute; left: 7px; top: 0; width: 30px; height: 30px; border: 6px solid white; border-radius: 50%; background: var(--month-main); box-shadow: 0 0 0 1px color-mix(in srgb, var(--month-main) 45%, transparent), 0 10px 22px color-mix(in srgb, var(--month-main) 22%, transparent); }
.month-marker strong { color: var(--month-main); font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(1.35rem, 1.9vw, 1.8rem); line-height: 1.05; }
.month-marker small { font-size: .9rem; font-weight: 800; }
.date-bubbles { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 420px)); justify-content: start; align-items: start; gap: 18px; min-width: 0; }
.date-bubble {
  position: relative;
  width: 100%;
  min-height: 190px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--month-main) 28%, white);
  border-radius: 999px 999px 28px 999px;
  background: radial-gradient(circle at 28% 18%, rgba(255,255,255,.98), var(--month-soft));
  box-shadow: 0 18px 32px color-mix(in srgb, var(--month-main) 16%, transparent);
  animation: date-float 5.8s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
.date-bubble-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.series-pill { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: color-mix(in srgb, var(--month-main) 13%, white); color: var(--month-main); font-size: .78rem; font-weight: 900; }
.date-actions { display: flex; gap: 6px; }
.date-bubble strong { display: block; margin-top: 10px; color: var(--month-main); font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(2.15rem, 3.2vw, 3.2rem); line-height: 1; text-align: center; }
.date-bubble p { margin: 10px 0 2px; color: var(--deep); font-size: .95rem; font-weight: 800; text-align: center; }
.date-bubble small { display: block; color: var(--muted); font-size: .75rem; text-align: center; }
.empty-state { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); background: #fbfcfa; }

.series-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(240px, 1fr) minmax(150px, 190px) auto;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
}

.waitlist-card {
  display: grid;
  gap: 3px;
  min-height: 98px;
  padding: 18px;
  border: 1px solid #cfe1dd;
  border-radius: 8px;
  background: linear-gradient(135deg, #f1f8f7, #fff4e7);
  color: var(--deep);
  text-align: left;
}
.waitlist-card span { color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.waitlist-card strong { font-family: "Libre Baskerville", Georgia, serif; font-size: 2.2rem; line-height: 1; }
.waitlist-card small { color: var(--muted); }
.series-search, .series-goal { display: grid; gap: 7px; color: var(--deep); font-size: .88rem; font-weight: 800; }
.series-goal input { text-align: center; font-weight: 900; }
.series-timeline { margin-top: 26px; }
.series-bubble {
  cursor: pointer;
  border-color: var(--goal-edge, var(--month-soft));
  background: linear-gradient(145deg, rgba(255,255,255,.82), color-mix(in srgb, var(--goal-surface, #f8e3df) 88%, white));
  box-shadow: 0 18px 38px color-mix(in srgb, var(--goal-accent, #ce5d4b) 16%, transparent), inset 0 0 0 1px rgba(255,255,255,.55);
  transition: transform .18s ease, box-shadow .18s ease, background .32s ease, border-color .32s ease;
}
.series-bubble:hover { transform: translateY(-5px); box-shadow: 0 22px 42px color-mix(in srgb, var(--month-main) 22%, transparent); }
.city-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.78); color: var(--deep); font-size: .78rem; font-weight: 900; }
.series-counts { display: flex; justify-content: center; gap: 8px; margin: 14px 0 8px; }
.series-counts span { display: inline-flex; gap: 5px; align-items: baseline; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.78); color: var(--muted); font-size: .76rem; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.65); }
.series-counts .main-count { color: var(--deep); background: rgba(255,255,255,.9); }
.series-counts b { color: var(--month-main); font-family: "Libre Baskerville", Georgia, serif; font-size: 1.38rem; line-height: 1; }
.goal-meter {
  position: relative;
  height: 10px;
  margin: 10px auto 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 49, 55, .12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.68);
}
.goal-meter span {
  display: block;
  width: var(--goal-progress, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--goal-accent, #d84d42);
  transition: width .32s ease;
}
.series-bubble .series-pill { color: var(--goal-accent, var(--month-main)); background: rgba(255,255,255,.76); }
.series-bubble > strong, .series-bubble .series-counts b { color: var(--goal-accent, var(--month-main)); }
.series-bubble .goal-label { color: color-mix(in srgb, var(--goal-accent, #d84d42) 78%, #173f45); }
.goal-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-style: normal;
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.series-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  padding: clamp(12px, 2vw, 28px);
  background: rgba(8, 34, 39, .62);
  backdrop-filter: blur(8px);
}
.series-detail {
  width: min(1680px, 100%);
  max-height: calc(100vh - clamp(24px, 4vw, 56px));
  margin: auto;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 8px;
  background: linear-gradient(140deg, #fbfcfa, #eef7f6);
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
}
.series-detail-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(251,252,250,.92);
  backdrop-filter: blur(16px);
}
.series-overlay-number {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: clamp(1.55rem, 2.9vw, 2.8rem);
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}
.series-detail-head h2 { margin: 0 0 8px; font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(1.8rem, 3.1vw, 3.4rem); line-height: 1.05; }
.series-detail-head p:not(.eyebrow):not(.series-overlay-number) { margin: 0; color: var(--muted); }
.series-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.coordination-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #0f5667);
  color: white;
  box-shadow: 0 16px 34px rgba(10, 129, 138, .24);
  font-weight: 950;
  letter-spacing: .08em;
  cursor: pointer;
}
.coordination-button:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(10, 129, 138, .3); }
.inline-facilitator {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto minmax(180px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 18px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: white;
}
.inline-facilitator label { color: var(--deep); font-weight: 800; }
.coordination-panel {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 34px);
}
.coordination-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fffd, #eef8f5);
}
.coordination-head h3 {
  margin: 0 0 8px;
  color: var(--deep);
  font-size: clamp(1.4rem, 2.1vw, 2rem);
}
.coordination-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-weight: 800; }
.coordination-table-wrap { overflow-x: auto; }
.coordination-table {
  min-width: 1040px;
  table-layout: fixed;
}
.coordination-table th,
.coordination-table td {
  text-align: center;
  vertical-align: middle;
  padding: 10px 8px;
}
.coordination-table th {
  white-space: nowrap;
  font-size: .68rem;
  line-height: 1.1;
}
.coordination-table th:nth-child(1),
.coordination-table td:nth-child(1) { width: 92px; }
.coordination-table th:nth-child(3),
.coordination-table td:nth-child(3) { width: 126px; }
.coordination-table th:nth-child(n+4),
.coordination-table td:nth-child(n+4) { width: 72px; }
.coordination-name-col {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: left !important;
  background: color-mix(in srgb, var(--cream) 90%, white);
  box-shadow: 10px 0 18px rgba(9, 48, 49, .08);
}
.coordination-table thead .coordination-name-col {
  z-index: 4;
  background: color-mix(in srgb, var(--cream) 96%, white);
}
.sort-head {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sort-head span {
  color: var(--teal);
  font-size: .66rem;
}
.attendance-name {
  color: var(--deep);
  background: linear-gradient(90deg, #fff6d9 0%, #f7fffc 100%) !important;
  box-shadow: inset 4px 0 0 var(--gold), 10px 0 18px rgba(9, 48, 49, .08);
}
.coordination-cell {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
}
.coordination-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.coordination-cell span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #c9d9d6;
  border-radius: 7px;
  background: white;
  transition: .18s ease;
}
.coordination-cell input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
}
.coordination-cell input:checked + span::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.coordination-cell.manual { cursor: pointer; }
.coordination-cell.manual span { border-color: color-mix(in srgb, var(--gold) 65%, #d2c2a2); }
.coordination-cell.manual input:checked + span {
  border-color: var(--gold);
  background: var(--gold);
}
.coordination-cell.attendance { cursor: pointer; }
.coordination-cell.attendance span { border-color: color-mix(in srgb, #21a676 45%, #c9d9d6); }
.coordination-cell.attendance input:checked + span {
  border-color: #21a676;
  background: #21a676;
  box-shadow: 0 0 0 4px rgba(33, 166, 118, .12);
}
.coordination-percent {
  min-width: 72px;
  display: grid;
  gap: 6px;
}
.coordination-percent strong {
  color: var(--deep);
  font-size: .95rem;
}
.coordination-percent span {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ecea;
}
.coordination-percent span::before {
  content: "";
  display: block;
  width: var(--coordination-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d94f45 0%, #f0b84f 48%, #21a676 100%);
}
.series-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: clamp(18px, 3vw, 34px);
}
.series-people-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}
.section-title h3 { margin: 0; color: var(--deep); font-size: 1.35rem; }
.section-title-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.add-person-button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  border-radius: 999px;
  background: #f4fbfa;
  color: var(--deep);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.add-person-button:hover { background: #e6f6f4; }
.person-form {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, #dde9e7);
  border-top: 4px solid var(--teal);
  border-radius: 7px;
  background: linear-gradient(180deg, #fbfffe 0%, #fbfcfa 100%);
  box-shadow: 0 14px 32px rgba(9, 48, 49, .08);
  animation: formReveal .2s ease-out both;
}
@keyframes formReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.person-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.person-fields.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-fields textarea {
  min-height: 86px;
  grid-column: 1 / -1;
  resize: vertical;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}
.phone-pair { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px; }
.check-line { display: flex; align-items: center; gap: 8px; color: var(--deep); font-weight: 800; }
.check-line input { width: 18px; min-height: 18px; accent-color: var(--teal); }
.whatsapp-link { color: #1d7f54; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.waitlist-detail { width: min(1280px, 100%); }

.migration-dialog {
  width: min(480px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: white;
  box-shadow: 0 28px 70px rgba(0,0,0,.26);
}
.migration-dialog::backdrop { background: rgba(8,34,39,.55); backdrop-filter: blur(6px); }
.migration-dialog form { display: grid; gap: 10px; padding: 24px; }
.migration-dialog h3 { margin: 0; font-family: "Libre Baskerville", Georgia, serif; font-size: 1.55rem; }
.migration-dialog p { margin: 0 0 8px; color: var(--muted); }
.migration-dialog label { color: var(--deep); font-weight: 800; }

@keyframes date-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.action-circle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: white;
  box-shadow: 0 7px 16px rgba(12,64,80,.14);
}
.action-circle:hover { transform: translateY(-1px); }
.delete-action { background: #cf3f3f; }
.edit-action { background: #f5f0e3; }
.trash-glyph, .edit-glyph { position: relative; display: block; }
.trash-glyph {
  width: 13px;
  height: 14px;
  border: 2px solid #fff;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}
.trash-glyph::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -5px;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}
.trash-glyph::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -8px;
  width: 7px;
  height: 3px;
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.edit-glyph {
  width: 17px;
  height: 5px;
  border-radius: 2px;
  background: var(--deep);
  transform: rotate(-38deg);
}
.edit-glyph::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  border-top: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
  border-right: 5px solid var(--deep);
}
.edit-glyph::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 0;
  width: 3px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: #d9a441;
}

.tab-bar { display: flex; gap: 4px; margin-top: 24px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.tab-button { padding: 11px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 700; }
.tab-button.active { border-color: var(--teal); color: var(--deep); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.import-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(320px, 1.15fr); gap: 24px; margin-top: 26px; }
.instructions-panel { background: #eef6f4; }
.instructions-panel > p:last-child { margin: 18px 0 0; color: var(--muted); line-height: 1.55; }
.column-guide { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: cols; }
.column-guide li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #cfe1dd; border-radius: 6px; background: white; }
.column-guide li span { color: var(--muted); font-size: .8rem; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.report-panel { margin-top: 20px; padding: 20px; border: 1px solid #b8dcd4; border-radius: 7px; background: #edf8f4; }
.report-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.report-stats span { display: grid; padding: 12px; border: 1px solid #cce5df; border-radius: 6px; background: white; color: var(--muted); font-size: .78rem; }
.report-stats strong { color: var(--deep); font-size: 1.35rem; }
.export-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 26px; background: linear-gradient(110deg, #f3f8f7, #fff8ef); }
.export-panel p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.55; }

.accounting-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #b7d6d2;
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--deep);
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}
.accounting-button:hover { background: #e7f5f2; transform: translateY(-1px); }
.inscrito-table { min-width: 1280px; }
.participant-row { transition: background-color .2s ease, box-shadow .2s ease; }
.participant-row.contact-confirmado { background: #e6f5ff; }
.participant-row.contact-no_responde { background: #fff0f3; }
.participant-row.progress-complete, .coordination-table tr.progress-complete { background: #e2f7e9 !important; }
.contact-status {
  min-width: 132px;
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #cadbd8;
  border-radius: 6px;
  background-color: white;
  color: var(--deep);
  font-weight: 800;
}
.observations-cell { min-width: 220px; max-width: 320px; white-space: normal; line-height: 1.4; }
.accounting-table { min-width: 1680px; }
.accounting-table th { white-space: nowrap; }
.accounting-table input, .accounting-table select, .accounting-table textarea {
  min-width: 145px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.accounting-table textarea { width: 230px; min-height: 66px; resize: vertical; }
.compact-check { min-width: 76px; }
.caravana-admin-card { background: linear-gradient(135deg, #164c51, #b36c45); }
.book-portal-card { background: linear-gradient(135deg, #0c555c, #c17853); }
.book-coverage-alert { margin: 22px 0 14px; padding: 16px 18px; border: 1px solid var(--line); border-left: 6px solid var(--teal); background: #edf8f6; color: var(--deep); font-weight: 800; }
.book-coverage-alert.danger { border-color: #e5a4aa; border-left-color: #b12b3a; background: #fff0f2; color: #8b1d2b; }
.book-coverage-alert.success { border-left-color: #2f9d68; }
.book-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.book-summary-grid article { min-width: 0; padding: 18px; border: 1px solid var(--line); background: #f7fbfa; }
.book-summary-grid small,.book-summary-grid strong { display: block; }
.book-summary-grid small { min-height: 34px; color: var(--muted); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.book-summary-grid strong { margin-top: 8px; color: var(--deep); font: 700 1.5rem Georgia,serif; overflow-wrap: anywhere; }
.book-pool-form { display: grid; grid-template-columns: minmax(220px,1fr) 170px auto auto minmax(120px,1fr); gap: 10px; align-items: end; margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.book-pool-form label { grid-column: 1; color: var(--deep); font-weight: 800; }
.book-pool-form input { grid-column: 2; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; }
.book-pool-form .form-feedback { margin: 0; align-self: center; }
.book-buyers-panel,.book-renewals-panel { margin-top: 14px; }
.caravana-event-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.caravana-event-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 16px;
  min-height: 160px;
  padding: 22px;
  border: 1px solid #d6e3e0;
  border-radius: 8px;
  text-align: left;
  background: #f7fbfa;
  color: var(--deep);
  cursor: pointer;
}
.caravana-event-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(8, 46, 55, .12); }
.caravana-event-card .event-number { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--teal); color: white; font-family: "Libre Baskerville", Georgia, serif; font-size: 1.8rem; font-weight: 700; }
.caravana-event-card small { display: block; margin-bottom: 5px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.caravana-event-card strong { display: block; font-family: "Libre Baskerville", Georgia, serif; font-size: 1.25rem; }
.caravana-event-card p { margin: 7px 0 0; color: var(--muted); }
.caravana-event-detail { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

@media (max-width: 980px) {
  .staff-login { grid-template-columns: minmax(0, 1fr); }
  .login-topbar, .welcome-copy, .access-panel { min-width: 0; max-width: 100%; }
  .welcome-copy { padding-bottom: 30px; }
  .access-panel { margin-top: 0; }
  .workspace-grid, .import-layout, .dates-workspace, .series-detail-grid, .series-toolbar { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .header-clock { display: none; }
  .series-detail-head, .coordination-head { align-items: stretch; flex-direction: column; }
  .series-head-actions { justify-content: space-between; }
  .caravana-event-cards { grid-template-columns: 1fr; }
  .book-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .book-pool-form { grid-template-columns: 1fr; align-items: stretch; }
  .book-pool-form label,.book-pool-form input { grid-column: auto; }
  .inline-facilitator { grid-template-columns: 1fr; align-items: stretch; }
}

@media (max-width: 640px) {
  .login-topbar { align-items: flex-start; padding: 15px 16px; }
  .brand-mini span { display: none; }
  .brand-mini img { width: 48px; height: 48px; }
  .back-link { flex: 0 1 170px; max-width: 170px; text-align: right; white-space: normal; }
  .welcome-copy { padding: 26px 20px 24px; }
  .welcome-copy h1 { max-width: 100%; font-size: clamp(1.75rem, 9vw, 2.45rem); overflow-wrap: anywhere; }
  .current-time { flex-wrap: wrap; gap: 4px 10px; }
  .current-time { margin-bottom: 18px; }
  .access-panel { width: calc(100% - 24px); margin-bottom: 24px; }
  .app-header { align-items: flex-start; padding: 9px 12px; }
  .app-brand span { display: none; }
  .header-tools { gap: 8px; }
  .user-chip { max-width: 148px; padding-left: 8px; overflow: hidden; }
  .user-chip span, .user-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard { width: min(100% - 24px, 1480px); padding-top: 28px; }
  .portal-card { grid-template-columns: 54px 1fr; min-height: 176px; padding: 20px; }
  .portal-icon { width: 52px; height: 52px; font-size: .8rem; }
  .portal-arrow { display: none; }
  .workspace-panel { padding: 16px; }
  .panel-heading { gap: 10px; }
  .tab-bar { overflow-x: auto; }
  .tab-button { white-space: nowrap; }
  .search-toolbar { align-items: stretch; flex-direction: column; }
  .search-toolbar input { width: 100%; }
  .data-panel { padding: 12px; }
  .timeline-panel { padding: 12px; }
  .dates-timeline::before { left: 12px; }
  .month-lane { grid-template-columns: 1fr; gap: 10px; }
  .month-marker { padding-left: 42px; min-height: 32px; }
  .month-marker span { left: 1px; }
  .date-fields { grid-template-columns: 1fr; }
  .date-bubbles { grid-template-columns: 1fr; }
  .series-overlay { padding: 8px; }
  .series-detail { max-height: calc(100vh - 16px); }
  .series-detail-head { padding: 16px; }
  .coordination-panel { padding: 12px; }
  .series-detail-grid { padding: 12px; }
  .series-people-section { padding: 12px; }
  .person-fields, .person-fields.compact { grid-template-columns: 1fr; }
  .phone-pair { grid-template-columns: 96px minmax(0, 1fr); }
  .report-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .export-panel { align-items: flex-start; flex-direction: column; }
  .button-link { width: 100%; }
  .caravana-event-card { grid-template-columns: 58px minmax(0, 1fr); padding: 16px; }
  .caravana-event-card .event-number { width: 54px; height: 54px; font-size: 1.3rem; }
  .caravana-event-card .portal-arrow { display: none; }
  .book-summary-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.book-balance-stamp { display: block; margin-top: 8px; color: #667d82; font-size: 12px; font-weight: 700; }
.book-balance-note { margin: -6px 0 22px; padding: 12px 15px; border-left: 3px solid #0aa0ad; background: #edf7f6; color: #48666b; font-size: 13px; }
