:root {
  --green: #0ea5e9;
  --green-dark: #0b3a73;
  --blue: #2563eb;
  --blue-dark: #123a7a;
  --blue-soft: #eaf2ff;
  --red: #c51122;
  --ink: #102033;
  --muted: #5d6f85;
  --line: #d5e1ef;
  --bg: #eef5ff;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    linear-gradient(180deg, #f4f8ff 0%, var(--bg) 100%);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid #c9d8ea;
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 800;
  cursor: pointer;
  transition: 0.18s ease;
}

button:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

button.primary {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 42px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(135deg, #0a2f66 0%, #164fa3 58%, #0d7bd3 100%);
  color: #fff;
  border-bottom: 6px solid #60a5fa;
}

.app-header h1 {
  margin: 4px 0;
  font-size: 2.5rem;
  line-height: 1;
}

.app-header p {
  margin: 0;
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow {
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-block,
.user-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.user-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-badge {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

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

.user-badge span {
  font-size: 0.8rem;
  opacity: 0.86;
}

.ghost-link {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.layout {
  display: grid;
  grid-template-columns: minmax(680px, 2.2fr) minmax(320px, 1fr);
  gap: 14px;
  padding: 16px;
  align-items: start;
}

.panel,
.report-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 55, 120, 0.12);
}

.panel {
  padding: 18px;
  align-self: start;
}

.wizard-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e6f6;
  border-radius: 12px;
  background: #f7fbff;
}

.wizard-step-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border-color: #cfdef0;
  text-align: left;
  white-space: normal;
  line-height: 1.28;
  font-size: 0.9rem;
}

.wizard-step-indicator span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e7f0ff;
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 0.95rem;
}

.wizard-step-indicator.active {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}

.wizard-step-indicator.active span {
  background: #fff;
  color: var(--blue-dark);
}

.wizard-step-panel h2 {
  margin-top: 0;
  color: var(--blue-dark);
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.inline-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

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

h2,
h3 {
  margin: 20px 0 12px;
}

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

label {
  display: grid;
  gap: 6px;
  color: #344b4e;
  font-weight: 800;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c8d8eb;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

textarea {
  resize: vertical;
}

.wide {
  margin-top: 16px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.info-box,
.result-box {
  padding: 14px;
  border: 1px solid #c7dcf4;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #f7fbff;
  color: var(--ink);
}

.result-box {
  margin-top: 16px;
}

.quick-role-box {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #bfd5f1;
  border-left: 6px solid var(--blue);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.quick-role-box h3 {
  margin: 0;
  color: var(--blue-dark);
}

.quick-role-box textarea {
  min-height: 138px;
  background: #fff;
}

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

.method-entry-choices button {
  min-height: 54px;
  border: 1px solid #b9d2f0;
  background: #fff;
}

.method-entry-choices button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.sector-evidence-box {
  margin-top: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-row.compact {
  margin-top: 0;
}

.compact-toolbar {
  margin-bottom: 8px;
}

.team-participants-box,
.quantity-box,
.client-history-box {
  padding: 14px;
  border: 1px solid #c7dcf4;
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  background: #f7fbff;
}

.participant-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.participant-row strong {
  grid-column: 1 / -1;
  color: var(--blue-dark);
}

.quantity-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

.quantity-box h3 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--blue-dark);
}

.mini-history-table {
  min-width: 820px;
}

.voice-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed #b8cce6;
  border-radius: 8px;
  background: #f7fbff;
}

.voice-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.forms-layout {
  grid-template-columns: minmax(420px, 560px) minmax(460px, 1fr);
}

.help-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  padding: 24px;
}

.help-card {
  padding: 24px;
}

.help-card h2 {
  margin-top: 0;
  color: var(--blue-dark);
}

.help-card ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.help-card li {
  margin-bottom: 10px;
}

.campaign-list {
  display: grid;
  gap: 12px;
}

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

.campaign-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.history-import-box {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #c7dcf4;
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  background: #f7fbff;
}

.history-import-box h3 {
  margin-top: 0;
}

.public-form-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.public-form-header {
  justify-content: flex-start;
}

.question-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.question-card legend {
  padding: 0 6px;
  font-weight: 800;
}

.scale-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.scale-row label {
  align-content: start;
  min-height: 88px;
  padding: 10px;
  border: 1px solid #d3e1f1;
  border-radius: 8px;
  background: #f7fbff;
  text-align: center;
  cursor: pointer;
}

.scale-row input {
  width: auto;
  margin: 0 auto;
}

.scale-row span {
  font-weight: 900;
  color: var(--blue-dark);
}

.scale-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.method-tabs {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbff;
}

.method-option {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: 130px;
  padding: 20px;
  border: 1px solid #d3e1f1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: 0.18s ease;
  overflow: visible;
}

.method-option:hover {
  border-color: #93b7ec;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.method-option:has(input:checked) {
  border-color: var(--blue);
  background: linear-gradient(135deg, #ffffff, var(--blue-soft));
  box-shadow: inset 4px 0 0 var(--blue), 0 10px 24px rgba(37, 99, 235, 0.12);
}

.method-option input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 5px;
}

.method-option strong,
.method-option small {
  display: block;
}

.method-option small {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.48;
  font-size: 0.93rem;
}

.method3-campaign-box,
.success-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #cfe0f4;
  border-radius: 12px;
  background: #f8fbff;
}

.success-box {
  border-left: 6px solid var(--green);
  color: #123a40;
  font-weight: 800;
}

.campaign-list {
  display: grid;
  gap: 12px;
}

.method-help {
  margin: 16px 0;
  padding: 14px;
  border-left: 6px solid var(--blue);
  background: #eef5ff;
}

.method-help p {
  margin: 6px 0 0;
  color: #344b4e;
}

.field-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.file-status {
  min-height: 22px;
  margin-top: 8px;
  color: var(--blue-dark);
  font-weight: 800;
}

.file-status.error {
  color: var(--red);
}

.file-upload-box {
  margin-top: 12px;
  padding: 14px;
  border: 2px dashed #8bb8f0;
  border-radius: 10px;
  background: #f4f8ff;
}

.file-upload-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-weight: 900;
}

.file-upload-box input {
  width: 100%;
  padding: 10px;
  border: 1px solid #b8cbe4;
  border-radius: 8px;
  background: #fff;
}

.file-upload-box small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.evidence-box {
  margin: 14px 0;
  padding: 14px 16px;
  border-left: 5px solid var(--blue);
  background: #f6f9fe;
  border-radius: 8px;
}

.evidence-box h3,
.evidence-box h4 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.evidence-box h4 {
  margin-top: 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.evidence-box p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.method-used-box {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border-left: 6px solid var(--green);
  background: #eef8f1;
  border-radius: 8px;
}

.method-used-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.method-used-box strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.methodology-description {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d9e6f2;
  border-radius: 8px;
  background: #fff;
}

.methodology-description h3 {
  margin-top: 0;
  color: var(--blue-dark);
}

.methodology-description ul {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.methodology-description li {
  margin: 4px 0;
}

.method-summary-table {
  width: 100%;
  margin: 16px 0 18px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.9rem;
}

.method-summary-table th {
  background: var(--blue-dark);
  color: #fff;
  text-align: left;
}

.method-summary-table th,
.method-summary-table td {
  padding: 10px;
  border: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.role-picker {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d3e1f1;
  border-radius: 8px;
  background: #f7fbff;
}

.role-picker strong {
  display: block;
  margin-bottom: 8px;
}

.inner-method-box {
  margin: 18px 0;
  background: #f8fbff;
}

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

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d3e1f1;
  border-radius: 8px;
  background: #fff;
}

.checkbox-grid input {
  width: auto;
  margin: 0;
}

.role-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 8px 4px 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
}

.batch-card {
  border-left-color: var(--blue);
}

.hidden {
  display: none !important;
}

.module-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #bfd3ee;
  border-left: 6px solid var(--blue);
  border-radius: 12px;
  background: #f7fbff;
}

.empty-module,
.locked-module {
  padding: 18px;
  border: 1px dashed #9db8dc;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}

.locked-module {
  border-style: solid;
  background: #fff7ed;
  color: #7c2d12;
}

.assistant-card textarea {
  min-height: 92px;
}

.draft-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.draft-row span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.compact-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.compact-select select {
  min-height: 42px;
  width: auto;
}

.review-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #bfd3ee;
  border-radius: 12px;
  background: #f8fbff;
}

.email-report-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #bfd3ee;
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  background: #f8fbff;
}

.email-report-panel h3 {
  margin: 0;
}

.email-report-panel textarea {
  resize: vertical;
}

.quality-score {
  margin: 10px 0 14px;
  font-size: 1.1rem;
  color: var(--blue-dark);
}

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

.review-grid > div,
.dashboard-grid > section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

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

.dashboard-cards > div {
  padding: 16px;
  border: 1px solid #bfd3ee;
  border-radius: 10px;
  background: #fff;
}

.dashboard-cards span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-cards strong {
  display: block;
  margin-top: 6px;
  font-size: 1.8rem;
  color: var(--blue-dark);
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr 40px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 0.88rem;
}

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

.bar-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #16a34a);
}

.dashboard-actions-table input,
.dashboard-actions-table select {
  min-width: 120px;
}

.dashboard-filter-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #bfd3ee;
  border-left: 6px solid var(--blue);
  border-radius: 10px;
  background: #f7fbff;
}

.dashboard-filter-box label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--blue-dark);
}

.tracking-report-box {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #bfd3ee;
  border-radius: 10px;
  background: #fff;
}

.dashboard-print-report {
  color: var(--ink);
}

.dashboard-print-report h4 {
  margin: 18px 0 8px;
  color: var(--blue-dark);
}

.dashboard-print-report ul {
  margin-top: 8px;
  padding-left: 22px;
}

.dashboard-print-report li {
  margin-bottom: 8px;
}

.button-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--azul);
  color: var(--azul);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.button-like.primary {
  background: var(--azul);
  color: #fff;
}

.method3-panel .info-box {
  border-left: 5px solid var(--azul);
  background: #eef5ff;
}

.assistant-copsoq-box {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bdd0ea;
  border-radius: 10px;
  background: #f7faff;
}

.combined-sources-box {
  border-left: 5px solid #1f64d6;
  background: #f5f9ff;
}

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

.source-match-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #dff5e9;
  color: #12613b;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

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

.assistant-copsoq-box summary {
  cursor: pointer;
  color: #123e7c;
  font-weight: 800;
}

.assistant-copsoq-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 520px;
  overflow: auto;
}

.assistant-copsoq-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #dbe6f4;
}

@media (max-width: 700px) {
  .assistant-copsoq-question {
    grid-template-columns: 1fr;
  }
}

.worker-header-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c8d7ea;
  border-radius: 10px;
  background: #f7fbff;
}

.worker-header-box h2 {
  margin-top: 0;
}

.toolbar,
.entry-head,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 12px;
  background: #fbfdff;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.report-shell {
  min-width: 0;
  overflow: auto;
}

.layout > .report-shell {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
}

.report {
  padding: 18px;
}

.report.empty {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.pdf-edit-notice {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 11px 18px;
  border-bottom: 1px solid #93c5fd;
  background: #eff6ff;
  color: #123b70;
  text-align: center;
  font-weight: 700;
}

.pdf-edit-target {
  min-width: 1px;
  outline: 2px dashed #2563eb;
  outline-offset: 1px;
  background: rgba(219, 234, 254, 0.38);
  overflow: auto;
  cursor: text;
  white-space: pre-wrap;
}

.pdf-edit-target:focus {
  outline-style: solid;
  background: #fff;
}

.pdf-edit-target.pdf-edit-overflow {
  outline-color: #dc2626;
  background: #fef2f2;
}

.pdf-editing .page,
.pdf-editing table,
.pdf-editing tr,
.pdf-editing td,
.pdf-editing th {
  box-sizing: border-box;
}

.pdf-editing table {
  table-layout: fixed;
}

.pdf-edit-link {
  border-color: #2563eb;
  color: #174ea6;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.22), transparent 28%),
    linear-gradient(135deg, #082f63, #1d4ed8);
}

.auth-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(4, 26, 63, 0.34);
}

.auth-card .brand-mark {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
}

.auth-card span {
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-card h1 {
  margin: 8px 0;
  color: var(--blue-dark);
  font-size: 2.1rem;
}

.auth-card p,
.auth-card small {
  color: var(--muted);
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.aep-sales-body {
  display: block;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(6, 182, 212, 0.24), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(22, 163, 74, 0.2), transparent 30%),
    linear-gradient(135deg, #082f63 0%, #1d4ed8 52%, #0f766e 100%);
}

.aep-sales-layout {
  width: min(1180px, 100%);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 430px);
  gap: 22px;
  align-items: stretch;
}

.aep-sales-panel,
.sales-auth-card {
  align-self: center;
}

.aep-sales-panel {
  min-height: 620px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 47, 99, 0.96), rgba(30, 64, 175, 0.88)),
    linear-gradient(45deg, rgba(14, 165, 233, 0.18), rgba(34, 197, 94, 0.18));
  box-shadow: 0 26px 80px rgba(4, 26, 63, 0.34);
}

.aep-sales-panel::before {
  content: "";
  position: absolute;
  inset: auto -90px -130px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.28);
}

.aep-sales-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: linear-gradient(#16a34a, #2563eb, #c51122);
}

.aep-sales-copy,
.aep-sales-visual {
  position: relative;
  z-index: 1;
}

.sales-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #dbeafe;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aep-sales-copy h1 {
  max-width: 560px;
  margin: 22px 0 16px;
  color: #fff;
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  line-height: 1.03;
}

.sales-lead {
  max-width: 560px;
  margin: 0;
  color: #e8f2ff;
  font-size: 1.08rem;
  line-height: 1.65;
}

.sales-highlight {
  max-width: 640px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 5px solid #22c55e;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.sales-highlight strong,
.sales-highlight span {
  display: block;
}

.sales-highlight strong {
  color: #fff;
  font-size: 1.05rem;
}

.sales-highlight span {
  margin-top: 6px;
  color: #dbeafe;
  line-height: 1.5;
}

.sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
}

.sales-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-sales {
  color: #082f63;
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.secondary-sales {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
}

.subtle-sales {
  color: #dff7ff;
  border: 1px solid rgba(219, 234, 254, 0.28);
  background: rgba(8, 47, 99, 0.28);
}

.sales-output-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sales-output-strip span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #eef7ff;
  font-size: 0.86rem;
  font-weight: 800;
}

.sales-benefits {
  display: grid;
  gap: 10px;
  max-width: 700px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-benefits li {
  padding-left: 18px;
  position: relative;
  color: #eef7ff;
  line-height: 1.45;
}

.sales-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.aep-sales-visual {
  min-height: 470px;
}

.visual-card {
  position: absolute;
  width: 248px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #102a43;
  box-shadow: 0 24px 55px rgba(6, 24, 44, 0.26);
}

.inspector-card {
  top: 28px;
  right: 8px;
}

.report-card {
  right: 36px;
  bottom: 26px;
}

.visual-card span {
  display: block;
  margin-bottom: 10px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-card strong {
  display: block;
  color: #082f63;
  font-size: 1.1rem;
}

.visual-card p {
  margin: 10px 0 0;
  color: #4b6477;
  line-height: 1.45;
}

.report-line {
  height: 10px;
  width: 68%;
  margin-bottom: 9px;
  border-radius: 999px;
  background: #c8d9ee;
}

.report-line.wide {
  width: 92%;
  background: #2563eb;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 18px 0;
}

.risk-grid span {
  height: 34px;
  border-radius: 7px;
  background: #eaf2ff;
  border-left: 4px solid #16a34a;
}

.visual-badge {
  position: absolute;
  right: 0;
  top: 214px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 10px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 950;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}

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

.sales-section {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.section-title span {
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 6px 0 18px;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.18;
}

.method-sales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.method-sales-grid article {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #102a43;
  box-shadow: 0 16px 36px rgba(4, 26, 63, 0.18);
}

.method-sales-grid article strong {
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.method-sales-grid article h3 {
  margin: 8px 0;
  color: #082f63;
}

.method-sales-grid article p {
  margin: 0;
  color: #4b6477;
  line-height: 1.5;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.check-list {
  columns: 2;
  column-gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  break-inside: avoid;
  position: relative;
  margin: 0 0 10px;
  padding-left: 26px;
  color: #eef7ff;
  line-height: 1.4;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #22c55e;
  color: #062c1a;
  font-size: 0.75rem;
  font-weight: 950;
}

.sales-benefits.dense {
  gap: 8px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
}

.flow-steps span {
  position: relative;
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #082f63;
  text-align: center;
  font-weight: 900;
  line-height: 1.25;
}

.flow-steps span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 8px;
  height: 2px;
  background: #22c55e;
}

.audience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.audience-tags span {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #082f63;
  font-weight: 900;
}

.sales-auth-card {
  width: 100%;
  position: sticky;
  top: 24px;
}

.sales-auth-card h2 {
  margin: 8px 0;
  color: var(--blue-dark);
  font-size: 2.1rem;
}

.support-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.login-sales-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
}

.login-sales-links .support-link {
  margin-top: 0;
}

.landing-body {
  min-height: 100vh;
  margin: 0;
  background: #eef4fb;
  color: #102a43;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: #0b2447;
  box-shadow: 0 10px 26px rgba(8, 32, 70, 0.18);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.landing-brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #7dd3fc;
  font-weight: 900;
}

.landing-brand strong {
  font-size: 1.04rem;
  letter-spacing: 0.02em;
}

.landing-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex: 1;
}

.landing-menu a {
  color: #dbeafe;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.93rem;
}

.landing-menu a:hover {
  color: #fff;
}

.landing-login-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 6px;
  color: #0b2447;
  background: #fff;
  font-weight: 900;
  text-decoration: none;
}

.landing-hero {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 430px);
  gap: 34px;
  align-items: center;
  padding: 72px 0 54px;
}

.landing-hero-copy {
  max-width: 720px;
}

.landing-kicker,
.landing-section-title span,
.landing-method-grid article span {
  display: inline-block;
  color: #1d4ed8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.landing-hero h1 {
  margin: 16px 0 16px;
  color: #082f63;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.landing-subtitle {
  max-width: 680px;
  margin: 0 0 14px;
  color: #123a5f;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.55;
  font-weight: 700;
}

.landing-text {
  max-width: 680px;
  margin: 0;
  color: #445d75;
  font-size: 1rem;
  line-height: 1.7;
}

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

.landing-primary,
.landing-secondary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.landing-primary {
  color: #fff;
  background: #1d4ed8;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.22);
}

.landing-secondary {
  color: #0b2447;
  border: 1px solid #bdd0e8;
  background: #fff;
}

.landing-login-card {
  padding: 28px;
  border: 1px solid #d2e0f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(13, 45, 84, 0.14);
}

.landing-login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.landing-login-head > span {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 14px;
  color: #082f63;
  background: #eaf3ff;
  font-weight: 900;
}

.landing-login-head strong,
.landing-login-head small {
  display: block;
}

.landing-login-head strong {
  color: #082f63;
  font-size: 1.18rem;
}

.landing-login-head small {
  margin-top: 3px;
  color: #657c91;
}

.landing-login-card form {
  display: grid;
  gap: 14px;
}

.landing-login-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.landing-login-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe0f4;
  border-radius: 6px;
  color: #0b4f77;
  background: #f8fbff;
  font-weight: 900;
  text-decoration: none;
}

.landing-section {
  padding: 58px max(18px, calc((100vw - 1180px) / 2));
  background: #fff;
}

.landing-section.alt {
  background: #f6f9fd;
}

.landing-section-title {
  max-width: 760px;
  margin-bottom: 26px;
}

.landing-section-title h2 {
  margin: 8px 0 0;
  color: #082f63;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.18;
}

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

.landing-feature-grid article,
.landing-method-grid article {
  padding: 20px;
  border: 1px solid #d8e5f3;
  border-radius: 10px;
  background: #fff;
}

.landing-feature-grid article strong,
.landing-method-grid article h3 {
  color: #082f63;
  font-size: 1.05rem;
}

.landing-feature-grid article p,
.landing-method-grid article p {
  margin: 10px 0 0;
  color: #566f86;
  line-height: 1.5;
}

.landing-method-grid article {
  border-top: 5px solid #1d4ed8;
}

.landing-audience {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-audience span {
  padding: 10px 14px;
  border: 1px solid #cfe0f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #0b3d69;
  font-weight: 900;
}

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

.landing-flow span {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid #d8e5f3;
  border-radius: 10px;
  background: #fff;
  color: #0b2447;
  text-align: center;
  font-weight: 900;
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--blue-dark);
  font-weight: 800;
}

.message.error {
  color: var(--red);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 22px;
  padding: 24px;
}

.wide-panel {
  grid-column: span 1;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

.admin-layout table {
  min-width: 760px;
}

.action-cell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  align-items: stretch;
  width: 100%;
  min-width: 250px;
  box-sizing: border-box;
}

.mini-link {
  display: inline-flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid #c9d8ea;
  border-radius: 6px;
  color: var(--blue-dark);
  background: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  text-decoration: none;
}

.mini-link.danger-link {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff5f6;
  cursor: pointer;
}

#clientReportsTable {
  min-width: 920px;
  table-layout: fixed;
  font-size: 0.76rem;
}

#clientReportsTable th:last-child,
#clientReportsTable td:last-child {
  width: 235px;
  min-width: 235px;
}

.client-history-box {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

#clientReportsTable th:nth-child(1) { width: 82px; }
#clientReportsTable th:nth-child(2) { width: 190px; }
#clientReportsTable th:nth-child(3) { width: 175px; }
#clientReportsTable th:nth-child(4) { width: 110px; }
#clientReportsTable th:nth-child(5) { width: 64px; }

#clientReportsTable th,
#clientReportsTable td {
  padding: 7px;
  overflow-wrap: anywhere;
}

.muted-small {
  color: var(--muted);
  font-size: 0.85rem;
}

.page {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 34px;
  background: #fff;
  border: 1px solid #d7e4f2;
}

.inventory-page {
  page-break-before: always;
  break-before: page;
}

.cover {
  min-height: 980px;
  display: block;
  padding: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid #cddbd8;
  background:
    radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #e8f2ff 100%);
}

.cover-band {
  position: absolute;
  inset: 0 auto 0 0;
  width: 32px;
  background: linear-gradient(180deg, var(--blue-dark) 0 46%, var(--blue) 46% 82%, var(--red) 82%);
}

.cover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  height: 14px;
  background: linear-gradient(90deg, transparent, #60a5fa, var(--blue));
}

.cover-content {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 980px;
  width: 100%;
  padding: 76px min(72px, 8vw) 76px min(108px, 12vw);
  z-index: 1;
}

.cover .logo {
  width: 150px;
  height: 92px;
  object-fit: contain;
  padding: 12px;
  border: 1px solid #d9e4e1;
  border-radius: 8px;
  background: #fff;
}

.logo-placeholder {
  display: grid;
  place-items: center;
  width: 150px;
  height: 92px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
}

.cover-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 76px;
}

.cover-top strong {
  display: block;
  margin-top: 4px;
  color: #102626;
  font-size: 1.35rem;
}

.cover span {
  color: var(--blue-dark);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cover-title {
  max-width: 100%;
  min-width: 0;
}

.cover h1 {
  max-width: 100%;
  margin: 10px 0 18px;
  color: #082f63;
  font-size: clamp(2.7rem, 7vw, 4.35rem);
  line-height: 1.03;
  text-transform: uppercase;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.cover p {
  max-width: 100%;
  color: #405a5d;
  font-size: 1.15rem;
  font-weight: 600;
}

.cover-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 100%;
  margin-top: 62px;
  padding: 24px;
  border: 1px solid #c9d9ed;
  border-left: 10px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 54px rgba(10, 47, 69, 0.12);
}

.cover-card div {
  padding-top: 10px;
  border-top: 3px solid var(--blue);
}

.cover-card span {
  display: block;
  color: #526365;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.cover-card strong {
  display: block;
  margin-top: 4px;
  color: #102626;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.cover-card small {
  color: #455b5e;
}

.page h2 {
  margin: 0 0 16px;
  padding: 9px 12px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  border-left: 8px solid #60a5fa;
  text-transform: uppercase;
  font-size: 1.15rem;
}

.page h3 {
  color: var(--blue-dark);
}

.summary-cards,
.technical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0 22px;
}

.summary-cards div,
.technical-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: #f8fbff;
}

.summary-cards span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-cards strong,
.technical-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.technical-grid p {
  margin: 6px 0 0;
  color: #344b4e;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  table-layout: fixed;
}

thead {
  display: table-header-group;
}

tfoot {
  display: table-footer-group;
}

tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

th,
td {
  border: 1px solid #cfdcda;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: #4774c4;
  color: #fff;
}

.method-table th:first-child,
.method-table td:first-child {
  width: 22%;
}

.risk-table {
  font-size: 0.7rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #b9c9d6;
}

.risk-table th,
.action-table th,
.pdca-table th,
.follow-table th {
  background: linear-gradient(180deg, #4774c4, #315faa);
  color: #fff;
  border-color: #294f8e;
}

.risk-table td {
  border-color: #d8e3e8;
  line-height: 1.28;
}

.risk-table tbody tr:nth-child(even) td {
  background: #f7fafc;
}

.risk-table tbody tr:hover td {
  background: #eef5ff;
}

.risk-table th:nth-child(10),
.risk-table th:nth-child(11),
.risk-table th:nth-child(12),
.risk-table td:nth-child(10),
.risk-table td:nth-child(11),
.risk-table td:nth-child(12) {
  width: 48px;
  text-align: center;
}

.risk-table th:nth-child(13),
.risk-table td:nth-child(13) {
  width: 92px;
}

.risk-table th:first-child,
.risk-table td:first-child,
.risk-table th:nth-child(2),
.risk-table td:nth-child(2) {
  width: 76px;
}

.risk-table th:nth-child(3),
.risk-table td:nth-child(3) {
  width: 118px;
}

.risk-table th:nth-child(8),
.risk-table td:nth-child(8),
.risk-table th:nth-child(9),
.risk-table td:nth-child(9) {
  width: 86px;
}

.scale-table {
  margin: 10px 0 18px;
  font-size: 0.82rem;
  page-break-inside: avoid;
  break-inside: avoid;
}

.scale-table th:first-child,
.scale-table td:first-child {
  width: 52px;
  text-align: center;
}

.scale-table th:nth-child(2),
.scale-table td:nth-child(2) {
  width: 104px;
  font-weight: 800;
}

.characterization-table th:first-child,
.characterization-table td:first-child,
.characterization-table th:nth-child(2),
.characterization-table td:nth-child(2) {
  width: 22%;
}

.technical-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 5px solid #2563eb;
  background: #eef5ff;
  color: #263f48;
  font-size: 0.88rem;
  line-height: 1.5;
}

.technical-team-box {
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid #cfe0f5;
  border-left: 5px solid #2563eb;
  background: #f8fbff;
}

.technical-team-box h3 {
  margin-top: 0;
  color: #123a73;
}

.technical-team-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  margin: 10px 0;
}

.technical-team-grid > div {
  padding: 12px;
  background: #fff;
  border: 1px solid #dbe8f7;
}

.technical-team-grid span {
  display: block;
  color: #5a6a76;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.technical-team-grid strong {
  display: block;
  margin-top: 5px;
}

.technical-team-grid small,
.technical-team-grid p {
  display: block;
  margin: 5px 0 0;
  color: #3d515c;
}

.technical-team-grid ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.suggestion-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #7aa7e8;
  background: #f7fbff;
}

.suggestion-box p {
  margin: 0 0 10px;
  color: #405461;
  font-size: 0.9rem;
}

.suggestion-box > strong {
  display: block;
  color: #123a73;
  margin-bottom: 6px;
}

.suggestion-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #dbe8f7;
}

.suggestion-item span {
  font-weight: 800;
  color: #102033;
}

.suggestion-item small {
  grid-column: 1 / -1;
  color: #526877;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  padding: 10px 12px;
  border: 1px solid #cfe0f5;
  border-left: 4px solid #2563eb;
  background: #f8fbff;
  font-weight: 700;
  color: #102033;
}

.risk-matrix-table {
  max-width: 760px;
  margin: 12px auto 20px;
  table-layout: fixed;
}

.risk-matrix-table th,
.risk-matrix-table td {
  text-align: center;
  vertical-align: middle;
}

.risk-matrix-table th:first-child {
  width: 180px;
}

.action-table,
.pdca-table,
.follow-table {
  font-size: 0.72rem;
}

.action-table th:nth-child(4),
.action-table td:nth-child(4),
.pdca-table th:first-child,
.pdca-table td:first-child,
.pdca-table th:nth-child(8),
.pdca-table td:nth-child(8) {
  width: 58px;
  text-align: center;
}

.pdca-table th:nth-child(9),
.pdca-table td:nth-child(9) {
  width: 82px;
}

.follow-table th:first-child,
.follow-table td:first-child {
  width: 80px;
}

.center {
  text-align: center;
}

.risk {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.risk.low {
  background: #16875b;
}

.risk.tolerable {
  background: #5e9f39;
}

.risk.medium {
  background: #c56a12;
}

.risk.high {
  background: #c51122;
}

.risk.critical {
  background: #730915;
}

.aep-type-chooser {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 27, 55, 0.82);
  backdrop-filter: blur(8px);
}

.aep-type-chooser.hidden {
  display: none;
}

.aep-type-card {
  width: min(1060px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
}

.aep-type-card h1 {
  margin: 8px 0 12px;
  color: #123d75;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.aep-type-card > p {
  max-width: 940px;
  margin: 0;
  color: #34465c;
  font-size: 1.02rem;
}

.aep-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.aep-type-options.single-entry {
  grid-template-columns: minmax(0, 1fr);
}

.aep-type-options.single-entry button {
  min-height: 130px;
  padding: 24px;
}

.aep-type-options.single-entry strong {
  font-size: 1.18rem;
}

.aep-type-options button {
  display: grid;
  gap: 12px;
  min-height: 240px;
  padding: 26px;
  text-align: left;
  align-content: start;
  border-radius: 14px;
  white-space: normal;
}

.aep-type-options button strong {
  font-size: 1.32rem;
  line-height: 1.16;
}

.aep-type-options button span {
  font-weight: 500;
  line-height: 1.5;
}

.aep-type-options button small {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aep-type-options button.primary small {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.aep-type-options button em {
  align-self: end;
  margin-top: 6px;
  color: #51647b;
  font-style: normal;
  font-weight: 800;
}

.aep-type-options button.primary em {
  color: rgba(255, 255, 255, 0.88);
}

.choice-note {
  margin-top: 18px !important;
  padding: 12px 14px;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #f4f8ff;
  font-weight: 800;
}

.signature-config,
.post-psych-decision {
  padding: 18px;
  border: 1px solid #c9d8ec;
  border-radius: 16px;
  background: #f7faff;
}

.signature-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.signature-default-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.signature-default-option input {
  width: auto;
}

.signature-pad-wrap {
  margin-top: 14px;
}

.signature-pad-wrap canvas {
  display: block;
  width: 100%;
  height: 150px;
  touch-action: none;
  border: 2px dashed #8ba7ca;
  border-radius: 12px;
  background: #fff;
  cursor: crosshair;
}

.signature-pad-wrap span {
  display: block;
  margin-top: 6px;
  color: #526173;
  font-size: 0.85rem;
}

.technical-signature-preview {
  display: block;
  max-width: 320px;
  max-height: 130px;
  margin-top: 14px;
  object-fit: contain;
  border-bottom: 1px solid #264f82;
}

.signature img {
  display: block;
  max-width: 280px;
  max-height: 110px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.post-psych-decision {
  margin-top: 18px;
  border-color: #7ba2d4;
}

@media (max-width: 720px) {
  .aep-type-options,
  .signature-input-grid {
    grid-template-columns: 1fr;
  }

  .aep-type-chooser {
    align-items: start;
    overflow-y: auto;
    padding: 14px;
  }

  .aep-type-card {
    padding: 22px;
    border-radius: 18px;
  }

  .aep-type-options button {
    min-height: auto;
    padding: 20px;
  }
}

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

figure {
  margin: 0;
  border: 1px solid var(--line);
  background: #f8fbff;
}

figure img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

figcaption {
  padding: 8px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 12px 0 20px;
}

.matrix-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  background: #f8fbff;
}

.probability-grid div {
  border-top-color: var(--blue);
}

.matrix-grid strong,
.matrix-grid span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.matrix-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.signature {
  max-width: 420px;
  margin-top: 70px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.signature span {
  display: block;
  color: var(--muted);
}

.client-acknowledgement {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-top: 32px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  background: #f8fbff;
}

.client-acknowledgement h3 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.client-acknowledgement p {
  margin: 0 0 22px;
}

.client-signature-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.7fr;
  gap: 16px;
}

.client-signature-grid div {
  min-height: 48px;
  border-top: 1px solid var(--ink);
}

.client-signature-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lead {
  color: #344b4e;
  font-size: 0.98rem;
}

.pdca-legend {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 12px;
  border-left: 6px solid var(--blue);
  background: #f1f6ff;
}

.pdca-legend span {
  color: #344b4e;
}

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

  .layout > .report-shell {
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
  }

  .app-header h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .app-header .user-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    width: 100%;
    gap: 8px;
  }

  .app-header .user-actions > * {
    width: 100%;
    min-width: 0;
  }

  .landing-topbar {
    position: static;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 18px;
  }

  .landing-menu {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    padding: 44px 0 38px;
  }

  .landing-login-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

  .landing-feature-grid,
  .landing-method-grid {
    grid-template-columns: 1fr;
  }

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

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

  .layout > .report-shell {
    position: static;
    max-height: none;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .inline-input-action,
  .quantity-box {
    grid-template-columns: 1fr;
  }

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

  .aep-sales-panel {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 30px 24px 34px;
  }

  .method-sales-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }

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

  .flow-steps span:not(:last-child)::after {
    display: none;
  }

  .sales-auth-card {
    position: static;
  }

  .aep-sales-visual {
    min-height: 330px;
  }

  .visual-card {
    width: min(280px, 86vw);
  }

  .inspector-card {
    top: 0;
    right: auto;
    left: 0;
  }

  .report-card {
    right: 0;
    bottom: 0;
  }

  .visual-badge {
    top: 116px;
    right: 20px;
    width: 94px;
    height: 94px;
    font-size: 1.25rem;
  }

  .review-grid,
  .dashboard-grid,
  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .draft-row,
  .compact-select {
    align-items: stretch;
    flex-direction: column;
  }

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

@media (max-width: 620px) {
  .layout {
    padding: 8px;
  }

  .panel {
    padding: 12px;
  }

  .wizard-steps {
    gap: 6px;
    padding: 7px;
  }

  .wizard-step-indicator {
    min-height: 50px;
    padding: 7px 9px;
  }

  .app-header .user-actions {
    grid-template-columns: 1fr;
  }

  .landing-topbar {
    align-items: stretch;
  }

  .landing-brand,
  .landing-login-btn {
    width: 100%;
    justify-content: center;
  }

  .landing-menu {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .landing-hero {
    width: min(100% - 24px, 1180px);
    padding: 34px 0;
  }

  .landing-hero h1 {
    font-size: 2.15rem;
  }

  .landing-actions,
  .landing-primary,
  .landing-secondary {
    width: 100%;
  }

  .landing-section {
    padding: 38px 14px;
  }

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

  .aep-sales-body {
    padding: 12px;
  }

  .aep-sales-layout {
    min-height: auto;
    gap: 12px;
  }

  .aep-sales-panel,
  .sales-auth-card {
    border-radius: 16px;
  }

  .aep-sales-panel {
    padding: 24px 18px 28px;
  }

  .aep-sales-copy h1 {
    font-size: 2.25rem;
  }

  .sales-section {
    padding: 18px;
  }

  .check-list {
    columns: 1;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .sales-output-strip span,
  .audience-tags span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .sales-actions,
  .sales-btn {
    width: 100%;
  }

  .sales-auth-card {
    padding: 26px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  @page landscape {
    size: A4 landscape;
    margin: 0;
  }

  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-header,
  .panel,
  .pdf-edit-notice {
    display: none !important;
  }

  .layout,
  .report {
    display: block;
    padding: 0;
  }

  .report-shell {
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .page {
    max-width: none;
    margin: 0;
    padding: 14mm;
    border: 0;
    page-break-after: always;
    break-after: page;
  }

  .page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .cover {
    height: 267mm;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .cover-band {
    width: 9mm;
  }

  .cover-content {
    height: 267mm;
    min-height: 0;
    align-content: center;
    padding: 14mm 17mm 14mm 24mm;
  }

  .cover h1 {
    font-size: 32pt;
  }

  .cover-top {
    margin-bottom: 18mm;
  }

  .cover-title p,
  .cover p {
    font-size: 10.5pt;
  }

  .cover .logo,
  .logo-placeholder {
    width: 35mm;
    height: 22mm;
  }

  .cover-card {
    grid-template-columns: repeat(2, 1fr);
    gap: 7mm;
    margin-top: 16mm;
    padding: 10mm;
  }

  .cover-card strong {
    font-size: 10pt;
  }

  .cover-card small {
    font-size: 8.5pt;
  }

  .landscape {
    width: 267mm;
    page: landscape;
  }

  .inventory-page {
    page-break-before: always;
    break-before: page;
  }

  .risk-table,
  .action-table,
  .pdca-table,
  .follow-table,
  .scale-table {
    font-size: 6.2pt;
  }

  .risk-table {
    font-size: 5.8pt;
    line-height: 1.18;
  }

  .risk-table td {
    line-height: 1.18;
  }

  table {
    page-break-inside: auto;
    break-inside: auto;
  }

  thead {
    display: table-header-group;
  }

  tr,
  .technical-note,
  .summary-cards > div,
  .technical-grid > div {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .scale-table {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .summary-cards,
  .technical-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  th,
  td {
    padding: 4px;
  }

  .photo-report-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

}
