@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap");

:root {
  --ink: #151226;
  --ink-2: #2b2840;
  --paper: #f5f7fb;
  --white: #ffffff;
  --muted: #717083;
  --line: #e2e4ed;
  --soft: #eceef5;
  --berry: #d93f6a;
  --berry-dark: #b92754;
  --berry-soft: #fff0f4;
  --teal: #137a72;
  --teal-soft: #e7f6f3;
  --amber: #a96308;
  --amber-soft: #fff4df;
  --danger: #b4233b;
  --shadow: 0 24px 64px rgba(29, 25, 54, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
label:focus-within,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 63, 106, 0.25);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 76px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  padding: 0 3.5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.topbar-actions button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.topbar-actions button:hover {
  color: var(--berry);
  border-color: rgba(217, 63, 106, 0.35);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
}

.brand-mark svg {
  width: 27px;
  fill: none;
  stroke: #ff6a8f;
  stroke-width: 1.5;
}

.brand-mark svg path:nth-child(2),
.brand-mark circle {
  stroke: white;
  stroke-linecap: round;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.04em;
  font-size: 1.18rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.topbar-center {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: var(--paper);
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 10px;
}

.step b {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  font-size: 0.7rem;
}

.step.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(21, 18, 38, 0.08);
}

.step.active b {
  background: var(--berry);
  color: var(--white);
}

main {
  width: min(1460px, 93vw);
  margin: 0 auto;
  padding: 38px 0 64px;
}

.main-tabs {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  margin-bottom: 25px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(29, 25, 54, 0.05);
}

.main-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.main-tab[hidden], .client-primary-button[hidden] { display: none; }

.main-tab svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.main-tab > span {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--berry-dark);
  background: var(--berry-soft);
  font-size: 0.66rem;
}

.main-tab:hover {
  color: var(--ink);
  background: var(--paper);
}

.main-tab.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 3px 12px rgba(21, 18, 38, 0.1);
}

.app-view[hidden] {
  display: none;
}

.workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 6px;
  color: var(--berry-dark);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.7rem;
  font-weight: 700;
}

.eyebrow span {
  color: #bab8c4;
  margin: 0 4px;
}

h1,
h2 {
  font-family: "Manrope", sans-serif;
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.12;
}

h2 {
  font-size: 1.04rem;
  line-height: 1.3;
}

.workspace-heading > div:first-child > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.55;
  font-size: 0.92rem;
}

.privacy-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid #cae9e4;
  background: var(--teal-soft);
  color: #0b625b;
  font-weight: 600;
  font-size: 0.77rem;
  white-space: nowrap;
}

.privacy-chip svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
  gap: 22px;
  align-items: start;
}

.photo-card,
.quality-card,
.evidence-card,
.review-card,
.sources-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo-card {
  padding: 25px;
  min-height: 686px;
}

.card-heading,
.quality-head,
.evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.view-badge,
.model-badge {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 10px;
  white-space: nowrap;
}

.upload-zone {
  min-height: 495px;
  margin-top: 20px;
  border: 1.5px dashed #c9cad6;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 30px;
  cursor: pointer;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 40%, rgba(217, 63, 106, 0.065), transparent 32%),
    linear-gradient(135deg, #fafbfe, #f5f6fb);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.upload-zone[hidden] {
  display: none;
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--berry);
  background: var(--berry-soft);
  transform: translateY(-1px);
}

.upload-zone input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
}

.upload-zone strong {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
}

.upload-zone > span:not(.upload-icon):not(.upload-action) {
  max-width: 420px;
  font-size: 0.87rem;
  line-height: 1.5;
}

.upload-zone small {
  font-size: 0.72rem;
  color: #9694a4;
}

.upload-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(21, 18, 38, 0.16);
  margin-bottom: 5px;
}

.upload-icon svg {
  width: 27px;
  fill: none;
  stroke: white;
  stroke-width: 1.6;
}

.upload-action {
  margin-top: 8px;
  color: white;
  background: var(--berry);
  border-radius: 11px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.8rem;
}

.image-workspace {
  margin-top: 20px;
}

.inspection-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  color: #40384b;
  background: #f3f0f8;
  border: 1px solid #e2dcec;
  font-size: 0.76rem;
  line-height: 1.4;
}

.inspection-tip svg {
  width: 19px;
  min-width: 19px;
  fill: none;
  stroke: var(--berry-dark);
  stroke-width: 1.8;
}

.inspection-tip strong {
  color: var(--ink);
}

.image-stage {
  height: 512px;
  overflow: auto;
  position: relative;
  border-radius: 18px;
  background-color: #171522;
  background-image: linear-gradient(45deg, #1e1b2d 25%, transparent 25%), linear-gradient(-45deg, #1e1b2d 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1e1b2d 75%), linear-gradient(-45deg, transparent 75%, #1e1b2d 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

#photo-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 45%;
  transition: transform 150ms ease;
}

.face-guide {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 49%;
  width: 48%;
  height: 82%;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(255, 255, 255, 0.66);
  border-radius: 48% 48% 44% 44% / 38% 38% 58% 58%;
  box-shadow: 0 0 0 999px rgba(15, 13, 24, 0.15);
}

.alignment-label {
  position: absolute;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  color: white;
  background: rgba(15, 13, 24, 0.74);
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  pointer-events: none;
}

.region-layer {
  position: absolute;
  inset: 0;
  transform-origin: 50% 45%;
  transition: transform 150ms ease;
}

.region {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(217, 63, 106, 0.08);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
}

.region-layer.ready .region {
  opacity: 0.75;
}

.region:hover,
.region.active {
  opacity: 1 !important;
  background: rgba(217, 63, 106, 0.34);
  transform: scale(1.04);
}

.region span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(21, 18, 38, 0.82);
  color: white;
  font-size: 0.62rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.region:hover span,
.region.active span {
  opacity: 1;
}

.region-forehead { left: 39%; top: 13%; width: 22%; height: 13%; }
.region-eye-left { left: 32%; top: 31%; width: 16%; height: 9%; }
.region-eye-right { left: 52%; top: 31%; width: 16%; height: 9%; }
.region-cheek-left { left: 29%; top: 41%; width: 19%; height: 18%; }
.region-cheek-right { left: 52%; top: 41%; width: 19%; height: 18%; }
.region-nose { left: 44%; top: 38%; width: 12%; height: 22%; }
.region-mouth { left: 40%; top: 62%; width: 20%; height: 10%; }
.region-chin { left: 42%; top: 74%; width: 16%; height: 11%; }

.image-actions {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  padding-top: 10px;
}

.text-button {
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-weight: 600;
  padding: 6px 0;
}

.text-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.zoom-control > button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
}

.zoom-control input {
  width: 84px;
  accent-color: var(--berry);
}

.zoom-control output {
  min-width: 35px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 700;
}

.zoom-presets {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.zoom-presets button {
  min-width: 43px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
}

.zoom-presets button:hover,
.zoom-presets button.active {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.capture-guidance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.capture-guidance > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border-radius: 13px;
  background: var(--paper);
}

.capture-guidance > div > span {
  color: var(--berry-dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding-top: 2px;
}

.capture-guidance p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.capture-guidance strong {
  display: block;
  color: var(--ink);
  font-size: 0.76rem;
  margin-bottom: 2px;
}

.results-column {
  display: grid;
  gap: 15px;
}

.quality-card,
.evidence-card {
  padding: 23px;
}

.quality-summary {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 9px;
  white-space: nowrap;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.neutral {
  color: var(--muted);
  background: var(--paper);
}

.status.good {
  color: var(--teal);
  background: var(--teal-soft);
}

.status.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.bad {
  color: var(--danger);
  background: #ffedf1;
}

.metric-list {
  display: grid;
  gap: 13px;
}

.metric > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.77rem;
}

.metric b {
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
}

.track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #bbb9c5;
  transition: width 500ms cubic-bezier(.2,.8,.2,1), background 300ms ease;
}

.quality-note {
  margin: 18px 0;
  border-radius: 12px;
  padding: 10px 11px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.quality-note svg {
  width: 16px;
  min-width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.primary-button,
.secondary-button {
  border: 0;
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-button {
  color: white;
  background: var(--ink);
}

.primary-button:hover:not(:disabled) {
  background: #2b2741;
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.primary-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.secondary-button {
  margin-top: 16px;
  color: var(--berry-dark);
  border: 1px solid #f1bfd0;
  background: var(--berry-soft);
}

.evidence-card {
  animation: rise 360ms ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.safety-banner {
  color: #72501c;
  background: var(--amber-soft);
  border: 1px solid #f1deb7;
  border-radius: 11px;
  padding: 10px 11px;
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 14px 0;
}

.auto-conclusion {
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid #ded9e7;
  border-radius: 13px;
  background: linear-gradient(135deg, #f8f5fb, #fff);
}

.auto-conclusion > span {
  display: block;
  margin-bottom: 5px;
  color: var(--berry-dark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auto-conclusion h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.auto-conclusion p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.finding-list {
  display: grid;
  gap: 9px;
}

.finding {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.finding:hover,
.finding.active {
  border-color: #e9a5bb;
  background: var(--berry-soft);
}

.finding-rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--paper);
  color: var(--berry-dark);
  font-weight: 700;
  font-size: 0.75rem;
}

.finding strong {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.finding p {
  margin: 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.finding-score {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

.review-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 18px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.review-card::after {
  content: "";
  width: 90px;
  height: 90px;
  position: absolute;
  right: -42px;
  top: -42px;
  border-radius: 50%;
  background: var(--soft);
}

.review-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
}

.review-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.review-card p:not(.card-kicker) {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
  margin: 6px 0 0;
}

.review-state {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.review-card.pending .review-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.review-card.pending .review-state {
  color: var(--amber);
}

.review-card.approved {
  border-color: #addbd5;
}

.review-card.approved .review-icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.review-card.approved .review-state {
  color: var(--teal);
}

.review-card.rejected {
  border-color: #efbdc6;
}

.review-card.rejected .review-icon {
  color: var(--danger);
  background: #ffedf1;
}

.review-card.rejected .review-state {
  color: var(--danger);
}

.report-editor {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.report-editor label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 700;
}

.professional-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 12px;
  margin-bottom: 14px;
}

.professional-fields label { margin: 0; }

.professional-fields label span {
  display: block;
  margin-bottom: 7px;
}

.professional-fields input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfbfd;
  padding: 0 12px;
  color: var(--ink);
  font: 0.75rem/1.5 "DM Sans", sans-serif;
  outline: none;
}

.professional-fields input:focus {
  border-color: #d993aa;
  outline: 3px solid rgba(217, 63, 106, 0.12);
}

.report-editor textarea {
  width: 100%;
  resize: vertical;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fbfbfd;
  font: 0.75rem/1.5 "DM Sans", sans-serif;
}

.report-editor textarea:focus {
  border-color: #d993aa;
  outline: 3px solid rgba(217, 63, 106, 0.12);
}

.report-editor > p {
  margin: 7px 0 12px !important;
  font-size: 0.67rem !important;
}

.review-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.report-action {
  min-height: 39px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.report-action.approve {
  grid-column: 1 / -1;
  color: white;
  background: var(--teal);
}

.report-action.revise {
  color: var(--ink);
  background: var(--soft);
}

.report-action.reject {
  color: var(--danger);
  background: #ffedf1;
}

.report-disclaimer {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.4;
}

.sources-card {
  box-shadow: none;
  overflow: hidden;
}

.sources-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
}

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

.sources-card summary > span {
  display: flex;
  flex-direction: column;
}

.sources-card summary b {
  font-size: 0.8rem;
}

.sources-card summary small {
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 2px;
}

.sources-card summary svg {
  width: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.sources-card[open] summary svg {
  transform: rotate(180deg);
}

.sources-card ul {
  list-style: none;
  margin: 0;
  padding: 0 18px 16px;
  display: grid;
  gap: 7px;
}

.sources-card li {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sources-card a {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.sources-card a:hover {
  color: var(--berry-dark);
  text-decoration: underline;
}

.sources-card li span {
  color: var(--muted);
  font-size: 0.65rem;
}

.test-library {
  animation: rise 260ms ease both;
}

.library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.library-heading > div:first-child > p:last-child {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.synthetic-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #f1deb7;
  border-radius: 999px;
  color: #72501c;
  background: var(--amber-soft);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.synthetic-notice svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

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

.test-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.test-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(29, 25, 54, 0.12);
}

.test-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e3e7;
}

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

.test-image > span {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: white;
  background: rgba(21, 18, 38, 0.78);
  backdrop-filter: blur(8px);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.test-content {
  display: flex;
  min-height: 285px;
  flex-direction: column;
  padding: 20px;
}

.case-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.case-line b {
  color: var(--berry-dark);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-line small {
  color: var(--muted);
  font-size: 0.65rem;
}

.test-content h2 {
  font-size: 1.08rem;
}

.test-content > p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.case-tags span {
  padding: 6px 8px;
  border-radius: 999px;
  color: #625f71;
  background: var(--paper);
  font-size: 0.64rem;
  font-weight: 600;
}

.use-case-button {
  width: 100%;
  min-height: 43px;
  margin-top: auto;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.use-case-button:hover:not(:disabled) {
  background: #2b2741;
  transform: translateY(-1px);
}

.use-case-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.library-footnote {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.library-footnote strong {
  color: var(--ink);
  font-size: 0.77rem;
}

.library-footnote p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.final-report {
  margin-top: 24px;
  scroll-margin-top: 96px;
  padding: 38px;
  border: 1px solid #cfd2df;
  border-top: 7px solid var(--ink);
  border-radius: 8px 8px var(--radius) var(--radius);
  background: var(--white);
  box-shadow: 0 28px 80px rgba(26, 23, 43, 0.11);
  animation: rise 320ms ease both;
}

.final-report[hidden] {
  display: none;
}

.report-document-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 23px;
  border-bottom: 2px solid var(--ink);
}

.report-brand,
.report-brand > span:last-child {
  display: flex;
  align-items: center;
}

.report-brand {
  gap: 10px;
}

.report-brand > span:last-child {
  align-items: flex-start;
  flex-direction: column;
}

.report-brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}

.report-brand small {
  color: var(--muted);
  font-size: 0.66rem;
}

.report-heading-copy {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.report-heading-copy > span {
  color: var(--berry-dark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-heading-copy h2 {
  margin-top: 3px;
  font-size: 1.35rem;
}

.report-heading-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.report-issued-state {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.report-state-wrap {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

.report-state-wrap small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}

.report-overview > div {
  min-height: 78px;
  padding: 15px;
  background: #fafafd;
}

.report-overview span,
.report-overview strong {
  display: block;
}

.report-scope {
  margin: 4px 0 9px;
  padding: 17px 19px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  border-left: 4px solid var(--berry-dark);
  background: #f7f7fa;
}

.report-scope strong {
  font-size: 0.75rem;
}

.report-scope p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.report-overview span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.66rem;
}

.report-overview strong {
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.35;
}

.report-section {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.report-section-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--berry-dark);
  background: var(--berry-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.report-section h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
}

.report-section p {
  margin: 0;
  max-width: 1000px;
  color: #4f4c5f;
  font-size: 0.76rem;
  line-height: 1.65;
  white-space: pre-line;
}

.report-section-lead {
  margin-bottom: 13px !important;
}

.report-method-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.report-method-tags span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: #fafafd;
  font-size: 0.63rem;
  font-weight: 600;
}

.report-evidence-wrap {
  min-width: 0;
}

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

.report-evidence-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafd;
}

.report-evidence-item strong {
  font-size: 0.72rem;
}

.report-evidence-item span {
  color: var(--berry-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

.report-evidence-item p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.report-evidence-item em {
  grid-column: 1 / -1;
  color: var(--teal);
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.conclusion-section > div:last-child {
  padding: 19px;
  border: 1px solid rgba(185, 39, 84, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8fa, #fafafd);
}

.conclusion-section p {
  color: var(--ink-2);
  font-size: 0.8rem;
}

.report-science {
  margin: 3px 0 20px;
  padding: 18px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  border: 1px solid var(--line);
  background: #fafafd;
}

.report-science > div span,
.report-science > div strong {
  display: block;
}

.report-science > div span {
  color: var(--berry-dark);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.report-science > div strong {
  margin-top: 7px;
  font-size: 0.73rem;
  line-height: 1.4;
}

.report-science ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.5;
}

.report-science li + li {
  margin-top: 5px;
}

.report-validation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px;
  border: 1px solid #bce1dc;
  border-radius: 13px;
  background: var(--teal-soft);
}

.report-validation strong {
  font-size: 0.76rem;
}

.report-validation p {
  max-width: 820px;
  margin: 4px 0 0;
  color: #3e6b67;
  font-size: 0.69rem;
  line-height: 1.45;
}

.report-validation > span {
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.report-footer-note {
  margin-top: 19px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.59rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.report-primary,
.report-secondary {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
}

.report-primary {
  border: 0;
  color: white;
  background: var(--ink);
}

.report-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  padding: 11px 15px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(21, 18, 38, 0.25);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.consent-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-2);
  background: #fafbfe;
  font-size: 0.72rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent-control input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.credit-dashboard {
  min-height: 620px;
}

.credit-heading {
  margin-bottom: 24px;
}

.credit-refresh {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

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

.credit-stat,
.credit-panel,
.credit-security-note {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 14px 42px rgba(29, 25, 54, 0.05);
}

.credit-stat {
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border-radius: 18px;
}

.credit-stat.primary {
  color: white;
  border-color: var(--ink);
  background: linear-gradient(145deg, var(--ink), #312c4c);
}

.credit-stat > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.credit-stat.primary > span,
.credit-stat.primary small {
  color: rgba(255, 255, 255, 0.68);
}

.credit-stat strong {
  display: block;
  margin: 8px 0 3px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.55rem, 2.2vw, 2.25rem);
  letter-spacing: -0.05em;
}

.credit-stat small {
  color: var(--muted);
  font-size: 0.67rem;
}

.credit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

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

.credit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.credit-panel-head span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
}

.credit-panel-head h2 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.credit-panel-head > strong {
  font-size: 0.78rem;
}

.credit-progress {
  height: 9px;
  margin: 25px 0 13px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.credit-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #35aaa0);
  transition: width 220ms ease;
}

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

.credit-panel-details span {
  color: var(--muted);
  font-size: 0.7rem;
}

.credit-panel-details b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.82rem;
}

.credit-note {
  margin: 20px 0 0;
  padding: 12px;
  border-radius: 10px;
  color: #4a4860;
  background: var(--teal-soft);
  font-size: 0.69rem;
  line-height: 1.5;
}

.ledger-state {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--teal) !important;
  background: var(--teal-soft);
}

.usage-table-wrap {
  margin-top: 17px;
  overflow: auto;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.usage-table th,
.usage-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.usage-table th {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.usage-table td:nth-child(2),
.usage-table td:nth-child(3),
.usage-table th:nth-child(2),
.usage-table th:nth-child(3) {
  text-align: right;
}

.credit-security-note {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
  padding: 17px 20px;
  border-radius: 15px;
}

.credit-security-note strong {
  font-size: 0.76rem;
}

.credit-security-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.client-association {
  margin-bottom: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(29, 25, 54, 0.035);
}

.client-association > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.association-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--berry);
  background: var(--berry-soft);
  font-size: 1.2rem;
  font-weight: 700;
}

.client-association strong,
.client-association p {
  display: block;
  margin: 0;
}

.client-association strong { font-size: 0.82rem; }
.client-association p { margin-top: 3px; color: var(--muted); font-size: 0.7rem; }

.association-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.association-actions label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.association-actions select,
.association-actions button {
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 0.72rem;
}

.association-actions select {
  min-width: 220px;
  padding: 0 34px 0 11px;
  color: var(--ink);
}

.association-actions button {
  padding: 0 13px;
  color: var(--berry);
  font-weight: 700;
  cursor: pointer;
}

.clients-view { padding-bottom: 50px; }
.clients-heading { margin-bottom: 20px; }

.client-primary-button {
  height: 43px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--berry);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217, 63, 106, 0.2);
}

.client-form {
  margin-bottom: 18px;
  padding: 23px;
  border: 1px solid rgba(217, 63, 106, 0.22);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.client-form[hidden] { display: none; }

.client-form-heading,
.client-form-actions,
.client-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.client-form-heading span,
.client-panel-heading span {
  color: var(--berry);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-form-heading h2,
.client-panel-heading h2 {
  margin: 3px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.03rem;
}

.client-form-heading > button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.client-form-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.client-form-grid label {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.client-form-grid label.wide { grid-column: span 3; }

.client-form-grid input,
.client-form-grid textarea,
.client-panel-heading input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfbfd;
  font-size: 0.75rem;
}

.client-form-grid input { height: 42px; padding: 0 12px; }
.client-form-grid textarea { min-height: 76px; padding: 11px 12px; resize: vertical; font-family: inherit; }

.client-form-actions { justify-content: flex-end; margin-top: 16px; }
.client-form-actions button { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.client-cancel { border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.client-save { border: 0; color: white; background: var(--teal); }

.client-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.client-stat-grid article {
  min-height: 98px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.client-stat-grid span { display: block; color: var(--muted); font-size: 0.68rem; }
.client-stat-grid strong { display: block; margin-top: 8px; font-family: "Manrope", sans-serif; font-size: 1.55rem; }

.client-content-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 15px;
}

.client-panel {
  min-height: 410px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.client-panel-heading { margin-bottom: 15px; }
.client-panel-heading input { width: 180px; height: 38px; margin: 0; padding: 0 11px; }

.client-list,
.report-history { display: flex; flex-direction: column; gap: 9px; }
.client-empty { margin: 45px 0; color: var(--muted); text-align: center; font-size: 0.75rem; }

.client-item,
.history-item {
  padding: 14px;
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfbfd;
}

.client-item { grid-template-columns: 42px 1fr auto; }
.client-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--berry); background: var(--berry-soft); font-weight: 800; }
.client-item strong,
.client-item span,
.history-item strong,
.history-item span { display: block; }
.client-item strong { font-size: 0.78rem; }
.client-item span { margin-top: 3px; color: var(--muted); font-size: 0.66rem; }
.client-item button { height: 34px; padding: 0 10px; border: 1px solid rgba(217,63,106,.22); border-radius: 9px; color: var(--berry); background: white; font-size: 0.65rem; font-weight: 700; cursor: pointer; }

.history-item { grid-template-columns: 1fr auto; }
.history-item strong { font-size: 0.74rem; }
.history-item span { margin-top: 4px; color: var(--muted); font-size: 0.64rem; line-height: 1.45; }
.history-item b { color: var(--teal); font-size: 0.65rem; }

.management-view { padding-bottom: 50px; }
.management-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 15px; }
.management-summary article { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.management-summary span { display: block; color: var(--muted); font-size: .68rem; }
.management-summary strong { display: block; margin-top: 7px; font-family: "Manrope",sans-serif; font-size: 1.45rem; }
.management-list { display: flex; flex-direction: column; gap: 11px; }
.management-card { padding: 18px 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 10px 30px rgba(29,25,54,.035); }
.management-card-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.management-avatar { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: var(--berry); background: var(--berry-soft); font-weight: 800; }
.management-card strong,.management-card span,.management-card small { display: block; }
.management-card strong { font-size: .82rem; }
.management-card span { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.management-card small { margin-top: 4px; color: #8e8797; font-size: .63rem; }
.management-badges { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.management-badge { padding: 6px 9px; border-radius: 999px; color: var(--teal); background: rgba(19,137,126,.09); font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.management-badge.muted { color: var(--muted); background: var(--paper); }
.management-badge.alert { color: #b33454; background: var(--berry-soft); }
.recovery-admin-panel { margin-bottom: 15px; padding: 18px 20px; display: grid; grid-template-columns: 260px 1fr; gap: 20px; border: 1px solid rgba(217,63,106,.2); border-radius: 16px; background: var(--berry-soft); }
.recovery-admin-panel[hidden] { display: none; }
.recovery-admin-panel span,.recovery-admin-panel strong { display: block; }
.recovery-admin-panel span { color: var(--berry); font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.recovery-admin-panel strong { margin-top: 5px; font-size: .82rem; }
.recovery-admin-panel p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.reset-password { margin-top: 10px; display: flex; gap: 7px; }
.reset-password input { width: 210px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; font-size: .68rem; }
.reset-password button { height: 36px; padding: 0 11px; border: 0; border-radius: 9px; color: white; background: var(--berry); font-size: .65rem; font-weight: 800; cursor: pointer; }

@media (max-width: 1080px) {
  .topbar-center {
    display: none;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .results-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .quality-card {
    grid-row: span 2;
  }
  .test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .credit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-content-grid {
    grid-template-columns: 1fr;
  }
  .management-summary { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .professional-fields {
    grid-template-columns: 1fr;
  }
  .topbar {
    height: 66px;
    padding: 0 16px;
    grid-template-columns: 1fr auto;
  }
  .topbar-actions span {
    display: none;
  }
  main {
    width: calc(100% - 24px);
    padding-top: 24px;
  }
  .main-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .main-tab {
    flex: 1;
    justify-content: center;
    min-width: max-content;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .privacy-chip {
    font-size: 0.7rem;
  }
  .photo-card,
  .quality-card,
  .evidence-card {
    padding: 17px;
    border-radius: 17px;
  }
  .photo-card {
    min-height: 0;
  }
  .upload-zone {
    min-height: 410px;
  }
  .image-stage {
    height: 480px;
  }
  .results-column {
    grid-template-columns: 1fr;
  }
  .capture-guidance {
    grid-template-columns: 1fr;
  }
  .image-actions {
    flex-wrap: wrap;
  }
  .zoom-control {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .zoom-control input {
    flex: 1;
  }
  .zoom-presets {
    width: 100%;
    margin: 2px 0 0;
    padding: 7px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .zoom-presets button {
    flex: 1;
  }
  .library-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .client-association {
    align-items: flex-start;
    flex-direction: column;
  }
  .association-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .association-actions select {
    width: 100%;
  }
  .client-form-grid,
  .client-stat-grid {
    grid-template-columns: 1fr;
  }
  .client-form-grid label.wide {
    grid-column: auto;
  }
  .client-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .client-panel-heading input {
    width: 100%;
  }
  .management-card { grid-template-columns: 1fr; }
  .management-badges { justify-content: flex-start; }
  .recovery-admin-panel { grid-template-columns: 1fr; }
  .reset-password { flex-direction: column; }
  .reset-password input { width: 100%; }
  .test-grid {
    grid-template-columns: 1fr;
  }
  .test-content {
    min-height: 0;
  }
  .library-footnote {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .credit-summary-grid,
  .credit-grid,
  .credit-panel-details,
  .credit-security-note {
    grid-template-columns: 1fr;
  }
  .final-report {
    padding: 18px;
  }
  .report-document-header {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .report-heading-copy {
    padding: 0;
    border-left: 0;
  }
  .report-issued-state {
    width: max-content;
  }
  .report-state-wrap {
    align-items: flex-start;
  }
  .report-overview,
  .report-evidence {
    grid-template-columns: 1fr;
  }
  .report-scope,
  .report-science {
    grid-template-columns: 1fr;
  }
  .report-validation {
    align-items: flex-start;
    flex-direction: column;
  }
  .report-document-actions {
    flex-direction: column;
  }
}

@media print {
  body {
    background: white;
  }
  .topbar,
  .main-tabs,
  .workspace-heading,
  .client-association,
  .analysis-grid,
  .clients-view,
  .test-library,
  .report-document-actions,
  .toast {
    display: none !important;
  }
  main {
    width: 100%;
    padding: 0;
  }
  .final-report {
    display: block !important;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .report-document-header,
  .report-overview,
  .report-scope,
  .report-section,
  .report-science,
  .report-validation {
    break-inside: avoid;
  }
  .report-section {
    page-break-inside: avoid;
  }
  .report-document-header {
    padding-top: 8mm;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
