:root {
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
  color: #113366;
  background: #f4f7fb;
  font-synthesis: none;
  /* Paleta oficial Shopee e tons de apoio derivados da própria marca. */
  --orange: #ee4d2d;
  --red: #d0011b;
  --blue: #0053de;
  --light-blue: #2673dd;
  --navy: #113366;
  --cyan: #26aa99;
  --yellow: #ffbb00;
  --orange-dark: var(--red);
  --orange-soft: #fff2ef;
  --red-soft: #fff0f2;
  --blue-soft: #edf4ff;
  --cyan-soft: #e8f7f5;
  --yellow-soft: #fff7dc;
  --page: #f4f7fb;
  --ink: var(--navy);
  --muted: #5f6f86;
  --line: #dbe4ef;
  --surface: #ffffff;
  --success: #167c71;
  --warning: #8a6300;
  --danger: var(--red);
  --shadow: 0 16px 45px rgba(17, 51, 102, 0.1);
}

/* Pesquisas internas */
.survey-gate-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(38, 115, 221, 0.2), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(238, 77, 45, 0.2), transparent 34%),
    var(--navy);
}

.survey-gate-card {
  width: min(680px, 100%);
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
  border: 0;
  box-shadow: 0 28px 75px rgba(17, 51, 102, 0.34);
}

.survey-check-card {
  justify-items: center;
  display: grid;
}

.survey-gate-card h1,
.survey-gate-card p,
.survey-gate-survey strong,
.survey-gate-survey small {
  display: block;
}

.survey-gate-card h1 {
  margin: 8px auto 14px;
  max-width: 560px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.survey-gate-card > p {
  color: var(--muted);
}

.survey-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.survey-gate-brand > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--orange);
  font-size: 24px;
  font-weight: 900;
}

.survey-gate-brand strong,
.survey-gate-brand small {
  display: block;
}

.survey-gate-brand strong { color: var(--navy); }
.survey-gate-brand small { margin-top: 2px; color: var(--muted); }

.survey-gate-icon {
  width: 74px;
  height: 74px;
  margin: 30px auto 20px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 36px;
  font-weight: 900;
}

.survey-gate-icon.error {
  color: var(--red);
  background: var(--red-soft);
}

.survey-gate-survey {
  margin: 26px 0 18px;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 16px;
  background: var(--orange-soft);
}

.survey-gate-survey strong { color: var(--navy); font-size: 19px; }
.survey-gate-survey p { margin: 8px 0; color: var(--muted); line-height: 1.55; }
.survey-gate-survey small { color: var(--orange-dark); font-weight: 800; }

.survey-gate-note { font-size: 13px; }

.survey-gate-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.survey-form-page {
  display: block;
  overflow: auto;
}

.survey-required-form-wrap {
  width: min(900px, 100%);
  margin: 0 auto;
}

.survey-required-header {
  margin-bottom: 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  background: white;
}

.survey-required-intro {
  padding: clamp(24px, 4vw, 42px);
  border-top: 6px solid var(--orange);
}

.survey-required-intro h1 {
  margin: 5px 0 10px;
  color: var(--navy);
  font-size: clamp(27px, 4vw, 42px);
}

.survey-required-intro p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.survey-answer-form {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.survey-answer-question {
  margin: 0;
  padding: 26px;
  border: 0;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.survey-answer-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.survey-answer-heading > span {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--orange);
  font-weight: 900;
}

.survey-answer-heading strong,
.survey-answer-heading small { display: block; }
.survey-answer-heading strong { color: var(--navy); font-size: 17px; line-height: 1.4; }
.survey-answer-heading small { margin-top: 4px; color: var(--muted); }

.survey-answer-question textarea,
.survey-builder-form textarea {
  width: 100%;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.survey-answer-question textarea:focus,
.survey-builder-form textarea:focus {
  outline: 3px solid rgba(38, 115, 221, 0.14);
  border-color: var(--light-blue);
}

.survey-choice-options {
  display: grid;
  gap: 10px;
}

.survey-choice-options label {
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  cursor: pointer;
}

.survey-choice-options label:hover { background: var(--blue-soft); border-color: var(--light-blue); }
.survey-choice-options input { accent-color: var(--orange); }

.survey-rating-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.survey-rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.survey-rating-options span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: white;
  font-weight: 900;
  cursor: pointer;
}
.survey-rating-options input:checked + span { color: white; border-color: var(--orange); background: var(--orange); }

.survey-submit-card {
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.survey-submit-card strong,
.survey-submit-card p { display: block; margin: 0; }
.survey-submit-card p { margin-top: 4px; color: var(--muted); font-size: 13px; }

.surveys-page,
.survey-results-page {
  display: grid;
  gap: 20px;
}

.survey-page-intro,
.survey-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.survey-page-intro h2,
.survey-page-intro p,
.survey-results-header h2,
.survey-results-header p { margin: 0; }
.survey-page-intro h2,
.survey-results-header h2 { color: var(--navy); font-size: clamp(25px, 3vw, 36px); }
.survey-page-intro p:last-child,
.survey-results-header p:last-child { margin-top: 7px; color: var(--muted); }

.survey-builder-card { padding: clamp(20px, 3vw, 32px); border-top: 5px solid var(--orange); }
.survey-builder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.survey-wide-field { grid-column: 1 / -1; }
.survey-builder-form .field > span { margin-bottom: 7px; display: block; color: var(--navy); font-size: 12px; font-weight: 900; }
.survey-builder-form .field small { color: var(--muted); font-weight: 500; }
.survey-builder-form input,
.survey-builder-form select,
.survey-results-toolbar select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}
.survey-builder-form select[multiple] { min-height: 130px; }

.survey-audience-note {
  grid-column: 1 / -1;
  padding: 15px 17px;
  border-radius: 12px;
  color: var(--navy);
  background: var(--blue-soft);
}

.survey-audience-preview {
  margin: 18px 0 26px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  color: var(--navy);
  background: var(--cyan-soft);
}
.survey-audience-preview strong { font-size: 24px; color: var(--cyan); }

.survey-builder-questions-heading,
.survey-builder-actions,
.survey-question-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.survey-builder-questions-heading h3,
.survey-builder-questions-heading p,
.survey-builder-actions p { margin: 0; }
.survey-builder-questions-heading p,
.survey-builder-actions p { color: var(--muted); font-size: 13px; }

.survey-question-list { margin-top: 14px; display: grid; gap: 14px; }
.survey-question-builder {
  position: relative;
  padding: 20px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--page);
}
.survey-question-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--navy);
  font-weight: 900;
}
.survey-question-fields { display: grid; gap: 14px; }
.survey-question-settings { align-items: end; }
.survey-question-settings .field { flex: 1; }
.survey-required-toggle { padding: 12px 0; display: flex; gap: 8px; color: var(--navy); font-weight: 700; white-space: nowrap; }
.survey-required-toggle input { width: auto; accent-color: var(--orange); }
.survey-builder-actions { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.survey-builder-actions > div { display: flex; gap: 10px; }

.survey-list { display: grid; gap: 12px; }
.survey-list-card {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
  align-items: center;
  gap: 24px;
  border-left: 5px solid var(--orange);
}
.survey-list-heading { display: flex; gap: 8px; flex-wrap: wrap; }
.survey-status,
.survey-audience-chip {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.survey-status.draft { color: var(--warning); background: var(--yellow-soft); }
.survey-status.published { color: var(--success); background: var(--cyan-soft); }
.survey-status.scheduled { color: var(--blue); background: var(--blue-soft); }
.survey-status.closed { color: var(--muted); background: var(--page); }
.survey-audience-chip { color: var(--navy); background: var(--blue-soft); }
.survey-list-main h3 { margin: 9px 0 5px; color: var(--navy); font-size: 19px; }
.survey-list-main p { margin: 0 0 8px; color: var(--muted); }
.survey-list-main small { color: var(--muted); }
.survey-list-progress strong,
.survey-list-progress span { display: block; }
.survey-list-progress strong { color: var(--navy); font-size: 27px; }
.survey-list-progress span { margin: 2px 0 8px; color: var(--muted); font-size: 12px; }
.survey-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--line); }
.survey-progress-track i { height: 100%; display: block; border-radius: inherit; background: var(--cyan); }
.survey-list-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.survey-results-header { align-items: flex-end; }
.survey-result-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.survey-result-summary-grid article { padding: 20px; }
.survey-result-summary-grid span,
.survey-result-summary-grid strong { display: block; }
.survey-result-summary-grid span { color: var(--muted); font-size: 12px; font-weight: 800; }
.survey-result-summary-grid strong { margin-top: 8px; color: var(--navy); font-size: 30px; }

.survey-question-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.survey-question-summary { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.survey-question-summary > strong { display: block; color: var(--navy); }
.survey-question-summary > span { margin-top: 8px; display: block; color: var(--muted); }
.survey-question-summary > div { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }
.survey-question-summary > div span { padding: 5px 8px; border-radius: 8px; color: var(--navy); background: var(--blue-soft); font-size: 12px; }
.survey-question-summary > div b { color: var(--blue); }

.survey-results-table-card { margin-top: 0; overflow: hidden; }
.survey-results-toolbar { padding: 16px; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(240px, 360px) 170px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.survey-results-toolbar strong,
.survey-results-toolbar span { display: block; }
.survey-results-toolbar span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.survey-results-table-wrap table { min-width: 1250px; }
.survey-results-table-wrap td { max-width: 260px; white-space: normal; }
.survey-question-legend { padding: 14px 16px; display: flex; gap: 10px 18px; flex-wrap: wrap; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.survey-question-legend b { color: var(--navy); }

@media (max-width: 1050px) {
  .survey-list-card { grid-template-columns: minmax(0, 1fr) 170px; }
  .survey-list-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .survey-result-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .survey-gate-page { padding: 18px 12px; }
  .survey-gate-card { padding: 24px 18px; }
  .survey-required-header,
  .survey-submit-card,
  .survey-page-intro,
  .survey-results-header,
  .survey-builder-questions-heading,
  .survey-builder-actions,
  .survey-question-settings { align-items: stretch; flex-direction: column; }
  .survey-required-header { align-items: flex-start; }
  .survey-gate-actions .button,
  .survey-submit-card .button,
  .survey-page-intro .button,
  .survey-results-header .button,
  .survey-builder-actions .button { width: 100%; }
  .survey-builder-grid,
  .survey-question-summary-grid,
  .survey-result-summary-grid { grid-template-columns: 1fr; }
  .survey-question-builder { grid-template-columns: 34px minmax(0, 1fr); padding: 16px; }
  .survey-remove-question { position: absolute; top: 12px; right: 12px; }
  .survey-list-card { grid-template-columns: 1fr; gap: 16px; }
  .survey-list-actions { grid-column: auto; }
  .survey-results-toolbar { grid-template-columns: 1fr; }
  .survey-rating-options span { width: 38px; height: 38px; }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(238, 77, 45, 0.035) 25%, transparent 25%) 0 0 /
      28px 28px,
    var(--page);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid #f7c6bc;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 560px);
}

.login-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: clamp(36px, 7vw, 96px);
  color: white;
  background:
    linear-gradient(180deg, rgba(17, 51, 102, 0.02), rgba(17, 51, 102, 0.78)),
    url("/shopee-wall.jpg") center / cover;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -90px 34%;
  height: 230px;
  transform: rotate(-9deg);
  background: var(--orange);
  opacity: 0.92;
}

.visual-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.visual-copy .eyebrow {
  color: #ffe1db;
}

.visual-copy h1 {
  max-width: 660px;
  margin: 10px 0 16px;
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.visual-copy p {
  max-width: 580px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.6;
}

.login-panel {
  min-height: 100vh;
  padding: 48px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 46px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--orange);
  color: white;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(238, 77, 45, 0.24);
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-panel h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.lead {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.55;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 24px;
  padding: 5px;
  border-radius: 14px;
  background: #eef3f9;
}

.login-tab {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.login-tab.active {
  color: var(--orange);
  background: white;
  box-shadow: 0 4px 14px rgba(17, 51, 102, 0.08);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #324f77;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #c8d4e5;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.11);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button-primary {
  color: white;
  background: var(--orange);
  box-shadow: 0 10px 22px rgba(238, 77, 45, 0.2);
}

.button-primary:hover {
  background: var(--orange-dark);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.button-ghost {
  min-height: 38px;
  padding: 0 11px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.button-danger {
  border-color: #f4c2c8;
  color: var(--danger);
  background: var(--red-soft);
}

.button-google {
  border-color: var(--line);
  color: var(--ink);
  background: white;
}

.button-google .google-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: 12px;
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.link-button {
  padding: 4px 0;
  border: 0;
  color: var(--orange);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.security-note {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding: 14px;
  border-radius: 12px;
  color: #526681;
  background: var(--blue-soft);
  font-size: 12px;
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  color: white;
  background: var(--navy);
}

.sidebar .brand-lockup {
  margin: 0 8px 34px;
}

.sidebar .brand-copy span {
  color: rgba(255, 255, 255, 0.62);
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  width: 22px;
  color: var(--yellow);
  text-align: center;
}

.sidebar-user {
  margin-top: auto;
  padding: 16px 12px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user strong,
.sidebar-user span {
  display: block;
}

.sidebar-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.logout-button {
  width: 100%;
  margin-top: 14px;
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.page {
  min-width: 0;
  padding: 0 34px 50px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar-title p,
.topbar-title h1 {
  margin: 0;
}

.topbar-title p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-title h1 {
  margin-top: 5px;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
}

.mobile-menu {
  display: none;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 26px;
  color: white;
  background:
    linear-gradient(115deg, var(--orange), var(--red));
  box-shadow: var(--shadow);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 54px;
  right: -100px;
  transform: rotate(-25deg);
  background: rgba(255, 255, 255, 0.13);
}

.hero-card::before {
  top: 42px;
}

.hero-card::after {
  top: 120px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  max-width: 700px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 49px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.hero-copy .sync-time {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.hero-figure {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: -75px;
  width: min(260px, 28%);
  filter: drop-shadow(0 18px 18px rgba(17, 51, 102, 0.18));
}

.section {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.045);
}

.filter-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.filter-heading h2,
.filter-heading p {
  margin: 0;
}

.filter-heading h2 {
  font-size: 19px;
}

.filter-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-active {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

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

.filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.filter-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #c8d4e5;
  border-radius: 11px;
  color: var(--ink);
  background: white;
}

.excellence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.excellence-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.045);
}

.excellence-card-button {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.excellence-card-button:hover,
.excellence-card-button:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 14px 32px rgba(238, 77, 45, 0.14);
  transform: translateY(-2px);
}

.excellence-card span,
.excellence-card strong,
.excellence-card p {
  display: block;
  margin: 0;
}

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

.excellence-card strong {
  margin-top: 10px;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.excellence-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.metric-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.045);
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  display: block;
  margin: 16px 0 9px;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.status-good,
.status-excellent {
  color: var(--success);
  background: var(--cyan-soft);
}

.status-attention {
  color: var(--warning);
  background: var(--yellow-soft);
}

.status-critical {
  color: var(--danger);
  background: var(--red-soft);
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.045);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.search-wrap {
  width: min(100%, 390px);
}

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

.agency-table-wrap {
  min-height: 320px;
  max-height: calc(100vh - 350px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.agency-table-wrap table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
}

.agency-list-panel {
  width: 100%;
  max-width: none;
}

.agency-list-table th,
.agency-list-table td {
  padding: 10px 10px;
  font-size: 12px;
}

.agency-list-table th:nth-child(1) { width: 18%; }
.agency-list-table th:nth-child(2) { width: 11%; }
.agency-list-table th:nth-child(3) { width: 13%; }
.agency-list-table th:nth-child(4) { width: 13%; }
.agency-list-table th:nth-child(5) { width: 5%; }
.agency-list-table th:nth-child(6) { width: 7%; }
.agency-list-table th:nth-child(7) { width: 7%; }
.agency-list-table th:nth-child(8) { width: 7%; }
.agency-list-table th:nth-child(9) { width: 11%; }
.agency-list-table th:nth-child(10) { width: 8%; }

.agency-list-table th:nth-child(n + 5):nth-child(-n + 8),
.agency-list-table td:nth-child(n + 5):nth-child(-n + 8) {
  text-align: center;
}

.agency-list-table th:nth-child(10),
.agency-list-table td:nth-child(10) {
  text-align: right;
}

.agency-list-table td:nth-child(1),
.agency-list-table td:nth-child(3),
.agency-list-table td:nth-child(4),
.agency-list-table td:nth-child(9) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.agency-list-table td:nth-child(9) {
  white-space: normal;
  line-height: 1.25;
}

.agency-name-cell strong,
.agency-name-cell small {
  display: block;
}

.agency-name-cell small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.agency-table-wrap thead th {
  position: sticky;
  z-index: 2;
  top: 0;
}

.agency-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.agency-table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid white;
  border-radius: 999px;
  background: #aebdd1;
}

.agency-table-wrap::-webkit-scrollbar-track {
  background: var(--page);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5ebf3;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f8fafe;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.table-title {
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

.table-actions {
  display: flex;
  gap: 6px;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}

.empty-state {
  padding: 54px 24px;
  color: var(--muted);
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 20px;
}

.profile-card {
  padding: 22px;
}

.excellence-detail {
  padding: 22px;
}

.excellence-highlight {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(120deg, var(--orange), var(--red));
}

.excellence-highlight span,
.excellence-highlight strong,
.excellence-highlight p {
  display: block;
  margin: 0;
}

.excellence-highlight span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.excellence-highlight strong {
  margin-top: 7px;
  font-size: 28px;
}

.excellence-highlight p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

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

.profile-card h2 {
  margin: 0 0 18px;
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.profile-item {
  min-width: 0;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.profile-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.profile-item span,
.profile-item strong {
  display: block;
}

.profile-item span {
  color: var(--muted);
  font-size: 11px;
}

.profile-item strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.agency-context-sidebar .nav-list {
  margin-bottom: 18px;
}

.sidebar-agency {
  margin-top: auto;
  padding: 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-agency strong,
.sidebar-agency span {
  display: block;
}

.sidebar-agency strong {
  color: white;
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-agency span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.compact-user {
  margin-top: 0;
  padding-top: 12px;
}

.agency-summary-hero,
.excellence-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 210px;
  padding: clamp(28px, 4vw, 50px);
  border-radius: 25px;
  color: white;
  background: linear-gradient(120deg, var(--orange), var(--red));
  box-shadow: var(--shadow);
}

.agency-summary-hero::after,
.excellence-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -80px;
  width: 420px;
  height: 170px;
  transform: rotate(-18deg);
  border-top: 26px solid rgba(255, 255, 255, 0.18);
  border-bottom: 26px solid rgba(255, 255, 255, 0.12);
}

.agency-summary-hero > *,
.excellence-hero > * {
  position: relative;
  z-index: 1;
}

.agency-summary-hero h2,
.excellence-hero h2 {
  margin: 10px 0 12px;
  max-width: 960px;
  font-size: clamp(34px, 4.3vw, 60px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.agency-summary-hero p,
.excellence-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.agency-summary-hero .eyebrow {
  color: white;
}

.hero-fifo,
.excellence-score {
  flex: 0 0 170px;
  padding: 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 20px;
  background: rgba(17, 51, 102, 0.28);
  text-align: center;
}

.hero-fifo span,
.hero-fifo strong,
.hero-fifo small,
.excellence-score span,
.excellence-score strong,
.excellence-score small {
  display: block;
}

.hero-fifo span,
.excellence-score span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-fifo strong,
.excellence-score strong {
  margin: 10px 0 5px;
  color: white;
  font-size: 34px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 28px;
}

.period-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 22px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.045);
}

.period-toolbar > div span,
.period-toolbar > div strong,
.period-select-field span,
.period-select-field small {
  display: block;
}

.period-toolbar > div span,
.period-select-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.period-toolbar > div strong {
  margin-top: 4px;
  font-size: 20px;
}

.period-select-field {
  min-width: min(100%, 280px);
}

.period-select-field select {
  width: 100%;
  min-height: 42px;
  margin-top: 5px;
  padding: 0 38px 0 12px;
  border: 1px solid #c8d4e5;
  border-radius: 11px;
  color: var(--ink);
  background: white;
}

.period-select-field small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.page-intro h2 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.page-intro p,
.agency-section-heading p,
.content-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-kicker {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.agency-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 14px;
}

.agency-section-heading h2 {
  margin: 0 0 5px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.agency-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.agency-home-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agency-kpi-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(17, 51, 102, 0.065);
}

.agency-kpi-card.level-good,
.agency-kpi-card.level-excellent {
  border-top-color: var(--success);
}

.agency-kpi-card.level-attention {
  border-top-color: var(--warning);
}

.agency-kpi-card.level-critical {
  border-top-color: var(--danger);
}

.kpi-card-header,
.kpi-result-row,
.content-card-header,
.flow-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-card-header h3,
.content-card-header h3,
.flow-title h3 {
  margin: 0;
  font-size: 13px;
}

.kpi-card-header > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--orange);
  background: var(--orange-soft);
  font-weight: 800;
}

.kpi-value {
  display: block;
  margin: 20px 0 10px;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.045em;
}

.kpi-text-value {
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.4vw, 31px);
  line-height: 1.08;
}

.kpi-result-row small {
  color: var(--muted);
}

.agency-kpi-card > p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.volume-grid,
.flow-grid,
.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.volume-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(17, 51, 102, 0.06);
}

.volume-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--orange);
  background: var(--orange-soft);
  font-weight: 800;
}

.volume-card span,
.volume-card strong,
.volume-card small {
  display: block;
}

.volume-card > div > span,
.volume-card small {
  color: var(--muted);
  font-size: 11px;
}

.volume-card strong {
  margin: 3px 0;
  font-size: 23px;
}

.agency-content-card {
  padding: 18px;
}

.alert-list,
.check-list {
  display: grid;
  gap: 10px;
}

.alert-item,
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 13px;
  background: var(--page);
}

.alert-dot,
.check-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.alert-item.level-good .alert-dot,
.alert-item.level-excellent .alert-dot,
.check-dot {
  background: var(--success);
}

.alert-item p,
.check-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agency-profile-card {
  padding: 0;
}

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

.chart-card,
.table-card {
  padding: 18px;
}

.chart-wrap {
  height: 260px;
  margin-top: 18px;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-inbound { background: var(--yellow); }
.legend-outbound { background: var(--orange); }

.table-card {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
}

.table-card .content-card-header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.daily-table-card {
  width: 100%;
  max-width: none;
}

.daily-data-table {
  width: 100%;
  table-layout: fixed;
}

.daily-data-table th,
.daily-data-table td {
  padding: 9px 11px;
  font-size: 12px;
  text-align: right;
}

.daily-data-table th {
  white-space: normal;
  line-height: 1.2;
}

.daily-data-table th:first-child,
.daily-data-table td:first-child {
  text-align: left;
}

.pending-intro {
  align-items: flex-end;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  padding: 4px;
  border-radius: 13px;
  background: #e5ebf3;
}

.segment-button {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.segment-button.active {
  color: var(--orange);
  background: white;
  box-shadow: 0 3px 12px rgba(17, 51, 102, 0.09);
}

.flow-card,
.criteria-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(17, 51, 102, 0.06);
}

.flow-card > strong {
  display: block;
  margin: 18px 0 2px;
  font-size: 30px;
}

.flow-card > small,
.criteria-card span,
.criteria-card small {
  color: var(--muted);
  font-size: 11px;
}

.flow-details {
  display: grid;
  gap: 10px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.flow-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.flow-details span {
  color: var(--muted);
}

.flow-details b {
  text-align: right;
}

.aging-card {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.aging-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.aging-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e5ebf3;
}

.aging-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.excellence-hero {
  min-height: 220px;
}

.certificate-download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-left: 4px solid #c8d4e5;
}

.certificate-download-card.is-available {
  border-left-color: var(--orange);
  background: linear-gradient(100deg, var(--orange-soft) 0%, #fff 58%);
}

.certificate-file-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 66px;
  border-radius: 12px 12px 15px 12px;
  color: white;
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(238, 77, 45, 0.2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.certificate-download-copy h3,
.certificate-download-copy p {
  margin: 0;
}

.certificate-download-copy h3 {
  font-size: 17px;
}

.certificate-download-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.certificate-download-button {
  white-space: nowrap;
}

.certificate-unavailable-status {
  white-space: nowrap;
}

.criteria-card span,
.criteria-card strong,
.criteria-card small {
  display: block;
}

.criteria-card strong {
  margin-top: 9px;
  font-size: 16px;
}

.criteria-card small {
  margin-top: 6px;
}

.check-list {
  padding: 18px;
}

.dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 51, 102, 0.58);
  backdrop-filter: blur(5px);
}

.dialog {
  width: min(100%, 540px);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  padding: 26px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 30px 80px rgba(17, 51, 102, 0.25);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dialog-header h2,
.dialog-header p {
  margin: 0;
}

.dialog-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-close {
  flex: 0 0 auto;
}

.password-rules {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}

.toast {
  padding: 14px 16px;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  animation: toast-in 0.22s ease-out;
}

.toast.error {
  background: var(--danger);
}

.toast-action {
  display: grid;
  gap: 10px;
  line-height: 1.45;
}

.toast-action a {
  justify-self: start;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--navy);
  background: white;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.toast-action a:hover {
  background: var(--yellow-soft);
}

.beta-ended-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 32px 20px;
  background:
    linear-gradient(135deg, rgba(238, 77, 45, 0.96), rgba(208, 1, 27, 0.92)),
    url('/shopee-wall.jpg') center / cover;
}

.beta-ended-page::before,
.beta-ended-page::after {
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: '';
}

.beta-ended-page::before {
  top: -170px;
  right: -90px;
}

.beta-ended-page::after {
  bottom: -220px;
  left: -100px;
}

.beta-ended-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 42px 44px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 80px rgba(17, 51, 102, 0.24);
  text-align: center;
}

.beta-ended-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  text-align: left;
}

.beta-ended-brand div {
  display: grid;
  gap: 1px;
}

.beta-ended-brand strong {
  color: var(--ink);
  font-size: 17px;
}

.beta-ended-brand span:not(.beta-ended-logo) {
  color: var(--muted);
  font-size: 13px;
}

.beta-ended-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(238, 77, 45, 0.24);
  font-size: 24px;
  font-weight: 800;
}

.beta-ended-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: var(--cyan-soft);
  font-size: 34px;
  font-weight: 800;
}

.beta-ended-card .eyebrow {
  margin-bottom: 10px;
  color: var(--orange);
}

.beta-ended-card h1 {
  max-width: 520px;
  margin: 0 auto 16px;
  color: var(--ink);
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.06;
}

.beta-ended-message {
  max-width: 510px;
  margin: 0 auto 12px;
  color: #526681;
  font-size: 17px;
  line-height: 1.65;
}

.beta-ended-note {
  margin: 0 auto 24px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.55;
}

.beta-ended-thanks {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #526681;
  background: var(--blue-soft);
  font-size: 14px;
  line-height: 1.5;
}

.beta-ended-button {
  width: 100%;
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

.simulator-page {
  display: grid;
  gap: 28px;
  padding-bottom: 32px;
}

.simulator-program-banner {
  width: 100%;
  height: clamp(230px, 25vw, 360px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--orange);
  box-shadow: var(--shadow);
}

.simulator-program-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.simulator-rules {
  display: grid;
  gap: 18px;
}

.simulator-heading {
  margin: 0;
}

.simulator-heading h2 {
  margin: 6px 0 4px;
}

.simulator-heading p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.simulator-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.simulator-rule-card {
  position: relative;
  min-height: 260px;
  padding: 24px 20px 20px;
  overflow: hidden;
}

.simulator-rule-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 12px;
  color: white;
  background: var(--orange);
  font-weight: 900;
}

.simulator-rule-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.simulator-rule-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #526681;
  font-size: 13px;
  line-height: 1.4;
}

.simulator-rule-card li::marker {
  color: var(--orange);
}

.simulator-rules-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.simulator-rule-details {
  min-width: 0;
  overflow: hidden;
}

.simulator-rule-details summary {
  padding: 18px 20px;
  cursor: pointer;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.simulator-rule-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.simulator-rule-details table {
  min-width: 600px;
  font-size: 12px;
}

.simulator-rule-details th,
.simulator-rule-details td {
  padding: 11px 13px;
  vertical-align: top;
}

.simulator-rule-details td:last-child {
  color: var(--orange-dark);
  font-weight: 800;
  white-space: nowrap;
}

.simulator-form {
  display: grid;
  gap: 16px;
}

.simulator-form-section {
  padding: 24px;
}

.simulator-section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.simulator-section-title > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.simulator-section-title h3,
.simulator-section-title p {
  margin: 0;
}

.simulator-section-title h3 {
  font-size: 20px;
}

.simulator-section-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.simulator-field {
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 7px;
}

.simulator-field > span {
  color: #324f77;
  font-size: 13px;
  font-weight: 800;
}

.simulator-field > small {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
}

.simulator-field select,
.simulator-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #c8d4e5;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
}

.simulator-field select:focus,
.simulator-field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.11);
}

.simulator-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.simulator-input-wrap input {
  padding-right: 88px;
}

.simulator-input-wrap > b {
  position: absolute;
  right: 13px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.currency-input > b {
  right: auto;
  left: 14px;
  font-size: 13px;
}

.currency-input input {
  padding-right: 14px;
  padding-left: 44px;
}

.simulator-billing-field {
  width: min(100%, 520px);
}

.simulator-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.simulator-form-actions .button-primary {
  min-width: 270px;
}

.simulator-empty-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 150px;
  padding: 28px;
  text-align: left;
}

.simulator-empty-result > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: var(--orange);
  font-size: 28px;
}

.simulator-empty-result h3,
.simulator-empty-result p {
  margin: 0;
}

.simulator-empty-result p {
  margin-top: 5px;
  color: var(--muted);
}

.simulator-result {
  display: grid;
  gap: 18px;
  scroll-margin-top: 24px;
}

.simulator-result-hero {
  position: relative;
  min-height: 240px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 30px;
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow);
}

.simulator-result-hero::after {
  content: '';
  position: absolute;
  width: 330px;
  height: 330px;
  right: -150px;
  top: -180px;
  border: 50px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.simulator-result-copy,
.simulator-score-summary,
.simulator-medal {
  position: relative;
  z-index: 1;
}

.simulator-result-copy > span,
.simulator-score-summary span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulator-result-copy h2 {
  margin: 5px 0 8px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.simulator-result-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.simulator-score-summary {
  min-width: 160px;
  display: grid;
  gap: 4px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.simulator-score-summary strong {
  font-size: 42px;
}

.simulator-score-summary small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.simulator-medal {
  width: 116px;
  height: 150px;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 28px rgba(17, 51, 102, 0.2);
}

.simulator-medal img {
  position: absolute;
  width: 232.36%;
  height: auto;
  left: -66.08%;
  top: -24.3%;
  display: block;
}

.simulator-medal.compact {
  width: 52px;
  height: 67px;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(17, 51, 102, 0.12);
}

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

.simulator-breakdown-card {
  padding: 22px;
}

.simulator-breakdown-list {
  display: grid;
  margin-top: 12px;
}

.simulator-breakdown-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: #526681;
  font-size: 13px;
}

.simulator-breakdown-list strong {
  color: var(--ink);
  white-space: nowrap;
}

.simulator-breakdown-list .simulator-breakdown-total {
  border-bottom: 0;
  color: var(--ink);
  font-weight: 800;
}

.negative-points {
  color: var(--danger) !important;
}

.simulator-financial-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border-color: #f7c6bc;
  background: linear-gradient(135deg, #fff7f5, var(--orange-soft));
}

.simulator-financial-result h3 {
  margin: 7px 0 8px;
  font-size: 24px;
}

.simulator-financial-result p:last-child {
  max-width: 760px;
  margin: 0;
  color: #526681;
  line-height: 1.55;
}

.simulator-final-value {
  flex: 0 0 auto;
  min-width: 250px;
  display: grid;
  gap: 5px;
  padding: 20px 22px;
  border-radius: 18px;
  color: white;
  background: var(--orange);
  text-align: right;
}

.simulator-final-value span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.simulator-final-value strong {
  font-size: 27px;
}

.simulator-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.simulator-comparison-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
}

.simulator-comparison-card.current {
  border: 2px solid var(--orange);
}

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

.simulator-comparison-card span,
.simulator-comparison-card small {
  color: var(--muted);
  font-size: 11px;
}

.simulator-comparison-card strong {
  font-size: 18px;
  white-space: nowrap;
}

.simulator-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.functioning-page {
  display: grid;
  gap: 22px;
}

.functioning-rule-banner {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid #f6d879;
  border-radius: 17px;
  color: var(--navy);
  background: var(--yellow-soft);
  box-shadow: 0 8px 24px rgba(17, 51, 102, 0.04);
}

.functioning-rule-banner > span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: var(--yellow);
  font-size: 20px;
  font-weight: 900;
}

.functioning-rule-banner strong,
.functioning-rule-banner p {
  margin: 0;
}

.functioning-rule-banner p {
  margin-top: 4px;
  color: #526681;
  font-size: 13px;
  line-height: 1.5;
}

.functioning-rule-banner .functioning-support-reminder {
  margin-top: 10px;
  color: var(--navy);
}

.functioning-support-reminder a {
  color: var(--blue);
  font-weight: 900;
}

.functioning-primary-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(540px, 1.22fr);
  gap: 20px;
  align-items: start;
}

.functioning-primary-grid.management {
  grid-template-columns: 1fr;
}

.functioning-form-card,
.functioning-calendar-card {
  padding: 22px;
}

.compact-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.functioning-form {
  display: grid;
  gap: 14px;
}

.functioning-form .field > span {
  color: #324f77;
  font-size: 12px;
  font-weight: 800;
}

.functioning-form .field small {
  color: var(--muted);
  font-weight: 600;
}

.functioning-form textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid #c8d4e5;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
  font: inherit;
}

.functioning-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.11);
}

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

.functioning-inline-warning {
  padding: 12px 14px;
  border: 1px solid #f4c2c8;
  border-radius: 11px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.functioning-holiday-help {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.functioning-holiday-help strong {
  font-size: 12px;
}

.functioning-holiday-help div {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

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

.functioning-calendar-header h2,
.functioning-calendar-header p {
  margin: 0;
}

.functioning-calendar-header h2 {
  margin-top: 4px;
  font-size: 21px;
}

.functioning-calendar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.functioning-weekdays,
.functioning-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.functioning-weekdays span {
  padding: 7px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.functioning-calendar-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  gap: 1px;
}

.functioning-calendar-day {
  position: relative;
  min-width: 0;
  min-height: 72px;
  padding: 9px;
  border: 0;
  color: var(--ink);
  background: white;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.functioning-calendar-day:hover,
.functioning-calendar-day:focus-visible {
  z-index: 1;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 2px var(--light-blue);
  outline: none;
}

.functioning-calendar-day > span {
  font-size: 12px;
  font-weight: 800;
}

.functioning-calendar-day b,
.functioning-calendar-day small {
  position: absolute;
  bottom: 7px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 9px;
}

.functioning-calendar-day b {
  left: 7px;
  color: #684900;
  background: var(--yellow);
}

.functioning-calendar-day small {
  right: 7px;
  color: white;
  background: var(--orange);
  font-weight: 900;
}

.functioning-calendar-day.outside-month {
  color: #9aa9bc;
  background: #f7f9fc;
}

.functioning-calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.functioning-calendar-day.national-holiday {
  background: var(--yellow-soft);
}

.functioning-calendar-day.has-notice {
  background: var(--orange-soft);
}

.functioning-calendar-day.blocked-date {
  cursor: not-allowed;
  color: #a5b0bf;
  background: #f1f4f8;
}

.functioning-calendar-day.blocked-date::after {
  content: '';
  position: absolute;
  inset: 50% 14% auto;
  height: 1px;
  transform: rotate(-30deg);
  background: #b7c2d0;
}

.functioning-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.functioning-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.functioning-calendar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-holiday { background: var(--yellow); }
.legend-notice { background: var(--orange); }
.legend-blocked { background: #b7c2d0; }

.functioning-notice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.functioning-notice-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border-top: 4px solid var(--orange);
}

.functioning-notice-card.vacation { border-top-color: var(--blue); }
.functioning-notice-card.reduced { border-top-color: var(--yellow); }

.functioning-notice-card p,
.functioning-notice-card strong {
  margin: 0;
}

.functioning-notice-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.functioning-notice-card .button {
  justify-self: start;
  margin-top: 4px;
}

.functioning-notice-type {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.functioning-management-filter {
  margin-top: 0;
}

.functioning-filter-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) repeat(3, minmax(150px, 0.72fr));
  gap: 12px;
}

.functioning-search-field .search-input {
  min-height: 44px;
}

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

.functioning-summary-grid .metric-card {
  display: grid;
  gap: 9px;
  border-top: 4px solid var(--orange);
}

.functioning-summary-grid .metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.functioning-summary-grid .metric-card strong {
  font-size: 28px;
}

.functioning-management-table {
  margin-top: 0;
}

.functioning-management-table .table-wrap {
  max-height: 520px;
  overflow: auto;
}

.functioning-management-table table {
  min-width: 1320px;
}

.functioning-management-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: white;
}

.functioning-management-table th,
.functioning-management-table td {
  padding: 11px 12px;
  font-size: 12px;
}

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

  .agency-kpi-grid,
  .criteria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .excellence-profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .simulator-rule-grid,
  .simulator-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .functioning-primary-grid,
  .functioning-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .functioning-calendar-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    width: min(100%, 600px);
    margin: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(290px, calc(100vw - 46px));
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .page {
    padding: 0 20px 92px;
  }

  .mobile-menu {
    display: inline-grid;
    place-items: center;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-figure {
    opacity: 0.34;
    width: 220px;
  }

  .agency-summary-hero,
  .excellence-hero {
    min-height: 190px;
  }

  .simulator-result-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .simulator-score-summary {
    grid-column: 1 / -1;
  }

  .simulator-result-grid {
    grid-template-columns: 1fr;
  }

  .functioning-primary-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .certificate-download-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .certificate-download-button,
  .certificate-unavailable-status {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .beta-ended-page {
    align-items: start;
    padding: 18px 14px;
  }

  .beta-ended-card {
    padding: 30px 22px;
    border-radius: 22px;
  }

  .beta-ended-brand {
    margin-bottom: 26px;
  }

  .login-panel {
    padding: 30px 20px;
    justify-content: flex-start;
  }

  .brand-lockup {
    margin-bottom: 34px;
  }

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

  .topbar {
    min-height: 72px;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .hero-card {
    min-height: 260px;
    padding: 26px 22px;
    border-radius: 20px;
  }

  .hero-copy h2 {
    font-size: 31px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .agency-kpi-grid,
  .volume-grid,
  .flow-grid,
  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .agency-summary-hero,
  .excellence-hero,
  .page-intro,
  .pending-intro,
  .period-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .period-select-field {
    min-width: 0;
  }

  .agency-summary-hero h2,
  .excellence-hero h2 {
    font-size: 34px;
  }

  .hero-fifo,
  .excellence-score {
    flex-basis: auto;
    width: 100%;
  }

  .segmented-control {
    width: 100%;
  }

  .chart-wrap {
    height: 220px;
  }

  .section-heading,
  .panel-toolbar,
  .filter-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-grid,
  .excellence-profile {
    grid-template-columns: 1fr;
  }

  .search-wrap {
    width: 100%;
  }

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

  .profile-item:nth-child(odd) {
    border-right: 0;
  }

  .dialog {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .form-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .simulator-program-banner {
    height: 220px;
    border-radius: 20px;
  }

  .simulator-rule-grid,
  .simulator-fields-grid,
  .simulator-comparison-grid,
  .simulator-rules-table-grid {
    grid-template-columns: 1fr;
  }

  .simulator-rule-card {
    min-height: 0;
  }

  .simulator-form-section {
    padding: 20px 16px;
  }

  .simulator-section-title,
  .simulator-financial-result,
  .simulator-form-actions,
  .simulator-empty-result {
    align-items: stretch;
    flex-direction: column;
  }

  .simulator-form-actions .button,
  .simulator-form-actions .button-primary {
    width: 100%;
    min-width: 0;
  }

  .simulator-result-hero {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 24px 20px;
  }

  .simulator-medal {
    width: 82px;
    height: 106px;
    border-radius: 16px;
  }

  .simulator-medal.compact {
    width: 52px;
    height: 67px;
  }

  .simulator-score-summary,
  .simulator-final-value {
    width: 100%;
    min-width: 0;
  }

  .simulator-final-value {
    text-align: left;
  }

  .functioning-rule-banner,
  .functioning-calendar-header,
  .functioning-management-filter .filter-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .functioning-filter-grid,
  .functioning-date-fields,
  .functioning-summary-grid {
    grid-template-columns: 1fr;
  }

  .functioning-form-card,
  .functioning-calendar-card {
    padding: 16px;
  }

  .functioning-calendar-day {
    min-height: 52px;
    padding: 6px;
  }

  .functioning-calendar-day b,
  .functioning-calendar-day small {
    bottom: 4px;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    font-size: 8px;
  }

  .functioning-calendar-day b { left: 4px; }
  .functioning-calendar-day small { right: 4px; }
}
