:root {
  color-scheme: light;
  --font: "Prompt", Arial, "Helvetica Neue", sans-serif;
  --bg: #f5f7ff;
  --panel: #ffffff;
  --ink: #15193e;
  --muted: #626b91;
  --line: #dfe4f4;
  --accent: #262b63;
  --accent-2: #6372bc;
  --accent-soft: #e8ecff;
  --warn-soft: #eef1ff;
  --danger: #b42318;
  --success: #176b52;
  --warning: #b05c12;
  --info: #3857a6;
  --control-bg: #ffffff;
  --control-border: #dfe4f4;
  --focus-ring: rgba(99, 114, 188, 0.32);
  --surface-subtle: #f8faff;
  --surface-strong: linear-gradient(135deg, #252a63 0%, #4352a3 100%);
  --gold: #b58a33;
  --radius-card: 8px;
  --radius-control: 8px;
  --shadow: 0 8px 18px rgba(24, 30, 75, 0.07);
  --shadow-raised: 0 14px 30px rgba(24, 30, 75, 0.13);
  --transition-ui: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(99, 114, 188, 0.14) 0, rgba(245, 247, 255, 0) 280px),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button,
.file-button {
  border: 0;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 700;
  min-height: 40px;
  box-shadow: 0 6px 16px rgba(38, 43, 99, 0.08);
  transform: translateY(0);
  transition: var(--transition-ui);
}

button:hover:not(:disabled),
.file-button:hover {
  background: #1f2457;
  box-shadow: 0 12px 24px rgba(38, 43, 99, 0.18);
  filter: none;
  transform: translateY(-1px);
}

button:active:not(:disabled),
.file-button:active {
  box-shadow: inset 0 3px 8px rgba(9, 13, 42, 0.24), 0 2px 6px rgba(38, 43, 99, 0.12);
  transform: translateY(2px) scale(0.97);
}

button.button-pressed,
.file-button.button-pressed {
  box-shadow: inset 0 3px 8px rgba(9, 13, 42, 0.24), 0 2px 6px rgba(38, 43, 99, 0.12);
  transform: translateY(2px) scale(0.97);
}

button:focus-visible,
.file-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled {
  cursor: progress;
  opacity: 0.82;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: 0;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

button.button-saving {
  position: relative;
  padding-left: 34px;
}

button.button-saving::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.secondary {
  background: #eef1fb;
  color: var(--ink);
}

.secondary:hover:not(:disabled),
.file-button.secondary:hover {
  background: #dfe5f8;
  color: var(--accent);
}

.danger {
  background: #f7d9d6;
  color: var(--danger);
}

.danger:hover:not(:disabled) {
  background: #efc4bf;
  color: #8d1d14;
}

.muted {
  background: transparent;
  border: 1px solid #e0b4ae;
}

.muted:hover:not(:disabled) {
  background: #fff2f0;
  border-color: #cf8f87;
  color: var(--danger);
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

body.auth-pending .app-shell {
  display: none;
}

body.auth-pending .login-screen {
  display: none;
}

body.login-visible .app-shell {
  display: none;
}

body.auth-pending::before {
  align-items: center;
  background: var(--bg);
  color: var(--muted);
  content: "กำลังโหลดระบบ...";
  display: flex;
  font-weight: 900;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 1000;
}

body.auth-pending.auth-slow::before {
  content: "กำลังตรวจสอบสิทธิ์เข้าสู่ระบบ...";
}

body.login-visible::before {
  display: none;
}

[hidden] {
  display: none !important;
}

.login-screen {
  position: relative;
  z-index: 2000;
  min-height: 100vh;
  background: #ffffff;
  color: #333333;
  font-family: "Prompt", var(--font);
  line-height: 1.6;
}

.login-screen a {
  color: inherit;
  text-decoration: none;
}

.landing-page-wrapper {
  min-height: 100vh;
  background: #ffffff;
  color: #333333;
}

.landing-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(252, 253, 255, 0.9);
  border-bottom: 1px solid rgba(38, 43, 99, 0.1);
  box-shadow: 0 10px 28px rgba(21, 25, 62, 0.07);
  backdrop-filter: blur(18px);
}

.landing-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(21, 25, 62, 0.08);
}

.landing-scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #b58a33, #6372bc 55%, #252a63);
  transform-origin: left center;
  transition: width 0.12s linear;
}

.landing-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 34px);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.landing-logo img {
  display: block;
  width: min(235px, 36vw);
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #596179;
  font-size: 14px;
  font-weight: 700;
}

.landing-nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.landing-nav-links a:hover {
  color: #15193e;
  background: rgba(99, 114, 188, 0.09);
}

.landing-login-form {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.landing-login-button,
.landing-primary-link,
.landing-contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #15193e 0%, #2d3476 58%, #5a65a4 100%);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(17, 21, 42, 0.28);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(37, 42, 99, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.landing-login-button:hover,
.landing-primary-link:hover,
.landing-contact-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #0f1433 0%, #252a63 58%, #6372bc 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(37, 42, 99, 0.26);
}

.landing-login-button,
.landing-login-button:hover,
.landing-login-button:focus,
.landing-login-button:focus-visible,
.landing-login-button:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.login-screen .landing-login-button,
.login-screen .landing-login-button:hover:not(:disabled),
.login-screen .landing-login-button:focus:not(:disabled),
.login-screen .landing-login-button:active:not(:disabled),
.login-screen .landing-primary-link,
.login-screen .landing-primary-link:hover,
.login-screen .landing-primary-link:focus,
.login-screen .landing-primary-link:active,
.login-screen .landing-contact-submit,
.login-screen .landing-contact-submit:hover:not(:disabled),
.login-screen .landing-contact-submit:focus:not(:disabled),
.login-screen .landing-contact-submit:active:not(:disabled) {
  background: linear-gradient(135deg, #15193e, #4f5dae) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 1px 1px rgba(17, 21, 42, 0.34);
}

.login-screen .landing-login-button:hover:not(:disabled),
.login-screen .landing-primary-link:hover,
.login-screen .landing-contact-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #1b2141, #6372bc) !important;
  box-shadow: 0 18px 34px rgba(37, 42, 99, 0.3);
}

.landing-login-button:focus-visible,
.landing-primary-link:focus-visible,
.landing-contact-submit:focus-visible,
.landing-nav-links a:focus-visible,
.landing-contact-card input:focus-visible,
.landing-contact-card select:focus-visible {
  outline: 3px solid rgba(229, 169, 61, 0.48);
  outline-offset: 3px;
}

.landing-login-button:active,
.landing-primary-link:active,
.landing-contact-submit:active {
  transform: translateY(0);
  background: linear-gradient(135deg, #11152a, #252a63);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 21, 42, 0.28);
}

.landing-login-form .login-message {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 260px;
  color: #b03a2e;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
}

.landing-hero {
  overflow: hidden;
  position: relative;
  padding: clamp(48px, 5.8vw, 76px) 0 clamp(54px, 6.4vw, 84px);
  background:
    radial-gradient(circle at 88% 12%, rgba(181, 138, 51, 0.17), transparent 27%),
    radial-gradient(circle at 12% 20%, rgba(99, 114, 188, 0.2), transparent 31%),
    linear-gradient(180deg, #fbfcff 0%, #f4f6ff 46%, #ffffff 100%);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 28px max(20px, calc((100vw - 1180px) / 2)) auto auto;
  width: min(34vw, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(181, 138, 51, 0.72), transparent);
  opacity: 0.72;
  pointer-events: none;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.98fr) minmax(420px, 1.02fr);
  gap: clamp(38px, 4.8vw, 68px);
  align-items: center;
}

.landing-hero-content {
  min-width: 0;
  max-width: 660px;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #4a538c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

.landing-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: #b58a33;
}

.landing-hero h1 {
  max-width: 10.9em;
  margin: 0 0 18px;
  color: #15193e;
  font-size: clamp(34px, 3.25vw, 48px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.012em;
  text-wrap: balance;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.landing-hero p {
  max-width: 38rem;
  margin: 0 0 26px;
  color: #4d536d;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.78;
  font-weight: 500;
  overflow-wrap: anywhere;
  white-space: normal;
  text-wrap: pretty;
}

.landing-hero-subtitle {
  max-width: 44rem;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.9);
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.landing-primary-link {
  min-width: 214px;
}

.landing-video-card {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 600px;
  justify-self: end;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 244, 255, 0.84));
  box-shadow: 0 26px 58px rgba(27, 33, 65, 0.16);
}

.landing-video-card::after {
  content: "";
  position: absolute;
  inset: auto 24px -14px 24px;
  height: 28px;
  border-radius: 999px;
  background: rgba(37, 42, 99, 0.2);
  filter: blur(18px);
  z-index: -1;
}

.landing-video-frame {
  position: relative;
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%;
  border-radius: 10px;
  background: #15193e;
}

.landing-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.landing-video-caption {
  display: grid;
  gap: 3px;
  padding: 14px 4px 2px;
  color: #4d536d;
}

.landing-video-caption span {
  color: #8b6f32;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.landing-video-caption strong {
  color: #15193e;
  font-size: 14px;
  font-weight: 800;
}

.landing-section {
  padding: clamp(70px, 7vw, 96px) 0;
  background: #ffffff;
}

.landing-motion-ready .landing-reveal {
  /* Reveal is enhancement only; content must remain readable if an observer is delayed. */
  opacity: 1;
  transform: none;
  transition: opacity 0.72s ease-out, transform 0.72s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}

.landing-motion-ready .landing-reveal:not(.is-visible) {
  opacity: 1;
  transform: none;
}

.landing-motion-ready .landing-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.landing-motion-ready .landing-hero-content.landing-reveal {
  transform: translateX(-18px);
}

.landing-motion-ready .landing-hero-content.landing-reveal.is-visible,
.landing-motion-ready .landing-career-visual.landing-reveal.is-visible {
  transform: none;
}

.landing-motion-ready .landing-career-visual.landing-reveal {
  transform: translateX(18px);
}

.landing-services-section {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

.landing-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  text-align: left;
}

.landing-section-heading h2 {
  margin: 0;
  color: #15193e;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.landing-section-heading span {
  flex: 1 1 auto;
  min-width: 90px;
  max-width: 360px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(181, 138, 51, 0.78), rgba(99, 114, 188, 0.08));
}

.landing-profile-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(38, 43, 99, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 255, 0.98) 100%),
    #ffffff;
  text-align: left;
  box-shadow: 0 18px 38px rgba(24, 30, 75, 0.08);
}

.landing-profile-mark {
  width: min(168px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #15193e, #3f4a97);
  color: #ffffff;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 36px rgba(37, 42, 99, 0.18);
}

.landing-profile-card h3 {
  margin: 0 0 4px;
  color: #15193e;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 800;
}

.landing-profile-role {
  margin: 0 0 18px;
  color: #4f5dae;
  font-weight: 700;
}

.landing-profile-card p:not(.landing-profile-role) {
  margin: 0;
  max-width: 68ch;
  color: #4d536d;
  line-height: 1.78;
}

.landing-badges {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -18px;
}

.landing-badges span {
  padding: 8px 14px;
  border: 1px solid rgba(181, 138, 51, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #252a63;
  font-size: 14px;
  font-weight: 700;
}

.landing-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.landing-services-grid article {
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: 28px;
  border: 1px solid rgba(38, 43, 99, 0.1);
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 10px 24px rgba(24, 30, 75, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-services-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(181, 138, 51, 0.38);
  box-shadow: 0 18px 36px rgba(24, 30, 75, 0.1);
}

.landing-service-icon {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  margin: 0 0 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 114, 188, 0.1);
  color: #252a63;
  font-size: 13px;
  font-weight: 800;
}

.landing-services-grid h3 {
  margin: 0 0 12px;
  color: #15193e;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
}

.landing-services-grid p {
  margin: 0;
  color: #4d536d;
  font-size: 15px;
  line-height: 1.72;
}

.landing-cta {
  padding: clamp(70px, 8vw, 104px) 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(181, 138, 51, 0.18), transparent 30%),
    linear-gradient(135deg, #11152a 0%, #252a63 58%, #4f5dae 100%);
  color: #ffffff;
  text-align: left;
}

.landing-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(500px, 0.78fr);
  gap: clamp(30px, 4.8vw, 64px);
  align-items: center;
}

.landing-cta-copy h2 {
  margin: 0 0 14px;
  max-width: 11em;
  font-size: clamp(34px, 4.3vw, 60px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.landing-cta-copy p {
  max-width: 42rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.75;
}

.landing-cta-points {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.landing-cta-points span {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
}

.landing-cta-points span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #d6b369;
}

.landing-contact-card {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
  padding: clamp(22px, 2.4vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  background: #ffffff;
  color: #333333;
  text-align: left;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.16);
}

.landing-contact-card label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}

.landing-contact-card input,
.landing-contact-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d8ddee;
  border-radius: 8px;
  padding: 10px 14px;
  color: #15193e;
  font: inherit;
  font-weight: 600;
}

.landing-contact-card input:focus,
.landing-contact-card select:focus {
  outline: 3px solid rgba(229, 169, 61, 0.28);
  border-color: #5a65a4;
}

.landing-contact-submit {
  grid-column: 1 / -1;
  width: 100%;
  border-radius: 8px;
}

.landing-contact-note {
  grid-column: 1 / -1;
  display: block;
  color: #626b91;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.landing-contact-note.success {
  color: #1f7a46;
}

.landing-contact-note.error {
  color: #b42318;
}

.landing-contact-more {
  grid-column: 1 / -1;
  border-top: 1px solid #e2e6f2;
  padding-top: 12px;
}

.landing-contact-more summary,
.landing-stories-disclosure summary {
  cursor: pointer;
  color: #4f5dae;
  font-size: 13px;
  font-weight: 800;
}

.landing-contact-more summary::marker,
.landing-stories-disclosure summary::marker {
  color: #b58a33;
}

.settings-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.landing-contact-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 14px;
}

.full-field {
  grid-column: 1 / -1;
}

.landing-footer {
  padding: 28px 0;
  background: #11152a;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 14px;
}

.landing-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(37, 42, 99, 0.18);
  border-radius: 999px;
  padding: 11px 22px;
  background: rgba(255, 255, 255, 0.72);
  color: #252a63;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(24, 30, 75, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.landing-secondary-link:hover {
  transform: translateY(-1px);
  background: #ffffff;
  color: #15193e;
  box-shadow: 0 18px 34px rgba(24, 30, 75, 0.14);
}

.landing-career-visual {
  position: relative;
  display: grid;
  align-self: center;
  justify-self: stretch;
}

.landing-career-photo,
.landing-image-card,
.landing-culture-image {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 12px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(37, 42, 99, 0.9), rgba(99, 114, 188, 0.7)),
    linear-gradient(135deg, #f8f9ff, #e9edff);
  background-size: cover;
  background-position: center;
  box-shadow: 0 26px 58px rgba(27, 33, 65, 0.16);
}

.landing-career-photo {
  aspect-ratio: 16 / 9;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-width: 10px;
  border-radius: 20px;
  box-shadow: 0 24px 54px rgba(27, 33, 65, 0.15);
}

.landing-career-photo.has-image .landing-photo-copy {
  background: linear-gradient(180deg, transparent, rgba(17, 21, 42, 0.72));
  color: #ffffff;
}

.landing-hero-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.landing-hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.9s ease, transform 5.5s ease;
}

.landing-hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.landing-photo-copy,
.landing-image-card > div,
.landing-culture-image > div {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 4px;
  padding: 22px;
  color: #ffffff;
  z-index: 2;
}

.landing-hero-dots {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(17, 21, 42, 0.26);
  backdrop-filter: blur(8px);
}

.landing-hero-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background 0.25s ease;
}

.landing-hero-dots span.active {
  width: 24px;
  background: #ffffff;
}

.landing-hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.landing-hero-dots button:hover,
.landing-hero-dots button:focus-visible {
  transform: scale(1.2);
  background: #ffffff;
  outline: none;
}

.landing-hero-dots button.active {
  width: 24px;
  background: #ffffff;
}

.landing-photo-copy strong,
.landing-image-card strong,
.landing-culture-image strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.landing-photo-copy span,
.landing-image-card span,
.landing-culture-image span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.landing-info-card,
.landing-story-card,
.landing-path-card,
.landing-step-row,
.landing-faq-item,
.landing-trust-item {
  border: 1px solid rgba(38, 43, 99, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(24, 30, 75, 0.07);
}

.landing-trust-band,
.landing-soft-section {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

.landing-trust-band {
  padding: 26px 0;
  border-top: 1px solid rgba(38, 43, 99, 0.08);
  border-bottom: 1px solid rgba(38, 43, 99, 0.08);
}

.landing-trust-grid,
.landing-card-grid,
.landing-fit-grid,
.landing-gallery,
.landing-stories,
.landing-culture-grid {
  display: grid;
  gap: 18px;
}

.landing-card {
  border: 1px solid rgba(38, 43, 99, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(24, 30, 75, 0.07);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(181, 138, 51, 0.36);
  box-shadow: 0 20px 38px rgba(24, 30, 75, 0.11);
}

.landing-trust-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-trust-item,
.landing-info-card,
.landing-story-card,
.landing-path-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-trust-item:hover,
.landing-info-card:hover,
.landing-story-card:hover,
.landing-path-card:hover {
  transform: translateY(-3px);
  border-color: rgba(181, 138, 51, 0.36);
  box-shadow: 0 20px 38px rgba(24, 30, 75, 0.11);
}

.landing-trust-item h3,
.landing-info-card h3,
.landing-story-card h3,
.landing-path-card h3,
.landing-step-row h3 {
  margin: 0 0 8px;
  color: #15193e;
  font-size: 19px;
  line-height: 1.32;
  font-weight: 800;
}

.landing-trust-item p,
.landing-info-card p,
.landing-story-card p,
.landing-path-card p,
.landing-path-card li,
.landing-step-row p,
.landing-faq-answer p,
.landing-section-heading p,
.landing-note,
.landing-disclaimer {
  margin: 0;
  color: #596179;
  font-size: 15px;
  line-height: 1.72;
  font-weight: 500;
}

.landing-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-career-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 26px;
  align-items: start;
}

.landing-story-progress {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: -16px 0 24px;
}

.landing-story-progress span {
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(99, 114, 188, 0.2);
  transition: width 0.35s ease, background 0.35s ease;
}

.landing-story-progress span.active {
  width: 64px;
  background: #b58a33;
}

.landing-career-big-quote {
  position: sticky;
  top: 112px;
  margin: 0;
  padding: 30px;
  border-left: 4px solid #b58a33;
  border-radius: 14px;
  background: rgba(245, 247, 255, 0.86);
  color: #15193e;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.35;
  font-weight: 800;
}

.landing-card-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15193e, #4f5dae);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.landing-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.landing-check-grid div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(245, 247, 255, 0.9);
  color: #252a63;
  font-weight: 700;
}

.landing-check-grid span {
  color: #b58a33;
}

.landing-dark-section {
  background: linear-gradient(135deg, #11152a 0%, #252a63 62%, #4f5dae 100%);
  color: #ffffff;
}

.landing-dark-section .landing-eyebrow,
.landing-dark-section .landing-section-heading h2,
.landing-dark-section .landing-section-heading p {
  color: #ffffff;
}

.landing-fit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-fit-grid article {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.landing-fit-grid h3 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 22px;
}

.landing-fit-grid ul,
.landing-path-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-fit-grid li {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  line-height: 1.55;
}

.landing-fit-muted {
  background: rgba(255, 255, 255, 0.07) !important;
}

.landing-path-card span,
.landing-story-card span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #8b6f32;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.landing-path-card strong {
  display: block;
  margin: 0 0 12px;
  color: #4f5dae;
  line-height: 1.55;
}

.landing-note,
.landing-disclaimer {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(181, 138, 51, 0.1);
  color: #5c4b25;
  font-weight: 700;
}

.landing-closer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 42, 99, 0.08), rgba(181, 138, 51, 0.12));
}

.landing-closer p {
  margin: 0;
  color: #15193e;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
}

.landing-gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.landing-stories-disclosure {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(38, 43, 99, 0.12);
}

.landing-stories-disclosure[open] summary {
  margin-bottom: 16px;
}

.landing-image-card {
  min-height: 230px;
  border-width: 0;
}

.landing-story-card small {
  color: #8b6f32;
  font-weight: 800;
}

.landing-culture-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}

.landing-culture-grid > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding-top: 8px;
}

.landing-culture-media {
  min-width: 0;
  align-self: center;
}

.landing-culture-grid > div:last-child .landing-eyebrow {
  margin-bottom: 10px;
}

.landing-culture-grid > div:last-child h2 {
  margin: 0 0 8px;
  max-width: 18em;
  color: #ffffff;
  font-size: clamp(26px, 2.25vw, 34px);
  line-height: 1.24;
  font-weight: 800;
}

.landing-culture-grid > div:last-child > p:not(.landing-eyebrow) {
  margin: 0;
  max-width: 56em;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.58;
  font-weight: 600;
}

.landing-culture-gallery {
  display: grid;
  gap: 14px;
}

.landing-culture-image {
  min-height: 0;
  height: clamp(148px, 10vw, 178px);
  border-width: 0;
}

.landing-culture-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-stacked-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.landing-stacked-item {
  min-height: 112px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.landing-stacked-item h3,
.landing-stacked-item p {
  color: #ffffff;
}

.landing-stacked-item h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.landing-stacked-item p {
  font-size: 13px;
  line-height: 1.55;
}

.landing-video-teaser {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0 10px;
  color: #ffffff;
}

.landing-video-teaser > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #252a63;
  font-size: 16px;
}

.landing-video-teaser strong,
.landing-video-teaser small {
  display: block;
  color: #ffffff;
}

.landing-video-teaser strong {
  font-size: 17px;
  line-height: 1.35;
}

.landing-video-teaser small {
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.84;
}

.landing-inline-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  padding-bottom: 0;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 22px 46px rgba(9, 12, 32, 0.24);
}

.landing-culture-media .landing-video-teaser {
  margin-top: 0;
}

.landing-gradient-section {
  background:
    radial-gradient(circle at 18% 16%, rgba(181, 138, 51, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f3f5ff 100%);
}

.landing-step-list,
.landing-faq-list {
  display: grid;
  gap: 12px;
}

.landing-step-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.landing-step-row > span {
  flex: 0 0 auto;
  color: #8b6f32;
  font-size: 13px;
  font-weight: 800;
}

.landing-narrow {
  max-width: 960px;
}

.landing-faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  padding: 20px;
  background: transparent;
  color: #15193e;
  text-align: left;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.landing-faq-question:hover,
.landing-faq-question:focus-visible {
  background: linear-gradient(135deg, #15193e 0%, #252a63 62%, #4f5dae 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(24, 30, 75, 0.16);
}

.landing-intro {
  margin-top: 6px;
}

.landing-path-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(181, 138, 51, 0.14);
  color: #fff2d1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-step-time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(181, 138, 51, 0.14);
  color: #8a6f31;
  font-size: 12px;
  font-weight: 800;
}

.landing-story-tag {
  margin-bottom: 8px;
  color: #b58a33;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #11152a 0%, #3c4a94 100%);
}

.landing-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-faq-question:hover span,
.landing-faq-question:focus-visible span {
  color: #ffffff;
}

.landing-faq-answer {
  display: none;
  padding: 0 20px 20px;
}

.landing-faq-item.open .landing-faq-answer {
  display: block;
}

.landing-faq-item.open .landing-faq-question span:last-child {
  transform: rotate(45deg);
}

.landing-career-guides {
  background: #f6f7fc;
}

.landing-guide-links {
  display: grid;
  border-top: 1px solid rgba(38, 43, 99, 0.14);
}

.landing-guide-links a {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.35fr);
  gap: 28px;
  align-items: center;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(38, 43, 99, 0.14);
  color: #15193e;
  text-decoration: none;
  transition: color 180ms ease, padding 180ms ease, background-color 180ms ease;
}

.landing-guide-links a:hover,
.landing-guide-links a:focus-visible {
  padding-left: 16px;
  padding-right: 16px;
  color: #ffffff;
  background: #252a63;
  outline: none;
}

.landing-guide-links strong {
  font-size: 18px;
  line-height: 1.45;
}

.landing-guide-links span {
  color: #626987;
  line-height: 1.7;
}

.landing-guide-links a:hover span,
.landing-guide-links a:focus-visible span {
  color: #f1f3ff;
}

.landing-footer-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.landing-footer-content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.landing-footer-content a {
  color: inherit;
  text-decoration: none;
}

.landing-footer-content a:hover,
.landing-footer-content a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.landing-contact-card textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid #d8ddee;
  border-radius: 8px;
  padding: 10px 14px;
  color: #15193e;
  font: inherit;
  font-weight: 600;
  resize: vertical;
}

.landing-contact-card textarea:focus {
  outline: 3px solid rgba(229, 169, 61, 0.28);
  border-color: #5a65a4;
}

.landing-upload-control {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(38, 43, 99, 0.12);
  border-radius: 12px;
  background: rgba(245, 247, 255, 0.76);
}

.landing-upload-control strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.landing-upload-control small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.landing-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.landing-upload-row select {
  flex: 1 1 180px;
  min-height: 44px;
  border: 1px solid #d8ddee;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  background: #ffffff;
}

@media (max-width: 1180px) {
  .landing-nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
  }

  .landing-login-form {
    width: 100%;
    justify-items: center;
  }

  .landing-login-form .login-message {
    position: static;
    min-width: 0;
    text-align: center;
  }

  .landing-hero-grid,
  .landing-cta-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .landing-contact-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-video-card {
    justify-self: center;
  }

  .landing-hero-content,
  .landing-hero h1,
  .landing-hero p,
  .landing-cta-copy h2,
  .landing-cta-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero-actions {
    justify-content: center;
  }

  .landing-cta {
    text-align: center;
  }

  .landing-cta-points {
    width: min(520px, 100%);
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .landing-services-grid {
    grid-template-columns: 1fr;
  }

  .landing-services-grid article {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .landing-container {
    width: min(100% - 28px, 1200px);
  }

  .landing-nav {
    gap: 14px;
  }

  .landing-logo img {
    width: min(218px, 72vw);
  }

  .landing-nav-links {
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .landing-login-button,
  .landing-primary-link {
    width: 100%;
  }

  .landing-hero {
    padding: 46px 0;
  }

  .landing-hero h1,
  .landing-cta-copy h2 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .landing-hero p,
  .landing-cta-copy p {
    font-size: 16px;
  }

  .landing-section,
  .landing-cta {
    padding: 54px 0;
  }

  .landing-section-heading {
    display: grid;
    justify-items: start;
    gap: 14px;
  }

  .landing-section-heading span {
    width: 100%;
    max-width: none;
  }

  .landing-profile-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .landing-profile-mark {
    width: 112px;
  }

  .landing-badges {
    grid-column: auto;
    margin-top: 0;
  }

  .landing-profile-card,
  .landing-contact-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .landing-contact-more-grid {
    grid-template-columns: 1fr;
  }

  .landing-guide-links a {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .landing-footer-content {
    display: grid;
  }
}

/* Keep the landing hero confident and readable without letting the headline dominate. */
.landing-hero h1 {
  max-width: 12.5em;
  font-size: clamp(30px, 2.7vw, 42px);
  line-height: 1.2;
  letter-spacing: 0;
}

.landing-nav-links a[href="/login"] {
  color: #7c8399;
  font-size: 13px;
}

@media (max-width: 640px) {
  .landing-hero h1 {
    font-size: clamp(30px, 8.5vw, 38px);
  }
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid rgba(38, 43, 99, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(24, 30, 75, 0.16);
}

.login-brand {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 8px;
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
}

.login-card p {
  margin: -6px 0 4px;
  color: var(--muted);
  font-weight: 700;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.login-message {
  min-height: 18px;
  color: var(--danger);
  font-weight: 800;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(99, 114, 188, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f3ff 100%);
  box-shadow: var(--shadow);
}

.brand-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title > div {
  margin-left: auto;
  min-width: 0;
  text-align: right;
}

.brand-logo {
  width: clamp(150px, 20vw, 280px);
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1,
.app-title {
  color: var(--accent);
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  white-space: nowrap;
}

h2 {
  font-size: 20px;
}

.topbar-actions,
.toolbar,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-actions {
  align-items: end;
  display: grid;
  grid-template-columns: 142px 142px auto;
  justify-content: flex-end;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
}

.nav-control-row {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 14px;
}

.as-of-control {
  align-items: stretch;
  display: grid;
  gap: 6px;
  color: var(--accent);
  font-weight: 800;
  min-width: 0;
  width: 142px;
  font-size: 13px;
}

.as-of-control input,
.as-of-control select {
  min-width: 0;
}

.file-button input {
  display: none;
}

.page-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  margin: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-button {
  background: #eef1fb;
  color: var(--accent);
  flex: 0 0 auto;
}

.tab-button:hover:not(.active):not(:disabled) {
  background: #dfe5f8;
  color: var(--accent);
}

.tab-button.active {
  background: var(--accent);
  color: white;
}

.tab-button.active:hover:not(:disabled) {
  background: #1f2457;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-actions button,
.settings-actions .file-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  min-width: 132px;
  padding: 8px 12px;
}

.page:not(.active) {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.metric {
  padding: 13px 14px;
  display: grid;
  gap: var(--space-xs);
  min-height: 92px;
  position: relative;
  overflow: hidden;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.metric span,
.metric small,
.panel-header p {
  color: var(--muted);
}

.period-caption {
  color: var(--accent-2);
  display: block;
  font-weight: 800;
  margin-top: 6px;
}

.overall-progress {
  align-items: center;
  background: linear-gradient(135deg, #252a63 0%, #4f5eae 100%);
  border: 1px solid rgba(181, 138, 51, 0.38);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(24, 30, 75, 0.16);
  color: #ffffff;
  display: grid;
  gap: 2px;
  min-width: 104px;
  padding: 9px 12px;
  text-align: right;
}

.overall-progress span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.overall-progress strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.metric strong {
  font-size: 24px;
}

.metric:hover {
  background: linear-gradient(135deg, #252a63 0%, #3f4b9b 100%);
  border-color: rgba(99, 114, 188, 0.72);
  box-shadow: var(--shadow-raised);
  transform: translateY(-1px);
}

.metric:hover::before {
  background: linear-gradient(90deg, #b58a33, #eef1ff);
}

.metric:hover span,
.metric:hover small {
  color: rgba(255, 255, 255, 0.78);
}

.metric:hover strong {
  color: #ffffff;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  align-items: stretch;
}

.dashboard-layout > .panel {
  grid-column: span 2;
}

.panel {
  padding: var(--space-lg);
}

.dashboard-layout .panel {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.dashboard-layout .panel-header {
  margin-bottom: 8px;
}

.dashboard-layout .panel-header p {
  margin: 4px 0 0;
}

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

.with-actions {
  align-items: center;
}

.toolbar {
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.entry-form input,
.entry-form select,
.goals-form input,
.goals-form select,
.as-of-control input,
.as-of-control select {
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  height: 40px;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
  transition: var(--transition-ui);
}

.form-grid textarea {
  height: auto;
  line-height: 1.45;
  min-height: 82px;
  resize: vertical;
}

.entry-form select {
  line-height: 20px;
}

.topbar-actions button,
.topbar-actions .file-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  min-width: 92px;
  padding: 8px 10px;
  white-space: nowrap;
}

.logout-control {
  background: transparent;
  border: 1px solid #d8a9a2;
  color: #9c3026;
  min-width: 118px !important;
}

.logout-control:hover:not(:disabled),
.logout-control:focus-visible {
  background: #9c3026;
  border-color: #9c3026;
  color: #fff;
}

.logout-control span:first-child {
  font-size: 18px;
  line-height: 1;
}

.toolbar input {
  min-width: min(420px, 100%);
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  max-height: min(70vh, 720px);
}

.customer-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(180px, 220px);
  margin-bottom: 14px;
}

.search-field input,
.customer-sort-field select,
.customer-filter-field select {
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  height: 40px;
  padding: 9px 11px;
  width: 100%;
  transition: var(--transition-ui);
}

.customer-sort-field {
  display: grid;
  gap: 6px;
  color: #344140;
  font-weight: 700;
  min-width: 0;
}

.customer-filter-field {
  display: grid;
  gap: 6px;
  color: #344140;
  font-weight: 700;
  min-width: 0;
}

.mini-stat {
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-stat strong {
  color: var(--accent);
  font-size: 20px;
}

.customer-dashboard-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.customer-kpi-card {
  background:
    linear-gradient(135deg, #252a63 0%, #3f4b9b 100%);
  border: 1px solid rgba(99, 114, 188, 0.72);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(24, 30, 75, 0.14);
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.customer-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-2), rgba(238, 241, 255, 0.86));
  transition: background 160ms ease;
}

.customer-kpi-card:nth-child(2) {
  background: linear-gradient(135deg, #252a63 0%, #4352a3 100%);
}

.customer-kpi-card:nth-child(3) {
  background: linear-gradient(135deg, #252a63 0%, #3b4794 100%);
}

.customer-kpi-card:nth-child(4) {
  background: linear-gradient(135deg, #252a63 0%, #37428a 100%);
}

.customer-kpi-card:hover {
  background: linear-gradient(135deg, #1f2457 0%, #4a58ad 100%);
  border-color: rgba(181, 138, 51, 0.72);
  box-shadow: 0 22px 48px rgba(24, 30, 75, 0.22);
  transform: translateY(-1px);
}

.customer-kpi-card:hover::before {
  background: linear-gradient(90deg, #b58a33, #eef1ff);
}

.customer-kpi-card:hover strong {
  color: #ffffff;
}

.customer-kpi-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  position: relative;
}

.customer-kpi-card strong {
  color: #ffffff;
  font-size: 25px;
  line-height: 1.08;
  position: relative;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.customer-kpi-card small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  position: relative;
}

.customer-insight-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.customer-insight-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 176px;
  padding: 14px;
}

.insight-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.insight-head h3 {
  font-size: 17px;
  margin: 0;
}

.insight-head span {
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  min-width: 30px;
  padding: 4px 9px;
  text-align: center;
}

.customer-insight-list {
  display: grid;
  gap: 8px;
  max-height: 176px;
  overflow-y: auto;
  padding-right: 2px;
}

.customer-insight-item {
  align-items: center;
  background: #f8faff;
  border: 1px solid rgba(216, 222, 242, 0.78);
  border-radius: 8px;
  box-shadow: none;
  color: var(--ink);
  display: grid;
  gap: 4px;
  justify-items: stretch;
  min-height: 48px;
  padding: 9px 10px;
  text-align: left;
}

.customer-insight-item:hover:not(:disabled) {
  background: var(--accent-soft);
  box-shadow: none;
  color: var(--ink);
  transform: translateY(-1px);
}

.customer-insight-item span {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.customer-insight-item strong,
.customer-insight-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-insight-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.customer-insight-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.customer-insight-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.policy-insight-item span {
  align-items: start;
  display: grid;
  gap: 2px;
}

.policy-insight-item {
  min-height: 62px;
}

.vip-insight-item {
  background: linear-gradient(135deg, rgba(181, 138, 51, 0.18), rgba(255, 255, 255, 0.78));
  border-color: rgba(181, 138, 51, 0.42);
}

.customer-empty-note {
  align-items: center;
  background: #f8faff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 54px;
  padding: 10px;
}

.customer-table {
  font-size: 14px;
  min-width: 760px;
  table-layout: fixed;
}

.customer-table th:nth-child(1) {
  width: 42%;
}

.customer-table th:nth-child(2) {
  width: 15%;
}

.customer-table th:nth-child(3) {
  width: 20%;
}

.customer-table th:nth-child(4) {
  width: 15%;
}

.customer-table th:nth-child(5) {
  width: 8%;
}

.link-button {
  background: transparent;
  border-radius: 6px;
  box-shadow: none;
  color: var(--accent);
  display: inline;
  min-height: 0;
  padding: 2px 4px;
  text-align: left;
}

.link-button:hover:not(:disabled) {
  background: var(--accent-soft);
  box-shadow: none;
  color: #111548;
  text-decoration: underline;
  transform: none;
}

.link-button:active:not(:disabled) {
  box-shadow: none;
  transform: scale(0.98);
}

.policy-link {
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-name-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
}

.customer-name-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-header-actions button,
.customer-header-actions .file-button {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.vip-tag {
  background: linear-gradient(135deg, #b58a33, #f3d47e);
  border: 1px solid rgba(121, 84, 23, 0.18);
  border-radius: 999px;
  color: #2a1b05;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0;
  padding: 2px 7px;
}

.vip-tag-list {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
}

.family-vip-tag {
  background: linear-gradient(135deg, #252a63, #7784d6);
  border-color: rgba(37, 42, 99, 0.22);
  color: white;
}

.customer-group-row {
  cursor: pointer;
}

.customer-group-row.vip-customer-row {
  background: linear-gradient(90deg, rgba(181, 138, 51, 0.2), rgba(255, 255, 255, 0.92) 50%);
  box-shadow: inset 0 0 0 1px rgba(181, 138, 51, 0.28);
}

.customer-group-row.vip-customer-row strong,
.customer-group-row.vip-customer-row .customer-name-button {
  color: #141741;
}

.customer-group-row.expanded {
  background: #f8faff;
}

.compact-action {
  min-height: 34px;
  min-width: 54px;
  padding: 6px 10px;
}

.customer-policy-detail-row > td {
  background: #fbfcff;
  padding: 0;
}

.customer-policy-detail {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.vip-policy-detail {
  background: linear-gradient(135deg, rgba(181, 138, 51, 0.12), rgba(255, 255, 255, 0.58));
}

.customer-policy-profile {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 2fr);
}

.customer-policy-profile article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.customer-policy-profile span,
.policy-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.customer-policy-profile strong,
.policy-card strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.customer-policy-list {
  display: grid;
  gap: 8px;
}

.policy-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1.2fr) minmax(90px, 0.6fr) minmax(110px, 0.7fr) auto;
  padding: 10px 12px;
}

.policy-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.policy-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-actions {
  justify-content: end;
}

.customer-name-cell,
.customer-status,
.clip-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-status {
  display: block;
  max-width: 100%;
}

.customer-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pagination-actions button {
  background: #f1f4fc;
  color: var(--ink);
  min-height: 34px;
  min-width: 36px;
  padding: 6px 10px;
}

.pagination-actions button.active {
  background: var(--accent);
  color: white;
}

.pagination-actions button:disabled {
  cursor: default;
  opacity: 0.45;
  transform: none;
}

.pagination-ellipsis {
  color: var(--muted);
  font-weight: 900;
  padding: 0 2px;
}

.customer-dialog {
  width: min(960px, calc(100% - 28px));
}

.customer-detail-dialog {
  width: min(920px, calc(100% - 28px));
}

.family-dialog {
  width: min(760px, calc(100% - 28px));
}

.family-rename-dialog {
  width: min(520px, calc(100% - 28px));
}

.dialog-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 10px 0 0;
}

.dialog-note strong {
  color: var(--accent);
}

.family-manager {
  display: grid;
  gap: 12px;
}

.family-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.family-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.family-row strong {
  color: var(--ink);
  font-size: 16px;
}

.family-row span,
.family-row small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  line-height: 1.4;
}

.family-row small {
  font-size: 12px;
  margin-top: 3px;
}

.family-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.family-member-chip {
  align-items: center;
  background: #f3f5fd;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
}

.family-member-chip b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
}

.family-member-add {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 10px;
}

.family-member-add input {
  min-width: 0;
}

.customer-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-detail-grid article {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 10px 12px;
}

.customer-detail-grid article.wide {
  grid-column: 1 / -1;
}

.customer-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-detail-grid strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.customer-detail-actions {
  grid-template-columns: 1fr auto auto;
}

.customer-address-field {
  grid-column: 1 / -1;
}

.form-field {
  display: grid;
  gap: 6px;
  color: #344140;
  font-weight: 700;
  min-width: 0;
}

.customer-name-field,
.customer-family-field {
  grid-column: 1 / -1;
}

.customer-family-field small,
.customer-family-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 5px;
}

.customer-family-label {
  margin-top: 3px;
}

.inline-family-button {
  justify-self: start;
  margin-top: 8px;
  min-height: 34px;
  padding: 6px 12px;
}

.customer-name-suggestions {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.customer-name-suggestions[hidden],
.customer-match-status[hidden] {
  display: none;
}

.customer-suggestion-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-suggestion {
  background: white;
  border: 1px solid #d9def1;
  box-shadow: none;
  color: var(--ink);
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 0;
  padding: 10px 12px;
  text-align: left;
}

.customer-suggestion:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #c5ceef;
  color: var(--accent);
}

.customer-suggestion span,
.customer-suggestion small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.customer-match-status {
  align-items: center;
  background: #eef7f1;
  border: 1px solid #cfe7d6;
  border-radius: 8px;
  color: #244d32;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.customer-match-status span {
  font-size: 12px;
  line-height: 1.4;
}

.customer-match-status .link-button {
  background: transparent;
  box-shadow: none;
  color: #244d32;
  min-height: 0;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1560px;
}

.agents-table {
  font-size: 12px;
  min-width: 0;
  table-layout: fixed;
}

.unit-table {
  font-size: 12px;
  min-width: 0;
  table-layout: fixed;
}

.unit-table th,
.unit-table td {
  padding: 4px 2px;
}

.unit-table tbody tr {
  height: 36px;
}

.unit-layout .table-wrap {
  min-height: 520px;
}

.unit-table th {
  font-size: 12px;
}

.unit-table th:nth-child(1) {
  width: 9%;
}

.unit-table th:nth-child(2) {
  width: 17%;
}

.unit-table th:nth-child(3) {
  width: 13%;
}

.unit-table th:nth-child(4) {
  width: 8%;
}

.unit-table th:nth-child(5),
.unit-table th:nth-child(6),
.unit-table th:nth-child(7) {
  width: 10%;
}

.unit-table th:nth-child(8) {
  width: 8%;
}

.unit-table th:nth-child(3),
.unit-table th:nth-child(4),
.unit-table th:nth-child(5),
.unit-table th:nth-child(6),
.unit-table th:nth-child(7),
.unit-table td:nth-child(3),
.unit-table td:nth-child(4),
.unit-table td:nth-child(5),
.unit-table td:nth-child(6),
.unit-table td:nth-child(7) {
  text-align: center;
}

.unit-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-table .row-actions button {
  font-size: 10px;
  min-height: 24px;
  width: 24px;
}

.unit-actions {
  gap: 3px;
  justify-content: flex-end;
}

.unit-fyc-list-table {
  min-width: 0;
  table-layout: fixed;
}

.unit-fyc-list-table th:nth-child(3),
.unit-fyc-list-table th:nth-child(4),
.unit-fyc-list-table td:nth-child(3),
.unit-fyc-list-table td:nth-child(4) {
  text-align: center;
}

.compact-table table {
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f0f3ff;
  color: var(--accent);
  font-size: 13px;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 3;
}

tbody tr {
  transition: var(--transition-ui);
}

.agents-table th,
.agents-table td {
  line-height: 1.35;
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.agents-table th {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.agents-table th:nth-child(1) {
  width: 16%;
}

.agents-table th:nth-child(2) {
  width: 22%;
}

.agents-table th:nth-child(3) {
  width: 14%;
}

.agents-table th:nth-child(4) {
  width: 10%;
}

.agents-table th:nth-child(5) {
  width: 16%;
}

.agents-table th:nth-child(6) {
  width: 8%;
}

.agents-table th:nth-child(7) {
  width: 10%;
}

.agents-table th:nth-child(8) {
  width: 4%;
}

.agents-table {
  min-width: 1180px;
  table-layout: fixed;
}

.agents-table th:first-child,
.agents-table .agent-identity-cell {
  left: 0;
  position: sticky;
  z-index: 4;
}

.agents-table .agent-identity-cell {
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line);
}

.agents-table th:first-child {
  z-index: 5;
}

tbody tr:hover {
  background: #fbfcff;
}

tbody tr.mdrt-row {
  background:
    linear-gradient(90deg, rgba(181, 138, 51, 0.28), rgba(255, 247, 222, 0.72) 38%, rgba(246, 248, 255, 0.96)),
    #fff8e6;
  box-shadow: inset 0 1px 0 rgba(181, 138, 51, 0.28), inset 0 -1px 0 rgba(181, 138, 51, 0.22);
}

tbody tr.mdrt-row:hover {
  background:
    linear-gradient(90deg, rgba(181, 138, 51, 0.36), rgba(255, 243, 202, 0.85) 38%, rgba(241, 244, 255, 0.98)),
    #fff3ca;
}

tbody tr.mdrt-row td {
  border-bottom-color: rgba(181, 138, 51, 0.32);
}

tbody tr.mdrt-row .agent-identity-cell {
  background: #fff8e6;
}

tbody tr.mdrt-row .agent-name strong {
  color: #15193e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

tbody tr.selected-agent-row {
  box-shadow: inset 0 0 0 2px rgba(38, 43, 99, 0.38);
}

tbody tr.selected-agent-row:not(.mdrt-row) {
  background: #f5f7ff;
}

tbody tr.selected-agent-row:not(.mdrt-row) .agent-identity-cell {
  background: #f5f7ff;
}

tbody tr.birthday-month-row:not(.mdrt-row) {
  background: #fffaf0;
}

tbody tr.birthday-month-row:not(.mdrt-row) .agent-identity-cell {
  background: #fffaf0;
}

tbody tr.renewal-watch-row {
  outline: 1px solid rgba(215, 149, 22, 0.28);
  outline-offset: -1px;
}

tbody tr.renewal-watch-renewal-urgent {
  outline-color: rgba(194, 59, 47, 0.34);
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.agent-name {
  cursor: pointer;
  min-width: 0;
  white-space: nowrap;
}

.agent-identity-cell {
  cursor: pointer;
}

.agent-two-line {
  display: grid;
  gap: 2px;
  min-height: 34px;
  min-width: 0;
  grid-template-rows: repeat(2, minmax(0, auto));
}

.agent-text-line {
  align-items: center;
  display: flex;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-personal-birthday-line {
  gap: 8px;
}

.agent-personal-birthday-line > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-birthday-badge {
  background: #fff3ca;
  border: 1px solid #f0d585;
  border-radius: 999px;
  color: #8a620c;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
}

.agent-centered-lines .agent-text-line {
  justify-content: center;
  text-align: center;
}

.agent-active-cell,
.agent-renewal-cell,
.agent-active-col,
.agent-renewal-col {
  text-align: center;
}

.agent-license-stack {
  grid-template-rows: repeat(2, minmax(0, auto));
}

.agent-identity-inline {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.agent-identity-inline strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-name-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.agent-name-stack strong {
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}

.agent-metric-line {
  text-align: right;
}

.agent-metric-line .agent-text-line {
  justify-content: flex-end;
}

.agent-renewal-line {
  font-weight: 800;
  justify-content: center;
  text-align: center;
}

.agent-renewal-line.renewal-warning,
.agent-renewal-line.renewal-urgent {
  border-radius: 999px;
  display: inline-flex;
  justify-self: center;
  padding: 2px 7px;
}

.agent-renewal-line.renewal-warning {
  background: #fff3ca;
  color: #8a620c;
}

.agent-renewal-line.renewal-urgent {
  background: #f8d9d4;
  color: #a4392d;
}

.agent-renewal-note,
.agent-muted {
  color: var(--muted);
  font-size: 11px;
}

.agent-nickname {
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-code {
  width: 6.5%;
}

.col-name {
  width: 12%;
}

.col-nickname {
  width: 4.5%;
}

.col-date {
  width: 6%;
}

.col-license {
  width: 5%;
}

.col-license-number {
  width: 7.2%;
}

.col-role {
  width: 4.5%;
}

.col-status {
  width: 5.5%;
}

.col-money {
  width: 5.2%;
}

.col-case {
  width: 3.5%;
}

.col-active-month {
  width: 5.5%;
}

.col-tenure {
  width: 3.5%;
}

.col-renewal {
  width: 6%;
}

.col-commission {
  width: 6%;
}

.col-actions {
  width: 5.5%;
}

.date-chip {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.new {
  background: var(--warn-soft);
  color: #4352a3;
}

.pill.prospect {
  background: #fff4d9;
  color: #8a5a00;
}

.pill.suspended {
  background: #fff4d9;
  color: #8a5a00;
}

.pill.terminated {
  background: #eceff0;
  color: #657170;
}

.qualification-list {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.qualification {
  background: #eef1fb;
  border: 1px solid #d9def3;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
  white-space: nowrap;
}

.onboarding-table {
  margin-top: 16px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.agents-table .row-actions button {
  font-size: 11px;
  min-height: 32px;
  width: 32px;
}

.agents-table .row-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

.agents-table .agent-actions-cell {
  vertical-align: middle;
}

.entry-form {
  display: grid;
  grid-template-columns: minmax(132px, 0.72fr) minmax(220px, 1.25fr) repeat(4, minmax(104px, 0.68fr)) minmax(140px, 0.92fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0;
}

.entry-form button {
  justify-self: start;
  min-width: 118px;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .app-shell {
    padding-top: 28px;
  }

  .nav-control-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .page-tabs {
    display: flex;
    overflow-x: auto;
  }

  .tab-button {
    min-height: 42px;
    padding: 8px 10px;
  }

  .topbar-actions {
    grid-template-columns: 150px 150px auto;
    justify-content: end;
    margin-left: auto;
  }

  .entry-form {
    grid-template-columns: minmax(132px, 0.8fr) minmax(250px, 1.4fr) repeat(4, minmax(108px, 0.74fr));
  }

  .entry-form label:nth-of-type(7) {
    grid-column: span 4;
  }

  .entry-form button {
    grid-column: span 2;
    justify-self: stretch;
    min-height: 40px;
  }

  .customer-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) minmax(170px, 220px);
  }
}

.entry-agent-field {
  grid-column: auto;
}

.agent-chart-panel {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.entry-money-field,
.entry-case-field {
  min-width: 0;
}

.goals-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
}

.goals-form button {
  grid-column: 1 / -1;
}

.settings-block {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.settings-block h3 {
  color: var(--accent);
  font-size: 18px;
  margin: 0;
}

.settings-fields {
  display: grid;
  gap: 12px;
}

.settings-fields textarea {
  min-height: 88px;
  resize: vertical;
}

.settings-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goal-inline-group {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.goal-smart-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.goal-smart-tools button {
  grid-column: auto;
}

.full-field {
  grid-column: 1 / -1;
}

.unit-section {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(24, 30, 75, 0.04);
  margin-bottom: 16px;
  padding: 16px;
}

.unit-section-header {
  align-items: center;
  border-bottom: 1px solid rgba(98, 112, 184, 0.16);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.unit-section-header h3 {
  color: var(--ink);
  font-size: 18px;
  margin: 0;
}

.unit-summary-section {
  background: #f6f8ff;
}

.unit-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 0;
}

.unit-summary {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.unit-summary span,
.unit-summary small {
  color: var(--muted);
  font-weight: 800;
}

.unit-summary strong {
  color: var(--accent);
  font-size: 24px;
}

.unit-form,
.unit-fyc-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0;
  padding: 0;
}

.unit-fyc-table {
  margin-top: 14px;
}

.unit-form input,
.unit-form select,
.unit-fyc-form input,
.unit-fyc-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 40px;
  padding: 9px 11px;
  width: 100%;
}

.unit-form button,
.unit-fyc-form button {
  align-self: end;
  min-height: 40px;
}

.unit-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.unit-tree-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.unit-tree,
.unit-tree ul {
  display: grid;
  gap: 10px;
}

.unit-tree ul {
  border-left: 1px solid var(--line);
  list-style: none;
  margin: 10px 0 0 14px;
  padding-left: 14px;
}

.tree-node {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.tree-node span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.root-node {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.root-node span {
  color: #eef1fb;
}

.segment-grid {
  display: block;
}

.date-chip {
  color: var(--muted);
  font-size: 13px;
}

.date-chip.renewal-warning,
.date-chip.renewal-urgent {
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 3px 7px;
  white-space: nowrap;
}

.date-chip.renewal-warning {
  background: #fff3ca;
  color: #8a620c;
}

.date-chip.renewal-urgent {
  background: #f8d9d4;
  color: #a4392d;
}

.row-actions button,
.icon-button {
  width: 38px;
  min-height: 34px;
  padding: 0;
}

@media (pointer: coarse) {
  .row-actions button,
  .icon-button,
  .agents-table .row-actions button {
    min-height: 44px;
    width: 44px;
  }
}

.goal-bars,
.segment-list,
.checklist-summary,
.rank-list,
.monthly-chart {
  display: grid;
  gap: 12px;
}

.dashboard-layout .goal-bars,
.dashboard-layout .rank-list,
.dashboard-layout .segment-list {
  flex: 1;
}

.dashboard-layout .goal-bars,
.dashboard-layout .rank-list {
  align-content: space-between;
  gap: 8px;
}

.dashboard-layout .rank-list {
  align-content: start;
  gap: 7px;
}

.onboarding-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-summary-grid article {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.onboarding-summary-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.onboarding-summary-grid strong {
  color: var(--ink);
  display: block;
  font-size: 24px;
  line-height: 1.1;
  margin-top: 6px;
}

.onboarding-accordion {
  display: grid;
  gap: 8px;
}

.onboarding-detail {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.onboarding-detail summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.onboarding-detail summary::-webkit-details-marker {
  display: none;
}

.onboarding-detail summary span,
.onboarding-detail summary strong {
  color: var(--accent);
  font-weight: 900;
}

.onboarding-detail > .bar {
  margin-top: 10px;
}

.onboarding-step-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(var(--onboarding-columns, 3), minmax(0, 1fr));
  margin-top: 12px;
}

.onboarding-step-list[data-columns="1"] {
  --onboarding-columns: 1;
}

.onboarding-step-list[data-columns="2"] {
  --onboarding-columns: 2;
}

.onboarding-step-list[data-columns="3"] {
  --onboarding-columns: 3;
}

.onboarding-step-list .check-row {
  background: #fbfcff;
  border: 1px solid #edf1fb;
  border-radius: 8px;
  min-height: 82px;
  padding: 12px;
}

.onboarding-step-list .check-label {
  align-items: flex-start;
  min-height: 36px;
}

.onboarding-step-list .check-label strong {
  line-height: 1.3;
}

.onboarding-step-list .check-label span {
  color: var(--accent);
  flex: 0 0 auto;
  font-weight: 900;
}

.prospect-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.prospect-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.prospect-card-head,
.prospect-card-foot {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.prospect-card-head strong {
  color: var(--ink);
  display: block;
  font-size: 17px;
}

.prospect-card-head span,
.prospect-card-foot span,
.prospect-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prospect-card-head b {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}

.prospect-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prospect-meta span {
  background: #f4f6ff;
  border-radius: 999px;
  padding: 4px 8px;
}

.goal-row,
.segment-row,
.rank-row,
.check-row {
  display: grid;
  gap: 8px;
}

.rank-row {
  border-radius: 8px;
  padding: 2px 0;
}

.rank-row.mdrt-rank-row {
  background:
    linear-gradient(90deg, rgba(181, 138, 51, 0.28), rgba(255, 247, 222, 0.72) 40%, rgba(246, 248, 255, 0.96)),
    #fff8e6;
  box-shadow: inset 0 0 0 1px rgba(181, 138, 51, 0.28);
  padding: 10px 12px;
}

.rank-row.mdrt-rank-row strong {
  color: #15193e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.goal-label,
.segment-label,
.rank-label,
.check-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bar {
  height: 12px;
  background: #edf1ee;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.chart-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 10px;
}

.segment-mode-toggle {
  justify-content: flex-end;
  margin: 4px 0 8px;
}

.chart-mode-toggle button {
  background: #eef1fb;
  color: var(--accent);
  min-height: 30px;
  min-width: 62px;
  padding: 6px 10px;
}

.chart-mode-toggle button:hover:not(.active):not(:disabled) {
  background: #dfe5f8;
  color: var(--accent);
}

.chart-mode-toggle button.active {
  background: var(--accent);
  color: #ffffff;
}

.chart-mode-toggle button.active:hover:not(:disabled) {
  background: #1f2457;
}

.combo-chart-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.combo-chart {
  display: block;
  min-width: 680px;
  width: 100%;
}

.chart-grid {
  stroke: #e6ebf7;
  stroke-width: 1;
}

.chart-axis,
.chart-axis-title,
.chart-month {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.left-axis {
  text-anchor: end;
}

.right-axis {
  text-anchor: start;
}

.left-title {
  fill: var(--accent);
  text-anchor: start;
}

.chart-axis-line {
  stroke: #d9def3;
  stroke-width: 1.5;
}

.chart-month {
  fill: var(--accent);
  text-anchor: middle;
}

.chart-bar {
  cursor: default;
}

.chart-fyp {
  fill: var(--accent);
}

.chart-fyc {
  fill: var(--accent-2);
}

.chart-cases {
  fill: #b58a33;
}

.chart-caseSize {
  fill: #8b6f2d;
}

.chart-tooltip {
  background: var(--ink);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(21, 25, 62, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  pointer-events: none;
  position: fixed;
  white-space: nowrap;
  z-index: 20;
}

.save-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1200;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(38, 43, 99, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(20, 24, 58, 0.18);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.save-toast-mark {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(38, 43, 99, 0.1);
}

.save-toast-copy {
  display: grid;
  gap: 3px;
}

.save-toast strong {
  font-size: 14px;
  line-height: 1.25;
}

.save-toast small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.save-toast[data-type="success"] {
  border-color: rgba(23, 107, 82, 0.28);
}

.save-toast[data-type="success"] .save-toast-mark {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(23, 107, 82, 0.12);
}

.save-toast[data-type="warning"] {
  border-color: rgba(176, 92, 18, 0.3);
}

.save-toast[data-type="warning"] .save-toast-mark {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(176, 92, 18, 0.12);
}

.save-toast[data-type="error"] {
  border-color: rgba(180, 35, 24, 0.32);
}

.save-toast[data-type="error"] .save-toast-mark {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.12);
}

.save-toast[data-type="info"] {
  border-color: rgba(56, 87, 166, 0.28);
}

.save-toast[data-type="info"] .save-toast-mark {
  background: var(--info);
  box-shadow: 0 0 0 5px rgba(56, 87, 166, 0.12);
}

.empty-state {
  color: var(--muted);
  font-weight: 800;
  padding: 8px 0;
}

.empty-state strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.empty-state span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.table-empty-row:hover {
  background: transparent;
}

.table-empty-row td {
  padding: 18px !important;
}

.table-empty-row .empty-state {
  background: var(--surface-subtle);
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
  text-align: center;
}

.segment-row {
  padding: 13px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segment-pie-wrap {
  align-content: stretch;
  align-items: center;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(180px, 1fr) auto;
  gap: clamp(8px, 1.4vw, 14px);
  min-height: 100%;
}

.segment-pie {
  align-items: center;
  aspect-ratio: 1;
  align-self: center;
  background: var(--pie);
  border-radius: 50%;
  display: grid;
  justify-self: center;
  max-width: clamp(176px, 58%, 236px);
  min-width: clamp(150px, 34vw, 176px);
  padding: 12px;
  position: relative;
  width: min(100%, 236px);
}

.segment-pie::after {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  content: "";
  inset: 22%;
  position: absolute;
}

.segment-pie > div {
  position: relative;
  text-align: center;
  z-index: 1;
}

.segment-pie-tooltip-layer {
  inset: 0;
  position: absolute;
  z-index: 2;
}

.segment-pie-hit {
  cursor: default;
  fill: rgba(255, 255, 255, 0);
  pointer-events: all;
}

.segment-pie-hit:hover {
  fill: rgba(255, 255, 255, 0.16);
}

.segment-pie span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.segment-pie strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  line-height: 1.1;
  margin-top: 4px;
}

.segment-legend {
  align-self: end;
  display: grid;
  gap: 6px;
}

.segment-legend-row {
  align-items: center;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 4px 8px;
  min-height: 48px;
  padding: 6px 9px;
}

.segment-dot {
  background: var(--dot);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.segment-legend-row strong {
  color: var(--ink);
  min-width: 0;
}

.segment-legend-row b {
  color: var(--accent);
  font-size: 15px;
}

.segment-legend-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  grid-column: 2 / -1;
}

.compact-segment-row,
.compact-goal-row,
.compact-rank-row {
  min-height: 48px;
}

.compact-segment-row,
.compact-goal-row {
  padding: 6px 9px;
}

.compact-goal-row small,
.compact-segment-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-rank-row {
  min-height: 40px;
  padding: 2px 0;
}

.compact-rank-row.mdrt-rank-row {
  min-height: 46px;
  padding: 6px 9px;
}

.compact-rank-row .rank-label span,
.compact-goal-row .goal-label span,
.compact-segment-row .segment-label span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

dialog {
  width: min(780px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(16, 24, 24, 0.45);
}

form {
  padding: 20px;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.icon-button {
  background: #eef2f0;
  color: var(--ink);
  border-radius: 50%;
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #344140;
  font-weight: 700;
  min-width: 0;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0 0;
  padding: 12px;
}

legend {
  padding: 0 8px;
  font-weight: 800;
}

.checks {
  display: grid;
  gap: 12px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.check-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.check-group h3 {
  color: var(--accent);
  font-size: 14px;
  margin: 0 0 10px;
}

.check-group-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-line {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.checks input,
.checkbox-line input {
  width: 18px;
  height: 18px;
}

[data-former-agent-only][hidden] {
  display: none !important;
}

.dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-layout > .panel {
    grid-column: auto;
  }

  .customer-toolbar {
    grid-template-columns: 1fr;
  }

  .customer-dashboard-grid,
  .customer-insight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .customer-policy-profile,
  .policy-card {
    grid-template-columns: 1fr;
  }

  .customer-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    justify-content: flex-start;
  }

  .customer-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-control-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions {
    grid-template-columns: 142px 142px;
    justify-content: end;
    margin-left: auto;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segment-grid {
    display: block;
  }

  .segment-pie-wrap {
    grid-template-columns: 1fr;
  }

  .segment-pie {
    max-width: clamp(180px, 46vw, 220px);
    min-width: 150px;
  }

  .unit-layout,
  .unit-summary-grid {
    grid-template-columns: 1fr;
  }

  .unit-section {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .summary-grid,
  .onboarding-summary-grid,
  .prospect-card-grid,
  .form-grid,
  .checks,
  .entry-form,
  .goals-form,
  .unit-form,
  .unit-fyc-form {
    grid-template-columns: 1fr;
  }

  .check-group-items {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .toolbar {
    align-items: stretch;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-basis: auto;
    margin-left: 0;
  }

  .page-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .customer-detail-grid {
    grid-template-columns: 1fr;
  }

  .customer-dashboard-grid,
  .customer-insight-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(180px, 38vw);
  }

  h1,
  .app-title {
    font-size: clamp(20px, 6vw, 28px);
  }

  .topbar-actions > *,
  .toolbar > *,
  .as-of-control {
    width: 100%;
  }

  .logout-control {
    grid-column: 1 / -1;
  }
}

/* Responsive refinement layer */
@media (max-width: 1280px) {
  .topbar-actions {
    grid-template-columns: minmax(142px, 1fr) minmax(142px, 1fr) auto;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
  }

  .brand-title {
    flex-wrap: wrap;
  }

  h1,
  .app-title {
    white-space: normal;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout > .panel {
    grid-column: span 1;
  }

  .dashboard-layout > .panel:last-child {
    grid-column: 1 / -1;
  }

  .entry-form {
    grid-template-columns: minmax(140px, 0.8fr) minmax(260px, 1.4fr) repeat(3, minmax(110px, 0.7fr));
  }

  .entry-form label:nth-of-type(6),
  .entry-form label:nth-of-type(7),
  .entry-form button {
    grid-column: span 2;
  }

  .onboarding-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-step-list[data-columns="1"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-tabs {
    display: flex;
    overflow-x: auto;
  }

  .onboarding-step-list {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-layout > .panel,
  .dashboard-layout > .panel:last-child {
    grid-column: auto;
  }

  .dashboard-layout .panel {
    min-height: auto;
  }

  .segment-pie-wrap {
    grid-template-rows: minmax(220px, auto) auto;
  }

  .segment-pie {
    width: min(52vw, 240px);
  }

  .unit-summary-grid,
  .customer-dashboard-grid,
  .customer-insight-grid,
  .onboarding-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-policy-profile,
  .policy-card {
    grid-template-columns: 1fr;
  }

  .policy-actions,
  .row-actions {
    justify-content: flex-start;
  }

  .customer-policy-profile article,
  .policy-card {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    padding: 12px;
  }

  .topbar {
    padding: 14px;
  }

  .brand-title {
    gap: 10px;
  }

  .brand-logo {
    width: min(220px, 70vw);
  }

  .nav-control-row {
    gap: 10px;
  }

  .page-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    min-height: 40px;
    padding: 8px;
    white-space: normal;
  }

  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions button,
  .topbar-actions .file-button {
    min-width: 0;
  }

  .summary-grid,
  .unit-summary-grid,
  .customer-dashboard-grid,
  .customer-insight-grid,
  .onboarding-summary-grid,
  .goals-form,
  .unit-form,
  .unit-fyc-form,
  .form-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .metric,
  .customer-kpi-card,
  .unit-summary {
    min-height: auto;
  }

  .panel {
    padding: 12px;
  }

  .panel-header,
  .panel-header.with-actions,
  .with-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel-header button,
  .with-actions button {
    justify-self: stretch;
  }

  .chart-mode-toggle,
  .segment-mode-toggle {
    justify-content: stretch;
  }

  .chart-mode-toggle button {
    flex: 1 1 0;
    min-width: 0;
  }

  .segment-pie-wrap {
    grid-template-rows: auto auto;
  }

  .segment-pie {
    max-width: 220px;
    min-width: 150px;
    width: min(68vw, 220px);
  }

  .segment-legend-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .entry-form label,
  .entry-form label:nth-of-type(6),
  .entry-form label:nth-of-type(7),
  .entry-form button {
    grid-column: auto;
  }

  .settings-two-col,
  .settings-three-col,
  .goal-inline-group {
    grid-template-columns: 1fr;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar input {
    min-width: 0;
  }

  .combo-chart-wrap {
    margin-inline: -4px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .combo-chart {
    min-width: 680px;
  }

  dialog,
  .customer-dialog,
  .customer-detail-dialog,
  .family-dialog {
    max-height: calc(100dvh - 20px);
    width: min(100% - 16px, 960px);
  }

  dialog form {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 16px;
  }

  .dialog-header {
    align-items: center;
    gap: 10px;
  }

  .dialog-actions,
  .customer-detail-actions {
    grid-template-columns: 1fr;
  }

  .dialog-actions button,
  .customer-detail-actions button {
    width: 100%;
  }

  .check-group-items {
    grid-template-columns: 1fr;
  }

  .family-row {
    grid-template-columns: 1fr;
  }

  .family-row .row-actions {
    justify-content: start;
  }

  .family-member-add {
    grid-template-columns: 1fr;
  }

  .customer-detail-grid {
    grid-template-columns: 1fr;
  }

  .customer-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    justify-content: flex-start;
  }

  .table-wrap {
    border: 0;
    overflow-x: auto;
  }

  /* Keep agents table horizontal on embedded narrow viewports */
  .agents-table {
    display: table;
    min-width: 1120px;
    table-layout: fixed;
    width: max-content;
  }

  .agents-table thead {
    display: table-header-group;
  }

  .agents-table tbody {
    display: table-row-group;
  }

  .agents-table tr {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: table-row;
    margin-bottom: 0;
    overflow: visible;
    padding: 0;
  }

  .agents-table th,
  .agents-table td {
    border-bottom: 1px solid var(--line);
    display: table-cell;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
  }

  .customer-table,
  .customer-table thead,
  .customer-table tbody,
  .customer-table tr,
  .customer-table td,
  .unit-table,
  .unit-table thead,
  .unit-table tbody,
  .unit-table tr,
  .unit-table td,
  .unit-fyc-list-table,
  .unit-fyc-list-table thead,
  .unit-fyc-list-table tbody,
  .unit-fyc-list-table tr,
  .unit-fyc-list-table td,
  .entry-list-table,
  .entry-list-table thead,
  .entry-list-table tbody,
  .entry-list-table tr,
  .entry-list-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .customer-table thead,
  .unit-table thead,
  .unit-fyc-list-table thead,
  .entry-list-table thead {
    display: none;
  }

  .customer-table tr,
  .unit-table tr,
  .unit-fyc-list-table tr,
  .entry-list-table tr {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 30, 75, 0.05);
    height: auto;
    margin-bottom: 10px;
    overflow: hidden;
    padding: 10px;
  }

  .customer-table td,
  .unit-table td,
  .unit-fyc-list-table td,
  .entry-list-table td {
    border-bottom: 0;
    padding: 6px 0;
    text-align: left;
    white-space: normal;
  }

  .customer-table td:nth-child(2)::before,
  .customer-table td:nth-child(3)::before,
  .customer-table td:nth-child(4)::before,
  .customer-table td:nth-child(5)::before,
  .unit-table td:nth-child(1)::before,
  .unit-table td:nth-child(2)::before,
  .unit-table td:nth-child(3)::before,
  .unit-table td:nth-child(4)::before,
  .unit-table td:nth-child(5)::before,
  .unit-table td:nth-child(6)::before,
  .unit-table td:nth-child(7)::before,
  .unit-table td:nth-child(8)::before,
  .unit-fyc-list-table td:nth-child(1)::before,
  .unit-fyc-list-table td:nth-child(2)::before,
  .unit-fyc-list-table td:nth-child(3)::before,
  .unit-fyc-list-table td:nth-child(4)::before,
  .unit-fyc-list-table td:nth-child(5)::before,
  .entry-list-table td:nth-child(1)::before,
  .entry-list-table td:nth-child(2)::before,
  .entry-list-table td:nth-child(3)::before,
  .entry-list-table td:nth-child(4)::before,
  .entry-list-table td:nth-child(5)::before,
  .entry-list-table td:nth-child(6)::before,
  .entry-list-table td:nth-child(7)::before {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 2px;
  }

  .customer-table td:nth-child(2)::before { content: "จำนวนกรมธรรม์"; }
  .customer-table td:nth-child(3)::before { content: "วันเกิด"; }
  .customer-table td:nth-child(4)::before { content: "เบี้ยรวม"; }
  .customer-table td:nth-child(5)::before { content: "จัดการ"; }
  .unit-table td:nth-child(1)::before { content: "เลขหน่วย"; }
  .unit-table td:nth-child(2)::before { content: "หัวหน้าหน่วย"; }
  .unit-table td:nth-child(3)::before { content: "FYC YTD"; }
  .unit-table td:nth-child(4)::before { content: "MDRT"; }
  .unit-table td:nth-child(5)::before { content: "ตำแหน่ง"; }
  .unit-table td:nth-child(6)::before { content: "ระดับชั้น"; }
  .unit-table td:nth-child(7)::before { content: "ต้นสังกัด"; }
  .unit-table td:nth-child(8)::before { content: "จัดการ"; }
  .unit-fyc-list-table td:nth-child(1)::before { content: "เลขหน่วย"; }
  .unit-fyc-list-table td:nth-child(2)::before { content: "หัวหน้าหน่วย"; }
  .unit-fyc-list-table td:nth-child(3)::before { content: "FYC"; }
  .unit-fyc-list-table td:nth-child(4)::before { content: "MDRT"; }
  .unit-fyc-list-table td:nth-child(5)::before { content: "จัดการ"; }
  .entry-list-table td:nth-child(1)::before { content: "วันที่"; }
  .entry-list-table td:nth-child(2)::before { content: "ตัวแทน"; }
  .entry-list-table td:nth-child(3)::before { content: "FYP"; }
  .entry-list-table td:nth-child(4)::before { content: "FYP MDRT"; }
  .entry-list-table td:nth-child(5)::before { content: "FYC"; }
  .entry-list-table td:nth-child(6)::before { content: "Case"; }
  .entry-list-table td:nth-child(7)::before { content: "หมายเหตุ"; }

  .table-empty-row {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .table-empty-row td {
    padding: 0 !important;
  }

  .table-empty-row td::before {
    content: none !important;
  }

  .customer-policy-detail-row {
    padding: 0 !important;
  }

  .customer-policy-detail-row > td {
    padding: 0;
  }

  .customer-policy-detail {
    padding: 10px;
  }

  .agent-metric-line .agent-text-line,
  .number {
    text-align: left;
  }

  .row-actions,
  .unit-actions,
  .policy-actions {
    justify-content: flex-start;
  }
}

/* Final income visual guardrail: never stretch the artwork to match the taller copy panel. */
#landingIncome .landing-bonus-feature {
  align-items: start;
}

#landingIncome .landing-achievement-visual {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

#landingIncome .landing-achievement-visual img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

@media (max-width: 760px) {
  #landingIncome .landing-achievement-visual {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Keep the income visual at its native 16:9 ratio. The panel may be taller, but
   it must never stretch or crop the artwork to match the text column. */
#landingIncome .landing-bonus-feature {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

#landingIncome .landing-achievement-visual {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

#landingIncome .landing-achievement-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

#landingIncome .landing-bonus-panel {
  min-width: 0;
  height: auto;
}

@media (max-width: 920px) {
  #landingIncome .landing-section-heading h2 {
    white-space: normal;
    font-size: clamp(30px, 6vw, 44px);
  }

  #landingIncome .landing-bonus-feature {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #landingIncome .landing-achievement-visual {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  #landingIncome .landing-achievement-visual img {
    height: auto;
  }

  #landingIncomeCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #landingIncome .landing-bonus-panel {
    padding: 18px;
  }

  #landingIncome .landing-bonus-heading h3 {
    font-size: clamp(28px, 8vw, 38px);
  }

  #landingIncomeCards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 10px;
  }

  .topbar-actions,
  .page-tabs {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(210px, 82vw);
  }

  .metric strong,
  .customer-kpi-card strong,
  .unit-summary strong {
    font-size: 22px;
  }

  .segment-pie {
    width: min(76vw, 200px);
  }
}

@media (max-width: 1180px) {
  .landing-trust-grid,
  .landing-four-col,
  .landing-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-career-grid,
  .landing-culture-grid {
    grid-template-columns: 1fr;
  }

  .landing-stacked-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .landing-two-col,
  .landing-three-col,
  .landing-four-col,
  .landing-trust-grid,
  .landing-fit-grid,
  .landing-gallery,
  .landing-check-grid {
    grid-template-columns: 1fr;
  }

  .landing-stacked-list {
    grid-template-columns: 1fr;
  }

  .landing-stacked-item {
    min-height: 0;
  }

  .landing-career-photo {
    min-height: 0;
  }

  .landing-bonus-feature {
    grid-template-columns: 1fr;
  }

  #landingIncomeCards {
    grid-template-columns: 1fr;
  }

  .landing-achievement-visual img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .landing-career-big-quote {
    position: static;
  }

  .landing-story-progress {
    margin-top: -10px;
  }

  .landing-closer,
  .landing-step-row {
    display: grid;
  }

  .landing-section-heading p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .landing-motion-ready .landing-reveal,
  .landing-motion-ready .landing-hero-content.landing-reveal,
  .landing-motion-ready .landing-career-visual.landing-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Team reviews: calm, readable horizontal loop. */
.landing-story-reviews-section {
  display: grid;
  gap: 18px;
  overflow: hidden;
}

.landing-story-reviews-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.landing-story-reviews-heading span {
  color: #252a63;
  font-size: 20px;
  font-weight: 800;
}

.landing-story-reviews-heading p {
  margin: 0;
  color: #657094;
  font-size: 14px;
  font-weight: 700;
}

.landing-story-reviews {
  --review-loop-gap: 22px;
  overflow: hidden;
  margin: 0 -2px;
  padding: 2px;
}

.landing-story-reviews-track {
  display: flex;
  width: max-content;
  gap: var(--review-loop-gap);
  will-change: transform;
}

.landing-story-reviews-set {
  display: flex;
  gap: var(--review-loop-gap);
}

.landing-story-reviews.is-looping .landing-story-reviews-track {
  animation: landing-story-review-loop 58s linear infinite;
}

.landing-story-reviews .landing-story-card {
  flex: 0 0 clamp(300px, 31vw, 420px);
  min-height: 292px;
  margin: 0;
}

@keyframes landing-story-review-loop {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - (var(--review-loop-gap) / 2))); }
}

@media (max-width: 760px) {
  .landing-story-reviews-heading {
    display: grid;
    gap: 6px;
  }

  .landing-story-reviews .landing-story-card {
    flex-basis: min(82vw, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-story-reviews.is-looping .landing-story-reviews-track {
    animation: none;
  }
}

/* Recruitment landing: premium, evidence-led visual system */
.landing-career-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(181, 138, 51, 0.12), transparent 28%),
    linear-gradient(135deg, #11152a 0%, #252a63 62%, #3f4a97 100%);
}

.landing-career-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 21, 42, 0.36), transparent 58%);
  pointer-events: none;
}

.landing-career-hero .landing-container {
  position: relative;
  z-index: 1;
}

.landing-career-hero .landing-eyebrow,
.landing-career-hero h1,
.landing-career-hero p {
  color: #ffffff;
}

.landing-career-hero h1 {
  max-width: 11em;
  font-size: clamp(42px, 5.1vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.landing-career-hero .landing-eyebrow::before {
  background: #d5ad56;
}

.landing-career-hero .landing-hero-content > p:not(.landing-eyebrow) {
  max-width: 47ch;
  color: rgba(255, 255, 255, 0.82);
}

/* Keep the hero message prominent without letting manual line breaks make it dominate the first screen. */
#landingHero .landing-hero-content h1 {
  max-width: 760px;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

#landingHero .landing-hero-dots {
  right: 16px;
  bottom: 14px;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(17, 21, 42, 0.22);
}

#landingHero .landing-hero-dots button {
  width: 5px !important;
  height: 5px !important;
  min-width: 5px !important;
  min-height: 5px !important;
  max-height: 5px !important;
  flex: 0 0 5px;
  opacity: 0.72;
}

#landingHero .landing-hero-dots button.active {
  width: 13px !important;
  min-width: 13px !important;
  flex-basis: 13px;
  opacity: 1;
}

#landingHero .landing-photo-copy {
  padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(17, 21, 42, 0.68));
}

#landingHero .landing-photo-copy strong {
  font-size: 15px;
}

#landingHero .landing-photo-copy span {
  font-size: 12px;
}

@media (max-width: 720px) {
  #landingHero .landing-hero-content h1 {
    max-width: 20ch;
    font-size: clamp(32px, 9vw, 46px);
  }

  #landingHero .landing-hero-dots {
    right: 10px;
    bottom: 10px;
  }
}

.landing-career-hero .landing-secondary-link {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.landing-career-hero .landing-secondary-link:hover,
.landing-career-hero .landing-secondary-link:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  color: #15193e;
}

.landing-trust-band {
  position: relative;
  background: #f7f8fc;
}

.landing-trust-item {
  min-height: 136px;
  border-top: 3px solid #b58a33;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(24, 30, 75, 0.06);
}

.landing-trust-item h3 {
  font-size: 21px;
}

.landing-trust-item p {
  font-size: 14px;
}

#landingPath {
  background: #11152a;
}

#landingPath .landing-section-heading h2,
#landingPath .landing-section-heading p,
#landingPath .landing-eyebrow {
  color: #ffffff;
}

#landingPath .landing-section-heading span {
  background: linear-gradient(90deg, rgba(213, 173, 86, 0.88), rgba(255, 255, 255, 0.12));
}

#landingPath .landing-path-card {
  overflow: hidden;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.12);
  border-top: 4px solid #b58a33;
  border-radius: 12px;
  background: #252a63;
  box-shadow: 0 18px 40px rgba(5, 8, 24, 0.2);
}

#landingPath .landing-path-card h3,
#landingPath .landing-path-card p,
#landingPath .landing-path-card li,
#landingPath .landing-path-card strong {
  color: #ffffff;
}

#landingPath .landing-path-card-header {
  padding: 24px 24px 0;
}

#landingPath .landing-path-card-body {
  padding: 0 24px 24px;
}

#landingPath .landing-path-income {
  margin: 22px 0 20px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #f2f4f8;
  color: #252a63;
}

#landingPath .landing-path-income small {
  display: block;
  margin-bottom: 8px;
  color: #687087;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

#landingPath .landing-path-income b {
  display: block;
  color: #b58a33;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

#landingPath .landing-path-card span {
  color: #e3bf6b;
}

#landingPath .landing-note {
  background: rgba(181, 138, 51, 0.14);
  color: #f4dfaa;
}

#landingFit .landing-section-heading h2 {
  max-width: 18ch;
}

#landingFitProfiles {
  margin: 26px 0 30px;
}

#landingFitProfiles .landing-info-card {
  min-height: 170px;
  border-top: 3px solid #d6aa4c;
  background: rgba(255, 255, 255, 0.98);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

#landingFitProfiles .landing-info-card:hover,
#landingFitProfiles .landing-info-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(6, 12, 44, 0.24);
}

#landingCareer #landingRoleCards {
  align-items: stretch;
}

#landingCareer #landingRoleCards .landing-info-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-top: 3px solid #b58a33;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

#landingCareer #landingRoleCards .landing-info-card:hover,
#landingCareer #landingRoleCards .landing-info-card:focus-within {
  transform: translateY(-4px);
  border-color: #d6aa4c;
  box-shadow: 0 18px 34px rgba(19, 25, 66, 0.16);
}

#landingCareer #landingRoleCards .landing-info-card h3 {
  max-width: 22ch;
}

#landingCareer #landingRoleCards .landing-info-card p {
  max-width: 38ch;
}

#landingSuccess .landing-stories-disclosure {
  margin-top: 34px;
  border-top: 0;
}

#landingSuccess .landing-stories-disclosure > summary {
  width: fit-content;
  margin-bottom: 18px;
  padding: 10px 16px;
  border: 1px solid rgba(181, 138, 51, 0.35);
  border-radius: 999px;
  background: #ffffff;
  color: #252a63;
  font-weight: 800;
  cursor: pointer;
}

#landingSuccess .landing-stories-disclosure > summary:hover,
#landingSuccess .landing-stories-disclosure > summary:focus-visible {
  background: #252a63;
  color: #ffffff;
}

#landingSuccess .landing-story-card {
  position: relative;
  min-height: 240px;
  padding: 30px;
  border-top: 3px solid #b58a33;
  border-radius: 12px;
}

#landingSuccess .landing-story-card::before {
  content: "“";
  display: block;
  height: 30px;
  color: #b58a33;
  font-size: 56px;
  font-weight: 800;
  line-height: 0.8;
}

#landingSuccess .landing-story-card h3 {
  font-size: 22px;
}

#landingIncome {
  background: #f7f8fc;
}

#landingIncome .landing-section-heading h2 {
  max-width: 18ch;
}

.landing-bonus-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 22px;
  align-items: start;
  margin-top: 30px;
}

.landing-achievement-visual {
  align-self: start;
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #0b1530;
  box-shadow: 0 18px 40px rgba(17, 24, 55, 0.16);
}

.landing-achievement-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0b1530;
}

.landing-bonus-panel {
  padding: 24px;
  border: 1px solid rgba(37, 42, 99, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(17, 24, 55, 0.1);
}

.landing-bonus-heading {
  margin-bottom: 18px;
}

.landing-bonus-heading span {
  color: #b58a33;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}

.landing-bonus-heading h3 {
  margin: 8px 0 0;
  color: #15193e;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.2;
}

#landingIncomeCards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#landingIncomeCards .landing-bonus-card {
  min-height: 0;
  padding: 16px 18px;
  border: 1px solid rgba(37, 42, 99, 0.12);
  border-top: 3px solid #b58a33;
  border-radius: 12px;
  background: #f7f8fc;
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#landingIncomeCards .landing-bonus-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

#landingIncomeCards .landing-bonus-card:hover {
  transform: translateY(-2px);
  border-color: #b58a33;
  box-shadow: 0 10px 22px rgba(37, 42, 99, 0.12);
}

#landingIncome .landing-info-card {
  min-height: 170px;
  border-top: 3px solid #b58a33;
  border-radius: 12px;
}

#landingIncome .landing-info-card h3 {
  font-size: 21px;
}

#landingIncome .landing-disclaimer {
  border-left: 4px solid #b58a33;
  background: #fffaf0;
  color: #5c4b25;
}

/* Income section: keep the promise line intact and make the visual/panel read as one unit. */
#landingIncome .landing-section-heading h2 {
  max-width: none;
  white-space: nowrap;
  letter-spacing: 0;
}

#landingIncome .landing-bonus-feature {
  align-items: stretch;
}

#landingIncome .landing-achievement-visual {
  height: 100%;
  aspect-ratio: auto;
}

#landingIncome .landing-achievement-visual img {
  height: 100%;
  object-fit: cover;
}

@media (max-width: 760px) {
  #landingIncome .landing-section-heading h2 {
    white-space: normal;
  }

  #landingIncome .landing-achievement-visual {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  #landingIncome .landing-achievement-visual img {
    height: 100%;
  }
}

#landingSteps .landing-step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

#landingSteps .landing-step-row {
  position: relative;
  display: block;
  min-height: 220px;
  padding: 24px 22px 22px;
  border: 1px solid rgba(38, 43, 99, 0.1);
  border-top: 4px solid #b58a33;
  border-radius: 12px;
  background: #ffffff;
}

#landingSteps .landing-step-row > span {
  display: grid;
  place-items: center;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #b58a33;
  color: #15193e;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(181, 138, 51, 0.22);
}

#landingSteps .landing-step-row h3 {
  min-height: 3.15em;
  margin: 0 58px 12px 0;
  font-size: 18px;
}

#landingSteps .landing-step-row p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 1050px) {
  #landingSteps .landing-step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #landingSteps .landing-step-list {
    grid-template-columns: 1fr;
  }

  #landingSteps .landing-step-row {
    min-height: 0;
  }
}

.lead-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.lead-kpi-card {
  padding: 18px;
  border: 1px solid rgba(38, 43, 99, 0.14);
  border-top: 3px solid #b58a33;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(38, 43, 99, 0.06);
}

.lead-kpi-card span,
.lead-kpi-card small {
  display: block;
  color: #69749a;
}

.lead-kpi-card strong {
  display: block;
  margin: 5px 0;
  color: #15193e;
  font-size: clamp(24px, 3vw, 34px);
}

.lead-toolbar {
  grid-template-columns: minmax(260px, 1.8fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr);
  margin-bottom: 16px;
}

.lead-table-wrap {
  overflow: auto;
}

.lead-table {
  min-width: 980px;
}

.lead-table td,
.lead-table th {
  vertical-align: top;
}

.lead-table td small {
  display: block;
  margin-top: 4px;
  color: #69749a;
  overflow-wrap: anywhere;
}

.lead-table td strong {
  color: #15193e;
}

.lead-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf0ff;
  color: #252a63;
  font-size: 12px;
  font-weight: 800;
}

.lead-status[data-status="new"] {
  background: #fff4d9;
  color: #7b5a18;
}

.lead-status[data-status="contacted"],
.lead-status[data-status="qualified"] {
  background: #e7f6ef;
  color: #1f6a48;
}

.lead-status[data-status="scheduled"] {
  background: #e8efff;
  color: #3456a5;
}

.lead-status[data-status="won"] {
  background: #e6f6ed;
  color: #19734a;
}

.lead-status[data-status="lost"] {
  background: #f2f3f7;
  color: #69749a;
}

.lead-empty {
  padding: 40px 16px !important;
  color: #69749a;
  text-align: center;
}

.lead-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(17, 24, 58, 0.24);
}

.lead-dialog::backdrop {
  background: rgba(21, 25, 62, 0.42);
}

.lead-dialog form {
  padding: 24px;
}

.lead-dialog .dialog-header {
  align-items: flex-start;
}

.lead-dialog .dialog-header h2 {
  margin: 4px 0 0;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-form-grid label {
  display: grid;
  gap: 7px;
  color: #252a63;
  font-weight: 800;
}

.lead-form-grid label input,
.lead-form-grid label select,
.lead-form-grid label textarea {
  width: 100%;
}

.lead-form-grid .full-field {
  grid-column: 1 / -1;
}

.lead-readonly-meta {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f6fb;
  color: #69749a;
}

.lead-readonly-meta strong {
  color: #252a63;
}

@media (max-width: 900px) {
  .lead-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lead-dashboard-grid,
  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  .lead-toolbar {
    grid-template-columns: 1fr;
  }

  .lead-form-grid .full-field {
    grid-column: auto;
  }

  .lead-dialog form {
    padding: 18px;
  }
}

/* Keep every authorized workspace tab reachable without widening the page. */
.app-shell {
  min-width: 0;
}

.nav-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.page-tabs {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  padding: 2px 0 7px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.page-tabs .tab-button {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 44px;
  white-space: nowrap;
  scroll-snap-align: start;
}

.topbar-actions {
  margin-left: 0;
}

.user-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.user-kpi-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe3f3;
  border-top: 3px solid #555fae;
  border-radius: 8px;
  background: #fff;
}

.user-kpi-card span,
.user-kpi-card small {
  display: block;
  color: #69749a;
}

.user-kpi-card strong {
  display: block;
  margin: 5px 0 2px;
  color: #15193e;
  font-size: 28px;
}

.user-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dfe3f3;
  border-radius: 8px;
  background: #fff;
}

.user-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.user-table th,
.user-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8eaf4;
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  background: #f4f5fb;
  color: #252a63;
  font-size: 13px;
}

.user-table tbody tr:last-child td {
  border-bottom: 0;
}

.user-table td small {
  display: block;
  margin-top: 4px;
  color: #69749a;
}

.user-tabs-cell {
  max-width: 360px;
  color: #4f597d;
  line-height: 1.5;
}

.user-role-pill,
.user-active-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef0fa;
  color: #394078;
  font-size: 12px;
  font-weight: 800;
}

.user-role-pill.admin {
  background: #252a63;
  color: #fff;
}

.user-active-pill.is-active {
  background: #e7f6ef;
  color: #1f6a48;
}

.user-active-pill.is-inactive {
  background: #f2f3f7;
  color: #69749a;
}

.text-danger-button {
  border: 0;
  background: transparent;
  color: #a83a31;
  font-weight: 800;
}

.text-danger-button:hover,
.text-danger-button:focus-visible {
  background: #fff0ee;
  color: #7d241d;
}

.user-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: min(840px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 58, 0.24);
}

.user-dialog::backdrop {
  background: rgba(21, 25, 62, 0.42);
}

.user-dialog form {
  padding: 24px;
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.user-form-grid > label,
.user-tab-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #252a63;
  font-weight: 800;
}

.user-form-grid .full-field,
.user-tab-field {
  grid-column: 1 / -1;
}

.user-form-grid input,
.user-form-grid select {
  width: 100%;
}

.user-active-field {
  align-content: end;
}

.user-active-field .checkbox-row {
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 9px;
}

.user-active-field input,
.user-tab-option input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.user-tab-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.user-tab-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dfe3f3;
  border-radius: 7px;
  background: #f8f9fd;
  color: #394078;
  font-weight: 700;
}

.user-tab-option:has(input:checked) {
  border-color: #6670be;
  background: #eef0ff;
  color: #252a63;
}

@media (max-width: 1280px) {
  .nav-control-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-actions {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .page-tabs {
    display: flex;
    grid-template-columns: none;
  }

  .page-tabs .tab-button {
    min-width: max-content;
    white-space: nowrap;
  }

  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .topbar-actions .logout-control {
    grid-column: 1 / -1;
    justify-self: end;
    width: auto;
  }

  .user-kpi-grid,
  .user-form-grid,
  .user-tab-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .user-form-grid .full-field,
  .user-tab-field {
    grid-column: auto;
  }

  .user-dialog form {
    padding: 18px;
  }
}
/* Improve income readability while preserving the FIN INFINITY palette. */
#landingPath .landing-path-card-body .landing-path-income {
  display: grid;
  gap: 8px;
  margin: 22px 0 20px;
  padding: 18px 20px;
  border: 1px solid rgba(37, 42, 99, 0.1);
  border-radius: 12px;
  background: #f5f7fc;
  color: #5b6580;
  line-height: 1.45;
}

#landingPath .landing-path-income span {
  color: #5f6a86;
  font-size: 13px;
  font-weight: 800;
}

#landingPath .landing-path-income strong {
  color: #9a6c12;
  font-family: var(--font);
  font-size: clamp(24px, 2.1vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

#landingPath .landing-path-card.prime {
  border-color: rgba(181, 138, 51, 0.9);
  box-shadow: 0 22px 48px rgba(129, 96, 21, 0.24);
}

#landingPath .landing-path-card.prime .landing-path-card-header {
  background: linear-gradient(135deg, #171d50, #303d8b);
}

#landingPath .landing-path-card.prime .landing-path-income {
  border-color: rgba(181, 138, 51, 0.42);
  background: linear-gradient(135deg, #fff9e9, #f5f7fc);
}

#landingPath .landing-path-card.prime .landing-path-income strong {
  color: #8d5e08;
}

/* Keep the editable income artwork inside a stable 16:9 frame on every viewport. */
#landingIncome .landing-bonus-feature {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start !important;
}

#landingIncome .landing-achievement-visual {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden;
}

#landingIncome .landing-achievement-visual img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: contain !important;
  object-position: center;
}

@media (max-width: 760px) {
  #landingIncome .landing-bonus-feature {
    grid-template-columns: 1fr;
  }

  #landingIncome .landing-section-heading h2 {
    white-space: normal !important;
  }

  #landingIncome .landing-achievement-visual,
  #landingIncome .landing-achievement-visual img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
}
.landing-career-copy { min-width: 0; }
.landing-career-principle { margin: 18px 0 0; color: var(--muted); font-size: 20px; line-height: 1.55; font-weight: 700; }
@media (max-width: 760px) { .landing-career-principle { font-size: 17px; } }

.landing-page-wrapper,
.landing-page-wrapper *,
.landing-page-wrapper button,
.landing-page-wrapper input,
.landing-page-wrapper textarea,
.landing-page-wrapper select {
  font-family: var(--font) !important;
}
