:root {
  --bg:     #dfe3e8;
  --header: #30343a;
  --navy:   #163a63;
  --blue:   #0f6ea8;
  --muted:  #64748b;
  --text:   #1f2937;
  --card:   #ffffff;
  --line:   #dbe4ef;
  --soft:   #f7fbff;
  --green:  #1f9d6a;
  --red:    #e4554e;
  --shadow: 0 10px 24px rgba(15,23,42,.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-inner {
  height: 64px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
}
.logo { height: 42px; width: 150px; object-fit: contain; display: block; }
.header-title { font-size: 18px; font-weight: 900; letter-spacing: .03em; flex: 1; }
.user-info { text-align: right; font-size: 13px; line-height: 1.25; }
.user-info span { display: block; color: #cbd5e1; }
.logout {
  border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: #fff;
  border-radius: 10px; padding: 10px 16px;
  font-weight: 800; cursor: pointer;
}

/* ── Welcome banner ── */
.welcome {
  background: var(--header);
  border-top: 1px solid rgba(255,255,255,.12);
  color: #fff; text-align: center; padding: 18px 20px;
}
.welcome h2 { margin: 0 0 8px; font-size: 18px; }
.welcome p {
  max-width: 980px; margin: 0 auto;
  color: #e2e8f0; font-size: 14px; line-height: 1.45;
}

/* ── Step tabs ── */
.step-tabs {
  position: sticky; top: 64px; z-index: 40;
  display: grid; grid-template-columns: repeat(5,1fr);
  background: #fff; border-bottom: 1px solid #cbd5e1;
  box-shadow: var(--shadow);
}
.step-tab {
  position: relative; min-height: 82px;
  border: 0; border-right: 1px solid #cbd5e1;
  background: #fff; color: #172033;
  cursor: pointer; padding: 14px 12px;
  text-align: center; font-weight: 900;
}
.step-tab:last-child { border-right: 0; }
.step-tab.active { background: var(--blue); color: #fff; }
.step-label        { font-size: 16px; line-height: 1.15; }
.step-label-mobile { display: none; }
.step-pct          { font-size: 20px; margin-top: 6px; }
.step-bar   { position: absolute; bottom: 0; left: 0; right: 0; height: 8px; background: #eef2f7; }
.step-fill  { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.step-tab.active .step-fill { background: #fff; }

/* ── Mobile step nav ── */
.mobile-step-nav {
  display: none;
  position: sticky; top: 56px; z-index: 40;
  background: #fff; border-bottom: 1px solid #cbd5e1;
  padding: 12px; box-shadow: var(--shadow);
}
.mobile-step-card {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px;
}
.mobile-step-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mobile-step-kicker { font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.mobile-step-title  { font-size: 18px; color: var(--navy); font-weight: 900; }
.mobile-step-pct    { font-size: 24px; color: var(--blue); font-weight: 900; }

.progress-track {
  height: 8px; border: 1px solid #d9e3ef;
  background: #fff; border-radius: 999px; overflow: hidden; margin-top: 10px;
}
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .3s; }

select {
  width: 100%; border: 1px solid #cbd5e1; background: #fff;
  border-radius: 12px; padding: 12px;
  font-size: 16px; font-weight: 700; color: #334155; margin-top: 12px;
}

/* ── Layout ── */
.layout {
  max-width: 1500px; margin: 0 auto;
  padding: 24px;
  display: grid; grid-template-columns: 310px 1fr; gap: 24px;
}
.layout.no-sidebar { grid-template-columns: 1fr; }

/* ── Sidebar ── */
.sidebar {
  position: sticky; top: 170px; align-self: start;
  background: #fff; border: 1px solid var(--line);
  border-radius: 24px; padding: 20px; box-shadow: var(--shadow);
}
.sidebar h3 { margin: 0 0 16px; color: var(--navy); font-size: 22px; }

.section-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  text-align: left; border: 1px solid transparent;
  background: #fff; color: #475569;
  border-radius: 16px; padding: 13px 12px; margin-bottom: 8px;
  cursor: pointer; font-weight: 600; font-size: 15px;
}
.section-btn.active { background: var(--soft); border-color: var(--line); color: var(--navy); font-weight: 900; }
.section-dot {
  width: 20px; height: 20px; border: 2px solid #cbd5e1;
  border-radius: 999px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
}
.section-btn.done .section-dot { background: var(--green); border-color: var(--green); }

.progress-box {
  margin-top: 22px; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 18px; padding: 16px;
}
.progress-box strong { color: var(--navy); display: block; margin-bottom: 8px; }
.progress-count { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ── Mobile section nav ── */
.mobile-section-nav {
  display: none; /* shown only on mobile via .active class */
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; box-shadow: var(--shadow);
}
.mobile-sec-nav-btns {
  display: flex; gap: 10px; margin-top: 12px;
}
.mobile-sec-nav-btn {
  flex: 1; padding: 10px 0; font-size: 15px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--soft); color: var(--navy); cursor: pointer;
}
.mobile-sec-nav-btn:disabled { opacity: .4; cursor: default; }
.mobile-sec-nav-btn:not(:disabled):active { background: #dbeafe; }

/* ── Main content ── */
.content { min-width: 0; }
.page-title {
  font-size: 42px; line-height: 1.15;
  margin: 0 0 20px; color: #172033; font-weight: 900;
}

/* ── Cards ── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 28px; padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.card h2 { margin: 0 0 14px; color: var(--navy); font-size: 32px; }
.card h3 { color: var(--navy); font-size: 24px; margin: 24px 0 10px; }
.card p, .card li { font-size: 18px; line-height: 1.55; color: #334155; }
.card ul, .card ol { font-size: 18px; line-height: 1.55; color: #334155; padding-left: 28px; }

.callout {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; margin-top: 18px;
}
.callout p { font-size: 20px; color: #1d4978; }
.callout h3 { margin-top: 0; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }

/* ── Bonus cards ── */
.bonus-card {
  background: #f8fbff; border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; text-align: center;
}
.bonus-card.highlight { border: 2px solid #cfe0f8; }
.bonus-title  { font-size: 20px; font-weight: 900; color: var(--navy); }
.bonus-amount { font-size: 48px; font-weight: 900; color: var(--navy); margin: 16px 0 8px; }
.bonus-sub    { font-size: 15px; font-weight: 700; color: var(--muted); }

/* ── Mini cards ── */
.mini-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.mini-card h4 { margin: 0 0 8px; color: var(--navy); font-size: 21px; }
.mini-card p  { margin: 0; font-size: 18px; color: #475569; }

.holiday-list {
  margin-top: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  font-size: 17px; line-height: 1.6; color: #1d4978;
}

/* ── Tables ── */
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 18px; }
th { background: #f8fbff; color: var(--navy); font-size: 15px; text-transform: uppercase; font-weight: 900; }
tr:last-child td { border-bottom: 0; }

/* ── Videos ── */
.video-wrap {
  margin-top: 18px; background: #0f172a;
  border-radius: 18px; overflow: hidden;
  aspect-ratio: 16/9; position: relative;
}
.video-wrap video { width: 100%; height: 100%; display: block; }

/* ── Legacy section content ── */
.legacy-content img { max-width: 100%; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.legacy-content h3:first-child { margin-top: 0; }
.legacy-content center { display: block; text-align: center; }

/* Audio players in sales script sections */
.script-section { margin-bottom: 28px; }
.script-header {
  background: var(--blue); color: #fff;
  padding: 14px 20px; border-radius: 14px 14px 0 0;
  font-size: 20px; font-weight: 900;
}
.script-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.script-col { padding: 18px; border: 1px solid var(--line); }
.script-col.effective   { background: #f0fdf4; border-color: #86efac; }
.script-col.ineffective { background: #fff1f2; border-color: #fca5a5; }
.script-col-header { font-weight: 900; font-size: 16px; margin-bottom: 10px; padding: 6px 12px; border-radius: 8px; display: inline-block; }
.script-col.effective   .script-col-header { background: #dcfce7; color: #15803d; }
.script-col.ineffective .script-col-header { background: #fee2e2; color: #dc2626; }
audio { width: 100%; margin-top: 10px; }

.yellowHighlight { background: #fef08a; padding: 1px 3px; border-radius: 3px; }
.bright-blue { color: var(--blue); }
.bold { font-weight: 900; }

/* ── Acknowledgment card ── */
.ack-card label { display: flex; gap: 12px; align-items: flex-start; font-size: 20px; color: #334155; }
.ack-card input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.typed-name {
  width: 100%; max-width: 700px; margin-top: 16px;
  border: 1px solid var(--line); background: #f8fafc;
  border-radius: 12px; padding: 15px 18px;
  font-size: 18px; color: #334155;
}
.ack-actions { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.save-btn {
  background: var(--red); color: #fff; border: 0;
  border-radius: 14px; padding: 16px 28px;
  font-size: 20px; font-weight: 900; cursor: pointer;
}
.save-btn:disabled { opacity: .5; cursor: not-allowed; }
.media-gate-notice {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 18px; color: #78350f; font-weight: 600; line-height: 1.5;
}
.media-gate-icon { font-size: 18px; flex-shrink: 0; line-height: 1.5; }
.completed-pill {
  display: inline-block; background: #ecf8f3;
  border: 1px solid #bdebd3; color: #126a46;
  border-radius: 999px; padding: 8px 12px; font-weight: 900; margin-bottom: 12px;
}

/* ── Loading state ── */
.loading-msg { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 18px; }

/* ── Personal info form ── */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 24px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 700; font-size: 15px; color: var(--navy); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 12px 14px; font-size: 16px; color: #334155;
  background: #f8fafc; width: 100%;
}
.form-group input:focus,
.form-group select:focus {
  outline: 2px solid var(--blue); outline-offset: 1px;
  background: #fff;
}
.form-group .required { color: var(--red); }
.tz-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tz-btn {
  border: 2px solid var(--line); background: #f8fafc;
  border-radius: 10px; padding: 10px 16px;
  font-weight: 700; font-size: 14px; color: #475569; cursor: pointer;
}
.tz-btn.selected { border-color: var(--blue); background: var(--soft); color: var(--navy); }
.photo-preview {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--line);
  display: block; margin-bottom: 12px;
}
.form-submit-btn {
  background: var(--blue); color: #fff; border: 0;
  border-radius: 14px; padding: 16px 36px;
  font-size: 18px; font-weight: 900; cursor: pointer; margin-top: 8px;
}
.form-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.form-msg { padding: 12px 16px; border-radius: 10px; font-size: 16px; margin-top: 12px; display: none; }
.form-msg.success { background: #ecf8f3; color: #126a46; border: 1px solid #bdebd3; }
.form-msg.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ── Employee documents ── */
.docs-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.doc-row td { background: #fff; border: 1px solid var(--line); padding: 16px; vertical-align: middle; }
.doc-row td:first-child { border-radius: 14px 0 0 14px; font-weight: 700; font-size: 15px; color: var(--navy); width: 200px; }
.doc-row td:last-child  { border-radius: 0 14px 14px 0; }
.doc-row td + td { border-left: 0; }
.doc-action-btn {
  display: inline-block; border: 0; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-online { background: var(--blue); color: #fff; }
.btn-view   { background: #ecf8f3; color: #126a46; }
.btn-upload { background: var(--soft); color: var(--navy); border: 1px solid var(--line); }
.missing-alert {
  background: #fef2f2; border: 1px solid #fca5a5;
  color: #b91c1c; border-radius: 14px; padding: 16px 20px; margin-bottom: 20px;
  font-size: 16px;
}
.pandadoc-modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.65); align-items: center; justify-content: center;
}
.pandadoc-modal.open { display: flex; }
.pandadoc-inner {
  background: #fff; border-radius: 20px; overflow: hidden;
  width: 90%; max-width: 900px; height: 85vh;
  display: flex; flex-direction: column;
}
.pandadoc-header {
  background: var(--navy); color: #fff;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
}
.pandadoc-header button {
  background: transparent; border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer;
}
.pandadoc-inner iframe { flex: 1; border: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .header-inner { height: 56px; padding: 0 12px; gap: 12px; }
  .logo { height: 34px; width: 94px; }
  .header-title { font-size: 13px; }
  .user-info { display: none; }
  .logout { padding: 8px 12px; font-size: 12px; }
  .welcome { padding: 12px; }
  .welcome p { font-size: 13px; }

  /* Step tabs: equal-width row, no scroll needed */
  .step-tabs {
    display: flex;
    overflow-x: auto; /* safety net for very narrow screens */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    top: 56px;
  }
  .step-tabs::-webkit-scrollbar { display: none; }
  .step-tab {
    flex: 1;
    min-width: 0;
    min-height: 62px;
    padding: 8px 4px;
  }
  .step-label        { display: none; }
  .step-label-mobile { display: block; font-size: 10px; line-height: 1.3; }
  .step-pct          { font-size: 14px; margin-top: 3px; }

  /* Mobile step card/dropdown no longer needed */
  .mobile-step-nav { display: none; }

  .layout, .layout.no-sidebar { display: block; padding: 12px; }
  .sidebar { display: none !important; }
  .mobile-section-nav.active { display: block; margin-bottom: 14px; }
  .page-title { font-size: 30px; margin-top: 6px; }
  .card { border-radius: 22px; padding: 20px; margin-bottom: 16px; }
  .card h2 { font-size: 28px; }
  .card h3 { font-size: 22px; }
  .card p, .card ul, .card ol, .card li { font-size: 17px; }
  .grid-2, .grid-3, .form-grid-2, .form-grid-3, .script-cols { grid-template-columns: 1fr; }
  .ack-actions { grid-template-columns: 1fr; }
  .save-btn { width: 100%; }
  .bonus-amount { font-size: 40px; }
  .legacy-content img { float: none !important; margin: 12px 0 !important; }
  .docs-table, .docs-table thead, .docs-table thead tr, .docs-table thead th, .doc-row, .doc-row td { display: block; }
  .doc-row td:first-child, .doc-row td:last-child { border-radius: 0; }
  .doc-row td { border-left: 1px solid var(--line) !important; }
  .doc-row td:first-child { border-radius: 14px 14px 0 0; }
  .doc-row td:last-child  { border-radius: 0 0 14px 14px; }
}
