/* src/admin.css */
.login-stack {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: stretch;
}
.login-stack > .login-card {
  max-width: none;
}
.admin-login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: #f8f3e7;
  border: 1px solid #d8c9ad;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 25px 70px #071d1840;
}
.admin-login-card h2 {
  margin: 0;
  color: var(--green);
  font: 700 28px Georgia, serif;
}
.admin-login-card p {
  color: #5f6c67;
  line-height: 1.5;
}
.admin-login-card label span {
  display: block;
  margin-bottom: 7px;
  color: #52605c;
  font-size: 12px;
  font-weight: 700;
}
.admin-login-card input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  outline: none;
}
.admin-login-card input:focus {
  border-color: var(--green2);
  box-shadow: 0 0 0 3px #27655522;
}
.admin-login-card button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
.admin-login-card button:disabled {
  opacity: .45;
}
.login-error {
  margin: 0 !important;
  color: #9a3f34 !important;
  font-size: 13px;
}
.admin-shell {
  max-width: 1440px;
  padding-bottom: 0;
}
.admin-content {
  padding: 30px;
}
.admin-view,
.admin-detail {
  min-width: 0;
}
.admin-hero,
.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.admin-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--green);
  font: 700 38px Georgia, serif;
}
.admin-hero p:last-child,
.detail-title p:last-child {
  margin: 7px 0 0;
  color: #68736f;
}
.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid #b9d6c5;
  border-radius: 99px;
  padding: 8px 12px;
  background: #e7f2eb;
  color: #276148;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}
.readonly-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9167;
}
.admin-alert {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #e4b8ae;
  border-radius: 12px;
  background: #fff2ef;
  color: #8b392f;
  font-size: 13px;
}
.admin-path {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ebe5d8;
}
.admin-path span,
.admin-path small {
  font-size: 11px;
  color: #6d7874;
}
.admin-path code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #244a3f;
  font-size: 12px;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.admin-metrics article {
  display: flex;
  min-height: 122px;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #faf8f2;
}
.admin-metrics span,
.admin-metrics small {
  color: #6b7672;
  font-size: 11px;
}
.admin-metrics strong {
  color: var(--green);
  font: 700 30px Georgia, serif;
}
.admin-tabs {
  display: flex;
  gap: 6px;
  margin: 22px 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eae5da;
  width: max-content;
}
.admin-tabs button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: transparent;
  color: #62706b;
}
.admin-tabs button.active {
  background: var(--green);
  color: white;
  font-weight: 700;
}
.admin-panel {
  min-width: 0;
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #faf8f2;
}
.admin-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-panel-heading h2 {
  margin: 0;
  color: var(--green);
  font-size: 23px;
}
.admin-panel-heading > strong {
  padding: 5px 10px;
  border-radius: 99px;
  background: #e9e3d7;
  color: var(--green);
  font-size: 12px;
}
.admin-panel-heading > span {
  font-size: 11px;
  color: #73807b;
}
.admin-filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}
.admin-filters label {
  min-width: 0;
}
.admin-filters label span {
  display: block;
  margin: 0 0 5px 2px;
  color: #697570;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-filters input,
.admin-filters select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 11px;
  background: white;
  color: var(--ink);
  outline: none;
}
.admin-filters input:focus,
.admin-filters select:focus {
  border-color: #71988a;
  box-shadow: 0 0 0 3px #2765551b;
}
.admin-filters input:disabled {
  background: #eeebe3;
  color: #89908d;
}
.admin-table-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: #ece8de;
  color: #52605c;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-data-table td {
  max-width: 260px;
  padding: 10px 12px;
  border-top: 1px solid #ece8df;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-data-table tbody tr:hover {
  background: #fbf7ed;
}
.admin-data-table .row-action {
  border: 1px solid #bdcec8;
  border-radius: 9px;
  padding: 7px 10px;
  background: white;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}
.cell-pill {
  padding: 4px 7px;
  border-radius: 99px;
  background: #edf1ec;
  color: #35584d;
}
.table-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 90px;
  background: #fffdf0d9;
  color: #536660;
  font-weight: 700;
}
.admin-empty {
  padding: 22px;
  text-align: center;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: #697570;
  font-size: 12px;
}
.pager div {
  display: flex;
  gap: 7px;
}
.pager button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  background: white;
  color: var(--green);
}
.pager button:disabled {
  opacity: .4;
}
.admin-schema-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.table-list {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f5ed;
}
.table-list button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  background: transparent;
  color: #52605c;
  text-align: left;
}
.table-list button.active {
  background: var(--green);
  color: white;
}
.table-list strong {
  font-size: 10px;
}
.table-panel {
  overflow: hidden;
}
.schema-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.schema-columns div {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ded8cb;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f1ede4;
  font-size: 10px;
}
.schema-columns span {
  color: #75807c;
}
.schema-columns b {
  color: #8e6728;
}
.table-filters {
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
}
.generic td {
  max-width: 220px;
}
.generic td[title] {
  cursor: help;
}
.admin-detail > .back {
  margin-bottom: 8px;
}
.detail-provenance {
  margin-bottom: 16px;
}
.admin-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
}
.admin-definition-grid > div {
  padding: 12px 0;
  border-top: 1px solid #e7e1d6;
}
.admin-definition-grid dt {
  color: #75807c;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-definition-grid dd {
  margin: 5px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.admin-definition-grid code {
  font-size: 10px;
}
.path-value {
  font-size: 12px;
}
.section-note {
  margin: -5px 0 15px;
  color: #6b7672;
  font-size: 12px;
  line-height: 1.5;
}
.field-table td:nth-child(2) small {
  display: block;
  margin-top: 3px;
  color: #79847f;
}
.field-table td:nth-child(5),
.field-table td:nth-child(6) {
  max-width: 300px;
}
.calculated-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.calculated-grid article {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #d9e2dc;
  border-radius: 14px;
  background: #f1f6f2;
}
.calculated-grid article.unavailable {
  border-color: #e0d1b5;
  background: #f7f1e5;
}
.calculated-grid span {
  color: #62706b;
  font-size: 11px;
}
.calculated-grid strong {
  margin: 12px 0 7px;
  color: var(--green);
  font-size: 20px;
}
.calculated-grid small {
  margin-top: auto;
  color: #75807c;
  line-height: 1.4;
}
.admin-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #62706b;
}
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #cdd8d2;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: admin-spin .8s linear infinite;
}
@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width:900px) {
  .admin-content {
    padding: 22px 16px;
  }
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-filters,
  .table-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-filters .wide {
    grid-column: span 2;
  }
  .calculated-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-schema-layout {
    grid-template-columns: 1fr;
  }
  .table-list {
    position: static;
    display: flex;
    overflow: auto;
  }
  .table-list .eyebrow {
    display: none;
  }
  .table-list button {
    flex: 0 0 auto;
    width: auto;
  }
  .login-stack {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}
@media (max-width:560px) {
  .admin-content {
    padding: 18px 12px;
  }
  .admin-hero,
  .detail-title {
    align-items: flex-start;
  }
  .admin-hero h1,
  .detail-title h1 {
    font-size: 30px;
  }
  .readonly-badge {
    padding: 7px 9px;
  }
  .admin-path {
    grid-template-columns: 1fr;
  }
  .admin-metrics {
    gap: 8px;
  }
  .admin-metrics article {
    min-height: 105px;
    padding: 13px;
  }
  .admin-metrics strong {
    font-size: 25px;
  }
  .admin-tabs {
    width: 100%;
  }
  .admin-tabs button {
    flex: 1;
  }
  .admin-panel {
    padding: 14px;
  }
  .admin-filters,
  .table-filters {
    grid-template-columns: 1fr;
  }
  .admin-filters .wide {
    grid-column: auto;
  }
  .admin-definition-grid {
    grid-template-columns: 1fr;
  }
  .calculated-grid {
    grid-template-columns: 1fr;
  }
  .admin-data-table {
    font-size: 11px;
  }
  .login-stack {
    display: block;
  }
  .admin-login-card {
    margin-top: 14px;
    padding: 23px;
  }
  .login-shell {
    align-items: start;
  }
  .pager {
    align-items: flex-start;
    gap: 8px;
  }
  .pager div {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
.management-view {
  display: grid;
  gap: 16px;
}
.management-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #e2dccf;
  border-radius: 14px;
  background: white;
}
.management-form.users {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
}
.management-form.assignment {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
}
.management-form label span {
  display: block;
  margin: 0 0 5px 2px;
  color: #697570;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.management-form input,
.management-form select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: white;
}
.management-form button,
.management-actions button,
.membership button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
.management-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.management-cards > article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.management-cards h3 {
  margin: 0 0 3px;
  color: var(--green);
}
.management-cards code {
  font-size: 11px;
}
.management-cards dl {
  display: flex;
  gap: 18px;
}
.management-cards dl div {
  display: grid;
  gap: 3px;
}
.management-cards dt {
  color: #75807c;
  font-size: 10px;
  text-transform: uppercase;
}
.management-cards dd {
  margin: 0;
  font-weight: 700;
}
.management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.danger-button {
  background: #9a3f34 !important;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #abc2b9;
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}
.upload-button input {
  display: none;
}
.source-editor {
  margin-top: 12px;
}
.source-editor summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
}
.source-editor .management-form {
  margin: 10px 0 0;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
}
.membership {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}
.membership button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 10px;
}
.admin-data-table td > small {
  display: block;
  color: #75807c;
}
@media (max-width:1000px) {
  .management-form,
  .management-form.users,
  .management-form.assignment,
  .source-editor .management-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .management-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width:560px) {
  .management-form,
  .management-form.users,
  .management-form.assignment,
  .source-editor .management-form {
    grid-template-columns: 1fr;
  }
  .management-cards dl {
    flex-wrap: wrap;
  }
  .management-actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* src/styles.css */
:root {
  font-family:
    Inter,
    Segoe UI,
    system-ui,
    sans-serif;
  color: #1e2c28;
  background: #f3f0e7;
  font-synthesis: none;
  --green:#173f35;
  --green2:#276555;
  --cream:#f3f0e7;
  --gold:#dba84d;
  --line:#ddd8cb;
  --ink:#1e2c28;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--cream);
  overflow-x: hidden;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(
      circle at 70% 10%,
      #326959 0,
      transparent 30%),
    linear-gradient(
      150deg,
      #102d27,
      #1b4b3f 64%,
      #9a7131);
}
.login-card {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  background: #fffdf7;
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 25px 70px #071d1877;
}
.brand-mark,
.mini-brand {
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--green);
  font-family: Georgia, serif;
  font-weight: 700;
}
.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 22px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #86662d;
  margin: 0 0 7px;
}
.login-card h1,
.welcome h1,
.list-heading h1,
.animal-hero h1,
.sync-page h1 {
  font-family: Georgia, serif;
  margin: 0;
  color: var(--green);
}
.login-card h1 {
  font-size: 38px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.login-card h1 span {
  color: #b17a25;
}
.lead {
  line-height: 1.55;
  color: #53615d;
}
.notice {
  font-size: 12px;
  padding: 12px 14px;
  border: 1px solid #e6d7bb;
  background: #fbf6e9;
  border-radius: 12px;
  color: #725c36;
}
.login-options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.login-options button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
}
.login-options button:hover {
  border-color: var(--green2);
  transform: translateY(-1px);
}
.login-options small {
  display: block;
  margin-top: 3px;
  color: #77817e;
}
.app-shell {
  max-width: 860px;
  margin: auto;
  min-height: 100vh;
  padding-bottom: 92px;
}
header {
  height: 72px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  background: #f8f6efcc;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.mini-brand {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 19px;
}
.mini-brand + div {
  min-width: 0;
  flex: 1;
}
.mini-brand + div strong,
.mini-brand + div small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-brand + div small {
  font-size: 11px;
  color: #68736f;
}
.connection {
  border: 0;
  background: #e7e3d9;
  border-radius: 99px;
  padding: 8px 10px;
  font-size: 11px;
  color: #52605c;
}
.connection i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a16c57;
  margin-right: 6px;
}
.connection i.on {
  background: #2e9367;
}
.content {
  padding: 24px 18px;
}
.welcome {
  padding: 12px 2px 22px;
}
.welcome h1 {
  font-size: 36px;
}
.welcome > p:last-child {
  margin: 4px 0 0;
  color: #62706b;
}
.metric-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}
.metric {
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #faf8f2;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric span {
  font-size: 12px;
  color: #68736f;
}
.metric strong {
  font-family: Georgia, serif;
  font-size: 32px;
  color: var(--green);
}
.metric.accent {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.metric.accent span,
.metric.accent strong {
  color: white;
}
.panel {
  margin-top: 16px;
  padding: 18px;
  background: #faf8f2;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.sync-summary {
  display: flex;
  align-items: center;
  gap: 15px;
}
.sync-summary > div {
  flex: 1;
}
.sync-summary strong,
.sync-summary small {
  display: block;
}
.sync-summary small {
  font-size: 11px;
  color: #73807b;
  margin-top: 5px;
}
.panel button,
.comment-form button,
.sync-page > button {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  background: var(--green);
  color: white;
  font-weight: 600;
}
.panel button:disabled {
  opacity: .45;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-title h2 {
  font-size: 17px;
  margin: 0;
}
.panel-title span {
  font-size: 12px;
  background: #e9e3d7;
  padding: 4px 8px;
  border-radius: 99px;
}
.quick {
  width: 100%;
  display: flex;
  justify-content: space-between !important;
  background: #f0ebdf !important;
  color: var(--green) !important;
}
.list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 6px 2px 18px;
}
.list-heading h1 {
  font-size: 32px;
}
.list-heading > span {
  background: var(--green);
  color: white;
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 12px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 15px;
  position: sticky;
  top: 84px;
  z-index: 3;
  box-shadow: 0 5px 18px #50472d0d;
}
.search span {
  font-size: 24px;
  color: #66736f;
}
.search input {
  width: 100%;
  height: 50px;
  border: 0;
  outline: 0;
  background: transparent;
}
.animal-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.animal-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #faf8f2;
  border-radius: 16px;
  padding: 11px;
  text-align: left;
  color: var(--ink);
}
.animal-list > button:hover {
  border-color: #90a59e;
}
.animal-list strong,
.animal-list small {
  display: block;
}
.animal-list small {
  color: #74807c;
  margin-top: 3px;
}
.animal-list > button > span {
  font-size: 12px;
  color: #536660;
}
.cow-avatar {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background: #e6dfcf;
  color: #806126;
  font-weight: 700;
}
.back {
  border: 0;
  background: transparent;
  color: #4b655d;
  padding: 7px 0 17px;
}
.animal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 12px;
}
.animal-hero h1 {
  font-size: 34px;
}
.animal-hero p:last-child {
  margin: 5px 0;
  color: #6c7874;
}
.status {
  background: #e8dfcf;
  padding: 7px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}
.status.good {
  background: #dbeadf;
  color: #246542;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.info-grid > div {
  padding: 12px 0;
  border-top: 1px solid #e6e1d7;
}
.info-grid > div:nth-child(odd) {
  padding-right: 15px;
}
.info-grid dt {
  font-size: 11px;
  color: #77827e;
}
.info-grid dd {
  font-weight: 600;
  margin: 3px 0 0;
}
.comment-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: white;
}
.comment-form button {
  margin-top: 7px;
}
.comments article {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.comments time {
  float: right;
  font-size: 10px;
  color: #7b8581;
}
.comments p {
  margin: 7px 0;
}
.comments small {
  color: #9b6c20;
}
.muted,
.empty {
  color: #77827e;
  font-size: 13px;
}
.sync-page p {
  line-height: 1.6;
}
.sync-page dl div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.sync-page dt {
  color: #68736f;
}
.sync-page dd {
  margin: 0;
  font-weight: 600;
}
.feedback {
  color: #366c5c;
  font-size: 13px;
}
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 100%);
  height: 76px;
  padding: 7px 16px max(7px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fbf9f4f2;
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 5;
}
nav button {
  border: 0;
  background: transparent;
  color: #74807c;
  font-size: 10px;
}
nav button span {
  display: block;
  font-size: 22px;
  margin-bottom: 2px;
}
nav button.active {
  color: var(--green);
  font-weight: 700;
}
@media (max-width:520px) {
  .login-card {
    padding: 25px;
  }
  .login-card h1 {
    font-size: 31px;
  }
  .login-shell {
    padding: 18px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric:first-child {
    grid-column: 1/-1;
    min-height: 96px;
  }
  .metric {
    min-height: 102px;
  }
  .sync-summary {
    align-items: flex-end;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .info-grid > div:nth-child(odd) {
    padding-right: 0;
  }
  .content {
    padding: 20px 14px;
  }
}
.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.login-form label span {
  display: block;
  margin: 0 0 6px 2px;
  color: #52605c;
  font-size: 12px;
  font-weight: 700;
}
.login-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  outline: none;
}
.login-form input:focus {
  border-color: var(--green2);
  box-shadow: 0 0 0 3px #27655522;
}
.login-form button {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
.login-form button:disabled {
  opacity: .5;
}
.login-card > .login-error {
  margin-top: 14px !important;
}
.header-identity select {
  max-width: 280px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 700;
  outline: 0;
}
.dashboard-charts {
  overflow: hidden;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.distribution {
  min-width: 0;
}
.distribution h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--green);
}
.distribution div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px 0 10px;
  border-bottom: 1px solid #e8e3d8;
  font-size: 11px;
}
.distribution div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.distribution div i {
  position: absolute;
  left: 0;
  bottom: 3px;
  height: 3px;
  border-radius: 9px;
  background: var(--gold);
}
@media (max-width:520px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .header-identity select {
    max-width: 170px;
  }
}
.report-tabs {
  display: flex;
  gap: .5rem;
  overflow: auto;
  padding: .2rem 0 1rem;
}
.report-tabs button {
  white-space: nowrap;
  border: 1px solid #d8e0dc;
  background: #fff;
  border-radius: 999px;
  padding: .65rem .9rem;
  color: #355047;
}
.report-tabs button.active {
  background: #176c4b;
  color: #fff;
  border-color: #176c4b;
}
.report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.report-filters label {
  display: grid;
  gap: .35rem;
  font-size: .8rem;
  color: #52675f;
}
.report-filters input {
  border: 1px solid #ced9d4;
  border-radius: .7rem;
  padding: .7rem;
  font: inherit;
}
.report-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .8rem;
}
.report-links button {
  border: 0;
  border-radius: .6rem;
  background: #edf6f1;
  color: #176c4b;
  padding: .55rem .7rem;
}
nav {
  overflow-x: auto;
  grid-template-columns: repeat(4, 1fr);
}
nav button {
  min-width: 70px;
}
[hidden] {
  display: none !important;
}
.pie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.pie-card {
  background: white;
  border: 1px solid #e0e7e4;
  border-radius: 18px;
  padding: 18px;
  min-width: 0;
}
.pie-card h3 {
  font-size: 16px;
  margin: 0;
}
.pie-card svg {
  display: block;
  width: 100%;
  height: 210px;
}
.pie-card svg [role=button] {
  cursor: pointer;
  stroke: white;
  stroke-width: 2;
}
.pie-card svg [role=button]:focus {
  outline: none;
  stroke: #111;
  stroke-width: 4;
}
.pie-tooltip {
  font-size: 13px;
  min-height: 36px;
  color: #3e544d;
}
.pie-legend {
  display: grid;
  gap: 4px;
}
.pie-legend button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f7f5;
  color: #213b32;
  padding: 10px;
  text-align: left;
  min-height: 44px;
}
.pie-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pie-legend span {
  flex: 1;
}
.pie-legend b {
  font-size: 12px;
}
.rejection-alert {
  display: block !important;
  background: #fff0f0;
  color: #a11624;
  font-size: 13px !important;
  padding: 6px 9px;
  border: 1px solid #e7a0a7;
  border-radius: 8px;
  white-space: normal;
}
.rejection-alert span {
  font-size: 22px !important;
  color: #a11624 !important;
}
.rejected-animal {
  border-left: 5px solid #a11624 !important;
}
.card-highlight {
  background: #e6eee9;
  padding: 10px;
  border-radius: 12px;
  min-width: 65px;
  max-width: 130px;
  overflow-wrap: anywhere;
}
.card-highlight small {
  font-size: 11px;
}
.card-highlight b {
  font-size: 22px;
}
.work-alert {
  background: #fff2c8 !important;
  color: #6a4900 !important;
  padding: 5px;
}
.comment-alert {
  background: #e6efff !important;
  color: #254875 !important;
  padding: 5px;
}
.list-display-toggle {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0;
}
.list-display-toggle button {
  min-height: 44px;
}
.field-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.field-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.field-options input[type=checkbox],
.report-filters input[type=checkbox] {
  width: 18px;
  height: 18px;
}
.admin-panel fieldset {
  margin: 18px 0;
  border: 1px solid #d8e2dd;
  border-radius: 12px;
  padding: 14px;
}
.admin-panel ol li {
  margin: 5px 0;
}
.admin-panel ol button {
  margin-left: 10px;
  min-width: 36px;
  min-height: 36px;
}
.admin-data-table input:not([type=checkbox]) {
  min-width: 110px;
  max-width: 180px;
}
.month-heading {
  background: #e6eee9;
  color: #1c473a;
  width: 100%;
  text-align: left;
}
.info-grid dd {
  overflow-wrap: anywhere;
}
.animal-list button > div {
  min-width: 0;
}
.animal-list small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-links button {
  min-height: 44px;
}
@media (max-width:540px) {
  .pie-grid {
    grid-template-columns: 1fr;
  }
  .card-highlight {
    max-width: 95px;
  }
  .list-heading h1 {
    font-size: 23px;
  }
  .pie-card svg {
    height: 190px;
  }
  .admin-panel {
    overflow: hidden;
  }
}
.pie-legend button {
  border: 0;
  border-radius: 8px;
}
.pie-legend button:hover {
  background: #e4eee8;
}
.admin-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.admin-navigation a {
  color: inherit;
  font-weight: 600;
}
.contract-summary {
  overflow-wrap: anywhere;
}
@media (max-width:600px) {
  header {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
  }
  .admin-navigation {
    order: 3;
    flex-basis: 100%;
    padding: 6px 0;
  }
  .management-form input {
    max-width: 100%;
  }
}
.new-password {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.new-password input {
  width: 100%;
  min-width: 0;
}
.new-password button {
  justify-self: start;
}
header {
  height: auto;
  min-height: 72px;
}
.header-identity > strong {
  font-size: 16px;
}
.header-identity select {
  display: block;
  font-size: 12px;
  max-width: 100%;
  color: #52605c;
  background: transparent;
  border: 0;
  padding: 2px 0;
}

/* src/admin-overrides.css */
.app-shell.admin-shell {
  max-width: 1440px;
  padding-bottom: 0;
}
.content.admin-content {
  min-width: 0;
  padding: 30px;
}
.admin-definition-grid > div {
  min-width: 0;
}
.path-value {
  word-break: break-all;
}
.stable-summary {
  margin-top: 16px;
}
@media (max-width:900px) {
  .content.admin-content {
    padding: 22px 16px;
  }
}
@media (max-width:560px) {
  .content.admin-content {
    padding: 18px 12px;
  }
}
