:root {
  --trombo-blue: #304898;
  --trombo-blue-dark: #243a82;
  --trombo-gray: #8f8f8f;
  --blue-950: var(--trombo-blue-dark);
  --blue-900: var(--trombo-blue-dark);
  --blue-850: var(--trombo-blue);
  --blue-700: var(--trombo-blue);
  --blue-500: #5e70b6;
  --ink: #26324a;
  --muted: #6f7480;
  --line: #d9deea;
  --field: #f7f8fb;
  --bg: #f4f6fa;
  --white: #ffffff;
  --gold: var(--trombo-gray);
  --font-ui: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(77, 134, 186, 0.22), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(7, 31, 58, 0.18), transparent 30%),
    linear-gradient(180deg, #e9f2fb 0%, #f8fbff 58%, #eef5fb 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(7,31,58,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,31,58,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 64%);
}

.page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 38px;
}

.hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-logo,
.panel,
.login-card,
.module-card {
  border: 1px solid var(--line);
  box-shadow: 0 20px 54px rgba(7, 31, 58, 0.12);
}

.hero-logo {
  min-height: 230px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 45%, rgba(36,96,146,0.08), transparent 44%),
    var(--white);
  display: grid;
  place-items: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.hero-logo::after {
  content: "";
  position: absolute;
  inset: auto 28px 20px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.hero-logo img {
  width: 100%;
  max-height: 198px;
  object-fit: contain;
}

.hero-panel {
  min-height: 230px;
  border-radius: 28px;
  padding: 34px 38px;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(77, 134, 186, 0.48), transparent 34%),
    linear-gradient(135deg, var(--blue-950) 0%, var(--blue-850) 62%, #1b5b95 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(7, 31, 58, 0.22);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(215,180,106,0.28), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.12), transparent 26%);
  pointer-events: none;
}

.top-nav {
  position: absolute;
  top: 22px;
  right: 26px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 1;
}

.top-nav form {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  text-decoration: none;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.nav-button {
  cursor: pointer;
  font: inherit;
}

.nav-link-hidden-history {
  width: 40px;
  padding-inline: 0;
  font-size: 14px;
  opacity: 0.72;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.46);
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.82);
  font-weight: 900;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.96;
  position: relative;
  z-index: 1;
}

.subtitle {
  margin: 0;
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

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

.module-card {
  min-height: 215px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,249,253,0.98) 100%);
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--blue-950), var(--blue-700), var(--gold));
}

.module-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -48px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(18, 61, 104, 0.06);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18, 61, 104, 0.42);
  box-shadow: 0 28px 70px rgba(7, 31, 58, 0.16);
}

.module-card h2 {
  margin: 0 0 12px;
  color: var(--blue-950);
  font-size: 22px;
  line-height: 1.1;
}

.module-card p {
  flex: 1;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.module-card span {
  display: inline-flex;
  width: max-content;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-950);
  color: var(--white);
  padding: 8px 13px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.module-card.muted {
  opacity: 0.72;
}

.panel {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,252,255,0.98));
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue-950), var(--blue-700), rgba(215,180,106,0.9));
}

.panel h2 {
  margin: 0 0 14px;
  color: var(--blue-950);
  font-size: 26px;
}

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

.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--blue-850);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

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

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

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

label {
  display: grid;
  gap: 8px;
  font-weight: 900;
  color: #15365d;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c5d6e8;
  border-radius: 16px;
  background: var(--field);
  color: #17324f;
  padding: 14px 16px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

textarea {
  resize: vertical;
  min-height: 280px;
}

.gal-exam-block {
  display: grid;
  gap: 12px;
}

.gal-exam-block strong {
  color: var(--blue-950);
  font-size: 18px;
}

.gal-exam-block p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.gal-exam-lines {
  display: grid;
  gap: 10px;
}

.gal-exam-line {
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
}

.gal-exam-line span {
  color: var(--blue-850);
  font-size: 14px;
  font-weight: 900;
}

.gal-exam-line input {
  min-height: 48px;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue-700);
  box-shadow:
    0 0 0 3px rgba(36,96,146,0.13),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.primary-button,
.secondary-button {
  border-radius: 16px;
  border: 1px solid var(--blue-850);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 13px 18px;
  letter-spacing: 0.01em;
}

.primary-button {
  background:
    linear-gradient(90deg, rgba(215,180,106,0.32), transparent 34%),
    linear-gradient(135deg, var(--blue-950) 0%, var(--blue-850) 100%);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(7, 31, 58, 0.18);
}

.secondary-button {
  background: var(--field);
  color: var(--blue-950);
  border-color: #cfd8e6;
}

.login-card {
  width: min(560px, 100%);
  margin: 6vh auto 0;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,251,255,0.98));
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--blue-950), var(--blue-700), var(--gold));
}

.login-logo {
  width: 170px;
  max-width: 44vw;
}

.login-card h1 {
  margin: 12px 0 8px;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: 40px;
  line-height: 1;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-links-grid {
  margin-top: 16px;
}

.auth-panel {
  width: min(780px, 100%);
  margin: 3vh auto 0;
}

.auth-panel-logged {
  width: min(640px, 100%);
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.profile-modal {
  width: min(760px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,249,255,0.99));
  padding: 26px;
  box-shadow: 0 24px 60px rgba(4, 18, 34, 0.28);
}

.profile-modal h2 {
  margin: 0 0 10px;
  color: var(--blue-950);
  font-size: 28px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-actions > * {
  flex: 1 1 220px;
}

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

.admin-user-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--field);
  padding: 18px;
}

.admin-user-card h3 {
  margin: 0 0 6px;
  color: var(--blue-950);
  font-size: 20px;
}

.admin-user-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-user-head,
.admin-user-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-user-summary {
  cursor: pointer;
  list-style: none;
}

.admin-user-summary::-webkit-details-marker {
  display: none;
}

.admin-user-form {
  margin-top: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.admin-actions form {
  margin: 0;
}

.danger-button {
  border-color: #f1b4b4;
  background: #fff5f5;
  color: #982727;
}

.admin-log-wrap {
  overflow-x: auto;
}

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-log-table th,
.admin-log-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-log-table th {
  color: var(--blue-950);
  font-size: 14px;
}

.admin-log-table td {
  color: var(--muted);
  font-size: 14px;
}

.admin-log-table tbody tr:nth-child(even) {
  background: rgba(232, 241, 252, 0.42);
}

.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 700;
}

.alert.error {
  background: #fff1f1;
  border: 1px solid #ffc9c9;
  color: #8a1f1f;
}

.alert.warn {
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  color: #7a4a00;
}

.alert.success {
  background: #eef8f1;
  border: 1px solid #bfe6ca;
  color: #176234;
}

.feedback-form textarea {
  min-height: 150px;
}

.feedback-list {
  display: grid;
  gap: 14px;
}

.feedback-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--field);
  padding: 16px;
}

.feedback-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.feedback-card h3 {
  margin: 0 0 6px;
  color: var(--blue-950);
  font-size: 18px;
}

.feedback-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-card details {
  margin-top: 12px;
}

.feedback-card summary {
  color: var(--blue-850);
  cursor: pointer;
  font-weight: 900;
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(48, 72, 152, 0.1);
  color: var(--trombo-blue);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

pre {
  margin: 0;
  white-space: pre-wrap;
  background:
    radial-gradient(circle at 100% 0%, rgba(77, 134, 186, 0.22), transparent 38%),
    #081b31;
  color: #f9fafb;
  border-radius: 18px;
  padding: 18px;
  overflow-x: auto;
  line-height: 1.55;
  border: 1px solid rgba(255,255,255,0.08);
}

.light-pre {
  margin-top: 12px;
  background: #f5f7fb;
  color: var(--ink);
  border: 1px solid var(--line);
}

.filters-grid {
  display: grid;
  grid-template-columns: 220px 1fr 140px 160px;
  align-items: end;
  gap: 14px;
}

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

.history-card-header h2 {
  margin-bottom: 6px;
}

.history-card-header p {
  margin: 0;
  color: var(--muted);
}

.download-link {
  text-decoration: none;
  white-space: nowrap;
}

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

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  padding: 12px 14px;
}

.detail-grid strong,
.detail-grid span {
  display: block;
}

.detail-grid strong {
  color: var(--blue-950);
  margin-bottom: 4px;
}

.detail-grid span {
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  background: #dcecff;
  color: var(--blue-850);
  padding: 7px 11px;
  font-size: 14px;
  font-weight: 850;
}

.muted-text {
  color: var(--muted);
  font-weight: 700;
}

.copy-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.copy-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.download-grid {
  display: grid;
  gap: 12px;
}

.print-selection {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(48, 72, 152, 0.045);
}

.print-selection h2 {
  margin: 2px 0 0;
}

.print-selection p,
.receita-copies-field small {
  margin: 6px 0 0;
  color: var(--muted);
}

.print-document-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.print-document-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--blue-950);
  cursor: pointer;
  font-weight: 800;
}

.print-document-option:has(input:checked) {
  border-color: var(--trombo-blue, var(--blue-850));
  background: rgba(48, 72, 152, 0.08);
}

.print-document-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--trombo-blue, var(--blue-850));
}

.receita-copies-field {
  display: grid;
  gap: 7px;
  max-width: 270px;
}

.receita-copies-field input {
  max-width: 150px;
}

.download-card,
.primary-download {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.download-card {
  background: var(--field);
  color: var(--blue-950);
}

.primary-download {
  background:
    linear-gradient(90deg, rgba(215,180,106,0.34), transparent 40%),
    linear-gradient(135deg, var(--blue-950) 0%, var(--blue-850) 100%);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(7, 31, 58, 0.18);
}

.download-card:hover,
.primary-download:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 61, 104, 0.42);
}

.footer-brand {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  text-align: center;
}

.footer-brand p {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--blue-950);
}

.footer-brand img {
  width: min(100%, 430px);
}

.mock-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.mock-brief > div:first-child,
.mock-brief-card {
  border: 1px solid rgba(23, 77, 134, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 16%, rgba(45, 93, 144, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #edf5ff 100%);
  padding: 24px;
}

.mock-brief h1 {
  max-width: 780px;
  margin: 0 0 10px;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 0.98;
}

.mock-brief p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.mock-brief-card {
  display: grid;
  align-content: center;
  gap: 8px;
  background: var(--blue-950);
  color: #ffffff;
}

.mock-brief-card strong,
.mock-brief-card span {
  display: block;
}

.mock-brief-card strong {
  font-size: 20px;
}

.mock-brief-card span {
  color: rgba(255,255,255,0.78);
  line-height: 1.45;
}

.mock-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.mock-choice {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 520px;
  border: 1px solid rgba(23, 77, 134, 0.16);
  border-radius: 28px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 55px rgba(15, 49, 88, 0.1);
}

.mock-choice-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mock-choice-head > span {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-radius: 18px;
  background: var(--blue-950);
  color: #ffffff;
  font-size: 28px;
  font-weight: 950;
}

.mock-choice-head h2 {
  margin: 0 0 4px;
  color: var(--blue-950);
  font-size: 24px;
}

.mock-choice-head p,
.mock-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mock-preview {
  min-height: 330px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(23, 77, 134, 0.14);
}

.institutional-preview {
  display: grid;
  grid-template-columns: 115px 1fr;
  background: #09213c;
}

.preview-logo-strip {
  display: grid;
  place-items: center;
  background: #ffffff;
  padding: 14px;
}

.preview-logo-strip img {
  width: 92px;
}

.preview-screen {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  background:
    radial-gradient(circle at 95% 8%, rgba(116, 169, 216, 0.45), transparent 38%),
    linear-gradient(145deg, #0d3158 0%, #174d86 100%);
  color: #ffffff;
}

.preview-screen small,
.preview-screen strong {
  display: block;
}

.preview-screen small {
  color: rgba(255,255,255,0.72);
  font-weight: 800;
}

.preview-screen strong {
  font-family: var(--font-ui);
  font-size: 30px;
  line-height: 1;
}

.preview-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-pill-row span {
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
}

.quiet-preview {
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 20px;
  background:
    radial-gradient(circle at 90% 0%, rgba(66, 121, 174, 0.14), transparent 36%),
    #f7fbff;
}

.quiet-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #d7e5f2;
  padding: 18px;
}

.quiet-preview-header img {
  width: 78px;
}

.quiet-preview-header small,
.quiet-preview-header strong {
  display: block;
}

.quiet-preview-header small {
  color: var(--muted);
  font-weight: 850;
}

.quiet-preview-header strong {
  margin-top: 6px;
  color: var(--blue-950);
  font-size: 24px;
  line-height: 1.08;
}

.quiet-preview-grid {
  display: grid;
  gap: 10px;
}

.quiet-preview-grid span {
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d7e5f2;
  color: var(--blue-950);
  padding: 16px;
  font-weight: 900;
}

.command-preview {
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(135deg, #071a2d 0%, #123d68 48%, #eaf3fb 48%, #f8fbff 100%);
  padding: 16px;
}

.command-preview-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  padding: 12px 14px;
}

.command-preview-bar small {
  color: rgba(255,255,255,0.72);
  font-weight: 850;
}

.command-preview-body {
  display: grid;
  align-content: end;
  gap: 14px;
  padding-top: 18px;
}

.command-preview-body > div {
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
}

.command-preview-body small,
.command-preview-body strong {
  display: block;
}

.command-preview-body small {
  color: var(--blue-700);
  font-weight: 950;
  text-transform: uppercase;
}

.command-preview-body strong {
  margin-top: 6px;
  color: var(--blue-950);
  font-size: 23px;
  line-height: 1.1;
}

.command-preview-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.command-preview-body li {
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #d8e5f1;
  color: var(--blue-950);
  padding: 12px 14px;
  font-weight: 850;
}

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

.mock-detail h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.blue-brief .mock-brief-card {
  background: var(--trombo-blue);
}

.blue-tone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.tone-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  padding: 18px;
  box-shadow: 0 14px 34px rgba(48, 72, 152, 0.08);
}

.tone-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tone-header > span {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 18px;
  background: var(--tone);
  color: var(--white);
  font-size: 26px;
  font-weight: 900;
}

.tone-header h2 {
  margin: 0 0 4px;
  color: var(--tone-dark);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.tone-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tone-preview {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tone) 18%, white);
  border-radius: 22px;
  background: var(--tone-soft);
}

.tone-preview-hero {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: var(--tone);
  color: var(--white);
  padding: 22px;
}

.tone-preview-hero small,
.tone-preview-hero strong {
  display: block;
}

.tone-preview-hero small {
  color: rgba(255,255,255,0.84);
  font-weight: 700;
  line-height: 1.3;
}

.tone-preview-hero strong {
  max-width: 320px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.tone-preview-cards {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.tone-preview-cards span {
  display: block;
  border: 1px solid color-mix(in srgb, var(--tone) 14%, white);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  color: var(--tone-dark);
  padding: 12px 13px;
  font-weight: 800;
}

.tone-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tone-decision strong {
  color: var(--trombo-blue);
}

/* Visual final: paleta trombolisa.ai, sem gradientes de cor. */
body {
  font-family: var(--font-ui);
  background: #f4f6fa;
}

body::before {
  display: none;
}

.hero-logo,
.panel,
.login-card,
.module-card {
  border-color: var(--line);
  box-shadow: 0 14px 34px rgba(48, 72, 152, 0.08);
}

.hero-logo {
  background: var(--white);
}

.hero-logo::after {
  display: none;
}

.hero-panel {
  background: var(--trombo-blue);
  box-shadow: 0 18px 44px rgba(48, 72, 152, 0.18);
}

.hero-panel::before {
  display: none;
}

.hero h1,
.login-card h1,
.mock-brief h1,
.preview-screen strong {
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.eyebrow,
.subtitle {
  color: rgba(255,255,255,0.92);
}

.nav-link {
  border-color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.12);
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255,255,255,0.24);
}

.module-card,
.panel,
.login-card,
.mock-choice,
.mock-brief > div:first-child {
  background: var(--white);
}

.module-card::before,
.panel::before,
.login-card::before {
  background: var(--trombo-blue);
}

.module-card::after {
  background: rgba(143, 143, 143, 0.08);
}

.module-card h2,
.panel h2,
.detail-grid strong,
.gal-exam-block strong,
.gal-exam-line span,
label,
.login-card h1,
.footer-brand p {
  color: var(--trombo-blue-dark);
}

.module-card p,
.lead,
.detail-grid span,
.gal-exam-block p,
.login-card p,
.mock-note,
.mock-choice-head p {
  color: var(--muted);
}

.module-card span,
.primary-button,
.primary-download,
.inline-action {
  background: var(--trombo-blue);
  color: var(--white);
  box-shadow: none;
}

.module-card:hover,
.download-card:hover,
.primary-download:hover {
  border-color: rgba(48, 72, 152, 0.36);
  box-shadow: 0 18px 42px rgba(48, 72, 152, 0.12);
}

input,
textarea,
select,
.detail-grid div,
.download-card,
.light-pre {
  background: var(--field);
  border-color: var(--line);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--trombo-blue);
  box-shadow: 0 0 0 3px rgba(48, 72, 152, 0.13);
}

.secondary-button,
.download-card {
  color: var(--trombo-blue-dark);
}

pre {
  background: #26324a;
}

.pill {
  background: rgba(48, 72, 152, 0.1);
  color: var(--trombo-blue);
}

.footer-brand img {
  width: min(100%, 420px);
}

.mock-intro,
.mock-option {
  margin-bottom: 24px;
}

.mock-intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  border: 1px solid rgba(23, 77, 134, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(45, 93, 144, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #edf5ff 100%);
  padding: 28px;
}

.mock-kicker {
  margin: 0 0 8px;
  color: var(--blue-700);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mock-intro h1 {
  margin: 0 0 10px;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 0.95;
}

.mock-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.mock-jump {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mock-jump a {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue-950);
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
}

.mock-label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.mock-label span {
  color: var(--blue-700);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mock-label strong {
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: 26px;
}

.mock-label p {
  margin: 0;
  color: var(--muted);
}

.mock-canvas {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(15, 49, 88, 0.14);
}

.institutional-canvas {
  display: grid;
  grid-template-columns: 250px 1fr;
  background: #08233f;
}

.mock-sidebar {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 26px;
  background: #ffffff;
  text-align: center;
}

.mock-sidebar img {
  width: 172px;
  margin: 0 auto;
}

.mock-sidebar p {
  margin: 0;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 800;
}

.mock-screen {
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 42px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(74, 144, 192, 0.45), transparent 34%),
    #123d68;
  color: #ffffff;
}

.mock-screen header span {
  color: rgba(255,255,255,0.72);
  font-weight: 800;
}

.mock-screen h2 {
  margin: 8px 0;
  font-family: var(--font-ui);
  font-size: 46px;
  line-height: 1;
}

.mock-screen p {
  margin: 0;
  color: rgba(255,255,255,0.84);
}

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

.mock-card-grid article {
  min-height: 104px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.mock-card-grid strong,
.mock-card-grid small {
  display: block;
}

.mock-card-grid small {
  margin-top: 10px;
  color: rgba(255,255,255,0.76);
}

.quiet-canvas {
  padding: 28px;
  background:
    radial-gradient(circle at 80% 0%, rgba(66, 121, 174, 0.16), transparent 36%),
    linear-gradient(180deg, #fbfdff 0%, #edf5fb 100%);
}

.quiet-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 150px;
  border-radius: 26px;
  background: #ffffff;
  padding: 26px 30px;
  box-shadow: inset 0 0 0 1px #d9e6f3;
}

.quiet-header h2 {
  margin: 8px 0 0;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: 42px;
}

.quiet-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.quiet-header img {
  width: 118px;
}

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

.quiet-actions article {
  min-height: 150px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #d9e6f3;
  padding: 20px;
}

.quiet-actions span,
.quiet-actions strong,
.quiet-actions small {
  display: block;
}

.quiet-actions span {
  color: #6c91b8;
  font-family: var(--font-ui);
  font-size: 34px;
  font-weight: 900;
}

.quiet-actions strong {
  margin: 10px 0;
  color: var(--blue-950);
  font-size: 20px;
}

.quiet-actions small,
.quiet-footer {
  color: var(--muted);
}

.quiet-footer {
  margin-top: 18px;
  border-radius: 18px;
  background: #dfeefa;
  padding: 16px 18px;
  font-weight: 900;
}

.command-canvas {
  background:
    linear-gradient(135deg, #071a2d 0%, #123d68 52%, #dfeefa 52%, #f8fbff 100%);
  padding: 22px;
}

.command-topbar {
  display: flex;
  justify-content: space-between;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  padding: 14px 18px;
}

.command-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.command-primary {
  display: grid;
  align-content: end;
  min-height: 315px;
  border-radius: 28px;
  background: #ffffff;
  padding: 28px;
}

.command-primary p {
  margin: 0 0 8px;
  color: var(--blue-700);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.command-primary h2 {
  margin: 0 0 12px;
  color: var(--blue-950);
  font-family: var(--font-ui);
  font-size: 44px;
  line-height: 1;
}

.command-primary small {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.command-primary button {
  width: max-content;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  background: #123d68;
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 900;
}

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

.command-list article {
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
  border: 1px solid #d5e3f0;
  padding: 18px;
}

.command-list strong,
.command-list span {
  display: block;
}

.command-list strong {
  color: var(--blue-950);
}

.command-list span {
  margin-top: 6px;
  color: var(--muted);
}

.mock-decision {
  border-style: dashed;
}

@media (max-width: 820px) {
  .hero,
  .module-grid,
  .mock-brief,
  .mock-gallery,
  .mock-detail-grid,
  .blue-tone-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    position: static;
    margin-bottom: 22px;
    justify-content: flex-start;
  }

  .hero-panel {
    min-height: 230px;
  }

  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .filters-grid,
  .detail-grid,
  .two-grid,
  .three-grid {
    grid-template-columns: 1fr;
  }

  .history-card-header {
    flex-direction: column;
  }

  .mock-intro,
  .quiet-header,
  .command-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .institutional-canvas,
  .institutional-preview,
  .quiet-actions,
  .command-layout {
    grid-template-columns: 1fr;
  }

  .preview-logo-strip {
    min-height: 96px;
  }

  .mock-choice {
    min-height: auto;
  }

  .profile-modal-backdrop {
    padding: 14px;
  }

  .profile-modal {
    padding: 20px;
  }
}

/* Laboratório de layouts inspirado na versão Streamlit. */
.layout-lab-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.layout-lab-intro > div,
.layout-lab-instruction,
.layout-option,
.layout-lab-summary {
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(16, 36, 61, 0.08);
}

.layout-lab-intro > div:first-child {
  padding: 24px 26px;
}

.layout-lab-kicker {
  margin: 0 0 7px;
  color: #45617f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.layout-lab-intro h2 {
  margin: 0 0 8px;
  color: #11345b;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.layout-lab-intro p,
.layout-lab-summary p {
  margin: 0;
  color: #45617f;
  line-height: 1.55;
}

.layout-lab-intro > .layout-lab-instruction {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 22px;
  color: #ffffff;
  background: #174d86;
  border-color: #174d86;
}

.layout-lab-instruction strong {
  font-size: 19px;
}

.layout-lab-instruction span {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.layout-mock-index {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  padding: 9px;
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(16, 36, 61, 0.08);
  backdrop-filter: blur(14px);
}

.layout-mock-index a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 12px;
  color: #11345b;
  text-decoration: none;
  font-weight: 700;
}

.layout-mock-index a:hover {
  background: #eef4fb;
}

.layout-mock-index strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #174d86;
  color: #ffffff;
}

.layout-option {
  scroll-margin-top: 78px;
  margin-bottom: 24px;
  padding: 20px;
}

.layout-option-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 15px;
}

.layout-option-heading > span {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 15px;
  background: #174d86;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
}

.layout-option-heading h2 {
  margin: 0 0 3px;
  color: #11345b;
  font-size: 24px;
}

.layout-option-heading p {
  margin: 0;
  color: #45617f;
}

.ui-preview {
  overflow: hidden;
  border: 1px solid #cbd9e9;
  border-radius: 18px;
  color: #10243d;
  background: #eef4fb;
  font-family: "Montserrat", sans-serif;
}

.preview-a {
  padding: 18px;
  background: linear-gradient(180deg, #eef4fb 0%, #f7fafc 100%);
}

.preview-a-header {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.preview-logo-card {
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e1ef;
  border-radius: 20px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(15, 49, 88, 0.08);
}

.preview-logo-card img {
  width: 142px;
  max-height: 150px;
  object-fit: contain;
}

.preview-a-hero {
  position: relative;
  min-height: 170px;
  display: grid;
  align-content: center;
  border-radius: 20px;
  padding: 25px 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f3158 0%, #174d86 100%);
  box-shadow: 0 12px 30px rgba(15, 49, 88, 0.16);
}

.preview-a-hero small,
.preview-b-header small,
.preview-c-brand small {
  display: block;
  font-weight: 600;
}

.preview-a-hero h3 {
  margin: 7px 0 5px;
  font-size: 28px;
}

.preview-a-hero p,
.preview-b-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.preview-nav {
  position: absolute;
  top: 15px;
  right: 16px;
  display: flex;
  gap: 6px;
}

.preview-nav span,
.preview-b-nav span,
.preview-c-nav span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.preview-panel {
  border: 1px solid #d6e1ef;
  border-radius: 16px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(16, 36, 61, 0.07);
}

.preview-panel h3 {
  margin: 0 0 14px;
  color: #11345b;
  font-size: 20px;
}

.preview-two-grid,
.preview-three-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

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

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

.preview-panel label {
  display: grid;
  gap: 6px;
  color: #15365d;
  font-size: 12px;
  font-weight: 700;
}

.preview-panel label > span {
  min-height: 43px;
  display: flex;
  align-items: center;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #f5f7fb;
  padding: 9px 12px;
  color: #6d7f95;
  font-size: 13px;
  font-weight: 600;
}

.preview-panel label em {
  margin-left: 9px;
  color: #45617f;
  font-style: normal;
}

.preview-file {
  margin-bottom: 12px;
}

.preview-panel button {
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  background: #174d86;
  color: #ffffff;
  padding: 10px 18px;
  font: inherit;
  font-weight: 800;
}

.preview-streamlit-panel > button {
  width: 100%;
}

.preview-b {
  background: #f4f6fa;
}

.preview-b-header {
  min-height: 124px;
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 24px;
  color: #ffffff;
  background: #174d86;
}

.preview-b-header img {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  background: #ffffff;
  padding: 6px;
  object-fit: contain;
}

.preview-b-header h3 {
  margin: 3px 0;
  font-size: 28px;
}

.preview-b-nav {
  display: flex;
  gap: 7px;
}

.preview-b-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 15px;
  padding: 16px;
}

.preview-b-layout aside {
  border: 1px solid #d6e1ef;
  border-radius: 16px;
  background: #ffffff;
  padding: 18px;
}

.preview-b-layout aside > strong {
  color: #11345b;
}

.preview-b-layout ol {
  display: grid;
  gap: 10px;
  margin: 17px 0;
  padding: 0;
  list-style: none;
}

.preview-b-layout li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #6d7f95;
  font-size: 12px;
  font-weight: 700;
}

.preview-b-layout li span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #eef4fb;
}

.preview-b-layout li.active {
  color: #174d86;
}

.preview-b-layout li.active span {
  background: #174d86;
  color: #ffffff;
}

.preview-b-layout aside p {
  margin: 0;
  color: #6d7f95;
  font-size: 11px;
  line-height: 1.5;
}

.preview-panel-title,
.preview-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-panel-title {
  margin-bottom: 14px;
}

.preview-panel-title small {
  color: #6d7f95;
  font-weight: 700;
}

.preview-panel-title h3 {
  margin: 2px 0 0;
}

.preview-panel-title > span {
  border-radius: 999px;
  background: #dcecff;
  color: #174d86;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 800;
}

.preview-file-drop > span {
  min-height: 62px !important;
  justify-content: center;
  border-style: dashed !important;
  gap: 8px;
}

.preview-file-drop b {
  color: #174d86;
}

.preview-action-row small {
  color: #6d7f95;
}

.preview-c {
  background: #eef4fb;
}

.preview-c-topbar {
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 13px 20px;
  color: #ffffff;
  background: #174d86;
}

.preview-c-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.preview-c-brand img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #ffffff;
  padding: 5px;
  object-fit: contain;
}

.preview-c-brand strong {
  display: block;
  font-size: 19px;
}

.preview-c-brand small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
}

.preview-c-nav {
  display: flex;
  gap: 7px;
}

.preview-c-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 20px 22px 12px;
}

.preview-c-title small {
  color: #45617f;
  font-weight: 700;
}

.preview-c-title h3 {
  margin: 3px 0 0;
  color: #11345b;
  font-size: 25px;
}

.preview-c-title p {
  margin: 0;
  color: #45617f;
  font-size: 12px;
}

.preview-c-panel {
  margin: 0 16px 16px;
}

.preview-c-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  align-items: end;
}

.preview-c-upload .preview-file {
  margin: 0;
}

.layout-lab-summary {
  padding: 22px 24px;
  border-left: 6px solid #174d86;
}

.layout-lab-summary strong {
  display: block;
  margin-bottom: 5px;
  color: #11345b;
  font-size: 19px;
}

@media (max-width: 900px) {
  .layout-lab-intro,
  .preview-a-header,
  .preview-b-layout,
  .preview-two-grid,
  .preview-three-grid,
  .preview-c-upload {
    grid-template-columns: 1fr;
  }

  .layout-mock-index {
    position: static;
  }

  .preview-b-header {
    grid-template-columns: 70px 1fr;
  }

  .preview-b-nav {
    grid-column: 1 / -1;
  }

  .preview-c-topbar,
  .preview-c-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Layout principal escolhido: Streamlit refinado (mock B). */
body {
  background: #f4f6fa;
  color: #10243d;
}

.page {
  width: min(1320px, calc(100% - 32px));
  padding-top: 22px;
}

.app-header {
  min-height: 132px;
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  border-radius: 24px;
  background: #174d86;
  padding: 20px 24px;
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 49, 88, 0.16);
}

.app-brand-logo {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: #ffffff;
  padding: 0;
}

.app-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
}

.app-header-copy {
  min-width: 0;
}

.app-header .eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 700;
}

.app-header h1 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.app-header .subtitle {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

.app-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  align-self: start;
}

.app-header-nav form {
  margin: 0;
}

.app-header .nav-link {
  min-height: 36px;
  padding: 6px 13px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.app-header .nav-link.active,
.app-header .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.46);
}

.app-header .nav-link-hidden-history {
  width: 36px;
  padding-inline: 0;
}

.panel,
.module-card,
.login-card {
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(16, 36, 61, 0.08);
}

.panel {
  padding: 22px 24px;
}

.panel::before,
.module-card::before,
.login-card::before {
  display: none;
}

.panel h2,
.module-card h2 {
  color: #11345b;
}

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

.module-card {
  min-height: 178px;
  padding: 20px;
}

.module-card::after {
  display: none;
}

.module-card h2 {
  margin-bottom: 9px;
  font-size: 20px;
}

.module-card p {
  font-size: 14px;
  line-height: 1.5;
}

.module-card span {
  min-height: 39px;
  border-radius: 12px;
  background: #f5f7fb;
  color: #174d86;
  box-shadow: inset 0 0 0 1px #cfd8e6;
  font-size: 13px;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: #b8c9df;
  box-shadow: 0 18px 42px rgba(16, 36, 61, 0.11);
}

label {
  gap: 7px;
  color: #15365d;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  min-height: 46px;
  border: 1px solid #cfd8e6;
  border-radius: 14px;
  background: #f5f7fb;
  color: #17324f;
  padding: 11px 14px;
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #6d7f95;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #2d5d90;
  box-shadow: 0 0 0 2px rgba(45, 93, 144, 0.12);
}

.primary-button,
.primary-download,
.inline-action {
  min-height: 46px;
  border-radius: 14px;
  background: #174d86;
  color: #ffffff;
  box-shadow: none;
}

.secondary-button,
.download-card {
  border-radius: 14px;
  background: #f5f7fb;
  color: #17324f;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}

.workflow-sidebar {
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  background: #ffffff;
  padding: 22px 20px;
  box-shadow: 0 14px 38px rgba(16, 36, 61, 0.08);
}

.workflow-sidebar > strong {
  color: #11345b;
  font-size: 17px;
}

.workflow-sidebar ol {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.workflow-sidebar li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  color: #6d7f95;
  font-size: 13px;
  font-weight: 700;
}

.workflow-sidebar li span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4fb;
  color: #45617f;
}

.workflow-sidebar li.active {
  color: #174d86;
}

.workflow-sidebar li.active span {
  background: #174d86;
  color: #ffffff;
}

.workflow-sidebar li.complete span {
  background: #dcecff;
  color: #174d86;
}

.workflow-sidebar p {
  margin: 0;
  color: #6d7f95;
  font-size: 12px;
  line-height: 1.55;
}

.workflow-main-panel {
  margin: 0;
}

.conditional-field-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.conditional-field-row:not(:has(> :not([hidden]))) {
  display: none;
}

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

.workflow-panel-heading small {
  color: #6d7f95;
  font-weight: 700;
}

.workflow-panel-heading h2 {
  margin: 3px 0 0;
}

.workflow-panel-heading > span {
  border-radius: 999px;
  background: #dcecff;
  color: #174d86;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.alzheimer-assessments {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  border-top: 1px solid #dce4ee;
  padding-top: 20px;
}

.assessment-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.assessment-heading small {
  color: #58708b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.assessment-heading h2 {
  margin: 3px 0 0;
  font-size: 23px;
}

.assessment-heading p {
  max-width: 520px;
  margin: 0;
  color: #60758d;
  font-size: 13px;
  line-height: 1.5;
}

.assessment-card {
  border: 1px solid #d2ddea;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.assessment-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  background: #edf4fb;
  color: #153f6d;
  cursor: pointer;
  list-style: none;
}

.assessment-card summary::-webkit-details-marker {
  display: none;
}

.assessment-card summary span {
  font-size: 16px;
  font-weight: 800;
}

.assessment-card summary small {
  color: #60758d;
  font-size: 12px;
  font-weight: 700;
}

.cdr-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px;
}

.cdr-domain-card {
  border: 1px solid #d6e1ec;
  border-radius: 13px;
  background: #ffffff;
  padding: 14px;
}

.cdr-domain-card > h3 {
  margin: 0;
  color: #1e4577;
  font-size: 16px;
  font-weight: 800;
}

.cdr-criterion {
  margin-top: 12px;
  border: 0;
  border-left: 3px solid #2e619f;
  background: #f3f7fb;
  padding: 10px 11px;
}

.cdr-criterion legend {
  display: block;
  width: 100%;
  color: #58718d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cdr-criterion-option {
  align-items: flex-start;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 7px 0 0;
  color: #29425d;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  padding: 7px 8px;
  transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.cdr-criterion-option:hover {
  background: #eaf1f8;
}

.cdr-criterion-option:has(input:checked) {
  background: #dfe9f6;
  box-shadow: inset 0 0 0 1px #9cb8d6;
  color: #15355e;
}

.cdr-criterion-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cdr-score-badge {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #2e619f;
  font-size: 11px;
  place-items: center;
}

.cdr-final-score {
  grid-column: 1 / -1;
  border: 0;
  border-top: 1px solid #dce4ee;
  padding-top: 15px;
}

.cdr-final-score legend {
  color: #1e4577;
  font-size: 16px;
  font-weight: 800;
  padding-right: 10px;
}

.cdr-final-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.cdr-final-option {
  cursor: pointer;
}

.cdr-final-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cdr-final-option span {
  display: inline-flex;
  border: 1px solid #cbd9e8;
  border-radius: 999px;
  background: #ffffff;
  color: #193d68;
  font-weight: 800;
  padding: 10px 14px;
}

.cdr-final-option:has(input:checked) span {
  border-color: #2e619f;
  background: #2e619f;
  color: #ffffff;
}

.cdr-final-score > small {
  display: block;
  margin-top: 10px;
  color: #687b92;
  font-weight: 600;
}

.mini-mental-intro {
  margin: 18px 18px 0;
  border: 1px solid #cbd9e8;
  border-left: 4px solid #2f5f9a;
  border-radius: 13px;
  background: #f3f7fb;
  padding: 14px 16px;
}

.mini-mental-kicker {
  color: #214f87;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-mental-intro p {
  margin: 4px 0 0;
  color: #41566d;
  line-height: 1.5;
}

.mini-mental-sections {
  display: grid;
  gap: 14px;
  padding: 16px 18px 4px;
}

.mini-mental-section {
  min-width: 0;
  margin: 0;
  border: 1px solid #d8e2ed;
  border-radius: 15px;
  background: #ffffff;
  padding: 0 15px 15px;
}

.mini-mental-section legend {
  width: calc(100% + 2px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -1px 0;
  border-radius: 13px 13px 0 0;
  background: #eaf1f8;
  color: #173f70;
  padding: 11px 14px;
}

.mini-mental-section legend > span {
  font-weight: 800;
}

.mini-mental-section legend strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #174d86;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 10px;
}

.mini-mental-instruction {
  margin: 14px 2px 12px;
  color: #50657b;
  font-size: 13px;
  line-height: 1.5;
}

.mini-point-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.mini-point-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mini-point-option {
  min-width: 0;
  display: block;
  position: relative;
  cursor: pointer;
}

.mini-point-option.wide {
  grid-column: 1 / -1;
}

.mini-point-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.mini-point-option span {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd8e6;
  border-radius: 11px;
  background: #f8fafc;
  color: #263f5c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  padding: 9px 11px;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.mini-point-option:hover span {
  border-color: #7094bb;
  transform: translateY(-1px);
}

.mini-point-option input:focus-visible + span {
  outline: 3px solid rgba(47, 95, 154, 0.24);
  outline-offset: 2px;
}

.mini-point-option input:checked + span {
  border-color: #174d86;
  background: #174d86;
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(23, 77, 134, 0.16);
}

.drawing-preview-button {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  gap: 9px;
  border: 1px dashed #9eb6d0;
  border-radius: 13px;
  background: #f8fafc;
  color: #174d86;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.drawing-preview-button:hover {
  border-color: #174d86;
  background: #f1f6fb;
}

.drawing-preview-button:focus-visible {
  outline: 3px solid rgba(47, 95, 154, 0.24);
  outline-offset: 2px;
}

.drawing-preview-button img {
  width: 148px;
  max-width: 100%;
  border: 0;
  background: #ffffff;
}

.drawing-preview-button span {
  font-size: 13px;
  font-weight: 800;
}

.mini-mental-drawing-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border: 0;
  background: #ffffff;
  margin: 0;
  padding: 28px;
}

.mini-mental-drawing-dialog[open] {
  display: grid;
  place-items: center;
}

.mini-mental-drawing-dialog::backdrop {
  background: #ffffff;
}

.mini-mental-drawing-dialog > img {
  width: min(82vw, 1080px);
  max-height: 82vh;
  object-fit: contain;
  image-rendering: auto;
}

.drawing-dialog-close {
  position: fixed;
  top: 22px;
  right: 26px;
  border: 1px solid #c8d5e3;
  border-radius: 999px;
  background: #ffffff;
  color: #174d86;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 15px;
}

.drawing-dialog-close:hover {
  border-color: #174d86;
  background: #f3f7fb;
}

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

.attention-mode-option {
  display: block;
  position: relative;
  cursor: pointer;
}

.attention-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attention-mode-option > span {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #cbd8e6;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
}

.attention-mode-option small {
  color: #64768a;
  font-weight: 600;
}

.attention-mode-option input:checked + span {
  border-color: #2f5f9a;
  background: #eaf1f8;
  color: #173f70;
  box-shadow: inset 0 0 0 1px #2f5f9a;
}

.attention-answer-panel {
  margin-top: 12px;
  border-top: 1px solid #e1e8f0;
  padding-top: 12px;
}

.answer-panel-label {
  display: block;
  margin-bottom: 8px;
  color: #50657b;
  font-size: 12px;
  font-weight: 700;
}

.mini-mental-total {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  margin: 12px 18px 18px;
  border-radius: 13px;
  background: #174d86;
  color: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(23, 77, 134, 0.2);
}

.mini-mental-total span {
  margin-right: auto;
  font-weight: 800;
}

.mini-mental-total strong {
  font-size: 25px;
}

.mini-mental-total small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.footer-brand {
  margin-top: 26px;
}

.footer-brand img {
  width: min(100%, 269px);
}

.login-logo {
  width: 245px;
  max-width: 58vw;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 109px minmax(0, 1fr);
  }

  .app-brand-logo {
    width: 103px;
    height: 103px;
  }

  .app-header-nav {
    grid-column: 1 / -1;
    align-self: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

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

@media (max-width: 720px) {
  .assessment-heading {
    display: grid;
  }

  .cdr-score-grid,
  .mini-point-grid,
  .mini-point-grid.compact,
  .attention-mode-grid {
    grid-template-columns: 1fr;
  }

  .mini-mental-drawing-dialog {
    padding: 18px;
  }

  .mini-mental-drawing-dialog > img {
    width: 94vw;
    max-height: 78vh;
  }

  .cdr-final-score {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100% - 20px, 1320px);
    padding-top: 10px;
  }

  .app-header {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    border-radius: 18px;
    padding: 16px;
  }

  .app-brand-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
  }

  .app-header h1 {
    font-size: 23px;
  }

  .app-header .subtitle {
    font-size: 12px;
  }

  .workflow-sidebar ol {
    grid-template-columns: 1fr;
  }
}

/* Tap Test — contador manual, executado integralmente no navegador. */
.tap-workspace {
  display: grid;
  gap: 18px;
}

.tap-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr) minmax(220px, 0.45fr);
  gap: 18px;
  align-items: center;
}

.tap-intro h2,
.tap-section-heading h2,
.tap-counter-heading h2,
.tap-shortcuts-panel h2 {
  margin: 2px 0 6px;
}

.tap-kicker {
  margin: 0;
  color: var(--trombo-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tap-privacy {
  display: grid;
  gap: 4px;
  border: 1px solid #b9d7c4;
  border-radius: 14px;
  background: #f0faf3;
  color: #285b3a;
  padding: 14px 16px;
}

.tap-privacy strong {
  font-size: 14px;
}

.tap-privacy span {
  font-size: 13px;
  line-height: 1.4;
}

.tap-file-picker {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px dashed #8da7c5;
  border-radius: 14px;
  background: #f5f7fb;
  color: #174d86;
  padding: 14px 16px;
  cursor: pointer;
}

.tap-file-picker span {
  font-weight: 800;
}

.tap-file-picker small {
  color: var(--muted);
  font-weight: 600;
}

.tap-file-picker input {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 7px 0 0;
  font-size: 12px;
}

.tap-settings {
  margin-bottom: 0;
}

.tap-section-heading,
.tap-counter-heading,
.tap-segment-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.tap-file-name {
  max-width: 46%;
  overflow: hidden;
  color: #64768d;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tap-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: end;
}

.tap-zoom-control > span {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  border: 1px solid #cfd8e6;
  border-radius: 14px;
  background: #f5f7fb;
  padding: 0 12px;
}

.tap-zoom-control input {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.tap-zoom-control output {
  color: #174d86;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.tap-review-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.tap-review-layout.vertical {
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.78fr);
}

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

.tap-review-layout > .panel {
  margin-bottom: 0;
}

.tap-video-viewport {
  overflow: hidden;
  min-height: 280px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #0d1522;
}

.tap-video-viewport video {
  display: block;
  width: 100%;
  max-height: 660px;
  background: #0d1522;
  transform: scale(var(--tap-video-zoom, 1));
  transform-origin: center center;
}

.tap-review-layout.horizontal .tap-video-viewport video {
  max-height: 620px;
}

.tap-segment-bar {
  margin-top: 14px;
  border: 1px solid #d6e1ef;
  border-radius: 14px;
  background: #f8fafd;
  padding: 14px;
}

.tap-segment-title {
  align-items: baseline;
}

.tap-segment-title strong {
  color: #11345b;
}

.tap-segment-title span,
.tap-hint {
  color: #6d7f95;
  font-size: 12px;
}

.tap-timeline {
  position: relative;
  height: 42px;
  margin: 8px 13px 0;
  touch-action: none;
  user-select: none;
}

.tap-timeline-track,
.tap-timeline-selection {
  position: absolute;
  top: 17px;
  height: 8px;
  border-radius: 999px;
}

.tap-timeline-track {
  right: 0;
  left: 0;
  background: #d9e1ec;
}

.tap-timeline-selection {
  background: #7e9fca;
}

.tap-timeline-playhead {
  position: absolute;
  z-index: 4;
  top: 6px;
  bottom: 4px;
  width: 3px;
  border-radius: 999px;
  background: #e58b27;
  pointer-events: none;
}

.tap-timeline-handle {
  position: absolute;
  z-index: 5;
  top: 5px;
  width: 25px;
  min-width: 25px;
  height: 32px;
  min-height: 0;
  transform: translateX(-50%);
  border: 3px solid #304898;
  border-radius: 7px;
  background: #ffffff;
  padding: 0;
  cursor: ew-resize;
}

.tap-timeline-events {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.tap-step-marker {
  position: absolute;
  top: 13px;
  width: 8px;
  min-width: 8px;
  height: 16px;
  min-height: 0;
  transform: translateX(-50%);
  border: 1px solid #ffffff;
  border-radius: 3px;
  background: #5d6c80;
  padding: 0;
  pointer-events: auto;
}

.tap-step-marker.right {
  background: #304898;
}

.tap-step-marker.left {
  background: #bf7023;
}

.tap-timeline-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: #61758e;
  font-size: 12px;
  font-weight: 700;
}

.tap-timeline-labels span:nth-child(2) {
  text-align: center;
}

.tap-timeline-labels span:last-child {
  text-align: right;
}

.tap-segment-actions,
.tap-counter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.tap-segment-actions button,
.tap-counter-actions button,
.tap-play-button {
  min-height: 40px;
  border-radius: 12px;
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tap-hint {
  margin: 10px 0 0;
}

.tap-counter-heading {
  align-items: center;
  margin-bottom: 12px;
}

.tap-total-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #b5c8e0;
  border-radius: 16px;
  background: #eef4fc;
  color: #173b68;
  padding: 15px 18px;
}

.tap-total-card span,
.tap-metrics-grid span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tap-total-card strong {
  font-size: 64px;
  line-height: 0.95;
}

.tap-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.tap-metrics-grid article {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #d6e1ef;
  border-radius: 14px;
  background: #f8fafd;
  padding: 12px;
}

.tap-metrics-grid span,
.tap-metrics-grid small {
  color: #687b92;
}

.tap-metrics-grid strong {
  color: #173b68;
  font-size: 29px;
  line-height: 1.05;
}

.tap-metrics-grid small {
  font-size: 11px;
  font-weight: 700;
}

.tap-metrics-grid .tap-dynamic-card {
  grid-column: 1 / -1;
  min-height: 108px;
  border-color: #c5d6eb;
  background: #f0f5fc;
}

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

.tap-step-buttons button {
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px solid #aebfd4;
  border-radius: 13px;
  background: #ffffff;
  color: #173b68;
  padding: 10px 7px;
  cursor: pointer;
}

.tap-step-buttons button:hover {
  border-color: #304898;
  background: #f2f5fb;
}

.tap-step-buttons span {
  font-size: 12px;
  font-weight: 800;
}

.tap-step-buttons kbd,
.tap-shortcuts kbd {
  border: 1px solid #c6d0dd;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #edf1f6;
  color: #173b68;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
}

.tap-status {
  min-height: 42px;
  margin: 11px 0 0;
  border-radius: 10px;
  background: #f5f7fb;
  color: #304898;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.tap-danger-button,
.tap-delete-event {
  border: 1px solid #e2b5b5;
  background: #fff7f7;
  color: #9d3434;
}

.tap-shortcuts-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 0;
}

.tap-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tap-shortcuts > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6e1ef;
  border-radius: 999px;
  background: #f8fafd;
  color: #536a85;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
}

.tap-events-panel {
  margin-bottom: 0;
}

.tap-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.tap-events-table {
  width: 100%;
  border-collapse: collapse;
}

.tap-events-table th,
.tap-events-table td {
  border-bottom: 1px solid #e0e6ef;
  padding: 9px 10px;
  text-align: left;
}

.tap-events-table th {
  color: #61758e;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tap-events-table select {
  width: min(100%, 190px);
  min-height: 38px;
  padding: 7px 10px;
}

.tap-time-link,
.tap-delete-event {
  min-height: 36px;
  border-radius: 9px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.tap-time-link {
  border: 0;
  background: transparent;
  color: #304898;
  text-decoration: underline;
}

.tap-empty-events {
  margin: 0;
  border: 1px dashed #c8d4e2;
  border-radius: 12px;
  color: #6d7f95;
  padding: 18px;
  text-align: center;
}

@media (max-width: 1040px) {
  .tap-intro,
  .tap-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tap-intro > div:first-child {
    grid-column: 1 / -1;
  }

  .tap-review-layout.vertical {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  }
}

@media (max-width: 820px) {
  .tap-review-layout.vertical,
  .tap-shortcuts-panel {
    grid-template-columns: 1fr;
  }

  .tap-video-viewport video {
    max-height: 620px;
  }
}

@media (max-width: 620px) {
  .tap-intro,
  .tap-fields,
  .tap-metrics-grid {
    grid-template-columns: 1fr;
  }

  .tap-intro > div:first-child,
  .tap-metrics-grid .tap-dynamic-card {
    grid-column: auto;
  }

  .tap-file-name,
  .tap-segment-title span {
    display: none;
  }

  .tap-step-buttons {
    grid-template-columns: 1fr;
  }

  .tap-step-buttons button {
    min-height: 56px;
    grid-template-columns: auto 1fr;
    justify-content: start;
    padding-inline: 14px;
  }

  .tap-total-card strong {
    font-size: 54px;
  }

  .tap-video-viewport {
    min-height: 210px;
  }
}
