:root {
  --ink: #17343d;
  --ink-soft: #58727a;
  --forest: #103f4b;
  --forest-2: #176878;
  --mint: #dceff0;
  --mint-strong: #87c5c8;
  --cream: #f3f2e9;
  --paper: #fffef9;
  --white: #ffffff;
  --coral: #f07a45;
  --amber: #e7b153;
  --sky: #7fb7c7;
  --line: #d9e5e4;
  --danger: #b84e3b;
  --shadow: 0 18px 45px rgba(15, 63, 75, 0.11);
  --shadow-soft: 0 8px 24px rgba(15, 63, 75, 0.07);
  font-family:
    "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--cream);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow--green {
  color: #4b8576;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo--login {
  height: clamp(48px, 5.2vw, 68px);
}

.brand-logo--sidebar {
  width: 172px;
  filter: brightness(0) saturate(100%) invert(20%) sepia(21%) saturate(1218%) hue-rotate(144deg) brightness(89%) contrast(92%);
}

.brand-logo--mobile {
  width: 178px;
  padding: 9px 13px;
  border-radius: 14px;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(15, 63, 75, 0.12);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px 12px 12px 4px;
  background: var(--mint);
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-mark svg {
  width: 27px;
  fill: currentColor;
}

.brand-mark svg circle {
  fill: var(--coral);
}

.brand--light .brand-mark {
  background: rgba(255, 255, 255, 0.12);
  color: #f7b16d;
}

.brand > span:last-child {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: #78918d;
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand--light strong {
  color: white;
}

.brand--light small {
  color: rgba(255, 255, 255, 0.54);
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 1.1fr) minmax(420px, 0.9fr);
}

.login-story {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 5vw, 72px);
  background: #0b3440;
  isolation: isolate;
}

.login-slideshow {
  position: absolute;
  z-index: 0;
  inset: 0;
}

.login-slide {
  position: absolute;
  opacity: 0;
  background-position: center;
  background-size: cover;
  inset: 0;
  animation: login-slide-original 14s ease-in-out infinite;
}

.login-slide--original {
  opacity: 1;
  background:
    radial-gradient(circle at 72% 24%, rgba(88, 174, 184, 0.18), transparent 28%),
    linear-gradient(145deg, #0b3440 0%, var(--forest) 50%, #155b68 100%);
}

.login-slide--brochure {
  background-image:
    linear-gradient(90deg, rgba(5, 37, 45, 0.8) 0%, rgba(5, 37, 45, 0.5) 52%, rgba(5, 37, 45, 0.28) 100%),
    url("/dashboard/images/brand/founding-breeder-hero.png");
  background-position: center;
  animation-name: login-slide-brochure;
}

.login-story::before {
  position: absolute;
  z-index: 1;
  top: 12%;
  left: 54%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(220, 239, 240, 0.13);
  box-shadow:
    0 0 0 46px rgba(220, 239, 240, 0.025),
    0 0 0 92px rgba(220, 239, 240, 0.018);
  border-radius: 50%;
  content: "";
}

.login-story::after {
  position: absolute;
  z-index: 1;
  right: -110px;
  bottom: -160px;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 0%, transparent 0 31px, rgba(255, 255, 255, 0.035) 32px 33px),
    #175664;
  content: "";
}

.login-story__copy {
  position: relative;
  z-index: 2;
  max-width: 590px;
  margin: auto 0;
}

.login-story > .brand {
  position: relative;
  z-index: 3;
}

.login-story h1 {
  max-width: 560px;
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.1vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.login-story__copy > p:last-child {
  max-width: 510px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1rem;
  line-height: 1.85;
}

.login-story__foot {
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-slide-dots {
  position: absolute;
  z-index: 3;
  right: clamp(30px, 5vw, 72px);
  bottom: clamp(30px, 5vw, 72px);
  display: flex;
  gap: 7px;
}

.login-slide-dots i {
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  animation: login-dot-original 14s ease-in-out infinite;
}

.login-slide-dots i:last-child {
  animation-name: login-dot-brochure;
}

.login-orbit {
  position: absolute;
  z-index: 2;
  right: -5%;
  bottom: 8%;
  width: 330px;
  height: 330px;
  opacity: 0.94;
  animation: login-orbit-cycle 14s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(220, 239, 240, 0.2);
  border-radius: 50%;
  inset: 0;
}

.orbit--two {
  inset: 48px;
  border-style: dashed;
}

.medaka-hero {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  transform: translate(-52%, -50%) rotate(-4deg);
  filter: drop-shadow(0 14px 16px rgba(4, 30, 36, 0.25));
  animation: medaka-swim 5.5s ease-in-out infinite;
}

.medaka-body {
  fill: #f38a4e;
}

.medaka-belly {
  fill: #ffc28c;
  opacity: 0.82;
}

.medaka-tail,
.medaka-fin {
  fill: #f2ad6f;
  opacity: 0.82;
}

.medaka-eye-ring {
  fill: #f8d2a4;
}

.medaka-eye {
  fill: #132e35;
}

.medaka-eye-glint {
  fill: white;
}

.medaka-gill,
.medaka-scales,
.medaka-lateral {
  fill: none;
  stroke: rgba(111, 54, 35, 0.38);
  stroke-linecap: round;
}

.medaka-gill {
  stroke-width: 3;
}

.medaka-scales {
  stroke-width: 2;
}

.medaka-lateral {
  stroke: rgba(255, 244, 219, 0.62);
  stroke-width: 2;
}

.water-bubble {
  position: absolute;
  border: 1px solid rgba(220, 239, 240, 0.4);
  border-radius: 50%;
  animation: bubble-rise 4.8s ease-in-out infinite;
}

.water-bubble--one {
  top: 56px;
  left: 58px;
  width: 12px;
  height: 12px;
}

.water-bubble--two {
  top: 34px;
  left: 87px;
  width: 7px;
  height: 7px;
  animation-delay: -1.8s;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px;
  background: var(--paper);
}

.login-card {
  width: min(100%, 410px);
}

.login-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.login-card > .muted {
  margin: 8px 0 34px;
  font-size: 0.9rem;
}

.login-card__mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid #ccd9d3;
  border-radius: 10px;
  outline: none;
  padding: 0 15px;
  background: white;
  color: var(--ink);
  transition: border-color 160ms, box-shadow 160ms;
}

.field input:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(30, 90, 84, 0.1);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.button--primary {
  background: var(--forest);
  color: white;
}

.button--primary:hover {
  background: #0c302e;
}

.button--wide {
  width: 100%;
  margin-top: 9px;
}

.form-error {
  min-height: 20px;
  margin: 4px 0;
  color: var(--danger);
  font-size: 0.78rem;
}

.login-help {
  margin: 25px 0 0;
  color: #7d918e;
  font-size: 0.75rem;
  text-align: center;
}

.login-guide-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  margin-top: 8px;
  color: #1a6670;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.login-guide-link span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: #1a6670;
  border-radius: 50%;
  font-size: 12px;
}

.login-guide-link:hover { color: #0b414b; text-decoration: underline; }
.login-survey-link { border: 1px solid #b9dccd; border-radius: 10px; padding: 9px 10px; background: #edf8f2; color: #12614e; text-decoration: none; }

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 242px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 242px;
  flex-direction: column;
  padding: 24px 17px 18px;
  border-right: 1px solid #d4dfdd;
  background:
    linear-gradient(180deg, rgba(220, 239, 240, 0.72), rgba(249, 247, 240, 0) 29%),
    #f9f7f0;
  box-shadow: 12px 0 30px rgba(15, 63, 75, 0.045);
}

.sidebar .brand {
  padding: 0 8px 23px;
}

.nav {
  overflow-y: auto;
  padding-right: 4px;
}

.nav-label {
  margin: 22px 10px 8px;
  color: #8da09d;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 13px;
  background: transparent;
  color: #52706c;
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 650;
  text-align: left;
}

.nav-item:hover {
  border-color: #dbe7e3;
  background: #edf4f1;
  color: var(--ink);
}

.nav-item.is-active {
  border-color: #0b5668;
  background: linear-gradient(135deg, #0d5260, var(--forest));
  color: white;
  box-shadow: 0 10px 20px rgba(16, 63, 75, 0.22);
}

.nav-item svg,
.icon-button svg,
.global-search svg,
.user-chip svg,
.user-popover svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 15px 8px 0;
}

.sidebar-footer div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}

.sidebar-footer strong {
  white-space: nowrap;
  font-size: 0.7rem;
}

.sidebar-footer small {
  color: #81938f;
  font-size: 0.64rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ea574;
  box-shadow: 0 0 0 5px rgba(62, 165, 116, 0.12);
}

.workspace {
  position: relative;
  min-width: 0;
  grid-column: 2;
  background:
    radial-gradient(circle at 91% 9%, rgba(127, 183, 199, 0.12), transparent 21rem),
    var(--cream);
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d8e1dc;
  padding: 14px clamp(22px, 3vw, 46px);
  background: rgba(243, 242, 233, 0.93);
  backdrop-filter: blur(12px);
}

.topbar-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.topbar-title .eyebrow {
  margin-bottom: 1px;
  font-size: 0.57rem;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-support { display: grid; gap: 9px; margin-top: auto; }
.sidebar-support .sidebar-footer { margin-top: 0; }
.sidebar-feedback-button { display: flex; width: 100%; align-items: center; gap: 9px; border: 1px solid #c9ddd5; border-radius: 12px; padding: 10px; color: #175e4b; background: linear-gradient(145deg, #f4faf6, #e5f2ea); text-align: left; cursor: pointer; }
.sidebar-feedback-button:hover { border-color: #82b69f; box-shadow: 0 7px 18px rgba(20, 83, 69, .1); }
.sidebar-feedback-button > svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar-feedback-button span { min-width: 0; }
.sidebar-feedback-button strong, .sidebar-feedback-button small { display: block; }
.sidebar-feedback-button strong { font-size: .68rem; }
.sidebar-feedback-button small { margin-top: 2px; color: #6f8980; font-size: .57rem; }

.farm-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  padding: 7px 10px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 59, 48, 0.05);
}

.farm-selector__label {
  color: #6b7d76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.farm-selector select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #183f34;
  font: inherit;
  font-weight: 700;
}

.membership-form {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) 150px minmax(260px, 1fr) auto;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid #e5ebe8;
  border-bottom: 1px solid #e5ebe8;
}

.onboarding-wizard__form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
  padding: 0 20px 20px;
}

.onboarding-wizard__form fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #dce7e2;
  border-radius: 16px;
  background: #fbfdfc;
}

.onboarding-wizard__form legend {
  padding: 0 8px;
  color: #173f35;
  font-weight: 750;
}

.onboarding-wizard__form legend span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #16624f;
}

.onboarding-wizard__form textarea {
  width: 100%;
  resize: vertical;
}

.onboarding-wizard__form > .dialog-actions,
.onboarding-wizard__form > [role="status"] {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .onboarding-wizard__form { grid-template-columns: 1fr; }
}

.membership-form input,
.membership-form select {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.founding-program-record { margin: 14px 0; }
.program-consent-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }

.global-search {
  display: flex;
  width: min(28vw, 300px);
  height: 40px;
  align-items: center;
  gap: 9px;
  border: 1px solid #d5ddd9;
  border-radius: 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #8ba09c;
}

.global-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d5ddd9;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.icon-button:hover {
  background: white;
}

.icon-button.is-spinning svg {
  animation: spin 700ms linear infinite;
}

.user-chip {
  display: flex;
  height: 43px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 1px solid #d5ddd9;
  padding: 0 0 0 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.user-chip > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #d7a452;
  color: white;
  font-family: Georgia, serif;
  font-size: 0.75rem;
}

.user-chip > span:nth-child(2) {
  display: grid;
  min-width: 90px;
}

.user-chip strong {
  overflow: hidden;
  max-width: 150px;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  color: #78908d;
  font-size: 0.59rem;
  letter-spacing: 0.05em;
}

.user-popover {
  position: absolute;
  top: 52px;
  right: 0;
  width: 235px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.user-popover p {
  overflow: hidden;
  margin: 5px 7px 12px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.user-popover button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 9px;
  background: #f7eee9;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.76rem;
}

.content {
  width: min(100%, 1600px);
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 42px) clamp(22px, 3vw, 46px) 55px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.date-pill,
.outline-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid #cfdbd5;
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #55716d;
  font-size: 0.7rem;
  font-weight: 700;
}

.outline-button {
  cursor: pointer;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.kpi-card::before {
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--coral);
  content: "";
  opacity: 0.78;
}

.kpi-card:nth-child(2)::before {
  background: var(--sky);
}

.kpi-card:nth-child(3)::before {
  background: var(--amber);
}

.kpi-card:nth-child(4)::before {
  background: var(--ink);
}

.kpi-card::after {
  position: absolute;
  right: -20px;
  bottom: -27px;
  width: 86px;
  height: 86px;
  border: 18px solid rgba(16, 63, 75, 0.045);
  border-radius: 50%;
  content: "";
}

.kpi-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #69817d;
  font-size: 0.72rem;
  font-weight: 700;
}

.kpi-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--mint);
  color: var(--forest);
}

.kpi-icon svg {
  width: 17px;
}

.kpi-card__value {
  margin: 17px 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem;
  line-height: 1;
}

.kpi-card__note {
  color: #81938f;
  font-size: 0.65rem;
}

.dashboard-grid {
  display: grid;
  margin-top: 15px;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 15px;
}

.panel {
  border: 1px solid #dce6e3;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 4px 6px -1px rgba(15, 63, 75, 0.05), 0 12px 28px rgba(15, 63, 75, 0.035);
}

.panel-header {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e4e9e5;
  padding: 14px 19px;
}

.panel-header h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 600;
}

.panel-header p {
  margin: 3px 0 0;
  color: #80928f;
  font-size: 0.64rem;
}

.text-button {
  border: 0;
  background: transparent;
  color: #397466;
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 800;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 21px 18px 25px;
}

.workflow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.workflow-step:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 17px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 1px;
  background: #cedbd5;
  content: "";
}

.workflow-step__dot {
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c7d8d0;
  border-radius: 50%;
  background: white;
  color: #66827d;
  font-size: 0.65rem;
  font-weight: 800;
}

.workflow-step.is-complete .workflow-step__dot {
  border-color: var(--forest-2);
  background: var(--forest-2);
  color: white;
}

.workflow-step.is-current .workflow-step__dot {
  border: 5px solid var(--mint);
  background: var(--coral);
  color: white;
  box-shadow: 0 0 0 1px var(--coral);
}

.workflow-step strong {
  font-size: 0.66rem;
}

.workflow-step small {
  color: #839592;
  font-size: 0.58rem;
}

.elite-fish-panel { min-width: 0; overflow: hidden; }
.elite-fish-slider { overflow: hidden; padding: 15px 0 17px; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.elite-fish-track { display: flex; width: max-content; animation: elite-fish-scroll var(--elite-duration, 30s) linear infinite; }
.elite-fish-slider:hover .elite-fish-track, .elite-fish-slider:focus-within .elite-fish-track { animation-play-state: paused; }
.elite-fish-set { display: flex; gap: 12px; padding-right: 12px; }
.elite-fish-card { display: grid; flex: 0 0 210px; width: 210px; overflow: hidden; padding: 0; color: inherit; text-align: left; border: 1px solid #dbe7e2; border-radius: 13px; background: #fff; box-shadow: 0 7px 18px rgb(29 68 60 / 8%); cursor: pointer; }
.elite-fish-card:hover { border-color: #82b79f; transform: translateY(-2px); }
.elite-fish-card__image { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 112px; overflow: hidden; background: #dce9e6; }
.elite-fish-card__image > span:not(.elite-fish-card__grade) { position: relative; min-width: 0; overflow: hidden; }
.elite-fish-card__image img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .25s ease; }
.elite-fish-card__image small { position: absolute; left: 5px; bottom: 5px; padding: 2px 5px; color: #fff; border-radius: 99px; background: rgb(6 36 32 / 68%); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.elite-fish-card:hover img { transform: scale(1.04); }
.elite-fish-card__grade { position: absolute; top: 9px; right: 9px; display: grid; width: 31px; height: 31px; place-items: center; color: #fff; border: 1px solid rgb(255 255 255 / 70%); border-radius: 50%; background: linear-gradient(145deg, #0d6855, #d7a746); font-size: 10px; font-weight: 900; box-shadow: 0 4px 10px rgb(13 80 68 / 25%); }
.elite-fish-card__body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.elite-fish-card__body strong { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.elite-fish-card__body small { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
@keyframes elite-fish-scroll { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .elite-fish-track { animation: none; }
  .elite-fish-slider { overflow-x: auto; mask-image: none; }
  .elite-fish-set[aria-hidden="true"] { display: none; }
}

.health-card {
  display: grid;
  min-height: 100%;
  align-content: start;
  padding: 21px;
}

.health-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.health-card__top h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.health-badge {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--mint);
  color: #277458;
  font-size: 0.59rem;
  font-weight: 800;
}

.health-ring {
  position: relative;
  display: grid;
  width: 134px;
  height: 134px;
  place-items: center;
  margin: 24px auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--forest-2) var(--health-progress, 0%), #e3e9e5 0);
}

.health-ring::before {
  position: absolute;
  border-radius: 50%;
  background: var(--paper);
  content: "";
  inset: 11px;
}

.health-ring__value {
  z-index: 1;
  display: grid;
  text-align: center;
}

.health-ring strong {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.health-ring small {
  color: #829490;
  font-size: 0.58rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.mini-stat {
  border-radius: 9px;
  padding: 10px 7px;
  background: #f0f2ed;
  text-align: center;
}

.mini-stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.mini-stat small {
  color: #81928f;
  font-size: 0.56rem;
}

.tables-grid {
  display: grid;
  margin-top: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.sgi-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.sgi-panel .panel-header {
  background:
    linear-gradient(90deg, rgba(220, 239, 240, 0.72), transparent 68%),
    var(--paper);
}

.sgi-score {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.38);
}

.data-table th {
  border-bottom: 1px solid #dfe9e5;
  padding: 10px 18px;
  color: #81928f;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  border-bottom: 1px solid #e7eeeb;
  padding: 12px 18px;
  font-size: 0.7rem;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f4faf7;
}

.record-code {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid #d6e5e2;
  border-radius: 6px;
  padding: 4px 7px;
  background: #edf6f4;
  color: var(--forest-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #e8eeea;
  color: #5b736f;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.badge--green {
  background: var(--mint);
  color: #267157;
}

.badge--coral {
  background: #f7e4de;
  color: #ad533d;
}

.badge--amber {
  background: #f7edd4;
  color: #9a6c1c;
}

.badge--blue {
  background: #e2eff2;
  color: #467986;
}

.record-view .panel {
  overflow: hidden;
}

.record-toolbar {
  display: flex;
  align-items: center;
  gap: 13px;
}

.operation-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(9, 45, 54, 0.28);
}

.operation-dialog::backdrop {
  background: rgba(8, 37, 44, 0.58);
  backdrop-filter: blur(4px);
}

.feedback-dialog textarea { min-height: 120px; resize: vertical; }
.feedback-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.feedback-summary article { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; box-shadow: 0 4px 14px rgba(9, 45, 54, .05); }
.feedback-summary article > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #176148; background: #e5f3eb; }
.feedback-summary svg { width: 17px; height: 17px; }
.feedback-summary strong, .feedback-summary small { display: block; }
.feedback-summary strong { color: var(--ink); font-size: 1.15rem; }
.feedback-summary small { margin-top: 2px; color: var(--ink-soft); font-size: .67rem; }
.feedback-list { display: grid; gap: 12px; padding: 16px; }
.feedback-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: #fff; box-shadow: 0 4px 12px rgba(9, 45, 54, .04); }
.feedback-card header, .feedback-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-card header > div { display: flex; align-items: center; gap: 7px; }
.feedback-card time { color: var(--ink-soft); font-size: .67rem; }
.feedback-card h3 { margin: 12px 0 6px; font-size: .94rem; }
.feedback-card > p { margin: 0; color: #4d6560; font-size: .76rem; line-height: 1.65; white-space: pre-wrap; }
.feedback-card footer { margin-top: 12px; border-top: 1px solid #edf2f0; padding-top: 10px; }
.feedback-card footer strong, .feedback-card footer small { display: block; }
.feedback-card footer small { margin-top: 2px; color: var(--ink-soft); font-size: .62rem; }
.feedback-card footer > span:last-child { display: flex; gap: 7px; }
.feedback-card footer a, .feedback-card footer button { border: 0; padding: 0; color: #176b54; background: none; font: inherit; font-size: .68rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.feedback-admin-note { margin-top: 12px; border-left: 3px solid #d8a85e; border-radius: 0 9px 9px 0; padding: 9px 11px; background: #fff8e9; }
.feedback-admin-note strong { color: #7a5418; font-size: .67rem; }
.feedback-admin-note p { margin: 3px 0 0; color: #735f3d; font-size: .7rem; }
.feedback-status-form { display: grid; grid-template-columns: 150px minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 8px; margin-top: 12px; border-top: 1px dashed #dce7e3; padding-top: 12px; }
.feedback-status-form input, .feedback-status-form select { min-width: 0; border: 1px solid #cadbd5; border-radius: 9px; padding: 8px; background: #fff; font: inherit; font-size: .7rem; }

@media (max-width: 900px) {
  .feedback-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedback-status-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .feedback-summary, .feedback-status-form { grid-template-columns: 1fr; }
  .feedback-card header, .feedback-card footer { align-items: flex-start; flex-direction: column; }
}

.line-detail-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: 22px;
  padding: 0;
  overflow: hidden auto;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(9, 45, 54, 0.3);
}

.line-detail-dialog::backdrop {
  background: rgba(8, 37, 44, 0.64);
  backdrop-filter: blur(5px);
}

.line-detail-dialog > article {
  padding: 25px;
}

.line-detail-dialog .dialog-header {
  margin-bottom: 18px;
}

.line-detail-dialog .dialog-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.image-zoom-button {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  padding: 0;
  background: rgba(5, 38, 44, 0.76);
  color: white;
  box-shadow: 0 6px 16px rgba(3, 24, 29, 0.22);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 160ms ease, background 160ms ease;
}

.image-zoom-button svg {
  width: 17px;
  height: 17px;
}

.image-zoom-button:hover {
  transform: scale(1.08);
  background: rgba(195, 105, 72, 0.92);
}

.image-zoom-button:focus-visible {
  outline: 3px solid rgba(255, 184, 143, 0.7);
  outline-offset: 2px;
}

.fish-view .image-zoom-button {
  top: 7px;
  right: 7px;
  width: 29px;
  height: 29px;
}

.fish-view .image-zoom-button svg {
  width: 14px;
  height: 14px;
}

.image-lightbox {
  width: min(1180px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  background: #071f25;
  box-shadow: 0 34px 100px rgba(0, 15, 20, 0.58);
}

.image-lightbox::backdrop {
  background: rgba(2, 17, 22, 0.86);
  backdrop-filter: blur(9px);
}

.image-lightbox > article {
  position: relative;
  min-height: min(78vh, 760px);
}

.image-lightbox figure {
  position: relative;
  display: grid;
  min-height: min(78vh, 760px);
  margin: 0;
  place-items: center;
}

.image-lightbox img {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  object-fit: contain;
}

.image-lightbox figcaption {
  position: absolute;
  right: 70px;
  bottom: 18px;
  left: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.image-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: rgba(5, 38, 44, 0.78);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  backdrop-filter: blur(7px);
}

.image-lightbox__close:hover {
  background: var(--coral);
}

.line-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 22px;
}

.line-detail-photo {
  position: relative;
  min-height: 350px;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0b333a;
}

.line-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.line-detail-photo::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 28, 32, 0.72));
  content: "";
  inset: 0;
  pointer-events: none;
}

.line-detail-photo figcaption {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 15px;
  left: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.66rem;
}

.line-detail-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  background:
    radial-gradient(circle at top right, rgba(94, 174, 171, 0.16), transparent 42%),
    white;
}

.line-detail-summary h3 {
  margin: 14px 0 9px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 500;
  line-height: 1.05;
}

.line-detail-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.line-detail-stats {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.line-detail-stats span {
  display: grid;
  min-width: 0;
  border-radius: 10px;
  padding: 12px 8px;
  background: var(--mist);
  text-align: center;
}

.line-detail-stats strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.line-detail-stats small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.55rem;
}

.line-traits {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.line-traits ul {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.line-traits li {
  position: relative;
  border-radius: 10px;
  padding: 13px 13px 13px 34px;
  background: #f2f7f5;
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.55;
}

.line-traits li::before {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px rgba(195, 105, 72, 0.25);
  content: "";
}

.line-detail-meta {
  display: flex;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.58rem;
}

.line-detail-meta code {
  overflow: hidden;
  color: var(--forest-2);
  text-overflow: ellipsis;
}

.line-detail-meta span:last-child {
  margin-left: auto;
}

.family-detail-dialog {
  width: min(1040px, calc(100vw - 32px));
}

.family-detail-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.family-detail-photo {
  position: relative;
  min-height: 310px;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0b333a;
}

.family-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
}

.family-detail-photo::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 50%, rgba(4, 28, 32, 0.78));
  content: "";
  inset: 0;
  pointer-events: none;
}

.family-detail-photo figcaption {
  position: absolute;
  z-index: 1;
  right: 17px;
  bottom: 14px;
  left: 17px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.64rem;
}

.family-detail-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  background:
    radial-gradient(circle at top right, rgba(215, 160, 57, 0.16), transparent 38%),
    white;
}

.family-detail-path {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
}

.family-detail-path span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--mist);
  color: var(--forest-2);
}

.family-detail-path b {
  color: var(--coral);
}

.family-detail-summary h3 {
  margin: 13px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.08;
}

.family-detail-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.family-detail-stats {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.family-detail-stats span {
  display: grid;
  border-radius: 10px;
  padding: 12px 7px;
  background: var(--mist);
  text-align: center;
}

.family-detail-stats strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 500;
}

.family-detail-stats small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.54rem;
}

.family-parentage,
.family-history,
.family-fish-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.fish-top-view-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fish-top-view-grid--line {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fish-view-pair {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.fish-top-view-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fbfdfc;
  box-shadow: 0 10px 24px rgba(12, 58, 63, 0.06);
}

.fish-top-view-card figure {
  position: relative;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: #102f3b;
}

.fish-top-view-card figure::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 55%, rgba(3, 24, 31, 0.78));
  content: "";
  inset: 0;
  pointer-events: none;
}

.fish-top-view-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.fish-top-view-card:hover img {
  transform: scale(1.025);
}

.fish-top-view-card figcaption {
  position: absolute;
  z-index: 1;
  right: 11px;
  bottom: 9px;
  left: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.52rem;
}

.fish-top-view-card figcaption span {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 7px;
  color: white;
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.fish-top-view-card .fish-view-pair figcaption {
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}

.fish-top-view-card__body {
  padding: 13px;
}

.fish-top-view-card__body > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fish-top-view-card__metrics {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fish-top-view-card__metrics > span {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.fish-top-view-card__metrics small {
  color: var(--muted);
  font-size: 0.48rem;
}

.fish-top-view-card__metrics strong {
  overflow: hidden;
  color: var(--forest-2);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fish-detail-link {
  width: 100%;
  margin-top: 12px;
  border: 1px solid #c8dcd6;
  border-radius: 9px;
  padding: 8px 10px;
  background: white;
  color: var(--forest-2);
  cursor: pointer;
  font: inherit;
  font-size: 0.55rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease;
}

.fish-detail-link:hover {
  border-color: var(--forest);
  background: var(--mist);
}

.passport-management { margin-top: 18px; }
.passport-qr-preview { width: 160px; margin: 14px 0; border: 1px solid #d7e7e2; border-radius: 14px; padding: 8px; background: white; }
.passport-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.passport-actions .fish-detail-link { width: auto; min-width: 180px; }
.passport-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.passport-danger { border-color: #e4b8b8; color: #9b3030; }
.certificate-version-list { display: grid; gap: 8px; margin-top: 16px; }
.certificate-version-list > div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #d7e7e2; border-radius: 10px; }
.certificate-version-list span { display: grid; }
.certificate-version-list small { color: var(--muted); }
.certificate-version-list code { font-size: .55rem; }
.certificate-version-list button { border: 1px solid #e4b8b8; border-radius: 8px; padding: 6px 8px; background: white; color: #9b3030; cursor: pointer; }
.passport-expansion-management { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.passport-expansion-management > div { min-width: 0; }
.passport-expansion-management h4 { margin: 0 0 10px; }
.passport-expansion-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #d7e7e2; }
.passport-expansion-record:has(img) { grid-template-columns: 58px minmax(0, 1fr) auto; }
.passport-expansion-record img { width: 58px; height: 44px; object-fit: cover; border-radius: 8px; }
.passport-expansion-record div { display: grid; gap: 2px; min-width: 0; }
.passport-expansion-record small { color: var(--muted); overflow-wrap: anywhere; }
.passport-expansion-record .private-health { color: #8a5c33; }
.passport-expansion-record button { border: 1px solid #9ccabb; border-radius: 8px; padding: 6px 8px; background: white; cursor: pointer; }
.passport-expansion-management form { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #b8d5cc; }
.passport-expansion-management form input, .passport-expansion-management form select, .passport-expansion-management form textarea { width: 100%; border: 1px solid #c8d9d4; border-radius: 8px; padding: 9px; font: inherit; }
.passport-expansion-management form button { border: 0; border-radius: 9px; padding: 10px; background: var(--primary); color: white; cursor: pointer; }
@media (max-width: 980px) { .passport-expansion-management { grid-template-columns: 1fr; } }

@media (max-width: 1120px) {
  .fish-detail-dialog {
    width: min(980px, calc(100vw - 24px));
    height: min(860px, calc(100dvh - 24px));
  }

  .fish-profile-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fish-profile-column--activity {
    grid-column: 1 / -1;
    min-height: 210px;
  }
}

.record-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(18, 85, 77, 0.28);
  text-underline-offset: 3px;
}

.record-link:hover {
  color: var(--coral);
  text-decoration-color: currentColor;
}

.line-table-identity {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.line-table-identity img {
  width: 42px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid #d3e2de;
  border-radius: 8px;
  object-fit: cover;
  background: #e8f1ee;
  box-shadow: 0 3px 7px rgba(15, 63, 75, 0.08);
}

.line-table-identity:hover .record-code {
  border-color: #8dbcb3;
  background: #e0f0eb;
  color: #0e5967;
}

.fish-detail-dialog {
  width: min(1440px, calc(100vw - 28px));
  height: min(820px, calc(100dvh - 28px));
  max-height: none;
  overflow: hidden;
}

.fish-detail-dialog > article {
  display: grid;
  height: 100%;
  padding: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.fish-detail-dialog .dialog-header {
  min-height: 78px;
  margin: 0;
  border-bottom: 1px solid #dce8e4;
  padding: 13px 18px 13px 22px;
  background: linear-gradient(90deg, #fbfdfa, #f0f7f4);
}

.fish-detail-dialog .dialog-header h2 {
  font-size: 1.35rem;
}

.fish-detail-header-meta {
  display: flex;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.fish-detail-dialog .line-detail-content {
  min-height: 0;
  overflow: hidden;
}

.fish-profile-dashboard {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: 13px;
  grid-template-columns: minmax(295px, 1.05fr) minmax(305px, 1.05fr) minmax(300px, 0.9fr);
  gap: 12px;
  background: #edf3f0;
}

.fish-profile-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #d7e4df;
  border-radius: 14px;
  padding: 12px;
  overflow: hidden;
  background: #fffef9;
  box-shadow: 0 4px 11px rgba(15, 63, 75, 0.045);
}

.fish-profile-column__heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fish-profile-column__heading h3 {
  overflow: hidden;
  margin: 7px 0 2px;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fish-profile-column__heading p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fish-profile-visuals {
  overflow: hidden;
  border-radius: 10px;
  background: #102f3b;
}

.fish-profile-visuals .fish-view-pair {
  height: 145px;
}

.fish-profile-visuals .fish-view {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #102f3b;
}

.fish-profile-visuals .fish-view::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 55%, rgba(3, 24, 31, 0.78));
  content: "";
  inset: 0;
  pointer-events: none;
}

.fish-profile-visuals .fish-view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fish-profile-visuals .fish-view figcaption {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 7px;
  left: 8px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.43rem;
}

.fish-profile-visuals .fish-view figcaption span {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 3px 5px;
  color: white;
  font-size: 0.41rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fish-detail-facts--compact {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fish-detail-facts--compact > div {
  padding: 8px 9px;
}

.fish-detail-facts--compact dt {
  margin-bottom: 3px;
}

.fish-profile-note,
.fish-profile-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.57rem;
  line-height: 1.45;
}

.fish-profile-note {
  border-left: 2px solid var(--mint-strong);
  padding-left: 8px;
}

.fish-profile-card {
  min-width: 0;
  border: 1px solid #dce8e4;
  border-radius: 10px;
  padding: 10px;
  background: #fbfdfc;
}

.fish-profile-card__heading,
.fish-activity-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fish-profile-card__heading > span,
.fish-activity-panel__header strong {
  color: var(--forest);
  font-size: 0.61rem;
  font-weight: 800;
}

.fish-profile-card__heading small {
  color: var(--muted);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.fish-pedigree-banner {
  display: grid;
  margin-top: 8px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
}

.fish-pedigree-banner__cross {
  align-self: center;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.fish-pedigree-parent {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  padding: 6px;
  background: white;
}

.fish-pedigree-parent img {
  width: 32px;
  height: 32px;
  grid-row: span 3;
  border-radius: 8px;
  object-fit: cover;
}

.fish-pedigree-parent > span,
.fish-pedigree-parent > strong,
.fish-pedigree-parent > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fish-pedigree-parent > span { color: var(--muted); font-size: 0.43rem; }
.fish-pedigree-parent > strong { color: var(--forest-2); font-size: 0.53rem; }
.fish-pedigree-parent > small { font-size: 0.45rem; }
.fish-pedigree-parent > small .badge { min-height: 16px; padding: 0 5px; font-size: 0.4rem; }
.fish-pedigree-parent button { grid-row: 1 / span 3; grid-column: 3; border: 0; padding: 3px; background: transparent; color: var(--forest-2); cursor: pointer; font-size: 0.43rem; font-weight: 800; }
.fish-pedigree-parent.is-missing { display: grid; grid-template-columns: 1fr; min-height: 63px; }

.fish-ownership-compact__grid {
  display: grid;
  margin-top: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #dce8e4;
}

.fish-ownership-compact__grid > * {
  min-width: 0;
  border: 0;
  padding: 7px;
  background: white;
  text-align: left;
}

.fish-ownership-compact__grid button { cursor: pointer; }
.fish-ownership-compact__grid small { display: block; overflow: hidden; color: var(--muted); font-size: 0.42rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-ownership-compact__grid strong { display: block; overflow: hidden; margin-top: 2px; color: var(--forest-2); font-size: 0.52rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-ownership-compact__history { margin: 7px 0 0; color: #7b6b4d; font-size: 0.48rem; }

.fish-grading-compact__score {
  display: grid;
  margin-top: 7px;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 7px;
}

.fish-grading-compact__score > strong { color: var(--coral); font-family: Georgia, serif; font-size: 1.55rem; }
.fish-grading-compact__score > small { overflow: hidden; color: var(--muted); font-size: 0.47rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-grading-components--compact { margin-top: 8px; gap: 4px; }
.fish-grading-components--compact > span { padding: 5px; }
.fish-grading-components--compact strong { font-size: 0.5rem; }

.fish-passport-compact { display: grid; gap: 4px; }
.fish-passport-compact > strong { overflow: hidden; color: var(--forest-2); font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-passport-compact > small { color: var(--muted); font-size: 0.48rem; }

.fish-profile-column--activity { padding: 0; background: #f8fbf9; }
.fish-profile-activity { position: relative; display: grid; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); }
.fish-profile-activity__top { padding: 13px 13px 8px; }
.fish-profile-activity__top h3 { margin: 0; color: var(--forest); font-family: Georgia, serif; font-size: 0.95rem; }
.fish-profile-activity__top p { margin: 2px 0 0; color: var(--muted); font-size: 0.5rem; }
.fish-activity-tabs { display: grid; margin: 0 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; border-bottom: 1px solid #dce8e4; }
.fish-activity-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 8px 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.49rem; font-weight: 800; }
.fish-activity-tabs button.is-active { border-color: var(--forest-2); color: var(--forest); }
.fish-activity-panel { min-height: 0; padding: 10px 13px; overflow: hidden; }
.fish-activity-add { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b8d8cf; border-radius: 7px; padding: 5px 7px; background: white; color: var(--forest-2); cursor: pointer; font-size: 0.47rem; font-weight: 800; text-decoration: none; }
.fish-activity-add:hover { border-color: var(--forest-2); background: #edf8f4; }
.fish-activity-panel .passport-expansion-record { padding: 7px 0; }
.fish-activity-panel .passport-expansion-record:has(img) { grid-template-columns: 42px minmax(0, 1fr) auto; }
.fish-activity-panel .passport-expansion-record img { width: 42px; height: 32px; }
.fish-activity-panel .passport-expansion-record strong { font-size: 0.52rem; }
.fish-activity-panel .passport-expansion-record small { font-size: 0.46rem; }
.fish-activity-panel .passport-expansion-record .badge { min-height: 17px; padding: 0 5px; font-size: 0.4rem; }
.fish-activity-panel .passport-expansion-record button { padding: 4px 5px; font-size: 0.42rem; }
.fish-activity-flyout { position: absolute; z-index: 4; right: 9px; bottom: 9px; left: 9px; border: 1px solid #b8d7ce; border-radius: 10px; padding: 10px; background: white; box-shadow: 0 14px 30px rgba(15, 63, 75, 0.18); }
.fish-activity-flyout__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--forest); font-size: 0.62rem; }
.fish-activity-flyout__header button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.fish-activity-flyout form { display: grid; gap: 6px; }
.fish-activity-flyout input, .fish-activity-flyout select, .fish-activity-flyout textarea { width: 100%; border: 1px solid #cadbd5; border-radius: 7px; padding: 7px; font: inherit; font-size: 0.55rem; }
.fish-activity-flyout textarea { min-height: 55px; resize: vertical; }
.fish-activity-flyout form button { border: 0; border-radius: 7px; padding: 8px; background: var(--forest); color: white; cursor: pointer; font-size: 0.55rem; font-weight: 800; }
.passport-tab-content { display: grid; gap: 9px; }
.passport-tab-content > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--forest-2); font-size: 0.55rem; }
.passport-tab-content__actions { display: flex; flex-wrap: wrap; gap: 5px; }
.passport-tab-content > small { color: var(--muted); font-size: 0.48rem; }
}

.fish-detail-hero {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  background: white;
}

.fish-detail-visuals {
  min-width: 0;
  background: #12383f;
}

.fish-detail-visuals .fish-view-pair {
  height: 100%;
}

.fish-detail-visuals figure {
  position: relative;
  min-height: 310px;
  margin: 0;
  overflow: hidden;
  background: #102f3b;
}

.fish-detail-visuals img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
}

.fish-detail-visuals figcaption {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(7, 41, 45, 0.76);
  color: white;
  font-size: 0.53rem;
}

.fish-detail-visuals figcaption span {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fish-detail-summary {
  display: flex;
  min-width: 0;
  padding: 26px;
  flex-direction: column;
  justify-content: center;
}

.fish-detail-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.fish-detail-summary h3 {
  margin: 18px 0 7px;
  color: var(--forest-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.fish-detail-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.fish-detail-kpis {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fish-detail-kpis > span {
  display: grid;
  min-height: 66px;
  align-content: center;
  border-radius: 11px;
  padding: 9px;
  gap: 5px;
  background: var(--mist);
  text-align: center;
}

.fish-detail-kpis small,
.fish-grading-components small {
  color: var(--muted);
  font-size: 0.5rem;
}

.fish-detail-kpis strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
}

.fish-detail-kpis .badge {
  justify-self: center;
}

.fish-detail-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.fish-detail-panel,
.fish-detail-pedigree {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.fish-detail-pedigree {
  margin-top: 18px;
}

.fish-detail-facts {
  display: grid;
  margin: 16px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.fish-detail-facts > div {
  min-width: 0;
  padding: 11px 12px;
  background: #fbfdfc;
}

.fish-detail-facts dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.5rem;
}

.fish-detail-facts dd {
  margin: 0;
  overflow: hidden;
  color: var(--forest-2);
  font-size: 0.62rem;
  font-weight: 700;
  text-overflow: ellipsis;
}

.fish-detail-facts code {
  font-size: 0.5rem;
}

.fish-detail-notes {
  margin-top: 14px;
  border-radius: 11px;
  padding: 12px 14px;
  background: #f7faf9;
}

.fish-detail-notes strong {
  color: var(--forest-2);
  font-size: 0.57rem;
}

.fish-detail-notes p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.6;
}

.fish-grading-score {
  display: grid;
  align-items: center;
  margin-top: 18px;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
}

.fish-grading-score > strong {
  grid-row: span 2;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
}

.fish-grading-score > span {
  justify-self: start;
}

.fish-grading-score > small {
  color: var(--muted);
  font-size: 0.53rem;
}

.fish-grading-components {
  display: grid;
  margin-top: 17px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.fish-grading-components > span {
  display: grid;
  border-radius: 9px;
  padding: 9px;
  gap: 4px;
  background: var(--mist);
}

.fish-grading-components strong {
  color: var(--forest-2);
  font-size: 0.61rem;
}

.pairing-detail-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.pairing-detail-summary {
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 24px;
  background:
    radial-gradient(circle at top right, rgba(240, 122, 90, 0.12), transparent 36%),
    white;
}

.pairing-detail-summary h3 {
  margin: 14px 0 7px;
  color: var(--forest-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.pairing-detail-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.6;
}

.pairing-detail-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pairing-detail-kpis > span {
  display: grid;
  min-height: 68px;
  align-content: center;
  border-radius: 11px;
  padding: 9px;
  gap: 5px;
  background: var(--mist);
  text-align: center;
}

.pairing-detail-kpis small {
  color: var(--muted);
  font-size: 0.49rem;
}

.pairing-detail-kpis strong {
  color: var(--forest);
  font-size: 0.68rem;
}

.pairing-fish-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.pairing-fish-grid {
  margin-top: 16px;
}

.egg-batch-detail-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.egg-batch-hero {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  background: white;
}

.egg-batch-photo {
  position: relative;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  background: #082e36;
}

.egg-batch-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.egg-batch-photo::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 58%, rgba(2, 28, 34, 0.82));
  content: "";
  inset: 0;
  pointer-events: none;
}

.egg-batch-photo figcaption {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.55rem;
}

.egg-batch-photo figcaption span {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 5px 8px;
  color: white;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.egg-batch-summary {
  display: flex;
  padding: 28px;
  flex-direction: column;
  justify-content: center;
}

.egg-batch-summary h3 {
  margin: 18px 0 7px;
  color: var(--forest-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.egg-batch-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.6;
}

.egg-batch-counts {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.egg-batch-counts > span {
  display: grid;
  min-height: 68px;
  align-content: center;
  border-radius: 11px;
  padding: 9px;
  gap: 5px;
  background: var(--mist);
  text-align: center;
}

.egg-batch-counts small,
.egg-batch-metrics small {
  color: var(--muted);
  font-size: 0.5rem;
}

.egg-batch-counts strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.egg-batch-metrics {
  display: grid;
  margin-top: 15px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.egg-batch-metrics article {
  display: grid;
  min-height: 105px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  gap: 6px;
  background: white;
  text-align: center;
}

.egg-batch-metrics strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.egg-batch-metrics span {
  color: var(--muted);
  font-size: 0.46rem;
}

.egg-batch-notes {
  margin-top: 18px;
}

.egg-batch-notes > p {
  margin: 15px 0 0;
  border-radius: 11px;
  padding: 13px 15px;
  background: var(--mist);
  color: var(--muted);
  font-size: 0.59rem;
  line-height: 1.7;
}

.fry-group-detail-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.fry-group-hero {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  background: white;
}

.fry-group-photo {
  position: relative;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  background: #082e36;
}

.fry-group-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.fry-group-photo::after {
  position: absolute;
  background: linear-gradient(180deg, transparent 58%, rgba(2, 28, 34, 0.82));
  content: "";
  inset: 0;
  pointer-events: none;
}

.fry-group-photo figcaption {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.55rem;
}

.fry-group-photo figcaption span {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 5px 8px;
  color: white;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fry-group-summary {
  display: flex;
  padding: 28px;
  flex-direction: column;
  justify-content: center;
}

.fry-group-summary h3 {
  margin: 18px 0 7px;
  color: var(--forest-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.fry-group-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.6;
}

.fry-group-kpis {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fry-group-kpis > span {
  display: grid;
  min-height: 68px;
  align-content: center;
  border-radius: 11px;
  padding: 9px;
  gap: 5px;
  background: var(--mist);
  text-align: center;
}

.fry-group-kpis small {
  color: var(--muted);
  font-size: 0.5rem;
}

.fry-group-kpis strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.fry-survival-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.fry-survival-track {
  display: grid;
  margin-top: 17px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.fry-survival-track article {
  position: relative;
  display: grid;
  min-height: 102px;
  align-content: center;
  border: 1px solid #d8e6e2;
  border-radius: 12px;
  padding: 12px;
  gap: 5px;
  background: var(--mist);
  text-align: center;
}

.fry-survival-track article:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -10px;
  width: 11px;
  height: 2px;
  background: var(--coral);
  content: "";
}

.fry-survival-track article.is-pending {
  border-style: dashed;
  background: #fbfcfc;
}

.fry-survival-track span {
  color: var(--coral);
  font-size: 0.52rem;
  font-weight: 800;
}

.fry-survival-track strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.fry-survival-track small {
  color: var(--muted);
  font-size: 0.45rem;
}

.fry-grade-grid {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fry-grade-grid article {
  display: grid;
  min-height: 98px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  gap: 5px;
  background: white;
  text-align: center;
}

.fry-grade-grid article > span {
  justify-self: center;
}

.fry-grade-grid strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.fry-grade-grid small {
  color: var(--muted);
  font-size: 0.49rem;
}

.fry-origin-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.family-parent-pairs {
  display: grid;
  margin-top: 16px;
  gap: 15px;
}

.family-parent-pair {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdfc;
}

.family-parent-pair__heading {
  display: flex;
  align-items: center;
  margin-bottom: 13px;
  justify-content: space-between;
  color: var(--forest-2);
  font-size: 0.61rem;
  font-weight: 800;
}

.family-parent-pair__heading small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 500;
}

.family-parent-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  gap: 10px;
}

.family-parent-cross {
  display: grid;
  align-self: center;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: #fff0e9;
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.family-parent-card {
  display: grid;
  min-width: 0;
  border: 1px solid #dce7e4;
  border-radius: 12px;
  overflow: hidden;
  grid-template-columns: minmax(230px, 1.2fr) minmax(170px, 0.8fr);
  background: white;
}

.family-parent-card figure {
  position: relative;
  min-height: 175px;
  margin: 0;
  overflow: hidden;
  background: #153f43;
}

.family-parent-card figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 175px;
  object-fit: cover;
}

.family-parent-card figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  border-radius: 999px;
  padding: 4px 6px;
  background: rgba(7, 41, 45, 0.72);
  color: white;
  font-size: 0.48rem;
  text-align: center;
}

.family-parent-card figcaption span {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.43rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.family-parent-card > div {
  min-width: 0;
  padding: 15px;
}

.family-parent-card > .fish-view-pair {
  padding: 0;
}

/* Pedigree profiles present each parent as a vertical visual sequence. */
.profile-dialog--pairing .family-parent-card > .fish-view-pair,
.profile-dialog--family .family-parentage .family-parent-card > .fish-view-pair {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.profile-dialog--pairing .family-parent-card > .fish-view-pair figure,
.profile-dialog--pairing .family-parent-card > .fish-view-pair figure img,
.profile-dialog--family .family-parentage .family-parent-card > .fish-view-pair figure,
.profile-dialog--family .family-parentage .family-parent-card > .fish-view-pair figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.profile-dialog--pairing .family-parent-card > .fish-view-pair figure,
.profile-dialog--family .family-parentage .family-parent-card > .fish-view-pair figure {
  display: grid;
  place-items: center;
}

.profile-dialog--pairing .family-parent-card > .fish-view-pair figure img,
.profile-dialog--family .family-parentage .family-parent-card > .fish-view-pair figure img {
  object-fit: contain;
  object-position: 50% 50%;
}

.family-parent-role {
  color: var(--coral);
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.family-parent-card h4 {
  margin: 8px 0 4px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  text-overflow: ellipsis;
}

.family-parent-card > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.55rem;
}

.family-parent-metrics {
  display: grid;
  margin-top: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.family-parent-metrics > span {
  display: grid;
  align-content: center;
  min-height: 50px;
  border-radius: 8px;
  padding: 6px;
  gap: 4px;
  background: var(--mist);
  text-align: center;
}

.family-parent-metrics small {
  color: var(--muted);
  font-size: 0.48rem;
}

.family-parent-metrics strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
}

.family-parent-metrics .badge {
  justify-self: center;
  padding: 3px 5px;
  font-size: 0.46rem;
}

.family-parent-card.is-missing {
  display: grid;
  min-height: 175px;
  place-content: center;
  padding: 15px;
  color: var(--muted);
  text-align: center;
}

.family-pairing-evidence {
  display: grid;
  margin-top: 12px;
  border-radius: 10px;
  padding: 12px;
  gap: 7px;
  background: #eef5f3;
}

.family-pairing-evidence > strong {
  color: var(--ink);
  font-size: 0.58rem;
}

.family-pairing-evidence > div {
  display: grid;
  align-items: center;
  grid-template-columns: auto auto auto 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 0.55rem;
}

.family-pairing-evidence > div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-pairing-evidence > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.57rem;
}

.family-generation-list {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.family-generation-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: #fbfdfc;
}

.family-generation-card figure {
  position: relative;
  height: 145px;
  margin: 0;
  overflow: hidden;
  background: #153f43;
}

.family-generation-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-generation-card figcaption {
  position: absolute;
  right: 9px;
  bottom: 8px;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(7, 41, 45, 0.74);
  color: white;
  font-size: 0.52rem;
}

.family-generation-card > div {
  padding: 14px;
}

.family-generation-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff0e9;
  color: var(--coral);
  font-size: 0.56rem;
  font-weight: 800;
}

.family-generation-card h4 {
  margin: 10px 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
}

.family-generation-card code {
  color: var(--forest-2);
  font-size: 0.56rem;
}

.family-generation-card p {
  min-height: 36px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.5;
}

.family-generation-card small {
  color: #81938f;
  font-size: 0.54rem;
}

.family-history-empty {
  display: flex;
  align-items: center;
  margin-top: 16px;
  border-radius: 12px;
  padding: 18px;
  gap: 14px;
  background: var(--mist);
}

.family-history-empty > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--forest);
}

.family-history-empty svg {
  width: 20px;
}

.family-history-empty strong {
  color: var(--ink);
  font-size: 0.68rem;
}

.family-history-empty p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.6rem;
}

.line-related-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.line-related-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  background: white;
}

.line-family-list {
  display: grid;
  margin-top: 15px;
  gap: 8px;
}

.line-family-list > span {
  display: grid;
  border-radius: 9px;
  padding: 11px 12px;
  gap: 3px;
  background: var(--mist);
}

.line-family-list strong {
  color: var(--forest-2);
  font-size: 0.68rem;
}

.line-family-list small {
  color: var(--muted);
  font-size: 0.58rem;
}

.line-fish-table {
  margin-top: 10px;
}

.line-admin-tools {
  margin-top: 18px;
  border: 1px solid rgba(188, 139, 26, 0.25);
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf7;
}

.line-admin-tools summary {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  justify-content: space-between;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  list-style: none;
}

.line-admin-tools summary::-webkit-details-marker {
  display: none;
}

.line-admin-tools summary span {
  color: #9a6c1c;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.line-admin-grid {
  display: grid;
  border-top: 1px solid rgba(188, 139, 26, 0.18);
  padding: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.line-admin-grid form {
  display: grid;
  align-content: start;
  border-radius: 12px;
  padding: 17px;
  gap: 12px;
  background: white;
  box-shadow: 0 5px 18px rgba(16, 52, 54, 0.06);
}

.line-admin-grid h3 {
  margin: 0 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.line-admin-grid label {
  display: grid;
  gap: 6px;
}

.line-admin-grid label > span {
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
}

.line-admin-grid input,
.line-admin-grid textarea {
  width: 100%;
  border: 1px solid #cfdbd8;
  border-radius: 9px;
  outline: 0;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.68rem;
}

.line-admin-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.line-admin-inline {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 10px;
}

.line-admin-grid .line-check {
  display: flex;
  align-items: center;
  flex-direction: row;
}

.line-check input {
  width: auto;
}

.line-admin-grid input:focus,
.line-admin-grid textarea:focus,
.line-admin-tools summary:focus-visible,
.line-detail-dialog button:focus-visible {
  border-color: var(--forest-2);
  outline: 3px solid rgba(23, 104, 120, 0.2);
  outline-offset: 2px;
}

.operation-dialog form {
  padding: 25px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.dialog-header .eyebrow {
  margin-bottom: 2px;
}

.dialog-fields {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.dialog-field {
  display: grid;
  gap: 6px;
}

.dialog-field--wide {
  grid-column: 1 / -1;
}

.dialog-field span {
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.dialog-field input,
.dialog-field select,
.dialog-field textarea {
  width: 100%;
  border: 1px solid #cfdbd8;
  border-radius: 9px;
  outline: 0;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
}

.dialog-field textarea {
  min-height: 82px;
  resize: vertical;
}

.dialog-field input:focus,
.dialog-field select:focus,
.dialog-field textarea:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(23, 104, 120, 0.1);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.row-action {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: white;
  color: var(--forest-2);
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 800;
}

.row-action:hover {
  border-color: var(--forest-2);
  background: #eff8f5;
}

.row-action--view {
  border-color: #bcd8d2;
  background: #f2f9f7;
}

.row-action__icon {
  display: inline-flex;
}

.row-action__icon svg {
  width: 13px;
  height: 13px;
}

.row-action--danger {
  color: var(--danger);
}

.operation-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 25px;
  padding: 28px;
}

@media (max-width: 620px) {
  .dialog-fields {
    grid-template-columns: 1fr;
  }

  .dialog-field--wide {
    grid-column: auto;
  }
}

/* User Directory vertical slice. */
.user-directory-panel { overflow: hidden; }
.user-directory-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 14px 18px 0;
}
.user-directory-filters label { display: grid; min-width: 150px; gap: 4px; }
.user-directory-filters label span { color: #6c817c; font-size: .65rem; font-weight: 800; }
.user-directory-filters select { min-height: 38px; border: 1px solid #ceded9; border-radius: 10px; padding: 6px 9px; background: #fff; color: #244b44; }
.user-directory-summary {
  display: grid;
  padding: 15px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid #dce8e4;
  background: linear-gradient(135deg, #f8fcfa, #eef7f3);
}
.user-directory-summary span { display: grid; gap: 2px; }
.user-directory-summary strong { color: #174f46; font: 700 1.35rem Georgia, serif; }
.user-directory-summary small { color: #71847f; font-size: .7rem; }
.user-directory-table td > small,
.user-membership-card small { display: block; margin-top: 4px; color: #728681; }
.user-directory-table .text-button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.user-directory-table .text-button svg { width: 15px; height: 15px; }
.user-farm-chip {
  display: block;
  width: fit-content;
  margin: 3px 0;
  border: 1px solid #cfe1dc;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f0f8f5;
  color: #285e55;
  font-size: .66rem;
  white-space: nowrap;
}
.membership-user-picker { display: grid; gap: 4px; }
.membership-user-picker span { color: #687d78; font-size: .66rem; font-weight: 700; }
.user-profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 3px auto 18px;
  place-items: center;
  border: 1px solid #56757b;
  border-radius: 24px;
  background: linear-gradient(145deg, #1a5b61, #c39a54);
  color: #fff9e9;
  font: 700 1.35rem Georgia, serif;
  box-shadow: 0 14px 26px rgba(0, 0, 0, .24);
}
.user-profile-kv { display: grid; gap: 8px; margin: 0; }
.user-profile-kv > div,
.user-membership-card {
  border: 1px solid #315660;
  border-radius: 11px;
  padding: 10px;
  background: #0c2a33;
}
.user-profile-kv dt { color: #9fb7b9; font-size: .54rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.user-profile-kv dd { overflow-wrap: anywhere; margin: 4px 0 0; color: #f8f1dc; font-size: .68rem; }
.user-membership-card { display: grid; margin-bottom: 8px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; }
.user-membership-card strong { color: #f8f1dc; font-size: .7rem; }
.user-membership-card small { grid-column: 1 / -1; color: #a9c0c2; }
.user-lifecycle-actions { display: grid; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.user-lifecycle-actions button,
.user-session-list button,
.user-invitation-list button {
  border: 1px solid #4c6e74;
  border-radius: 8px;
  padding: 7px 9px;
  background: #153d46;
  color: #f3ddaa;
  font: inherit;
  font-size: .56rem;
  font-weight: 800;
  cursor: pointer;
}
.user-lifecycle-actions .is-danger,
.user-invitation-list button:last-child { border-color: #8a5957; background: #4b2d31; color: #ffd4cc; }
.user-lifecycle-actions .is-positive { border-color: #4f806e; background: #174d40; color: #d9f4e8; }
.user-profile-subheading { margin: 15px 0 7px; color: #f2d392; font: 700 .72rem Georgia, serif; }
.user-session-list,
.user-invitation-list { display: grid; gap: 7px; }
.user-session-list article,
.user-invitation-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #315660;
  border-radius: 10px;
  padding: 8px;
  background: #0b2932;
}
.user-session-list strong,
.user-invitation-list strong { color: #f8f1dc; font-size: .62rem; }
.user-session-list small,
.user-invitation-list small { display: block; margin-top: 3px; color: #9fb7b9; font-size: .5rem; }
.user-invitation-list > article > span { display: flex; gap: 5px; }
@media (max-width: 720px) {
  .user-directory-filters { align-items: stretch; flex-direction: column; }
  .user-directory-filters label { width: 100%; }
  .user-directory-summary { grid-template-columns: 1fr; }
}

.record-toolbar input {
  width: 240px;
  height: 36px;
  border: 1px solid #c8dad5;
  border-radius: 9px;
  outline: none;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e1eae7;
  border-width: 1px 0 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e4e9e5;
  padding: 13px 18px;
  color: #718682;
  font-size: 0.65rem;
}

.pagination__buttons {
  display: flex;
  gap: 6px;
}

.pagination button {
  min-width: 32px;
  height: 30px;
  border: 1px solid #d4ddd9;
  border-radius: 7px;
  background: white;
  cursor: pointer;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest-2);
}

.empty-state h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.empty-state p {
  max-width: 350px;
  margin: 6px auto;
  color: #7d918d;
  font-size: 0.7rem;
}

.workflow-page {
  display: grid;
  gap: 12px;
}

.workflow-guide {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #607873;
  font-size: 0.66rem;
}

.workflow-guide span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.workflow-guide i {
  width: 19px;
  height: 3px;
  border-radius: 999px;
  background: var(--forest);
}

.workflow-guide i.is-return {
  background: var(--coral);
}

.workflow-guide small {
  margin-left: auto;
  color: #82938f;
}

.workflow-scroll {
  overflow-x: auto;
  padding: 12px 10px 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(circle at 8% 20%, rgba(129, 191, 178, 0.11), transparent 28%),
    linear-gradient(180deg, #fbfdfc 0%, #f4f8f7 100%);
  box-shadow: var(--shadow-soft);
  scrollbar-color: #94b7af transparent;
  scrollbar-width: thin;
}

.workflow-scroll:focus-visible {
  outline: 3px solid rgba(50, 119, 104, 0.22);
  outline-offset: 3px;
}

.workflow-canvas {
  position: relative;
  width: 2320px;
  min-height: 265px;
  padding: 22px 20px 88px;
}

.workflow-map {
  display: grid;
  grid-template-columns: repeat(11, 180px);
  gap: 29px;
}

.flow-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.flow-card:not(:last-child)::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  width: 23px;
  height: 2px;
  background: var(--forest);
  content: "";
}

.flow-card:not(:last-child)::before {
  position: absolute;
  z-index: 1;
  top: calc(50% - 4px);
  left: calc(100% + 25px);
  border-width: 5px 0 5px 7px;
  border-style: solid;
  border-color: transparent transparent transparent var(--forest);
  content: "";
}

.flow-card:hover {
  transform: translateY(-3px);
  border-color: #9bc3b9;
  box-shadow: 0 14px 25px rgba(29, 72, 63, 0.11);
}

.flow-card:focus-visible {
  outline: 3px solid rgba(50, 119, 104, 0.22);
  outline-offset: 3px;
}

.flow-card__number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--forest);
  color: white;
  font-family: Georgia, serif;
  font-size: 0.82rem;
}

.flow-card__content {
  display: grid;
  align-content: start;
  gap: 7px;
  padding-top: 2px;
}

.flow-card__content strong {
  font-family: Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.2;
}

.flow-card__content small {
  color: #7c8f8c;
  font-size: 0.62rem;
  line-height: 1.55;
}

.flow-card__metric {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest-2);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.flow-card.is-accent {
  border-color: #d89f8e;
  background: #fff7f3;
}

.flow-card.is-accent .flow-card__number,
.flow-card.is-accent .flow-card__metric {
  background: var(--coral);
  color: white;
}

.workflow-return {
  position: absolute;
  right: 110px;
  bottom: 29px;
  left: 757px;
  height: 51px;
  border-right: 3px solid var(--coral);
  border-bottom: 3px solid var(--coral);
  border-left: 3px solid var(--coral);
  border-radius: 0 0 17px 17px;
}

.workflow-return::after {
  position: absolute;
  right: -3px;
  bottom: 48px;
  width: 3px;
  height: 36px;
  background: var(--coral);
  content: "";
}

.workflow-return__arrow {
  position: absolute;
  bottom: 47px;
  left: -7px;
  border-width: 0 6px 9px;
  border-style: solid;
  border-color: transparent transparent var(--coral);
}

.workflow-return__label {
  position: absolute;
  top: 19px;
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 9px;
  transform: translateX(-50%);
  padding: 2px 10px;
  background: #f4f8f7;
  color: #8b6258;
  font-size: 0.6rem;
  white-space: nowrap;
}

.workflow-return__label strong {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 0.68rem;
}

.workflow-mobile-return {
  display: none;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.system-card {
  min-height: 170px;
  padding: 20px;
}

.system-card h3 {
  margin: 0 0 22px;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 13px;
}

.system-status__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: #2c7b5d;
}

.system-status strong,
.system-status small {
  display: block;
}

.system-status small {
  margin-top: 3px;
  color: #80928f;
  font-size: 0.65rem;
}

.loading-state {
  display: grid;
  min-height: 440px;
  place-items: center;
  align-content: center;
  color: #78908c;
  font-size: 0.75rem;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #d4dfd9;
  border-top-color: var(--forest-2);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.error-state {
  border: 1px solid #edd1c9;
  border-radius: 13px;
  padding: 24px;
  background: #fff8f5;
  color: var(--danger);
  text-align: center;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 250px;
  border-left: 4px solid var(--forest-2);
  border-radius: 9px;
  padding: 12px 15px;
  background: white;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  animation: toast-in 220ms ease-out;
}

.toast--error {
  border-left-color: var(--danger);
}

.toast--dialog {
  position: absolute;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
}

@media (max-width: 720px) {
  .toast--dialog {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 40px);
    min-width: 0;
  }
}

.sidebar-scrim,
.mobile-only {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes medaka-swim {
  0%,
  100% { transform: translate(-52%, -50%) rotate(-4deg); }
  50% { transform: translate(-48%, -54%) rotate(1deg); }
}

@keyframes login-slide-original {
  0%, 43% { opacity: 1; }
  50%, 93% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes login-slide-brochure {
  0%, 43% { opacity: 0; }
  50%, 93% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes login-dot-original {
  0%, 43%, 100% { background: var(--coral); }
  50%, 93% { background: rgba(255, 255, 255, 0.28); }
}

@keyframes login-dot-brochure {
  0%, 43%, 100% { background: rgba(255, 255, 255, 0.28); }
  50%, 93% { background: var(--coral); }
}

@keyframes login-orbit-cycle {
  0%, 43%, 100% { opacity: 0.94; }
  50%, 93% { opacity: 0; }
}

@keyframes bubble-rise {
  0%,
  100% { transform: translateY(8px) scale(0.85); opacity: 0.25; }
  50% { transform: translateY(-15px) scale(1); opacity: 0.8; }
}

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .medaka-hero,
  .water-bubble,
  .login-orbit,
  .login-slide,
  .login-slide-dots i {
    animation: none;
  }

  .login-slide--original { opacity: 1; }
  .login-slide--brochure { opacity: 0; }
  .login-orbit { opacity: 0.94; }
  .login-slide-dots i:first-child { background: var(--coral); }
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-search {
    display: none;
  }
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-story {
    display: none;
  }

  .login-card__mobile-brand {
    display: flex;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-column: 1;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 19;
    background: rgba(11, 31, 29, 0.42);
    inset: 0;
  }

  .sidebar-scrim.is-open {
    display: block;
  }

  .mobile-only {
    display: grid;
  }

  .topbar {
    justify-content: flex-start;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .dashboard-grid,
  .tables-grid {
    grid-template-columns: 1fr;
  }

  .fish-top-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .image-lightbox {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 15px;
  }

  .image-lightbox > article,
  .image-lightbox figure {
    min-height: 72vh;
  }

  .image-lightbox img {
    height: 72vh;
  }

  .image-lightbox__close {
    top: 11px;
    right: 11px;
    width: 38px;
    height: 38px;
  }

  .login-panel {
    align-items: start;
    padding: 30px 22px;
  }

  .login-card h2 {
    font-size: 2.2rem;
  }

  .topbar {
    min-height: 74px;
    padding: 12px 16px;
  }

  .topbar-title h1 {
    font-size: 1.22rem;
  }

  .topbar-title .eyebrow,
  .user-chip > span:nth-child(2),
  .user-chip > svg,
  #refresh-button {
    display: none;
  }

  .user-chip {
    border-left: 0;
    padding-left: 0;
  }

  .content {
    padding: 20px 15px 45px;
  }

  .section-heading {
    align-items: start;
  }

  .date-pill {
    display: none;
  }

  .kpi-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .workflow-guide {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .workflow-guide small {
    flex-basis: 100%;
    margin-left: 0;
  }

  .workflow-scroll {
    padding-right: 4px;
    padding-left: 4px;
  }

  .workflow-mobile-return {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid #e8c0b4;
    border-radius: 11px;
    background: #fff7f3;
    color: #825e54;
    font-size: 0.62rem;
  }

  .workflow-mobile-return strong {
    color: var(--coral);
  }

  .kpi-card {
    min-height: 125px;
  }

  .workflow-strip {
    overflow-x: auto;
    grid-template-columns: repeat(6, 100px);
  }

  .record-toolbar input {
    width: 150px;
  }

  .data-table th,
  .data-table td {
    padding-right: 12px;
    padding-left: 12px;
    white-space: nowrap;
  }

  .line-detail-dialog > article {
    padding: 18px;
  }

  .line-detail-hero {
    grid-template-columns: 1fr;
  }

  .family-detail-hero,
  .family-generation-list {
    grid-template-columns: 1fr;
  }

  .fish-detail-hero,
  .fish-detail-grid,
  .pairing-detail-summary,
  .egg-batch-hero,
  .fry-group-hero,
  .fry-origin-grid {
    grid-template-columns: 1fr;
  }

  .fish-detail-visuals figure,
  .fish-detail-visuals img {
    min-height: 220px;
  }

  .family-parent-grid {
    grid-template-columns: 1fr;
  }

  .fish-top-view-grid,
  .fish-top-view-grid--line {
    grid-template-columns: 1fr;
  }

  .family-parent-cross {
    justify-self: center;
  }

  .family-parent-card {
    grid-template-columns: 1fr;
  }

  .family-parent-card figure,
  .family-parent-card figure img {
    min-height: 210px;
  }

  .fish-detail-summary {
    padding: 20px;
  }

  .fish-detail-facts,
  .fish-grading-components,
  .pairing-detail-kpis,
  .egg-batch-metrics,
  .fry-grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .egg-batch-photo,
  .egg-batch-photo img,
  .fry-group-photo,
  .fry-group-photo img {
    min-height: 260px;
  }

  .fry-survival-track {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
  }

  .family-pairing-evidence > div {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .family-pairing-evidence > div small {
    white-space: normal;
  }

  .line-detail-photo,
  .line-detail-photo img,
  .family-detail-photo,
  .family-detail-photo img {
    min-height: 245px;
  }

  .line-detail-summary {
    padding: 19px;
  }

  .line-traits ul {
    grid-template-columns: 1fr;
  }

  .line-related-grid,
  .line-admin-grid {
    grid-template-columns: 1fr;
  }

  .line-admin-inline {
    grid-template-columns: 1fr;
  }

  .line-admin-tools summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .line-detail-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .line-detail-meta span:last-child {
    margin-left: 0;
  }
}
.founding-heading__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.founding-assurance {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #eef8f2, #f8fbf6);
  border-color: #cfe4d4;
}

.founding-assurance__icon,
.founding-profile-hero__seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--forest-2), #1e766d);
  box-shadow: 0 8px 20px rgb(21 96 82 / 24%);
}

.founding-assurance__icon svg,
.founding-profile-hero__seal svg { width: 25px; height: 25px; }
.founding-assurance p { margin: 4px 0 0; color: var(--ink-soft); }
.founding-assurance__legend { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.founding-assurance__legend span { padding: 6px 9px; border-radius: 999px; background: #fff; color: var(--forest-2); font-size: 11px; font-weight: 700; border: 1px solid #d7e6da; }

.founding-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.founding-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.founding-card__open {
  display: grid;
  grid-template-columns: 142px 1fr;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.founding-card__open:hover { background: #fbfdfb; }
.founding-card__image { position: relative; min-height: 260px; overflow: hidden; background: #dbe9e5; }
.founding-card__image img { width: 100%; height: 100%; object-fit: cover; }
.founding-card__image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(4 40 42 / 28%)); }
.founding-card__seal { position: absolute; z-index: 1; left: 12px; bottom: 12px; display: grid; place-items: center; width: 38px; height: 38px; color: #fff; border: 2px solid rgb(255 255 255 / 78%); border-radius: 50%; background: var(--forest-2); }
.founding-card__seal svg { width: 19px; }
.founding-card__body { display: flex; flex-direction: column; gap: 9px; padding: 17px; min-width: 0; }
.founding-card__body > strong { font-size: 20px; line-height: 1.15; }
.founding-card__top, .founding-card__progress { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.founding-card__top small { color: var(--ink-soft); font-weight: 700; }
.founding-card__farm { display: flex; align-items: center; gap: 6px; color: var(--forest-2); font-size: 12px; font-weight: 700; }
.founding-card__farm svg { width: 15px; }
.founding-card__bio { display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.founding-progress { display: block; overflow: hidden; width: 100%; height: 7px; border-radius: 999px; background: #e5ece7; }
.founding-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ca873, #d5a64a); }
.founding-progress--large { height: 9px; margin-bottom: 15px; }
.founding-card__progress b, .founding-card__progress em { color: var(--ink-soft); font-size: 11px; font-style: normal; }
.founding-card__counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: auto; }
.founding-card__counts span { padding: 7px; text-align: center; border-radius: 9px; background: #f4f8f7; font-size: 10px; color: var(--ink-soft); }
.founding-card__counts b { display: block; color: var(--ink); font-size: 14px; }
.founding-status { white-space: nowrap; }

.breeder-detail-dialog { width: min(1100px, calc(100vw - 32px)); }
.founding-profile-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; margin-bottom: 15px; border-radius: 17px; color: #effcf7; background: linear-gradient(135deg, #123f45, #17655d); }
.founding-profile-hero__identity { display: flex; align-items: center; gap: 14px; }
.founding-profile-hero__identity h3 { margin: 5px 0; color: #fff; font-size: 24px; }
.founding-profile-hero__identity p { margin: 0; color: #cde0dc; }
.founding-profile-hero__identity .record-code { color: #d6f0e4; background: rgb(255 255 255 / 12%); }
.founding-profile-hero__status { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; text-align: right; }
.founding-profile-hero__status small { color: #cfe1dc; }
.founding-detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 15px; margin-bottom: 15px; }
.founding-detail-panel, .founding-record-group { padding: 18px; }
.founding-checklist-panel { padding: 12px; }
.founding-checklist-panel .panel-header { min-height: 52px; padding: 9px 11px; }
.founding-farms { display: grid; gap: 10px; }
.founding-farm { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 11px; padding: 12px; border-radius: 12px; background: #f4f8f7; }
.founding-farm__icon { display: grid; place-items: center; width: 35px; height: 35px; color: var(--forest-2); border-radius: 10px; background: #dceddf; }
.founding-farm__icon svg { width: 18px; }
.founding-farm strong, .founding-farm span, .founding-farm p { display: block; }
.founding-farm span { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.founding-farm p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; }
.founding-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.founding-stat-grid span { padding: 16px; text-align: center; border-radius: 12px; background: linear-gradient(145deg, #f2f8f4, #e5f1e8); }
.founding-stat-grid strong { display: block; color: var(--forest-2); font-size: 27px; }
.founding-stat-grid small { color: var(--ink-soft); }
.founding-checklist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.founding-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.founding-check__mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 900; }
.founding-check.is-pass .founding-check__mark { color: #176b48; background: #daf0df; }
.founding-check.is-pending .founding-check__mark { color: #906812; background: #f8ebc9; }
.founding-check strong, .founding-check small { display: block; }
.founding-check strong { font-size: 10px; line-height: 1.35; }
.founding-check small { margin-top: 2px; overflow: hidden; color: var(--ink-soft); font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.founding-check em { grid-column: 2; color: var(--ink-soft); font-size: 8px; font-style: normal; font-weight: 800; }
.founding-record-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 15px; }
.founding-record-list { display: grid; gap: 7px; }
.founding-record-list > button, .founding-record-list > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; color: inherit; text-align: left; text-decoration: none; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.founding-record-list > button:hover, .founding-record-list > a:hover { border-color: #9cc8ae; background: #f4faf6; }
.founding-record-group strong, .founding-record-group small { display: block; }
.founding-record-group small { margin-top: 2px; color: var(--ink-soft); }
.founding-record-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; color: var(--ink-soft); border-top: 1px solid var(--line); font-size: 10px; }
.founding-record-pagination > span:last-child { display: flex; gap: 5px; }
.founding-record-pagination button { display: grid; width: 28px; height: 28px; padding: 0; place-items: center; color: var(--forest-2); border: 1px solid #cfe0d8; border-radius: 8px; background: #f7fbf8; cursor: pointer; }
.founding-record-pagination button:disabled { cursor: default; opacity: .38; }

.founding-admin-heading { align-items: flex-start; }
.founding-admin-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.founding-admin-summary article { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: #fff; box-shadow: 0 5px 16px rgba(9, 45, 54, .05); }
.founding-admin-summary article > span { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #176148; background: #e4f2e9; }
.founding-admin-summary svg { width: 18px; height: 18px; }
.founding-admin-summary strong, .founding-admin-summary small { display: block; }
.founding-admin-summary strong { font-size: 1.2rem; }
.founding-admin-summary small { margin-top: 2px; color: var(--ink-soft); font-size: .65rem; }
.founding-admin-list { display: grid; gap: 12px; }
.founding-admin-card { overflow: hidden; }
.founding-admin-card > header, .founding-admin-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 17px; list-style: none; }
.founding-admin-card > summary { cursor: pointer; }
.founding-admin-card > summary::-webkit-details-marker { display: none; }
.founding-admin-card > header > div, .founding-admin-card__identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.founding-admin-card__seal { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border: 1px solid #b9d8c8; border-radius: 50%; color: #176148; background: #e8f5ed; }
.founding-admin-card__seal svg { width: 19px; height: 19px; }
.founding-admin-card header strong, .founding-admin-card header small, .founding-admin-card__identity strong, .founding-admin-card__identity small { display: block; }
.founding-admin-card header small, .founding-admin-card__identity small { margin-top: 3px; color: var(--ink-soft); font-size: .65rem; }
.founding-admin-card > p { margin: 0; padding: 0 17px 12px; color: var(--ink-soft); font-size: .72rem; }
.founding-admin-apply { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 0 17px 16px; }
.founding-admin-apply input, .founding-admin-check input, .founding-admin-check select, .founding-admin-status input, .founding-admin-status select { min-width: 0; border: 1px solid #cadbd5; border-radius: 9px; padding: 8px 9px; background: #fff; font: inherit; font-size: .68rem; }
.founding-admin-card__metrics { display: flex; align-items: center; gap: 13px; }
.founding-admin-card__metrics > span:not(.badge) { text-align: center; }
.founding-admin-card__metrics b, .founding-admin-card__metrics small { display: block; }
.founding-admin-card__metrics b { color: var(--forest-2); font-size: .77rem; }
.founding-admin-card__metrics small { color: var(--ink-soft); font-size: .53rem; }
.founding-admin-card__metrics i { color: var(--ink-soft); font-size: 1rem; font-style: normal; transition: transform .16s ease; }
.founding-admin-card[open] .founding-admin-card__metrics i { transform: rotate(180deg); }
.founding-admin-card__body { display: grid; gap: 14px; border-top: 1px solid var(--line); padding: 16px; background: #f8faf9; }
.founding-admin-meta { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; gap: 8px; }
.founding-admin-meta > span { border: 1px solid #dfe9e5; border-radius: 9px; padding: 9px; background: #fff; }
.founding-admin-meta small, .founding-admin-meta strong { display: block; }
.founding-admin-meta small { color: var(--ink-soft); font-size: .55rem; text-transform: uppercase; }
.founding-admin-meta strong { margin-top: 3px; font-size: .68rem; }
.founding-admin-consents, .founding-admin-checklist, .founding-admin-status, .founding-admin-history { border: 1px solid #dde9e4; border-radius: 12px; padding: 13px; background: #fff; }
.founding-admin-consents h3, .founding-admin-checklist h3, .founding-admin-status h3, .founding-admin-history h3 { margin: 0; font-size: .78rem; }
.founding-admin-consents > div { display: flex; gap: 7px; margin-top: 9px; }
.founding-admin-consents p, .founding-admin-status p { margin: 7px 0 0; color: var(--ink-soft); font-size: .62rem; }
.founding-admin-section-title, .founding-admin-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.founding-admin-section-title { margin-bottom: 10px; }
.founding-admin-section-title span { color: var(--ink-soft); font-size: .62rem; }
.founding-admin-check { display: grid; grid-template-columns: 150px 125px 1fr 1fr 1fr auto; align-items: center; gap: 7px; border-top: 1px solid #eef2f0; padding: 8px 0; }
.founding-admin-check > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.founding-admin-check > span strong { font-size: .65rem; }
.founding-admin-status > form { display: grid; grid-template-columns: minmax(150px, auto) minmax(220px, 1fr) auto; gap: 7px; }
.founding-admin-history > div { display: grid; gap: 7px; margin-top: 10px; }
.founding-admin-history > div > span { position: relative; display: grid; grid-template-columns: 9px 1fr; gap: 3px 8px; }
.founding-admin-history i { grid-row: 1 / 3; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #4d9a75; box-shadow: 0 0 0 3px #e4f2e9; }
.founding-admin-history strong { font-size: .64rem; }
.founding-admin-history small { color: var(--ink-soft); font-size: .58rem; }

.breeder-profile-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.breeder-profile-summary article { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: #fff; box-shadow: 0 5px 16px rgba(9, 45, 54, .05); }
.breeder-profile-summary article > span { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #176148; background: #e4f2e9; }
.breeder-profile-summary svg { width: 18px; height: 18px; }
.breeder-profile-summary strong, .breeder-profile-summary small { display: block; }
.breeder-profile-summary strong { font-size: 1.2rem; }
.breeder-profile-summary small { margin-top: 2px; color: var(--ink-soft); font-size: .65rem; }
.breeder-profile-create { margin-bottom: 15px; overflow: hidden; }
.breeder-profile-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.button--compact { min-height: 34px; padding: 0 13px; font-size: .68rem; }
.breeder-invitation-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(200px, .8fr) minmax(260px, 1.2fr) auto; align-items: end; gap: 10px; margin: 12px 16px 0; border: 1px solid #b9d8cb; border-radius: 12px; padding: 13px; background: #f3faf6; }
.breeder-invitation-form[hidden] { display: none; }
.breeder-invitation-form > div:first-child { align-self: center; }
.breeder-invitation-form strong, .breeder-invitation-form small { display: block; }
.breeder-invitation-form small { margin-top: 3px; color: var(--ink-soft); font-size: .61rem; line-height: 1.45; }
.breeder-invitation-form label { display: grid; gap: 6px; color: var(--ink-soft); font-size: .65rem; }
.breeder-invitation-form input { width: 100%; min-width: 0; border: 1px solid #cadbd5; border-radius: 9px; padding: 9px; background: #fff; font: inherit; font-size: .72rem; }
.breeder-invitation-form__actions { display: flex; align-items: center; gap: 7px; }
#breeder-profile-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.breeder-profile-create label { display: grid; gap: 6px; color: var(--ink-soft); font-size: .65rem; }
.breeder-profile-create label.is-wide, .breeder-profile-create .is-wide { grid-column: 1 / -1; }
.breeder-profile-create input, .breeder-profile-create select, .breeder-profile-create textarea { width: 100%; min-width: 0; border: 1px solid #cadbd5; border-radius: 9px; padding: 9px; background: #fff; font: inherit; font-size: .72rem; }
.breeder-profile-create textarea { min-height: 76px; resize: vertical; }
.breeder-profile-create__actions { display: flex; justify-content: flex-end; }
.breeder-profile-empty { display: grid; justify-items: start; gap: 5px; padding: 18px; color: var(--ink-soft); }
.breeder-profile-empty p { margin: 0; color: var(--ink); font-weight: 750; }
.breeder-profile-list { overflow: hidden; }
.breeder-profile-list td small, .breeder-profile-list .table-primary { display: block; margin-top: 4px; }
.breeder-profile-list td small { max-width: 280px; overflow: hidden; color: var(--ink-soft); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.breeder-profile-actions { display: grid; gap: 7px; min-width: 190px; }
.breeder-profile-actions > form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.breeder-profile-actions input { min-width: 0; border: 1px solid #cadbd5; border-radius: 8px; padding: 7px; font: inherit; font-size: .62rem; }
.onboarding-prerequisite { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; margin-bottom: 12px; border: 1px solid #c7dfd2; border-radius: 12px; padding: 11px 13px; background: #f1f8f4; }
.onboarding-prerequisite.is-blocked { border-color: #e2c993; background: #fff8e9; }
.onboarding-prerequisite > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #176148; background: #dcefe4; }
.onboarding-prerequisite.is-blocked > span { color: #8a5c16; background: #f7e8c9; }
.onboarding-prerequisite svg { width: 17px; height: 17px; }
.onboarding-prerequisite strong, .onboarding-prerequisite small { display: block; }
.onboarding-prerequisite small { margin-top: 3px; color: var(--ink-soft); font-size: .62rem; }

@media (max-width: 1100px) {
  .founding-admin-check { grid-template-columns: 140px 120px 1fr; }
  .founding-admin-check input[name="evidenceUrl"], .founding-admin-check input[name="reason"], .founding-admin-check button { grid-column: auto; }
}

@media (max-width: 760px) {
  .breeder-profile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #breeder-profile-create-form, .breeder-profile-actions > form, .breeder-invitation-form { grid-template-columns: 1fr; }
  .breeder-profile-header-actions { align-items: flex-end; flex-direction: column; }
  .breeder-profile-create label.is-wide, .breeder-profile-create .is-wide { grid-column: auto; }
  .onboarding-prerequisite { grid-template-columns: auto 1fr; }
  .onboarding-prerequisite button { grid-column: 2; justify-self: start; }
  .founding-admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founding-admin-card > summary { align-items: flex-start; flex-direction: column; }
  .founding-admin-card__metrics { width: 100%; justify-content: space-between; }
  .founding-admin-meta, .founding-admin-check, .founding-admin-status, .founding-admin-status > form, .founding-admin-apply { grid-template-columns: 1fr; }
  .founding-admin-status { align-items: stretch; flex-direction: column; }
}

@media (max-width: 760px) {
  .founding-assurance { grid-template-columns: auto 1fr; }
  .founding-assurance__legend { grid-column: 1 / -1; justify-content: flex-start; }
  .founding-card__open { grid-template-columns: 105px 1fr; }
  .founding-card__image { min-height: 285px; }
  .founding-profile-hero { align-items: flex-start; flex-direction: column; }
  .founding-profile-hero__status { align-items: flex-start; text-align: left; }
  .founding-detail-grid, .founding-record-groups { grid-template-columns: 1fr; }
  .founding-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fish-name-with-guard { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fish-credential-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.fish-credential-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 2px 7px rgba(4, 26, 32, .14);
}
.fish-credential-icon svg { width: 11px; height: 11px; }
.fish-credential-icon--passport { color: #62bdb5; }
.fish-credential-icon--certificate { color: #d8ad58; }
.record-code .fish-credential-icon--passport,
.data-table .fish-credential-icon--passport { color: #176f69; background: #e3f3ef; }
.record-code .fish-credential-icon--certificate,
.data-table .fish-credential-icon--certificate { color: #956a1d; background: #fbf0d6; }
#fish-detail-title { display: flex; align-items: center; flex-wrap: wrap; }
#fish-detail-title .fish-credential-icon { background: rgba(255, 255, 255, .08); }
.founding-fish-guard { display: inline-grid; flex: 0 0 auto; width: 20px; height: 20px; padding: 3px; place-items: center; color: #176148; border: 1px solid #b8dcca; border-radius: 50%; background: #eaf7ef; vertical-align: middle; }
.founding-fish-guard svg { width: 12px; height: 12px; }
.ownership-panel { margin-top: 16px; }
.ownership-transfer-mark { display: inline-grid; width: 22px; height: 22px; margin-left: 5px; place-items: center; border-radius: 50%; color: #a55d0c; background: #fff1d6; font: 800 13px/1 system-ui, sans-serif; vertical-align: middle; }
.ownership-current { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ownership-party { display: grid; gap: 4px; min-width: 0; padding: 13px; border: 1px solid #dce8e4; border-radius: 13px; color: var(--ink); background: #f7faf9; text-align: left; font: inherit; }
button.ownership-party { cursor: pointer; }
button.ownership-party:hover { border-color: #7bb8a1; background: #eef8f3; }
.ownership-party small { color: var(--ink-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.ownership-party strong { overflow-wrap: anywhere; }
.ownership-party span { color: var(--ink-soft); font-size: 11px; overflow-wrap: anywhere; }
.ownership-history { display: grid; gap: 7px; margin-top: 14px; }
.ownership-history__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #dce8e4; border-radius: 12px; }
.ownership-history__item.is-previous { opacity: .72; background: #f7f8f8; }
.ownership-history__icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #176148; background: #e3f4eb; font-weight: 800; }
.ownership-history__item div { display: grid; gap: 2px; }
.ownership-history__item small, .ownership-history__item time { color: var(--ink-soft); font-size: 10px; }
.ownership-transfer-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #dce8e4; }
.ownership-transfer-form label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; }
.ownership-transfer-form select, .ownership-transfer-form textarea { width: 100%; min-height: 42px; border: 1px solid #cadbd5; border-radius: 10px; padding: 9px; background: white; font: inherit; }
.ownership-transfer-form textarea { min-height: 62px; resize: vertical; }

@media (max-width: 900px) {
  .ownership-current { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ownership-transfer-form { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .founding-checklist { grid-template-columns: 1fr; }
  .ownership-current { grid-template-columns: 1fr; }
  .ownership-history__item { grid-template-columns: 28px 1fr; }
  .ownership-history__item time { grid-column: 2; }
}

/* Premium Fish Profile showcase: dark navy, pearl white, and medaka-gold accents. */
.fish-detail-dialog { background: #071f28; }
.fish-detail-dialog .dialog-header { border-bottom-color: #284953; background: linear-gradient(105deg, #071f28, #123846 72%, #174b57); }
.fish-detail-dialog .dialog-header h2 { color: #f8f1dc; }
.fish-detail-dialog .dialog-header .eyebrow { color: #caa663; }
.fish-detail-dialog .dialog-header .icon-button { border-color: #4d6d73; background: rgba(255, 255, 255, 0.08); color: #f8f1dc; }
.fish-detail-header-meta .badge { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.fish-profile-share { display: inline-flex; min-height: 25px; align-items: center; gap: 4px; border: 1px solid #bc9854; border-radius: 999px; padding: 0 8px; background: rgba(202, 166, 99, 0.12); color: #f4d18f; cursor: pointer; font-size: 0.49rem; font-weight: 800; }
.fish-profile-share svg { width: 12px; height: 12px; }
.fish-profile-dashboard { background: radial-gradient(circle at 100% 0%, rgba(202, 166, 99, 0.16), transparent 30%), linear-gradient(145deg, #071f28, #0c3039); }
.fish-profile-column { border-color: #294c55; background: linear-gradient(180deg, #123640, #0c2a33); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2); }
.fish-profile-column__heading h3, .fish-profile-card__heading > span, .fish-activity-panel__header strong, .fish-profile-activity__top h3 { color: #f5e2b6; }
.fish-profile-column__heading p, .fish-profile-note, .fish-profile-empty, .fish-profile-activity__top p { color: #a9c0c2; }
.fish-profile-visuals { position: relative; border: 1px solid #496b70; box-shadow: inset 0 0 0 1px rgba(202, 166, 99, 0.12); }
.fish-profile-visuals .fish-view-pair { height: 168px; grid-template-columns: minmax(0, 1.58fr) minmax(0, 0.82fr); }
.fish-profile-visuals .fish-view:first-child { border-right: 1px solid rgba(202, 166, 99, 0.35); }
.fish-profile-visuals .fish-view img { object-fit: contain; object-position: center; }
.fish-size-scale { position: absolute; z-index: 3; right: 8px; bottom: 7px; left: 8px; display: grid; height: 20px; grid-template-columns: auto repeat(5, 1fr) auto; align-items: end; gap: 0; border: 1px solid rgba(247, 231, 188, 0.48); border-radius: 5px; padding: 3px 5px; background: rgba(4, 20, 26, 0.72); color: #f7e7bc; font-size: 0.4rem; backdrop-filter: blur(4px); }
.fish-size-scale i { height: 8px; border-left: 1px solid rgba(247, 231, 188, 0.72); }
.fish-size-scale strong { margin-left: 4px; color: #f4d18f; font-size: 0.4rem; }
.fish-detail-facts { border-color: #294c55; background: #294c55; }
.fish-detail-facts > div { background: #10333c; }
.fish-detail-facts dt, .fish-detail-facts dd { color: #a9c0c2; }
.fish-detail-facts dd { color: #f6f0dc; }
.fish-profile-card { border-color: #315660; background: rgba(6, 29, 37, 0.44); }
.fish-profile-card__heading small { color: #9cb6b8; }
.fish-pedigree-parent { border-color: #365c64; background: #133942; }
.fish-pedigree-parent > strong, .fish-pedigree-parent button { color: #f2d392; }
.fish-pedigree-parent > span { color: #a5bdc0; }
.fish-pedigree-parent__view { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #a98748 !important; border-radius: 50%; padding: 0 !important; background: rgba(202, 166, 99, 0.11) !important; color: #f2d392 !important; }
.fish-pedigree-parent__view:hover { background: rgba(202, 166, 99, 0.27) !important; }
.fish-pedigree-parent__view svg { width: 12px; height: 12px; }
.fish-pedigree-banner__cross { color: #dcb368; }
.fish-ownership-compact__grid { border-color: #315660; background: #315660; }
.fish-ownership-compact__grid > * { background: #10343e; }
.fish-ownership-compact__grid strong { color: #f6f0dc; }
.fish-ownership-compact__grid small, .fish-ownership-compact__history { color: #a5bdc0; }
.fish-grading-compact__score > strong { color: #f4cf7d; }
.fish-grading-compact__score > small { color: #a5bdc0; }
.fish-passport-compact__body { display: flex; align-items: center; gap: 9px; }
.fish-passport-stamp { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #d2b06d; border-radius: 50%; color: #f1d08a; font-size: 0.38rem; font-weight: 900; letter-spacing: .06em; transform: rotate(-10deg); }
.fish-passport-compact__body > div { min-width: 0; }
.fish-passport-compact__body strong { display: block; overflow: hidden; color: #f5e2b6; font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-passport-compact__body small { display: block; margin-top: 3px; color: #a5bdc0; font-size: .46rem; }
.fish-ownership-compact .founding-fish-guard { color: #f3d18b; border-color: #c9a35e; background: rgba(202, 166, 99, 0.16); box-shadow: 0 0 0 2px rgba(202, 166, 99, 0.06); }
.fish-passport-compact .badge { border: 1px solid #c9a35e; background: rgba(202, 166, 99, 0.18); color: #f4d18f; }
.fish-passport-compact .badge--blue { border-color: #77bdc5; background: rgba(119, 189, 197, 0.18); color: #bcebf0; }
.fish-passport-compact .badge--coral { border-color: #e89875; background: rgba(240, 122, 69, 0.18); color: #ffc1a1; }
.fish-profile-column--activity { background: linear-gradient(180deg, #102f39, #09242c); }
.fish-detail-header-meta { margin-left: 10px; margin-right: auto; justify-content: flex-start; }
.fish-activity-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom-color: #315660; }
.fish-activity-tabs button { overflow: hidden; padding: 8px 1px; color: #9cb6b8; font-size: .42rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-activity-tabs button.is-active { border-color: #ddb667; color: #f4d18f; }
.fish-activity-add { border-color: #a98748; background: rgba(202, 166, 99, 0.1); color: #f4d18f; }
.fish-activity-add:hover { border-color: #e0bd72; background: rgba(202, 166, 99, 0.2); }
.fish-activity-panel .passport-expansion-record { border-bottom-color: #294c55; }
.fish-activity-panel .passport-expansion-record strong { color: #f6f0dc; }
.fish-activity-panel .passport-expansion-record small { color: #a5bdc0; }
.fish-activity-flyout { border-color: #a98748; background: #0d2d36; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.46); }
.fish-activity-flyout__header { color: #f4d18f; }
.fish-activity-flyout input, .fish-activity-flyout select, .fish-activity-flyout textarea { border-color: #41646b; background: #123943; color: #f6f0dc; }
.fish-activity-flyout form button { background: #bd9250; color: #10252d; }
.passport-tab-content > div:first-child { color: #f5e2b6; }
.passport-tab-content > small { color: #a5bdc0; }
.fish-grading-showcase { display: grid; margin-top: 9px; gap: 7px; }
.fish-grade-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #c3d5d3; font-size: .47rem; }
.fish-grade-progress > div strong { color: #f2d392; font-size: .52rem; }
.fish-grade-progress > i { display: block; height: 5px; margin-top: 3px; overflow: hidden; border-radius: 999px; background: #264b54; }
.fish-grade-progress > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5299a0, #e0b766); box-shadow: 0 0 9px rgba(224, 183, 102, 0.35); }
.fish-video-showcase { display: grid; min-height: 160px; align-content: center; justify-items: center; gap: 10px; border: 1px dashed #54747a; border-radius: 10px; padding: 14px; text-align: center; }
.fish-video-showcase video { width: 100%; max-height: 170px; border-radius: 8px; background: black; }
.fish-video-showcase__play { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #d2b06d; border-radius: 50%; padding-left: 2px; color: #f1d08a; font-size: 1rem; box-shadow: 0 0 22px rgba(202, 166, 99, 0.15); }
.fish-video-showcase strong { display: block; color: #f5e2b6; font-size: .65rem; }
.fish-video-showcase small, .fish-video-showcase span { display: block; margin-top: 4px; color: #a5bdc0; font-size: .48rem; }
.fish-video-showcase span { color: #cfad68; font-size: .43rem; letter-spacing: .06em; }

.terms-acceptance-dialog {
  width: min(960px, calc(100vw - 32px));
  height: min(820px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  overflow: hidden;
  border: 1px solid #cfded8;
  border-radius: 20px;
  padding: 0;
  background: #f7faf8;
  box-shadow: 0 30px 80px rgba(4, 40, 41, .34);
}
.terms-acceptance-dialog::backdrop { background: rgba(4, 25, 28, .78); backdrop-filter: blur(5px); }
.terms-acceptance-dialog > article { display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.terms-acceptance-dialog__header { padding: 17px 22px 13px; border-bottom: 1px solid #dce7e2; background: #fff; }
.terms-acceptance-dialog__header h2 { margin: 2px 0; color: #153f40; }
.terms-acceptance-dialog__header p { margin: 0; font-size: .76rem; }
.terms-acceptance-dialog iframe { width: 100%; height: 100%; border: 0; background: #eef4f1; }
.terms-acceptance-dialog form { padding: 14px 22px 17px; border-top: 1px solid #dce7e2; background: #fff; }
.terms-acceptance-check { display: flex; align-items: flex-start; gap: 10px; color: #254c4b; font-size: .84rem; font-weight: 700; cursor: pointer; }
.terms-acceptance-check input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; accent-color: #147260; }
.terms-acceptance-dialog .dialog-actions { margin-top: 10px; }
.terms-acceptance-dialog button:disabled { cursor: not-allowed; opacity: .48; }

@media (max-width: 1120px) {
  .fish-detail-dialog {
    width: min(980px, calc(100vw - 24px));
    height: min(860px, calc(100dvh - 24px));
  }

  .fish-profile-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fish-profile-column--activity { grid-column: 1 / -1; min-height: 210px; }
}

@media (max-width: 720px) {
  .terms-acceptance-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .terms-acceptance-dialog__header { padding: 12px 14px 9px; }
  .terms-acceptance-dialog__header h2 { font-size: 1rem; }
  .terms-acceptance-dialog form { padding: 10px 14px 12px; }
  .terms-acceptance-dialog .dialog-actions { display: grid; }
  .fish-detail-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .fish-detail-dialog .dialog-header { min-height: 66px; padding: 10px 12px; }
  .fish-detail-dialog .dialog-header h2 { max-width: 150px; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
  .fish-detail-header-meta {
    display: flex;
    max-width: 46%;
    margin-left: 4px;
    gap: 3px;
    overflow: hidden;
  }
  .fish-detail-header-meta .badge { display: none; }
  .fish-detail-header-meta .fish-profile-share { flex: 0 0 auto; min-height: 24px; padding: 0 7px; font-size: .48rem; }
  .fish-profile-dashboard { display: block; overflow: auto; padding: 9px; }
  .fish-profile-column { margin-bottom: 9px; overflow: visible; }
  .fish-profile-column--activity { min-height: 300px; }
}

/* Shared premium profile-dialog system. Entity-specific renderers only provide content. */
.profile-dialog {
  --profile-bg: #071f28;
  --profile-surface: #0d3039;
  --profile-surface-raised: #123943;
  --profile-border: #315660;
  --profile-gold: #f2d392;
  --profile-muted: #a9c0c2;
  width: min(1440px, calc(100vw - 28px));
  height: min(820px, calc(100dvh - 28px));
  max-width: none;
  max-height: none;
  overflow: hidden;
  border: 1px solid #294c55;
  background: var(--profile-bg);
}

.profile-dialog > article {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.profile-dialog .dialog-header {
  min-height: 78px;
  margin: 0;
  border-bottom: 1px solid #284953;
  padding: 13px 18px 13px 22px;
  background: linear-gradient(105deg, #071f28, #123846 72%, #174b57);
}

.profile-dialog .dialog-header h2 {
  color: #f8f1dc;
  font-size: 1.35rem;
}

.profile-dialog .dialog-header .eyebrow { color: #caa663; }
.profile-dialog .dialog-header .icon-button {
  border-color: #4d6d73;
  background: rgba(255, 255, 255, 0.08);
  color: #f8f1dc;
}
.profile-dialog .line-detail-content { min-height: 0; overflow: hidden; }

.entity-profile-dashboard {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(202, 166, 99, 0.16), transparent 30%),
    linear-gradient(145deg, #071f28, #0c3039);
}

.entity-profile-column {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #123640, #0c2a33);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  grid-template-rows: auto minmax(0, 1fr);
}

.entity-profile-column__header {
  padding: 13px 13px 9px;
  border-bottom: 1px solid #315660;
}
.entity-profile-column__header h3 {
  margin: 0;
  color: var(--profile-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .94rem;
}
.entity-profile-column__header p {
  margin: 3px 0 0;
  color: var(--profile-muted);
  font-size: .52rem;
}
.entity-profile-column__body {
  min-height: 0;
  overflow: auto;
  padding: 11px;
  scrollbar-width: none;
}
.entity-profile-column__body::-webkit-scrollbar { width: 0; height: 0; }
.entity-profile-column__body > * { margin-top: 0; }
.entity-profile-empty { color: var(--profile-muted); font-size: .65rem; }

.entity-profile-tabs {
  display: grid;
  margin: -11px -11px 10px;
  grid-auto-columns: minmax(74px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  border-bottom: 1px solid #315660;
  scrollbar-width: none;
}
.entity-profile-tabs::-webkit-scrollbar { display: none; }
.entity-profile-tabs button {
  min-height: 34px;
  overflow: hidden;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 7px 5px;
  background: transparent;
  color: #9cb6b8;
  cursor: pointer;
  font: inherit;
  font-size: .48rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-profile-tabs button.is-active {
  border-bottom-color: #ddb667;
  color: #f4d18f;
  background: rgba(202, 166, 99, .07);
}
.entity-profile-tab-panels { min-height: 0; height: calc(100% - 1px); }
.entity-profile-tab-panel { height: 100%; min-height: 0; overflow: auto; scrollbar-width: none; }
.entity-profile-tab-panel::-webkit-scrollbar { width: 0; height: 0; }
.entity-profile-tab-panel[hidden] { display: none; }

/* Normalize legacy profile sections inside the shared shell. */
.entity-profile-dashboard .panel,
.entity-profile-dashboard .line-traits,
.entity-profile-dashboard .line-related-card,
.entity-profile-dashboard .family-parentage,
.entity-profile-dashboard .family-history,
.entity-profile-dashboard .family-fish-panel,
.entity-profile-dashboard .pairing-detail-summary,
.entity-profile-dashboard .pairing-fish-section,
.entity-profile-dashboard .egg-batch-metrics article,
.entity-profile-dashboard .fry-survival-section,
.entity-profile-dashboard .fry-grade-grid article,
.entity-profile-dashboard .fish-detail-panel,
.entity-profile-dashboard .line-admin-tools {
  border-color: #315660;
  background: rgba(6, 29, 37, .42);
  color: #f6f0dc;
  box-shadow: none;
}
.entity-profile-dashboard .panel-header h3,
.entity-profile-dashboard h3,
.entity-profile-dashboard h4,
.entity-profile-dashboard strong { color: #f5e2b6; }
.entity-profile-dashboard p,
.entity-profile-dashboard small,
.entity-profile-dashboard .muted,
.entity-profile-dashboard dt { color: var(--profile-muted); }
.entity-profile-dashboard .record-code { border-color: #4b6c73; background: #143a43; color: #f2d392; }
.entity-profile-dashboard .health-badge,
.entity-profile-dashboard .date-pill { border-color: #a98748; background: rgba(202, 166, 99, .12); color: #f4d18f; }
.entity-profile-dashboard .record-link { color: #f2d392; }
.entity-profile-dashboard .line-detail-meta {
  display: grid;
  margin: 0;
  border-color: #315660;
  border-radius: 11px;
  padding: 11px;
  gap: 6px;
  background: rgba(6, 29, 37, .42);
}
.entity-profile-dashboard .line-detail-meta code { color: #f2d392; overflow-wrap: anywhere; }
.entity-profile-dashboard img { object-fit: contain; object-position: center; }

.entity-profile-dashboard .line-detail-hero,
.entity-profile-dashboard .family-detail-hero,
.entity-profile-dashboard .egg-batch-hero,
.entity-profile-dashboard .fry-group-hero,
.entity-profile-dashboard .pairing-detail-summary {
  display: grid;
  border-color: #315660;
  background: rgba(6, 29, 37, .42);
  grid-template-columns: 1fr;
}
.entity-profile-dashboard .line-detail-photo,
.entity-profile-dashboard .family-detail-photo,
.entity-profile-dashboard .egg-batch-photo,
.entity-profile-dashboard .fry-group-photo {
  min-height: 210px;
  height: 210px;
  background: #061c23;
}
.entity-profile-dashboard .line-detail-photo img,
.entity-profile-dashboard .family-detail-photo img,
.entity-profile-dashboard .egg-batch-photo img,
.entity-profile-dashboard .fry-group-photo img {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 8px;
  object-fit: contain;
}
.entity-profile-dashboard .line-detail-summary,
.entity-profile-dashboard .family-detail-summary,
.entity-profile-dashboard .egg-batch-summary,
.entity-profile-dashboard .fry-group-summary { padding: 16px; background: transparent; }
.entity-profile-dashboard .line-detail-stats,
.entity-profile-dashboard .family-detail-stats,
.entity-profile-dashboard .egg-batch-counts,
.entity-profile-dashboard .fry-group-kpis,
.entity-profile-dashboard .pairing-detail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entity-profile-dashboard .line-detail-stats > span,
.entity-profile-dashboard .family-detail-stats > span,
.entity-profile-dashboard .egg-batch-counts > span,
.entity-profile-dashboard .fry-group-kpis > span,
.entity-profile-dashboard .pairing-detail-kpis > span { background: #10343e; }
.entity-profile-dashboard .line-related-grid,
.entity-profile-dashboard .founding-detail-grid,
.entity-profile-dashboard .founding-record-groups,
.entity-profile-dashboard .fry-origin-grid { grid-template-columns: 1fr; }
.entity-profile-dashboard .egg-batch-metrics,
.entity-profile-dashboard .fry-grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entity-profile-dashboard .family-parent-grid { min-width: 0; }

/* Family History: keep pedigree evidence and registered Fish on the premium shell. */
.profile-dialog--family .family-parent-pair {
  border-color: #3b626a;
  background:
    radial-gradient(circle at 100% 0, rgba(202, 166, 99, .12), transparent 34%),
    linear-gradient(145deg, #10343e, #0a2932);
  box-shadow: inset 0 0 0 1px rgba(202, 166, 99, .05);
}
.profile-dialog--family .family-parent-pair__heading {
  border-bottom: 1px solid rgba(169, 135, 72, .32);
  padding-bottom: 10px;
  color: #f2d392;
}
.profile-dialog--family .family-parent-card {
  border-color: #41646b;
  background: #0d3039;
}
.profile-dialog--family .family-parent-role { color: #f2d392; }
.profile-dialog--family .family-parent-metrics > span,
.profile-dialog--family .family-pairing-evidence {
  border: 1px solid rgba(65, 100, 107, .72);
  background: #123943;
}
.profile-dialog--family .family-parent-metrics strong,
.profile-dialog--family .family-pairing-evidence > strong { color: #f5e2b6; }

.profile-dialog--family .family-fish-panel .fish-top-view-grid {
  grid-template-columns: minmax(0, 1fr);
}
.profile-dialog--family .family-fish-panel .fish-top-view-card {
  display: grid;
  align-items: stretch;
  border-color: #41646b;
  grid-template-columns: minmax(180px, .82fr) minmax(0, 1.18fr);
  background: #0d3039;
}
.profile-dialog--family .family-fish-panel .fish-view-pair {
  height: 100%;
  min-height: 116px;
}
.profile-dialog--family .family-fish-panel .fish-top-view-card figure {
  min-height: 116px;
  aspect-ratio: auto;
}
.profile-dialog--family .family-fish-panel .fish-top-view-card__body {
  display: grid;
  align-content: center;
  border-left: 1px solid #41646b;
  padding: 12px;
}
.profile-dialog--family .family-fish-panel .fish-top-view-card__metrics > span {
  background: #123943;
}
.entity-profile-dashboard .line-admin-tools summary { color: #f2d392; }
.entity-profile-dashboard .line-admin-tools form,
.entity-profile-dashboard .line-admin-tools input,
.entity-profile-dashboard .line-admin-tools textarea,
.entity-profile-dashboard .line-admin-tools select {
  border-color: #41646b;
  background: #123943;
  color: #f6f0dc;
}
.entity-profile-dashboard--breeder .founding-profile-hero { padding: 16px; border-color: #315660; background: rgba(6, 29, 37, .42); }
.entity-profile-dashboard--breeder .founding-profile-hero__identity { align-items: flex-start; flex-direction: column; }
.entity-profile-dashboard--breeder .founding-profile-hero__status { align-items: flex-start; text-align: left; }
.entity-profile-dashboard--breeder .founding-checklist { grid-template-columns: 1fr; }
.entity-profile-dashboard--breeder .founding-check { border-color: #315660; background: #10343e; }
.entity-profile-dashboard--breeder .founding-record-group { min-width: 0; }

/* Breeder & Farm Identity: replace remaining legacy light containers. */
.profile-dialog--breeder .panel-header {
  border-bottom-color: #315660;
}
.profile-dialog--breeder .founding-profile-hero {
  background:
    radial-gradient(circle at 100% 0, rgba(202, 166, 99, .16), transparent 38%),
    linear-gradient(145deg, #123943, #0a2932);
}
.profile-dialog--breeder .founding-program-record .mini-stat,
.profile-dialog--breeder .founding-farm,
.profile-dialog--breeder .founding-stat-grid > span,
.profile-dialog--breeder .founding-record-list > button,
.profile-dialog--breeder .founding-record-list > a {
  border: 1px solid #41646b;
  background: #123943;
  color: #f6f0dc;
}
.profile-dialog--breeder .founding-farm__icon {
  border: 1px solid rgba(202, 166, 99, .34);
  background: rgba(202, 166, 99, .12);
  color: #f2d392;
}
.profile-dialog--breeder .founding-farm span,
.profile-dialog--breeder .founding-farm p,
.profile-dialog--breeder .founding-stat-grid small,
.profile-dialog--breeder .founding-program-record .mini-stat small,
.profile-dialog--breeder .founding-check small,
.profile-dialog--breeder .founding-check em,
.profile-dialog--breeder .founding-record-group small,
.profile-dialog--breeder .founding-record-pagination {
  color: #a9c0c2;
}
.profile-dialog--breeder .badge--green {
  border: 1px solid rgba(85, 190, 143, .46);
  background: rgba(59, 153, 111, .18);
  color: #a8e8c8;
}
.profile-dialog--breeder .badge--amber {
  border: 1px solid rgba(221, 182, 103, .48);
  background: rgba(202, 166, 99, .16);
  color: #f2d392;
}
.profile-dialog--breeder .founding-stat-grid strong,
.profile-dialog--breeder .founding-program-record .mini-stat strong,
.profile-dialog--breeder .founding-record-list > button > span:last-child,
.profile-dialog--breeder .founding-record-list > a > span:last-child {
  color: #f2d392;
}
.profile-dialog--breeder .founding-progress { background: #294c55; }
.profile-dialog--breeder .founding-record-list > button:hover,
.profile-dialog--breeder .founding-record-list > a:hover {
  border-color: #a98748;
  background: #174650;
}
.profile-dialog--breeder .founding-record-pagination {
  border-top-color: #315660;
}
.profile-dialog--breeder .founding-record-pagination button {
  border-color: #41646b;
  background: #123943;
  color: #f2d392;
}
.profile-dialog--breeder .founding-record-pagination button:not(:disabled):hover {
  border-color: #a98748;
  background: #174650;
}

/* Form and security dialogs share the premium brand shell while keeping light form surfaces. */
.branded-dialog { border: 1px solid #315660; box-shadow: 0 30px 80px rgba(4, 26, 32, .42); }
.branded-dialog .dialog-header {
  margin: -22px -22px 17px;
  border-bottom: 1px solid #315660;
  padding: 16px 20px;
  background: linear-gradient(105deg, #071f28, #123846 72%, #174b57);
}
.branded-dialog .dialog-header h2 { color: #f8f1dc; }
.branded-dialog .dialog-header .eyebrow { color: #caa663; }
.branded-dialog .dialog-header .icon-button { border-color: #4d6d73; background: rgba(255,255,255,.08); color: #fff; }
.branded-dialog .button--primary,
.branded-dialog .primary-button { background: linear-gradient(135deg, #176b59, #0d544e); box-shadow: 0 7px 18px rgba(13, 84, 78, .2); }
.branded-terms-dialog .terms-acceptance-dialog__header {
  border-bottom-color: #315660;
  background: linear-gradient(105deg, #071f28, #123846 72%, #174b57);
}
.branded-terms-dialog .terms-acceptance-dialog__header h2 { color: #f8f1dc; }
.branded-terms-dialog .terms-acceptance-dialog__header .eyebrow { color: #caa663; }
.branded-terms-dialog .terms-acceptance-dialog__header p { color: #a9c0c2; }

/* Admin demand-survey dashboard */
.survey-result-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.survey-result-metric {
  display: grid;
  gap: 5px;
  min-height: 126px;
  border: 1px solid #d9e6e1;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, #fff, #f4f8f6);
  box-shadow: 0 8px 20px rgba(22, 72, 65, .07);
}
.survey-result-metric small { color: #647b77; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.survey-result-metric strong { color: #123f38; font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.survey-result-metric span { align-self: end; color: #71837f; font-size: .78rem; }
.survey-result-metric.is-mint { border-color: #a9dbc9; background: linear-gradient(145deg, #fafffd, #e5f6ef); }
.survey-result-metric.is-gold { border-color: #e6d29e; background: linear-gradient(145deg, #fffdf7, #f7efd9); }
.survey-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.survey-result-chart { min-height: 270px; }
.survey-bars { display: grid; gap: 12px; padding: 2px 0 4px; }
.survey-bars > div { display: grid; gap: 6px; }
.survey-bars span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.survey-bars b { color: #284c46; font-size: .84rem; }
.survey-bars em { color: #728681; font-size: .76rem; font-style: normal; white-space: nowrap; }
.survey-bars i { height: 8px; overflow: hidden; border-radius: 999px; background: #e7efec; }
.survey-bars i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16705c, #5eb79b); }
.survey-response-list .data-table td small { display: block; margin-top: 3px; color: #768984; }
.survey-response-list .table-wrap { max-height: 540px; }

@media (max-width: 1120px) {
  .profile-dialog { width: min(980px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 24px)); }
  .entity-profile-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-profile-column--activity { grid-column: 1 / -1; min-height: 230px; }
  .survey-result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .profile-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .profile-dialog .dialog-header { min-height: 66px; padding: 10px 12px; }
  .profile-dialog .dialog-header h2 { max-width: 220px; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
  .entity-profile-dashboard { display: block; overflow: auto; padding: 9px; }
  .entity-profile-column { min-height: 420px; margin-bottom: 9px; overflow: visible; }
  .entity-profile-column__body { overflow: visible; }
  .entity-profile-tab-panel { overflow: visible; }
  .profile-dialog--family .family-fish-panel .fish-top-view-card {
    grid-template-columns: 1fr;
  }
  .profile-dialog--family .family-fish-panel .fish-top-view-card__body {
    border-top: 1px solid #41646b;
    border-left: 0;
  }
  .branded-dialog .dialog-header { margin: -18px -18px 15px; }
  .survey-result-metrics, .survey-result-grid { grid-template-columns: 1fr; }
  .survey-result-metric { min-height: 104px; }
}

/* Reusable media uploader: shared by Line, Family, Fish, Egg Batch and Fry Group. */
.media-upload-card {
  --media-surface: #fff;
  --media-surface-alt: #f3f8f6;
  --media-border: #cbded8;
  --media-text: #183e38;
  --media-muted: #6b817d;
  --media-accent: #176b59;
  --media-accent-soft: rgba(23, 107, 89, .1);
  display: grid;
  align-content: start;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--media-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--media-surface);
  color: var(--media-text);
  box-shadow: 0 10px 26px rgba(13, 55, 50, .08);
}
.media-upload-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.media-upload-card__header > div { display: grid; gap: 2px; }
.media-upload-card__header h3 { margin: 0; color: var(--media-text); font: 600 .92rem Georgia, serif; }
.media-upload-card__header small { color: var(--media-accent); font-size: .5rem; font-weight: 900; letter-spacing: .14em; }
.media-upload-card__header > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--media-border);
  border-radius: 10px;
  background: var(--media-accent-soft);
  color: var(--media-accent);
}
.media-upload-card__header svg,
.media-upload-dropzone__icon svg { width: 18px; height: 18px; }
.media-upload-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  overflow: hidden;
  border: 1px dashed var(--media-border);
  border-radius: 12px;
  padding: 13px;
  background: var(--media-surface-alt);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.media-upload-dropzone:hover { border-color: var(--media-accent); background: var(--media-accent-soft); transform: translateY(-1px); }
.media-upload-dropzone:focus-within { border-color: var(--media-accent); outline: 3px solid var(--media-accent-soft); outline-offset: 2px; }
.media-upload-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.media-upload-dropzone__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--media-accent-soft);
  color: var(--media-accent);
}
.media-upload-dropzone__content { display: grid; gap: 3px; min-width: 0; pointer-events: none; }
.media-upload-dropzone__content strong { color: var(--media-text); font-size: .68rem; }
.media-upload-dropzone__content small { overflow: hidden; color: var(--media-muted); font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
.media-upload-dropzone__action {
  border: 1px solid var(--media-border);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--media-surface);
  color: var(--media-accent);
  font-size: .52rem;
  font-weight: 850;
  pointer-events: none;
  white-space: nowrap;
}
.media-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-upload-field { display: grid; gap: 5px; }
.media-upload-field > span { color: var(--media-muted); font-size: .55rem; font-weight: 800; }
.media-upload-card .media-upload-field input,
.media-upload-card .media-upload-field select,
.media-upload-card .media-upload-field textarea {
  width: 100%;
  border: 1px solid var(--media-border);
  border-radius: 9px;
  padding: 8px 10px;
  outline: 0;
  background: var(--media-surface-alt);
  color: var(--media-text);
  font: inherit;
  font-size: .62rem;
}
.media-upload-card .media-upload-field textarea { min-height: 66px; resize: vertical; }
.media-upload-card .media-upload-field input:focus,
.media-upload-card .media-upload-field select:focus,
.media-upload-card .media-upload-field textarea:focus { border-color: var(--media-accent); box-shadow: 0 0 0 3px var(--media-accent-soft); }
.media-upload-check { display: flex; align-items: center; gap: 8px; color: var(--media-muted); font-size: .58rem; }
.media-upload-check input { width: auto; accent-color: var(--media-accent); }
.media-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.media-upload-actions small { color: var(--media-muted); font-size: .52rem; }
.media-upload-card .media-upload-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  background: var(--media-accent);
  color: #fff;
  font: inherit;
  font-size: .58rem;
  font-weight: 850;
  cursor: pointer;
}
.media-upload-disclosure[open] > summary { border-bottom: 1px solid var(--media-border, #d7e5e1); }
.media-upload-card--compact { gap: 8px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.media-upload-card--compact .media-upload-dropzone { min-height: 64px; padding: 9px; }
.media-upload-card--compact .media-upload-dropzone__icon { width: 30px; height: 30px; }

/* Premium profile modals inherit one dark media theme instead of page-specific form CSS. */
.entity-profile-dashboard .media-upload-card,
.fish-activity-flyout .media-upload-card,
.passport-expansion-management .media-upload-card {
  --media-surface: #0d3039;
  --media-surface-alt: #123943;
  --media-border: #41646b;
  --media-text: #f6f0dc;
  --media-muted: #a5bdc0;
  --media-accent: #d6ad61;
  --media-accent-soft: rgba(202, 166, 99, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02), 0 12px 28px rgba(4, 25, 31, .22);
}
.entity-profile-dashboard .line-admin-tools .media-upload-card {
  border-color: var(--media-border);
  background: var(--media-surface);
  color: var(--media-text);
}
.entity-profile-dashboard .media-upload-disclosure { border-color: #41646b; background: #0a2932; }
.entity-profile-dashboard .media-upload-disclosure summary { color: #f2d392; }
.entity-profile-dashboard .media-upload-disclosure .media-upload-card { margin: 10px; }
.entity-profile-dashboard .media-upload-card .media-upload-field input,
.entity-profile-dashboard .media-upload-card .media-upload-field select,
.entity-profile-dashboard .media-upload-card .media-upload-field textarea,
.fish-activity-flyout .media-upload-card .media-upload-field input,
.fish-activity-flyout .media-upload-card .media-upload-field select,
.fish-activity-flyout .media-upload-card .media-upload-field textarea,
.passport-expansion-management .media-upload-card .media-upload-field input,
.passport-expansion-management .media-upload-card .media-upload-field select,
.passport-expansion-management .media-upload-card .media-upload-field textarea {
  border-color: var(--media-border);
  background: var(--media-surface-alt);
  color: var(--media-text);
}
.entity-profile-dashboard .media-upload-card .media-upload-actions button,
.fish-activity-flyout .media-upload-card .media-upload-actions button,
.passport-expansion-management .media-upload-card .media-upload-actions button { background: #bd9250; color: #10252d; }

@media (max-width: 620px) {
  .media-upload-grid { grid-template-columns: 1fr; }
  .media-upload-dropzone { grid-template-columns: auto minmax(0, 1fr); }
  .media-upload-dropzone__action { grid-column: 2; justify-self: start; }
  .media-upload-actions { align-items: stretch; flex-direction: column; }
  .media-upload-card .media-upload-actions button { width: 100%; }
}
.passport-readiness-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.passport-readiness-list span {
  align-items: center;
  border: 1px solid var(--border, #dbe4df);
  border-radius: 999px;
  display: flex;
  font-size: 0.75rem;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
}

.passport-readiness-list svg { height: 0.85rem; width: 0.85rem; }
.passport-readiness-list .is-ready { background: #e8f7ef; color: #176b47; }
.passport-readiness-list .is-missing { background: #fff3e7; color: #9a4b13; }

/* Founding Breeder self-service */
.founding-self-hero { display: flex; align-items: center; gap: 18px; padding: 22px; background: linear-gradient(135deg, #0d3e35, #176b59); color: #fff; }
.founding-self-hero h2, .founding-self-hero p { margin: 3px 0; }
.founding-self-hero > .badge { margin-left: auto; }
.founding-self-hero__seal { display: grid; width: 58px; height: 58px; place-items: center; flex: 0 0 auto; border: 1px solid rgba(238,205,133,.55); border-radius: 18px; background: rgba(255,255,255,.09); color: #f0d28c; }
.founding-self-hero__seal svg { width: 32px; height: 32px; }
.founding-self-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.founding-self-summary article { display: grid; gap: 4px; padding: 17px; }
.founding-self-summary strong { color: #174e42; font-size: 1.15rem; }
.founding-self-summary small { color: #72827e; }
.founding-self-documents, .founding-self-checklist, .founding-self-apply { padding: 20px; }
.founding-self-document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.founding-self-document { display: grid; align-content: start; gap: 12px; border: 1px solid #d4e2dd; border-radius: 15px; padding: 17px; background: #f7faf9; }
.founding-self-document.is-accepted { border-color: #76b6a3; background: #eff9f5; }
.founding-self-document header { display: flex; align-items: center; gap: 10px; }
.founding-self-document header > span:first-child { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #e0f0eb; color: #176b59; }
.founding-self-document header svg, .founding-self-document .outline-button svg { width: 18px; height: 18px; }
.founding-self-document header div { flex: 1; }
.founding-self-document h4, .founding-self-document p { margin: 0; }
.founding-self-document header small { color: #71847e; font-weight: 800; letter-spacing: .08em; }
.founding-self-document .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
.founding-self-document form { display: grid; gap: 10px; border-top: 1px solid #d4e2dd; padding-top: 12px; }
.founding-self-consent-check { display: flex; align-items: flex-start; gap: 8px; color: #405a53; font-size: .78rem; }
.founding-self-consent-check input { margin-top: 2px; accent-color: #176b59; }
.founding-self-accepted-note { color: #176b59; font-size: .76rem; font-weight: 750; }
.founding-self-checklist > div:last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.founding-self-checklist article { display: flex; align-items: center; gap: 9px; border: 1px solid #d9e5e1; border-radius: 11px; padding: 10px; background: #f7faf9; }
.founding-self-checklist article > span:first-child { color: #176b59; }
.founding-self-checklist article svg { width: 17px; height: 17px; }
.founding-self-checklist article div { min-width: 0; flex: 1; }
.founding-self-checklist article strong, .founding-self-checklist article small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.founding-self-checklist article small { margin-top: 2px; color: #71847e; }
.founding-self-apply { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 22px; margin-top: 14px; }
.founding-self-apply form, .founding-self-apply label { display: grid; gap: 9px; }
.founding-self-apply textarea { min-height: 100px; border: 1px solid #cbded8; border-radius: 10px; padding: 11px; font: inherit; }
.founding-self-empty { display: flex; align-items: center; gap: 15px; padding: 24px; }
.founding-self-empty > span svg { width: 34px; height: 34px; color: #176b59; }
.founding-eligibility { margin-top:14px; padding:20px; }
.founding-eligibility__items { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.founding-eligibility__items article { display:flex; align-items:center; gap:10px; border:1px solid #d7e4df; border-radius:12px; padding:12px; background:#f7faf9; }
.founding-eligibility__items article.is-ready { border-color:#8bc6b4; background:#eff9f5; }
.founding-eligibility__items article.is-blocked { border-color:#e4c88f; background:#fff8e9; }
.founding-eligibility__items article > span:first-child { display:grid; width:32px; height:32px; place-items:center; border-radius:50%; color:#176b59; background:#dff2ea; }
.founding-eligibility__items article.is-blocked > span:first-child { color:#8a5c16; background:#f7e8c9; }
.founding-eligibility__items article svg { width:17px; height:17px; }
.founding-eligibility__items article div { min-width:0; flex:1; }
.founding-eligibility__items strong, .founding-eligibility__items small { display:block; }
.founding-eligibility__items small { margin-top:3px; color:#71847e; }
.founding-eligibility__notice { margin:12px 0 0; border-radius:10px; padding:10px 12px; color:#7a5418; background:#fff3d7; }
.founding-self-apply.is-disabled { opacity:.68; }
@media (max-width: 720px) { .founding-self-summary, .founding-self-document-grid, .founding-self-checklist > div:last-child, .founding-self-apply { grid-template-columns: 1fr; } .founding-self-hero { align-items: flex-start; flex-wrap: wrap; } .founding-self-hero > .badge { margin-left: 0; } }
@media (max-width:720px) { .founding-eligibility__items { grid-template-columns:1fr; } }

/* BREEDER self-service onboarding */
.onboarding-progress { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:14px; }
.onboarding-progress > span { display:flex; align-items:center; gap:8px; color:#82908c; font-size:.72rem; }
.onboarding-progress i { display:grid; width:28px; height:28px; place-items:center; border-radius:50%; background:#edf2f0; font-style:normal; }
.onboarding-progress i svg { width:15px; height:15px; }
.onboarding-progress .is-complete { color:#176b59; }
.onboarding-progress .is-complete i { background:#dff2ea; }
.breeder-self-card { display:grid; grid-template-columns:minmax(220px,.65fr) minmax(0,1.35fr); gap:24px; margin-top:14px; padding:22px; }
.breeder-self-card__heading { display:grid; align-content:start; }
.breeder-self-card h2, .breeder-self-card p { margin:3px 0; }
.farm-profile-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.farm-profile-form label, .farm-submit-review label, .breeder-self-card form label { display:grid; gap:5px; color:#536b65; font-size:.72rem; font-weight:750; }
.farm-profile-form .is-wide { grid-column:1/-1; }
.farm-profile-form input, .farm-profile-form textarea, .farm-submit-review input, .breeder-self-card form input, .breeder-self-card form textarea { width:100%; border:1px solid #cbded8; border-radius:9px; padding:9px 10px; background:#f8fbfa; color:#183e38; font:inherit; }
.farm-profile-form textarea { min-height:70px; resize:vertical; }
.onboarding-identity-summary { display:flex; align-items:center; gap:14px; margin-top:14px; padding:16px 20px; }
.onboarding-identity-summary div { display:grid; }
.onboarding-identity-summary p { margin-left:auto; color:#72827e; }
.farm-submit-review { grid-column:2; display:grid; gap:9px; margin-top:12px; border-top:1px solid #d8e5e1; padding-top:14px; }
.farm-review-note { border-left:3px solid #d39d45; padding:9px 12px; background:#fff7e9; }
.onboarding-locked { align-self:start; border:1px solid #cbded8; border-radius:10px; padding:12px; background:#f1f6f4; }
@media (max-width:720px) { .onboarding-progress, .breeder-self-card, .farm-profile-form { grid-template-columns:1fr; } .farm-profile-form .is-wide, .farm-submit-review { grid-column:auto; } .onboarding-identity-summary { align-items:flex-start; flex-direction:column; } .onboarding-identity-summary p { margin-left:0; } }
.farm-verification-queue { margin-top:14px; padding:18px; }
.farm-verification-review { display:grid; grid-template-columns:minmax(220px,1fr) 150px minmax(180px,1fr) minmax(180px,1fr) auto; align-items:center; gap:9px; border-top:1px solid #d8e5e1; padding:12px 0; }
.farm-verification-review > div { display:grid; gap:3px; }
.farm-verification-review small { color:#71847e; }
.farm-verification-review a { color:#176b59; font-size:.72rem; font-weight:800; }
.farm-verification-review input, .farm-verification-review select { min-width:0; border:1px solid #cbded8; border-radius:8px; padding:8px; }
@media (max-width:900px) { .farm-verification-review { grid-template-columns:1fr; } }
