@import url("./owner-profile.css");
@import url('./illustrated-icons.css');

:root {
  color-scheme: light;
  --ink: #19342a;
  --deep: #0b4434;
  --pine: #176448;
  --sage: #e4f3e9;
  --muted: #52695e;
  --oat: #f4f8f6;
  --paper: #ffffff;
  --line: #dbe8e0;
  --sand: #eaf5ee;
  --amber: #326f53;
  --gold: #85d2a9;
  --red: #913c32;
  --rose: #faeae5;
  --screen: 540px;
  --shadow: 0 4px 15px #283e3110;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #e7f1eb;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-width: 300px; min-height: 100dvh; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .62; cursor: wait; }
a { color: var(--pine); }
p, h1, h2, h3, h4 { margin: 0; }
p { line-height: 1.48; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #137c57; outline-offset: 3px; }
#app { max-width: var(--screen); min-height: 100dvh; margin-inline: auto; background: var(--oat); }
.icon { flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.launch { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 11px; padding: 24px; text-align: center; }
.launch h1 { font-size: 35px; letter-spacing: -.055em; }
.launch p { color: var(--muted); }
.topbar {
  position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between;
  min-height: 65px; padding: max(8px, var(--safe-area-inset-top, env(safe-area-inset-top))) 17px 8px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.top-left, .brand, .inline, .photo-actions { display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 830; font-size: 23px; letter-spacing: -.053em; gap: 8px; }
.brand img { width: 30px; height: 30px; }
.icon-button {
  display: inline-grid; width: 44px; height: 44px; place-items: center; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--pine); padding: 0;
}
.icon-button:hover, .button.ghost:hover { background: var(--sage); }
.status-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 154px; padding: 7px 9px; min-height: 34px;
  font-size: 11px; line-height: 1.15; font-weight: 760; background: var(--sage); color: #2d5847;
  border: 0; border-radius: 16px; text-align: left;
}
.status-chip.offline, .status-chip.pending, .status-chip.cloudError, .status-chip.conflict { background: var(--sand); color: #315c4a; }
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, var(--screen));
  z-index: 5; padding: 7px 11px max(8px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px #19342a0a;
}
.bottom-nav button {
  display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 52px; border: 0; border-radius: 12px;
  padding: 4px 2px; background: transparent; font-size: 10.5px; font-weight: 720; color: var(--muted);
}
.bottom-nav button[aria-current="page"] { background: var(--sage); color: var(--deep); }
.bottom-nav button[aria-current="page"] .icon { stroke-width: 2.25; }
.page { padding: 19px 18px calc(98px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); }
.page > section + section { margin-top: 23px; }
.page > .button.full + section { margin-top: 22px; }
.screen-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.screen-heading h1 { font-size: clamp(28px, 8vw, 37px); font-weight: 830; line-height: 1.08; letter-spacing: -.055em; overflow-wrap: anywhere; }
.screen-heading p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.screen-heading .icon-button { margin-top: 1px; }
.eyebrow {
  display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 820; letter-spacing: .145em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 17px; height: 2px; background: #3a9d70; border-radius: 3px; }
.dash-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 12px; }
.dash-caption time { font-size: 11px; color: var(--muted); font-weight: 720; text-transform: capitalize; }
.hero {
  position: relative; isolation: isolate; min-height: 180px; overflow: hidden; background: var(--deep);
  color: #ffffff; border-radius: 22px; box-shadow: 0 8px 18px #203a2c24; padding: 20px 20px 18px;
}
.hero::before { position: absolute; z-index: -2; inset: 0; content: ""; background: radial-gradient(ellipse at 90% 35%, #276851 0, transparent 69%); }
.hero::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #0b4434 0%, #0b4434e8 22%, transparent 80%); }
.hero-art { position: absolute; z-index: -2; right: 0; bottom: 0; width: min(110%, 460px); height: auto; }
.hero h1 { font-weight: 830; font-size: clamp(29px, 7.7vw, 42px); line-height: .99; letter-spacing: -.062em; max-width: 76%; overflow-wrap: anywhere; }
.hero .eyebrow { color: #b3ecd0; margin-bottom: 11px; }
.hero .location { display: flex; align-items: center; gap: 5px; color: #d6e4d2; margin-top: 10px; font-size: 12px; max-width: 74%; }
.hero .button { margin-top: 16px; min-height: 36px; background: #effff5; color: #0d513b; font-size: 11px; padding: 6px 10px; border: 0; }
.hero .button:hover { background: #ffffff; }
.hero .hero-note { font-size: 12px; max-width: 66%; margin-top: 7px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stat { display: grid; gap: 5px; padding: 11px 10px 10px; min-width: 0; min-height: 104px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.stat .icon { color: var(--pine); }
.stat:nth-child(2) .icon { color: #496d69; }
.stat:nth-child(3) .icon { color: #37735a; }
.stat strong { font-weight: 820; font-size: clamp(17px, 5.2vw, 26px); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
.stat small { font-size: 10.4px; color: var(--muted); line-height: 1.15; font-weight: 740; }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0 0 10px; }
.section-title h2 { font-size: 18px; line-height: 1.15; letter-spacing: -.026em; }
.text-button {
  border: 0; background: transparent; color: #2e604b; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 770; min-height: 36px; padding: 4px 1px; flex-shrink: 0;
}
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick {
  padding: 8px 3px; min-width: 0; min-height: 76px; display: grid; justify-items: center; align-content: center; gap: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-size: 10.6px; font-weight: 760;
}
.quick .icon { background: var(--sage); padding: 6px; width: 32px; height: 32px; border-radius: 11px; }
.quick:nth-child(2) .icon { background: #e4efed; }
.quick:nth-child(3) .icon { background: var(--sand); }
.quick:nth-child(4) .icon { background: #e9e9e2; }
.quick:hover { border-color: #94aa99; }
.card, .list-card, .chart-card { border-radius: 17px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card { padding: 14px; }
.chart-card { padding: 14px 13px 8px; }
.chart-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chart-top strong { font-size: 23px; font-weight: 830; letter-spacing: -.05em; }
.chart-top small { display: block; color: var(--muted); font-size: 10px; font-weight: 730; margin-top: 2px; }
.chart-card svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart-card p { color: var(--muted); font-size: 13px; margin: 12px 0 8px; }
.list-card { padding: 0 12px; }
.row {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 62px; text-align: left;
  padding: 9px 0; background: transparent; border: 0; text-decoration: none;
}
.row + .row { border-top: 1px solid var(--line); }
.row > .icon:last-child { color: #688276; }
.row .row-copy { flex: 1; min-width: 0; }
.row strong { display: block; font-size: 14px; font-weight: 760; line-height: 1.28; overflow-wrap: anywhere; }
.row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.3; overflow-wrap: anywhere; }
.row .value { color: var(--pine); font-size: 12px; font-weight: 780; text-align: right; }
.tile-icon, .picture {
  position: relative; display: inline-grid; place-items: center; width: 43px; height: 43px; flex: 0 0 auto;
  overflow: hidden; background: var(--sage); border-radius: 12px; color: var(--pine);
}
.tile-icon.weight, .tile-icon.calendar, .tile-icon.report, .tile-icon.place { background: var(--sand); color: #356550; }
.tile-icon.milk { background: #e1eeeb; color: #366a61; }
.tile-icon.health { background: var(--rose); color: #944c41; }
.tile-icon.reproduction, .tile-icon.heat, .picture.buffalo { background: #e5e8f1; color: #4f5878; }
.picture img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.badge { display: inline-flex; width: max-content; max-width: 100%; align-items: center; padding: 4px 7px; border-radius: 7px; background: var(--sage); color: #2c5646; font-size: 10px; font-weight: 790; line-height: 1.15; }
.badge[hidden] { display: none; }
.badge.warm { background: var(--sand); color: #355b4a; }
.badge.rose { background: var(--rose); color: var(--red); }
.badge.neutral { background: #e9eae4; color: #495a51; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px;
  padding: 10px 12px; min-height: 44px; font-weight: 770; font-size: 13px; background: var(--paper); color: var(--deep);
  text-align: center; text-decoration: none; line-height: 1.15;
}
.button.primary { background: var(--deep); border-color: var(--deep); color: #ffffff; }
.button.primary:hover { background: #294a3e; }
.button.ghost { background: transparent; }
.button.danger { color: var(--red); border-color: #e5bcb2; background: #fff6f2; }
.button.full { width: 100%; }
.button.compact { min-height: 37px; font-size: 11.5px; padding: 7px 8px; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.buttons > .button { flex: 1 1 auto; }
.empty { padding: 20px 12px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed #c6d0c2; border-radius: 15px; }
.empty .icon { color: var(--pine); }
.filters { display: grid; gap: 9px; margin-bottom: 13px; }
.filter-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.search-row { display: flex; align-items: stretch; gap: 7px; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box .icon { position: absolute; top: 13px; left: 11px; color: var(--muted); }
.search-box input { width: 100%; padding: 11px 11px 11px 37px; min-height: 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; font-size: 13px; }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 5px 11px; font-weight: 720; font-size: 11px; }
.chip.active { background: var(--pine); color: #fffdf5; border-color: var(--pine); }
.notice { border: 1px solid #d6e9de; border-radius: 13px; display: flex; align-items: flex-start; gap: 8px; padding: 11px; background: #eef7f1; font-size: 12px; line-height: 1.45; }
.notice .icon { margin-top: 1px; color: var(--amber); }
.notice strong { display: block; margin-bottom: 2px; }
.demo-note { margin: 13px 0 0; }
.animal-head { display: flex; gap: 14px; align-items: center; }
.animal-head .picture { width: 83px; height: 83px; border-radius: 18px; }
.animal-head .picture .icon { width: 39px; height: 39px; }
.animal-head h2 { font-size: 28px; letter-spacing: -.05em; overflow-wrap: anywhere; }
.animal-head p { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 10px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 10px; text-transform: uppercase; font-weight: 810; letter-spacing: .055em; color: var(--muted); }
.kv dd { margin: 4px 0 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.detail-top { margin-bottom: 12px; }
.detail-top .text-button { margin-bottom: 6px; }
.note-copy { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.card + .card { margin-top: 8px; }
.card h3 { font-size: 15px; margin-bottom: 5px; }
.card > p { color: var(--muted); font-size: 13px; }
.card > .button, .card > .buttons, .card > .kv { margin-top: 10px; }
.media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.media-grid figure { margin: 0; min-width: 0; }
.media-grid .picture { width: 100%; height: 82px; }
.media-grid figcaption { margin-top: 5px; line-height: 1.2; color: var(--muted); font-size: 10px; font-weight: 720; }
.hold-card { padding: 0 11px; }
.hold-card .row { min-height: 68px; }
.report-file { background: transparent; }
.report-file .tile-icon { width: 41px; height: 41px; }
.report-file .ext { font-size: 10px; color: var(--muted); font-weight: 820; }
.page-break { margin-top: 14px; }
dialog { color: var(--ink); border: 0; }
dialog::backdrop { background: #10282082; backdrop-filter: blur(2px); }
.sheet {
  position: fixed; bottom: 0; top: auto; width: min(100%, var(--screen)); max-width: 100%; max-height: 93dvh; margin: 0 auto;
  padding: 0; border-radius: 22px 22px 0 0; background: var(--paper); box-shadow: 0 -12px 38px #152c2966;
}
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--paper); display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 21px; line-height: 1.13; font-weight: 820; letter-spacing: -.04em; }
.sheet-body { padding: 15px 16px max(17px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); }
.sheet-body > .list-card { box-shadow: none; }
.sheet-body > p { font-size: 13px; margin-bottom: 10px; }
.form { display: grid; gap: 11px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 760; line-height: 1.15; }
.field input, .field select, .field textarea {
  min-height: 44px; width: 100%; min-width: 0; border: 1px solid #cdd7ca; border-radius: 11px;
  background: #fbfdfb; padding: 8px 9px; font-size: 16px; line-height: 1.22;
}
.field select { padding-right: 5px; }
.field textarea { resize: vertical; }
.field input[readonly], .field select:disabled { background: #eff4f0; color: var(--muted); }
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.form .hint, .hint { color: var(--muted); font-size: 11.5px; line-height: 1.42; }
.form .hint { margin-top: -3px; }
.form-error { padding: 9px 10px; background: var(--rose); color: var(--red); font-size: 12px; font-weight: 680; border-radius: 9px; }
.form-foot { display: flex; align-items: stretch; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.form-foot .primary { min-width: 112px; }
.form details { padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; }
.form summary { font-weight: 740; font-size: 12px; cursor: pointer; padding: 3px 0; }
.form details[open] summary { margin-bottom: 10px; }
.form details > .field + .field { margin-top: 8px; }
.form details > .form-two + .field, .form details > .form-two + .form-two { margin-top: 9px; }
.photo-field { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border: 1px dashed #c7d3c5; border-radius: 11px; }
.photo-field strong { font-size: 12px; }
.photo-field .picture { width: 48px; height: 48px; }
.photo-actions { flex-wrap: wrap; gap: 4px 10px; }
.small-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px; border: 0; background: transparent; padding: 0;
  color: #305b47; font-size: 11px; font-weight: 780; cursor: pointer;
}
.small-link:focus-within { outline: 2px solid #137c57; outline-offset: 2px; }
.small-link.photo-remove { color: var(--red); }
.drawer { position: fixed; inset: 0 auto 0 max(0px, calc((100vw - var(--screen)) / 2)); width: min(272px, calc(100vw - 64px)); max-width: calc(100vw - 64px); height: 100dvh; max-height: 100dvh; overflow-y: auto; overscroll-behavior-y: contain; padding: 0; margin: 0; background: var(--paper); border-radius: 0 20px 20px 0; box-shadow: 12px 0 35px #142b2555; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; padding: max(16px, var(--safe-area-inset-top, env(safe-area-inset-top))) 16px 16px; background: var(--deep); color: #ffffff; }
.drawer-top .icon-button { border-color: #547062; background: transparent; color: #ffffff; }
.drawer-inner { padding: 12px 13px 20px; }
.drawer-inner .row { padding: 7px 9px; min-height: 52px; border: 0; border-radius: 10px; }
.drawer-inner .row[aria-current="page"] { background: var(--sage); }
.drawer-inner .row .icon:first-child { color: var(--pine); }
.drawer-inner .hint { margin: 8px 9px 2px; }
.scan-preview { position: relative; min-height: 205px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--deep); color: #a6e5c0; }
.scan-preview video { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.scan-frame { position: absolute; pointer-events: none; left: 20%; right: 20%; top: 19%; bottom: 19%; border: 2px solid #9ee3ba; border-radius: 12px; box-shadow: 0 0 0 80px #142a2444; }
.scan-preview .icon { width: 47px; height: 47px; }
.scan-form { margin-top: 10px; }
.batch-list { padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; }
.batch-list label { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 8px; font-weight: 710; font-size: 12px; }
.batch-list label + label { border-top: 1px solid var(--line); }
.batch-list input { width: 100px; min-height: 39px; padding: 5px 7px; border-radius: 9px; border: 1px solid var(--line); font-size: 16px; }
.landing { padding: 24px 20px 28px; min-height: 100dvh; }
.landing .hero { margin: 27px 0 18px; min-height: 215px; padding-top: 25px; }
.landing .hero h1 { max-width: 86%; }
.landing .card { margin-top: 10px; }
.landing .notice { margin-top: 12px; }
.landing-links { display: flex; gap: 15px; flex-wrap: wrap; margin: 12px 0; }
#toast {
  position: fixed; left: 50%; bottom: max(79px, calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom)) + 73px)); transform: translateX(-50%);
  z-index: 20; width: max-content; max-width: min(90%, 480px); border-radius: 12px; background: #233d32; color: #fffaf0;
  padding: 10px 13px; box-shadow: 0 8px 20px #1d302c55; font-size: 13px; font-weight: 700; text-align: center;
}
#toast.error { background: var(--red); }
@media (max-width: 365px) {
  .page { padding-inline: 12px; }
  .hero { padding-inline: 15px; }
  .topbar { padding-inline: 12px; }
  .stat { padding-inline: 8px; }
  .quick-grid { gap: 5px; }
}
@media (min-width: 541px) {
  #app { box-shadow: 0 0 60px #2a413329; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open], .drawer[open] { animation: appear .16s ease-out; }
  @keyframes appear { from { opacity: .3; transform: translateY(7px); } }
}
/* Android's editable controls keep caret, selection and paste; product text
   does not invoke the WebView's long-press selection menu. */
.rodevia-android :is(#app, #dialog) { -webkit-user-select: none; user-select: none; }
.rodevia-android :is(#app, #dialog) :is(input, textarea, [contenteditable]:not([contenteditable="false"]), [data-allow-selection]) { -webkit-user-select: text; user-select: text; }

@media (min-width: 541px) {
  /* Stretch only the start-screen backdrop, not the tour or form contents. */
  .rodevia-android #app:has(> .welcome-onboarding) { max-width: none; box-shadow: none; }
}
/* Rodevia mobile surfaces */
:root { --screen: 540px; --deep: #0b4434; --pine: #15674c; --sage: #e4f3e9; --shadow: 0 4px 20px #0f3e2910; }
.topbar { background: #fff; }
.hero { min-height: 178px; border-radius: 21px; }
.hero-art, .hero-user {
  position: absolute; z-index: -2; inset: 0; display: block; width: 100%; height: 100%; border-radius: 0;
  object-fit: cover; object-position: 63% 48%; color: transparent;
}
.hero-user img { object-position: 60% 49%; }
.hero::after { background: linear-gradient(90deg, #062f24fa 0%, #0a3b2ce5 36%, #0a3a2c55 74%, #0a3a2c23 100%); }
.hero .button { color: #0e5940; }
.status-chip { padding: 4px 5px 4px 8px; min-height: 36px; gap: 6px; }
.status-text { display: flex; gap: 4px; align-items: center; }
.avatar-picture { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; position: relative; overflow: hidden; display: inline-grid; place-items: center; background: #107552; color: #fff; }
.avatar-picture .icon { width: 16px; height: 16px; }
.avatar-picture img { position: absolute; inset: 0; object-fit: contain; width: 100%; height: 100%; }
.animal-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.animal-tile { display: grid; text-align: left; border: 1px solid #dce9e1; border-radius: 16px; padding: 0; overflow: hidden; background: #fff; box-shadow: var(--shadow); min-width: 0; }
.animal-tile:focus-visible { outline-offset: 2px; }
.animal-cover { width: 100%; height: auto; aspect-ratio: 1.63; border-radius: 0; gap: 3px; align-content: center; }
.animal-cover img, .inventory-photo img { object-position: center; object-fit: contain; }
.animal-cover small { font-size: 10px; color: #546d60; }
.animal-tile-info { display: grid; padding: 9px 10px 11px; gap: 3px; }
.animal-tile-info strong { font-size: 14px; letter-spacing: -.012em; overflow-wrap: anywhere; }
.animal-tile-info small, .sample-caption { font-size: 10.5px; color: var(--muted); }
.sample-caption { margin-top: 6px; }
/* Photo inventory: the same records and filters in both views. */
.inventory-filters input, .inventory-filters select { font-size: 16px; }
.inventory-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; }
.inventory-count { font-size: 13px; font-weight: 750; color: var(--muted); }
.view-switch { display: inline-flex; flex-shrink: 0; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: #eaf1ed; }
.view-switch button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #476154; font-size: 12px; font-weight: 750; }
.view-switch button[aria-pressed="true"] { background: var(--paper); color: var(--deep); border-color: #d5e3da; box-shadow: 0 2px 5px #143c2910; }
.inventory-species .chip { min-height: 44px; padding-inline: 14px; border-radius: 22px; }
.inventory-list, .inventory-grid { display: grid; gap: 10px; }
.inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inventory-list > div, .inventory-grid > div { min-width: 0; }
.inventory-animal { width: 100%; height: 100%; display: flex; align-items: center; gap: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-align: left; box-shadow: var(--shadow); }
.inventory-animal:hover { border-color: #94b5a1; }
.inventory-animal > .icon { color: #688276; }
.inventory-photo { width: 84px; height: 96px; border-radius: 12px; gap: 5px; align-content: center; }
.inventory-photo .picture-fallback { padding-inline: 5px; text-align: center; color: #456251; font-size: 10px; line-height: 1.3; }
.inventory-photo.buffalo .picture-fallback { color: #4f5878; }
.inventory-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.inventory-copy strong { font-size: 17px; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.inventory-tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--pine); overflow-wrap: anywhere; }
.inventory-detail, .inventory-holding { color: var(--muted); font-size: 11.5px; line-height: 1.4; overflow-wrap: anywhere; }
.inventory-holding { display: flex; align-items: flex-start; gap: 3px; }
.inventory-holding .icon { margin-top: 1px; }
.inventory-copy .badge { margin-top: 3px; }
.inventory-grid .inventory-animal { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.inventory-grid .inventory-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
.inventory-grid .inventory-photo > .icon { width: 34px; height: 34px; }
.inventory-grid .inventory-copy { flex: 1; padding: 12px; align-content: start; }
.inventory-grid .inventory-copy strong { font-size: 16px; }
.inventory-grid .inventory-copy .badge { margin-top: 5px; }
@media (max-width: 365px) {
  .inventory-toolbar { gap: 8px; }
  .view-switch button { padding-inline: 8px; }
  .inventory-grid { gap: 9px; }
  .inventory-grid .inventory-copy { padding: 10px; }
  .inventory-list .inventory-animal { padding: 10px; gap: 10px; }
  .inventory-list .inventory-photo { width: 72px; height: 92px; }
  .inventory-copy strong { font-size: 16px; }
}
.photo-editor { display: grid; gap: 9px; background: #eff7f2; padding: 10px; border-radius: 13px; }
.photo-editor canvas { width: 100%; max-height: 38dvh; object-fit: contain; background: #132c25; border-radius: 9px; touch-action: none; cursor: grab; }
.photo-editor h3 { font-size: 14px; }
.zoom-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }
.zoom-label input { width: 100%; accent-color: var(--pine); }
.calendar { padding: 11px 11px 13px; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.calendar-heading strong { font-size: 16px; text-transform: capitalize; }
.calendar-heading .icon-button { width: 38px; height: 38px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.calendar-week { color: var(--muted); font-weight: 700; font-size: 11px; padding: 5px 0; }
.calendar-day { display: grid; place-items: center; align-content: center; gap: 3px; min-height: 40px; padding: 3px 0; border: 1px solid transparent; border-radius: 9px; background: #f3f8f5; font-size: 12px; font-weight: 750; }
.calendar-day.other-month { color: #6e877a; background: #fbfcfb; }
.calendar-day.today { border-color: #5caa81; }
.calendar-day.selected { color: #fff; background: #0c6b4d; }
.calendar-dot { width: 5px; height: 5px; border-radius: 50%; background: #1e9866; }
.calendar-day.selected .calendar-dot { background: #d2f6df; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.plan-top h2 { font-size: 20px; letter-spacing: -.03em; }
.plan-card ul { margin: 10px 0 4px; padding: 0; list-style: none; }
.plan-card li { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0; color: var(--muted); font-size: 13px; }
.plan-current { border-color: #63aa86; background: #f5fcf7; }
.calc-output { display: grid; gap: 2px; background: var(--sage); padding: 13px; border-radius: 13px; }
.calc-output span { font-size: 11px; color: var(--muted); font-weight: 700; }
.calc-output strong { font-size: 22px; color: var(--deep); font-weight: 820; }
.calc-output strong + span { margin-top: 8px; }
.legal-page > .button { margin-block: 18px 10px; }
.legal-page h1 { font-size: clamp(28px, 7vw, 38px); letter-spacing: -.045em; }
.legal-page .card { margin-top: 13px; }
.legal-page h2 { font-size: 17px; letter-spacing: -.015em; margin-bottom: 5px; }
.legal-page .card p + p { margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .page.route-forward { animation: route-in .19s ease-out; }
  .page.route-back { animation: route-back .18s ease-out; }
  @keyframes route-in { from { opacity: .6; transform: translateX(11px); } }
  @keyframes route-back { from { opacity: .6; transform: translateX(-11px); } }
}

/* Mobile workspace: cool white, fresh greens and the original brand signature. */
@font-face { font-family: Inter; src: url('/fonts/Inter.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root { --ink: #183d2e; --deep: #187448; --pine: #16744b; --sage: #e3f6eb; --oat: #f6faf8; --muted: #52685e; --line: #dfebe4; --shadow: 0 3px 14px #153f2707; font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; background: #e9f3ed; }
.topbar { min-height: 76px; padding: max(10px, var(--safe-area-inset-top, env(safe-area-inset-top))) 18px 10px; gap: 10px; background: #1e5631; border-bottom: 0; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 120px; height: auto; aspect-ratio: 1024 / 328; object-fit: contain; }
.topbar .status-chip { background: #ffffff; color: #235a3b; max-width: 155px; min-height: 44px; }
.topbar .avatar-picture { background: #dff4e7; color: #185f3d; }
.status-text { min-width: 0; }
.status-text > span { overflow-wrap: anywhere; }
.page { padding: 22px 18px calc(110px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); }
.page:focus { outline: none; }
.screen-heading h1 { font-size: clamp(27px, 7vw, 33px); font-weight: 750; letter-spacing: -.045em; line-height: 1.13; }
.screen-heading p { font-size: 13px; line-height: 1.55; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dashboard-heading h1 { font-size: clamp(24px, 6.4vw, 30px); font-weight: 750; letter-spacing: -.05em; line-height: 1.16; margin-top: 8px; }
.dashboard-heading time { max-width: 74px; text-align: right; font-size: 12px; font-weight: 550; color: var(--muted); line-height: 1.5; }
.eyebrow { font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.holding-switch { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #cce8d7; border-radius: 20px; text-align: left; background: #eaf8ef; }
.holding-symbol { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: #d5efdf; color: var(--pine); }
.holding-switch-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.holding-switch-copy small { font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #4d7160; }
.holding-switch-copy strong { font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.holding-switch-copy > span { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.holding-switch > .icon { color: var(--pine); }
.dashboard-stats { margin-top: 12px; gap: 9px; }
.stat { min-height: 112px; border-radius: 18px; padding: 13px 11px; gap: 8px; box-shadow: none; }
.stat strong { font-weight: 750; font-variant-numeric: tabular-nums; font-size: clamp(18px, 5.3vw, 26px); }
.stat small { font-size: 11px; font-weight: 550; line-height: 1.3; }
.section-title h2 { font-size: 17px; font-weight: 700; letter-spacing: -.025em; }
.section-title { gap: 8px; }
.page > section + section { margin-top: 26px; }
.page-break { margin-top: 22px; }
.quick { min-height: 87px; gap: 8px; font-size: 11px; font-weight: 650; border-radius: 18px; box-shadow: none; background: #fff; }
.quick .icon { width: 36px; height: 36px; padding: 7px; border-radius: 12px; background: #e4f6e9; color: #16744b; }
.quick:nth-child(2) .icon { background: #e5f5f2; color: #297269; }
.quick:nth-child(3) .icon { background: #edf2fb; color: #4b6398; }
.quick:nth-child(4) .icon { background: #ecf4f0; color: #416b58; }
.button { min-height: 46px; border-radius: 14px; font-size: 13px; font-weight: 650; }
.button.primary { background: #187448; border-color: #187448; }
.button.primary:hover { background: #125d39; }
.button.compact, .text-button, .small-link, .chip { min-height: 44px; }
.chip { font-size: 12px; font-weight: 600; }
.chip.active { background: #187448; color: #fff; }
.row { gap: 12px; min-height: 74px; padding-block: 12px; }
.row strong { font-size: 14px; font-weight: 650; line-height: 1.4; }
.row small { font-size: 12px; line-height: 1.45; }
.row .value { font-size: 12px; }
.card, .list-card, .chart-card { border-radius: 20px; box-shadow: none; }
.list-card { padding-inline: 13px; }
.card { padding: 17px; }
.card > p { line-height: 1.6; }
.badge { font-size: 10px; font-weight: 650; padding: 5px 8px; border-radius: 8px; }
.badge.neutral { background: #edf1ee; }
.tile-icon { border-radius: 13px; }
.tile-icon.weight, .tile-icon.report { background: #e9effb; color: #526491; }
.text-button { font-weight: 650; }
.bottom-nav { padding: 7px 9px max(9px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); border-top-color: #dce9e1; box-shadow: 0 -5px 22px #234b2f08; }
.bottom-nav button { min-height: 62px; gap: 4px; padding: 3px 1px; font-size: 10.5px; font-weight: 600; border-radius: 16px; }
.nav-icon { display: grid; place-items: center; width: 46px; height: 33px; border-radius: 14px; }
.bottom-nav button[aria-current='page'] { background: transparent; color: #146b42; font-weight: 750; }
.bottom-nav button[aria-current='page'] .nav-icon { background: #dff4e6; }
.bottom-nav .nav-register { color: #146b42; }
.nav-register .nav-icon { background: #187448; color: #fff; width: 48px; height: 38px; border-radius: 14px; }
.workspace-notice { display: flex; align-items: center; gap: 6px; background: #e9f6ef; color: #416350; padding: 3px 18px; font-size: 10px; line-height: 1.4; }
.workspace-notice > span { flex: 1; }
.workspace-notice .text-button { font-size: 11px; }
.drawer { background: #fff; border-radius: 0 24px 24px 0; }
.drawer-top { background: #1e5631; padding: max(14px, var(--safe-area-inset-top, env(safe-area-inset-top))) 14px 14px; gap: 12px; }
.drawer-top .brand { flex: 0 1 128px; min-width: 0; }
.drawer-top .brand img { width: 100%; height: auto; }
.drawer-top .icon-button { border: 0; }
.drawer-inner { padding: 14px 12px max(24px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); }
.drawer-group + .drawer-group { margin-top: 17px; }
.drawer-group h2 { margin: 0 10px 7px; color: #587061; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; font-weight: 650; }
/* A compact panel, with full-height touch targets and room for larger text. */
.drawer-inner .row { min-height: 52px; gap: 12px; }
.drawer-inner .row .row-copy { min-width: 0; }
.drawer-inner .row strong { font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.drawer-inner .hint { min-width: 0; overflow-wrap: anywhere; }
.sheet { border-radius: 26px 26px 0 0; box-shadow: 0 -10px 50px #1b3a2429; }
.sheet-head { padding: 14px 18px; }
.sheet-head h2 { font-size: 21px; line-height: 1.25; font-weight: 700; }
.sheet-body { padding: 18px 18px max(24px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); }
.field > span { font-size: 12px; font-weight: 600; }
.field input, .field select, .field textarea { border-color: #d5e4db; background: #fff; border-radius: 13px; min-height: 48px; padding: 10px; }
.form { gap: 15px; }
.form-foot { padding-top: 10px; }
.form-foot .button { flex: 1; }
.entry-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry-shortcuts .button { min-height: 70px; flex-direction: column; background: #edf9f1; border-color: #d5ecdf; }
.entry-label { margin: 21px 0 9px !important; font-size: 12px !important; color: var(--muted); font-weight: 650; }
.onboarding-card { display: flex; gap: 11px; margin-top: 16px; padding: 17px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.onboarding-card > .icon { color: var(--pine); margin-top: 2px; }
.onboarding-card strong { font-size: 14px; }
.onboarding-card p { font-size: 12px; color: var(--muted); margin: 7px 0 13px; }
.calendar-day { min-height: 44px; font-size: 13px; }
.calendar-heading .icon-button { width: 44px; height: 44px; }
.calendar-day.selected { background: #187448; }
.kv dt { font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.kv dd { font-size: 14px; font-weight: 600; line-height: 1.4; }
.inventory-photo { background: #e9f5ee; }
.inventory-animal { box-shadow: none; }
.inventory-copy strong { font-weight: 700; }
.animal-tile { box-shadow: none; }
.animal-tile-info { padding: 12px; gap: 5px; }
.animal-tile-info strong { font-weight: 650; }
.animal-tile-info small { font-size: 11px; }
.app-welcome { padding: max(24px, var(--safe-area-inset-top, env(safe-area-inset-top))) 24px max(24px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); background: #fff; }
.app-welcome > .brand { background: #1e5631; padding: 8px 12px; border-radius: 16px; }
.app-welcome > .brand img { width: 144px; }
.welcome-visual { margin: 26px 0 24px; border-radius: 24px; overflow: hidden; height: 145px; }
.welcome-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.welcome-copy h1 { margin-top: 12px; font-size: clamp(32px, 9vw, 42px); font-weight: 750; line-height: 1.08; letter-spacing: -.055em; }
.welcome-copy > p { margin-top: 13px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.welcome-actions { margin-top: 25px; }
.welcome-actions .button { min-height: 50px; }
.welcome-access { display: flex; gap: 7px; align-items: flex-start; font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 13px; }
.welcome-access .icon { margin-top: 2px; color: var(--pine); }
.sample-entry { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.sample-entry p { color: var(--muted); font-size: 11px; text-align: center; margin-top: 10px; }
.landing-links { gap: 0 16px; margin-top: 19px; }
.landing-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; text-decoration: none; }
.legal-page > .brand { background: #1e5631; padding: 8px 12px; border-radius: 14px; }
.launch { background: #1e5631; color: #fff; }
.launch img { width: min(300px, 85vw); height: auto; }
.launch p { color: #dfefe4; font-size: 13px; }
#toast { bottom: calc(91px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); color: #fff; }
@media (max-width: 365px) {
  .topbar { padding-inline: 12px; gap: 7px; }
  .topbar .brand img { width: 104px; }
  .topbar .status-chip { font-size: 10px; gap: 4px; }
  .status-chip .avatar-picture { width: 24px; height: 24px; flex-basis: 24px; }
  .page { padding-inline: 12px; }
  .dashboard-heading { gap: 8px; }
  .dashboard-heading h1 { max-width: 180px; }
  .stat { padding-inline: 9px; }
  .section-title h2 { font-size: 16px; }
  .section-title .text-button { font-size: 11px; }
  .quick-grid { gap: 7px; }
  .app-welcome { padding-inline: 20px; }
}

/* Rodevia functional icon family: compact symbols, dedicated photo portraits. */
.icon-animal { stroke-width: 1.55; }
.bottom-nav button[aria-current="page"] .icon-animal { stroke-width: 1.75; }
.picture-animal { background: #edf5ef; color: #2b6244; --portrait-muzzle: #f7fbf8; }
.picture-animal.buffalo { background: #eaf0ee; color: #49655a; --portrait-muzzle: #f6faf8; }
.animal-portrait { display: block; flex: 0 0 auto; width: 32px; height: 32px; }
.inventory-photo .animal-portrait { width: 44px; height: 44px; }
.inventory-grid .inventory-photo .animal-portrait { width: 62px; height: 62px; }
.picture-animal .picture-fallback { color: #547261; font-size: 10px; font-weight: 500; }
.picture-animal.buffalo .picture-fallback { color: #536d61; }
.animal-cover .animal-portrait { width: 52px; height: 52px; }
.animal-head .picture-animal .animal-portrait { width: 62px; height: 62px; }
.photo-field .picture-animal .animal-portrait { width: 36px; height: 36px; }

/* Keep the establishment identity visible, with the menu where field users expect it. */
.topbar .top-left { min-width: 0; gap: 8px; }
.topbar .top-menu { background: #ffffff12; border-color: #ffffff35; color: #fff; }
.topbar .top-menu:hover { background: #ffffff25; }
.topbar .top-menu:focus-visible { outline-color: #d2ffdf; }
.topbar .brand { flex-shrink: 1; min-width: 0; }
.topbar .brand img { width: clamp(104px, 28vw, 120px); max-width: 100%; }
.topbar [data-sync-chip] { flex-shrink: 0; }
.holding-card { overflow: hidden; border: 1px solid #cce8d7; border-radius: 20px; background: #eaf8ef; }
.holding-cover { position: relative; display: grid; place-items: center; width: 100%; height: clamp(138px, 39vw, 188px); border-radius: 0; overflow: hidden; background: #d9ecdf; color: #55856b; }
.holding-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 0; object-position: center; }
.holding-cover > .icon { width: 42px; height: 42px; }
.holding-cover .picture-fallback { position: absolute; bottom: 17px; color: #375e48; }
.holding-photo-note { position: absolute; right: 10px; bottom: 10px; padding: 4px 7px; border-radius: 7px; color: #fff; background: #133d2acc; font-size: 10px; }
.holding-card .holding-switch { border: 0; border-radius: 0; padding: 14px; }
.holding-card .holding-switch:focus-visible { outline-offset: -4px; }
.holding-card .holding-switch-copy strong { font-size: clamp(18px, 5vw, 22px); letter-spacing: -.025em; }
.holding-card .holding-symbol .picture { width: 44px; height: 44px; border-radius: 14px; }
@media (max-width: 365px) {
  .topbar { padding-inline: 10px; gap: 6px; }
  .topbar .top-left { gap: 6px; }
  .topbar .status-chip { padding-inline: 7px; max-width: 110px; }
}

.status-chip.notSaved, .status-chip.storageError, .topbar .status-chip.notSaved, .topbar .status-chip.storageError { background: #fff0e8; color: #8b311c; }
.photo-editor .form-error { flex-basis: 100%; }
.storage-health p { overflow-wrap: anywhere; }

/* Focused field workspace. Brand artwork and font family remain unchanged. */
.topbar { min-height: 82px; }
.topbar .brand img { width: clamp(104px, 28vw, 120px); }
.topbar .status-chip { max-width: 104px; padding: 6px 8px; min-height: 40px; }
.topbar .status-text { gap: 4px; font-size: 10px; }
.heading-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.context-help { flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; border: 0; background: transparent; color: #527061; }
.heading-title h1 { min-width: 0; }
.help-content { font-size: 15px; line-height: 1.7; padding: 6px 0 18px; }
.drawer-about { display: flex; align-items: center; margin-top: 14px; }
.holding-card { position: relative; isolation: isolate; display: grid; align-items: end; min-height: 0; aspect-ratio: 16 / 9; background: #255b40; border: 0; margin-bottom: 18px; }
.holding-card .holding-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(140deg, #5b8d62, #264e3b); }
.holding-card .holding-cover img { object-position: center; }
.holding-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, #0a211bee 0%, #0a211b99 25%, transparent 66%); }
.holding-card .holding-switch { position: relative; z-index: 2; background: transparent; color: white; min-width: 0; min-height: 48px; padding: 20px 22px 18px; align-items: center; gap: 13px; }
.holding-card .holding-switch-copy { gap: 6px; }
.holding-card .holding-switch-copy small { color: #e0f0e5; font-size: 10px; letter-spacing: .1em; }
.holding-card .holding-switch-copy strong { color: white; font-size: clamp(25px, 7vw, 34px); font-weight: 720; line-height: 1.12; letter-spacing: -.04em; text-wrap: pretty; text-shadow: 0 1px 3px #0a211b88; }
.holding-card .holding-switch-copy > span { color: #e3ede7; font-size: 12px; }
.holding-card .holding-symbol { background: #ffffff20; color: #fff; border: 1px solid #ffffff40; flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 3px; }
.holding-card .holding-switch > .icon {
  box-sizing: content-box; padding: 8px; color: white;
  background: #092b2973; border: 1px solid #ffffff45; border-radius: 50%;
}
.holding-card .holding-cover-empty > .icon { position: absolute; top: 37px; right: 28px; width: 86px; height: 86px; color: #c2e0ce50; }
.holding-card .holding-cover .picture-fallback { top: 38px; left: 24px; bottom: auto; color: #dceee3; font-size: 12px; }
.holding-photo-help { position: absolute; z-index: 3; top: 12px; right: 12px; }
.holding-photo-help .context-help { color: white; background: #0c342b88; border-radius: 50%; }
.staff-list-photo { width: 62px; height: 62px; border-radius: 16px; }
.staff-profile { padding: 24px 20px; }
.staff-profile-head { display: grid; justify-items: center; text-align: center; gap: 16px; padding: 4px 0 26px; }
.staff-profile-head h2 { font-size: 27px; line-height: 1.17; letter-spacing: -.035em; overflow-wrap: anywhere; }
.staff-profile-head p { color: var(--muted); font-size: 14px; margin: 7px 0; }
.staff-identity { width: 100%; min-width: 0; text-align: left; }
.staff-identity .kv { margin: 0; }
.staff-name { padding: 14px 0; }
.staff-name > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.staff-birth-age { grid-template-columns: minmax(0, 1fr) minmax(76px, .55fr); }
.staff-age-output { display: flex; align-items: center; min-height: 48px; padding: 10px; border: 1px solid #d5e4db; border-radius: 13px; background: #eff4f0; color: var(--muted); }
.staff-portrait { width: 148px; height: 148px; border-radius: 30px; background: #e5f0e8; }
.staff-portrait > .icon { width: 62px; height: 62px; }
.staff-photo-button { position: relative; padding: 0; border: 0; border-radius: 30px; background: transparent; line-height: 0; }
.photo-expand-hint { position: absolute; right: 7px; bottom: 7px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #143c2be8; color: white; border: 2px solid white; }
.photo-lightbox { max-width: 760px; background: #112e24; color: white; }
.photo-lightbox .sheet-head { background: #112e24; color: white; }
.photo-lightbox .sheet-head h2, .photo-lightbox .sheet-head .icon-button { color: white; }
.photo-lightbox .sheet-body { padding: 8px; }
.enlarged-photo { width: 100%; height: min(70dvh, 680px); border-radius: 12px; background: #0b211a; }
.enlarged-photo img { object-fit: contain; }
.enlarged-photo .picture-fallback { position: absolute; bottom: 30px; }
#toast, #toast[popover] { position: fixed; inset: 50% auto auto 50%; margin: 0; transform: translate(-50%, -50%); padding: 17px 24px; min-width: 160px; max-width: min(86vw, 430px); border: 1px solid #ffffff30; border-radius: 18px; box-shadow: 0 12px 40px #0b281b40; font-size: 14px; line-height: 1.4; z-index: 60; pointer-events: none; }
@media (max-width: 365px) {
 .topbar .brand img { width: 104px; }
 .topbar .status-chip { max-width: 85px; padding-inline: 6px; }
 .topbar .status-text { font-size: 9px; gap: 3px; }
 .holding-card .holding-switch { padding: 13px 14px 12px; gap: 8px; }
 .holding-card .holding-symbol { display: none; }
 .holding-card .holding-switch-copy strong { font-size: 27px; }
}
@media (min-width: 600px) { .staff-portrait { width: 176px; height: 176px; } }
.photo-editor canvas { display: block; width: 100%; height: auto; max-height: none; aspect-ratio: 3/2; touch-action: none; }
.photo-editor canvas:focus-visible { outline: 3px solid #157347; outline-offset: 3px; }
.photo-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.photo-editor-heading span, .photo-editor-hint, .photo-editor-privacy { font-size: 12px; line-height: 1.5; }
.photo-editor-controls { display: grid; }
.photo-editor-original canvas { cursor: default; touch-action: auto; }
.photo-editor-controls .zoom-label { display: grid; gap: 8px; }
.photo-editor-controls input[type=range] { width: 100%; min-height: 36px; }
.photo-editor .buttons { flex-wrap: wrap; }
.photo-editor .buttons button { min-height: 44px; }

.photo-editor-privacy summary { width: 32px; height: 32px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.photo-lightbox .sheet-head .icon-button { background: #ffffff12; border-color: #ffffff45; }

.context-help { flex-basis: 44px; width: 44px; height: 44px; min-height: 44px; }
.photo-editor-privacy summary { width: 44px; height: 44px; }

/* Equal side controls keep the original logo centered at every phone width. */
.topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; column-gap: 10px; }
.topbar > .brand { justify-self: center; justify-content: center; width: 100%; }
.topbar > .brand img { width: clamp(104px, 28vw, 120px); max-width: 100%; height: auto; }
.topbar [data-sync-chip] { width: 44px; height: 44px; }
.topbar .status-chip { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; max-width: 44px; padding: 0; border-radius: 50%; }
.topbar .status-text { display: grid; place-items: center; gap: 0; }
.topbar .status-text > .icon { width: 20px; height: 20px; }
.topbar .status-text > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar .avatar-picture { width: 34px; height: 34px; flex-basis: 34px; }
.topbar .status-chip.has-avatar .status-text { position: absolute; z-index: 1; right: -2px; bottom: -2px; width: 20px; height: 20px; border: 2px solid #1e5631; border-radius: 50%; background: #fff; }
.topbar .status-chip.has-avatar .status-text > .icon { width: 13px; height: 13px; }
.topbar .status-chip.notSaved .status-text, .topbar .status-chip.storageError .status-text { background: #fff0e8; color: #8b311c; }

/* Animal identity and labels stay local, readable and printable as PNG. */
.animal-code-summary { display:grid; gap:6px; padding:16px; background:#edf4ef; border-radius:14px; color:#173e2c; }
.animal-code-summary strong { font-size:clamp(17px,4.6vw,23px); font-variant-numeric:tabular-nums; letter-spacing:.02em; overflow-wrap:anywhere; }
.animal-code-summary small { line-height:1.5; }
.registration-scan { padding:14px; border:1px solid var(--line,#dbe2dc); border-radius:14px; }
.registration-scan video { width:100%; max-height:260px; object-fit:cover; background:#13231b; border-radius:12px; margin:12px 0; }
.registration-scan [data-register-result] { margin-top:10px; font-size:14px; line-height:1.5; }
.registration-scan [data-register-result] .button { margin-top:10px; }
.scan-inline-code { display:flex; align-items:center; gap:8px; margin-top:12px; }
.scan-inline-code > .field { flex:1; }
.scan-inline-code input { width:100%; min-width:0; }
.scan-inline-code .button { flex-shrink:0; }
.qr-logo-choice { display:flex; align-items:center; gap:10px; margin:14px 0; }
.qr-logo-choice input { width:20px; height:20px; accent-color:#21543a; }
.qr-label-preview { background:#fff; border:1px solid #dce5df; border-radius:12px; padding:8px; }
.qr-label-preview img { display:block; width:100%; height:auto; max-width:410px; margin:auto; -webkit-touch-callout:default; user-select:auto; }
.qr-label-preview [hidden] { display:none; }
[data-qr-download] { text-decoration:none; margin-bottom:12px; }
/* Explicit selection before personnel data enters a downloaded report. */
.report-staff-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.report-staff-choice input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--pine); }

/* Animal form: compact, in-place explanations preserve unsaved input. */
.animal-field-label { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 44px; }
.animal-field-label > label { min-width: 0; font-size: 12px; font-weight: 760; line-height: 1.25; }
.animal-field-help { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.animal-field-help[aria-expanded="true"] { color: var(--pine); background: var(--sage); }
.animal-field-explanation { margin: 0; padding: 9px 10px; border-radius: 9px; background: var(--sage); color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.animal-custom-breed { margin-top: 5px; }
.animal-custom-breed[hidden], .animal-field-explanation[hidden] { display: none; }
.form-two:has(.animal-input-field, .animal-breed-field) { align-items: start; }
.form-two:has(.animal-input-field, .animal-breed-field) > .field:not(.animal-input-field):not(.animal-breed-field) > span:first-child { min-height: 44px; display: flex; align-items: center; }
.form details > .animal-input-field + .form-two { margin-top: 9px; }

/* Recovery actions remain secondary and separate from daily work. */
/* Compact secondary action, grouped with the record's existing controls. */
.delete-control { color: var(--muted); background: transparent; width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; }
.delete-control:hover, .delete-control:focus-visible { color: var(--red); background: #fff6f2; border-color: #e5bcb2; }
.detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; align-items: center; }
.detail-actions > .button { min-width: 0; padding-inline: 8px; align-self: stretch; }
.detail-actions > .button span { min-width: 0; }
.form-foot > .delete-control { margin-inline-end: auto; align-self: center; }

.list-tools { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.plan-usage { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.trash-policy { margin: 0 0 18px; }
.trash-policy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.trash-list { display: grid; gap: 12px; }
.trash-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.trash-item > div { min-width: 0; }
.trash-item h3, .trash-record-name { overflow-wrap: anywhere; }
.trash-item small { color: var(--muted, #586d60); }
.trash-item .button { flex-shrink: 0; }
.trash-summary { padding-left: 22px; line-height: 1.8; }
.trash-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #e5bcb2; border-radius: 12px; }
.trash-check input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; }
@media (max-width: 420px) { .trash-item { align-items: stretch; flex-direction: column; } }

/* Existing dashboard cards also act as direct routes to their records. */
.stat-link { text-align: left; width: 100%; appearance: none; transition: border-color .15s, background-color .15s; }
.stat-link-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stat-link-top > .icon:last-child { opacity: .58; }
.stat-link:hover { border-color: #8ebca0; background: #f8fcf9; }
.stat-link:active { background: #eef8f1; }
.chart-period { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 9px; }
@media (prefers-reduced-motion: reduce) { .stat-link { transition: none; } }
.dashboard-stats .stat-link-top > .icon:first-child { width: 32px; height: 32px; }
.dashboard-stats .stat-link-top { min-height: 36px; }

/* Production notebook: scoped to reports; keeps Rodevia's existing field palette. */
.milk-report { margin-top: 24px; padding: 22px; background: #fffefb; border: 1px solid #d9e4da; border-radius: 22px; }
.milk-report h2 { margin: 0; font-size: 22px; }
.milk-report h3 { margin: 20px 0 12px; font-size: 15px; }
.milk-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; padding: 20px 0; border-block: 1px solid #dce5dc; }
.milk-metrics strong { display: block; color: #284e38; font-size: clamp(19px, 3vw, 28px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.milk-metrics span { display: block; margin-top: 6px; color: #546658; font-size: 12px; line-height: 1.5; }
.milk-note { color: #59675e; font-size: 12px; line-height: 1.6; margin: 12px 0; }
.milk-empty { padding: 25px 12px; text-align: center; color: #59675e; }
.milk-chart-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.milk-chart-heading span, .milk-chart-caption { color: #59675e; font-size: 11px; }
.milk-bars { display: flex; gap: 4px; height: 145px; padding-top: 8px; }
.milk-bar-slot { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.milk-bar-track { height: 116px; width: 100%; max-width: 45px; display: flex; align-items: flex-end; }
.milk-bar { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(0deg, #35644a, #85a78b); }
.milk-bar.missing { background: #c3cbc4; border-radius: 0; }
.milk-bar.zero { background: #35644a; border-radius: 0; }
.milk-bar-slot > span { font-size: 9px; color: #59675e; }
.milk-chart-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 20px; line-height: 1.6; }
.milk-missing-key { display: inline-flex; align-items: center; gap: 6px; }
.milk-missing-key::before { content: ""; width: 11px; height: 2px; background: #c3cbc4; }
.milk-shifts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.milk-shifts > div { padding: 13px 10px; border-radius: 12px; background: #eff4ed; }
.milk-shifts span, .milk-shifts small { display: block; color: #546658; font-size: 11px; line-height: 1.5; }
.milk-shifts strong { display: block; margin: 7px 0; font-size: 15px; overflow-wrap: anywhere; }
.milk-detail { margin-top: 12px; border: 1px solid #dce5dc; border-radius: 12px; overflow: hidden; }
.milk-detail summary { padding: 15px; cursor: pointer; font-size: 14px; font-weight: 650; }
.milk-detail summary > span { float: right; color: #59675e; font-size: 12px; }
.milk-detail summary:focus-visible, .milk-table-scroll:focus-visible { outline: 2px solid #35644a; outline-offset: -3px; }
.milk-table-scroll { overflow: auto; max-height: 320px; }
.milk-detail table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.milk-detail caption { text-align: left; padding: 0 15px 12px; color: #59675e; font-size: 11px; }
.milk-detail th, .milk-detail td { padding: 12px; text-align: right; border-top: 1px solid #e4eae3; white-space: nowrap; }
.milk-detail th:first-child { text-align: left; font-weight: 500; }
.milk-detail thead th { background: #eff4ed; color: #405846; font-weight: 650; }
@media (max-width: 480px) {
  .milk-report { padding: 16px 12px; }
  .milk-report h2 { font-size: 20px; }
  .milk-metrics { gap: 10px; }
  .milk-metrics strong { font-size: 19px; }
  .milk-metrics span { font-size: 11px; }
  .milk-bars { gap: 2px; }
  .milk-bar-slot > span { font-size: 8px; }
  .milk-shifts > div { padding: 10px 7px; }
}

/* Finance uses the existing field notebook cards and navigation. */
.finance-filters{padding:18px;margin-bottom:14px}.finance-filters .form-two{margin:0}.finance-filters .buttons{margin-top:2px}
.finance-totals{display:grid;gap:12px;margin-bottom:24px}.finance-totals .card{padding:18px}
.finance-totals h2{font-size:14px;margin:0 0 14px}.finance-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.finance-stat{min-width:0;display:flex;flex-direction:column;gap:5px}.finance-stat small{color:var(--muted,#61736a);font-size:12px}.finance-stat strong{font-size:15px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.finance-value{font-size:13px;font-weight:750;max-width:38%;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.finance-income{color:var(--green,#137d5a)}
.finance-row .tile-icon{flex-shrink:0}.finance-row .row-copy{min-width:0}.finance-row .row-copy strong{overflow-wrap:anywhere}.finance-row>svg{flex-shrink:0}
.finance-total-preview{display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:12px;background:#edf5ef;padding:16px}.finance-total-preview output{font-size:20px;font-weight:750;text-align:right;overflow-wrap:anywhere}
@media(max-width:420px){.finance-summary-grid{grid-template-columns:1fr}.finance-stat{flex-direction:row;align-items:baseline;justify-content:space-between}.finance-stat strong{text-align:right}.finance-row{gap:9px}.finance-row>.tile-icon{display:none}}

/* Compact geographic controls shared by initial registration and holding edits. */
.location-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.location-fields legend { font-size: 14px; font-weight: 750; margin-bottom: 14px; padding: 0; }
.location-fields [hidden] { display: none; }
.location-fields .field, .location-fields select, .location-fields input { min-width: 0; width: 100%; }
.location-attribution { color: var(--muted, #61745b); font-size: 10px; line-height: 1.5; }
.location-attribution a { color: inherit; }

/* Animal identity: the stored photograph is a first-class part of the record. */
.animal-profile { padding: 0; overflow: hidden; }
.animal-profile-main { display: grid; grid-template-columns: minmax(0, 1fr); }
.animal-profile .animal-profile-photo { display: grid; width: 100%; height: clamp(210px, 62vw, 330px); border-radius: 0; background: #e8f0e9; }
.animal-profile-photo img { object-fit: contain; }
.animal-profile-photo .animal-portrait { width: 132px; height: 132px; }
.animal-profile-photo .picture-fallback { position: absolute; bottom: 20px; padding: 0 15px; font-size: 13px; text-align: center; }
.animal-photo-button { position: relative; width: 100%; min-width: 0; display: block; padding: 0; border: 0; background: #e8f0e9; cursor: zoom-in; }
.animal-photo-button .photo-expand-hint { right: 14px; bottom: 14px; width: 36px; height: 36px; }
.animal-profile-identity { min-width: 0; padding: 22px; background: linear-gradient(135deg, #ffffff, #f2f7f1); }
.animal-profile-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.animal-profile-identity h2 { font-size: clamp(27px, 7.5vw, 36px); line-height: 1.13; letter-spacing: -.04em; overflow-wrap: anywhere; }
.animal-profile-code { margin: 8px 0 0; font-size: 14px; font-weight: 740; letter-spacing: .06em; color: var(--pine); }
.animal-profile-breed { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.animal-profile-place { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding-top: 15px; border-top: 1px solid #dce8dd; color: #335c44; font-size: 13px; line-height: 1.5; }
.animal-profile-place > .icon { flex: 0 0 auto; margin-top: 2px; }
.animal-profile-place span { min-width: 0; overflow-wrap: anywhere; }
.animal-profile-place small { display: block; color: var(--muted); font-size: 12px; }
.animal-profile .detail-actions { margin: 0; padding: 16px; border-top: 1px solid var(--line); }
@media (min-width: 600px) {
  .animal-profile-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .animal-profile .animal-profile-photo { height: 100%; min-height: 290px; }
  .animal-profile-identity { padding: 28px; }
}

/* Permanent trash controls remain readable and operable on narrow screens. */
.trash-toolbar { display: grid; gap: 12px; margin-bottom: 18px; }
.trash-select { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; cursor: pointer; }
.trash-select input { width: 22px; height: 22px; flex-shrink: 0; margin: 0; }
.trash-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.trash-record { flex: 1 1 300px; }
.trash-record .trash-select { display: flex; }
.trash-item { flex-wrap: wrap; }
.trash-policy p + p { margin-top: 8px; }
.trash-confirm-names { max-height: 220px; overflow: auto; padding-left: 24px; overflow-wrap: anywhere; }
@media (max-width: 560px) { .trash-record { flex-basis: auto; } .trash-actions { width: 100%; justify-content: flex-start; } .trash-actions .button { white-space: normal; } }

/* Animal detail: keep destructive actions in the heading and full labels readable. */
.animal-detail-top .screen-heading { align-items: flex-start; }
.animal-detail-top .screen-heading > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.animal-heading-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.animal-heading-actions .icon-button { width: 44px; height: 44px; }
.animal-profile .detail-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.animal-profile .detail-actions > .button { white-space: normal; min-height: 46px; }
.animal-profile .detail-actions > .primary { grid-column: 1 / -1; }
.animal-profile .detail-actions > .button span { overflow-wrap: anywhere; }
@media (min-width: 600px) {
  .animal-profile .detail-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .animal-profile .detail-actions > .primary { grid-column: auto; }
}

/* Reports: saved-record analysis above the download actions. */
.report-filters { padding: 20px; }
.report-filters h2 { font-size: 16px; margin-bottom: 14px; }
.report-filters .chips { margin: 0; flex-wrap: wrap; }
.report-filters .form { gap: 16px; }
.report-overview { padding: 20px; border: 1px solid #d4e7db; border-radius: 22px; background: #edf7f0; }
.report-panel { margin-top: 22px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
.report-section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.report-section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.report-range { margin-top: 6px; color: #52695e; font-size: 13px; }
.report-note { font-size: 12px; color: #59675e; line-height: 1.6; margin: 12px 0; }
.report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.report-metric { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
.report-metric > strong { color: #23583f; font-size: clamp(20px, 5vw, 28px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-metric > span { font-size: 12px; color: #52695e; line-height: 1.4; }
.report-empty { display: grid; justify-items: center; gap: 12px; padding: 24px 12px; color: var(--muted); text-align: center; font-size: 14px; }
.report-currency { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.report-currency h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 15px; font-size: 17px; }
.report-currency h3 > span { font-size: 11px; color: var(--muted); font-weight: 500; }
.report-money-metrics { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-money { border-radius: 12px; padding: 12px 10px; background: #f4f8f6; min-width: 0; }
.report-money span { display: block; font-size: 11px; color: var(--muted); }
.report-money strong { display: block; margin-top: 7px; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-money.income { background: #ebf5ef; color: #1d7050; }
.report-money.expense { background: #fbf1e9; color: #96572e; }
.report-money.negative { color: #913c32; }
.report-chart-title { margin: 22px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.report-chart-title h4 { font-size: 14px; }
.report-chart-title > span { color: var(--muted); font-size: 10px; }
.report-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 11px; color: var(--muted); }
.report-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.report-chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.report-chart-legend .income, .report-finance-track > .income { background: #287952; }
.report-chart-legend .expense, .report-finance-track > .expense { background: #cd8d5b; }
.report-finance-bars { display: flex; gap: 5px; min-width: 0; height: 166px; padding: 8px 0 0; }
.report-finance-slot { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.report-finance-track { height: 128px; width: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 31px, #e8eeea 31px, #e8eeea 32px); }
.report-finance-track > i { display: block; width: 43%; max-width: 22px; border-radius: 4px 4px 0 0; }
.report-finance-slot > span { margin-top: 7px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.report-detail { border-top: 1px solid var(--line); }
.report-detail > summary { padding: 14px 0; font-size: 13px; color: var(--pine); font-weight: 700; cursor: pointer; min-height: 44px; }
.report-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.report-table-scroll table { border-collapse: collapse; width: 100%; font-size: 12px; }
.report-table-scroll caption { text-align: left; color: var(--muted); font-size: 11px; padding-bottom: 8px; }
.report-table-scroll th, .report-table-scroll td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table-scroll th:first-child { text-align: left; }
.report-table-scroll tbody th { font-weight: 500; }
.report-activity-bars { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 17px; }
.report-activity-bars li > div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.report-activity-bars strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.report-activity-track { display: block; height: 6px; border-radius: 6px; background: #edf3ef; margin-top: 8px; overflow: hidden; }
.report-activity-track > i { display: block; height: 100%; border-radius: inherit; background: #73a78a; }
.report-inventory-total { font-size: 30px; color: var(--pine); }
.report-species { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.report-species > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; background: #f3f8f5; padding: 12px; border-radius: 12px; }
.report-species span { font-size: 12px; overflow-wrap: anywhere; }
.report-species strong { grid-column: 2; font-size: 20px; }
.report-invalid { padding: 16px; }
.report-downloads { margin-top: 28px; }
.report-downloads .report-file:disabled { cursor: not-allowed; }
.entry-finance { margin: 16px 0; }
@media (max-width: 420px) {
  .report-panel, .report-overview { padding: 18px 14px; }
  .report-filters { padding: 18px 14px; }
  .report-section-heading h2 { font-size: 20px; }
  .report-money-metrics { grid-template-columns: 1fr; gap: 6px; }
  .report-money { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; }
  .report-money strong { margin: 0; font-size: 16px; text-align: right; }
  .report-finance-bars { gap: 3px; }
  .report-metrics { gap: 10px; }
  .report-metric > span { font-size: 11px; }
}

/* Export resolution controls remain fully hidden for an identity-only record. */
.profile-period-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.profile-period-controls[hidden] { display: none; }

.report-download-heading { margin: 0; }
.report-content-choice { padding: .85rem; border: 1px solid #d9e8df; border-radius: 16px; background: #f5faf7; }
.report-content-choice span { min-width: 0; }
.report-content-choice small { display: block; margin-top: .25rem; color: #536e60; line-height: 1.4; font-size: .82rem; }

/* Match saved crops to their primary presentation; brand edges remain visible. */
.staff-portrait { width: 138px; height: 184px; border-radius: 24px; }
.staff-list-photo img, .staff-portrait img, .group-list-photo img, .holding-identity-photo img { object-position: center; object-fit: contain; }
/* A real photograph gets its saved frame; blank rows keep the original icon. */
.group-list-photo.picture-has-photo {
  width: clamp(64px, 21vw, 84px); height: auto; aspect-ratio: 16 / 9; border-radius: 8px;
}
.media-grid .holding-identity-cover.picture-has-photo { height: auto; aspect-ratio: 16 / 9; }
.staff-list-photo.picture-has-photo { width: 43px; height: auto; aspect-ratio: 3 / 4; }
.animal-cover.picture-has-photo,
.inventory-list .inventory-photo.picture-has-photo,
.animal-profile .animal-profile-photo.picture-has-photo { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
.animal-photo-button { align-self: start; }
.picture-brand img { object-fit: contain; padding: 4px; }
.photo-field .photo-thumb img { object-fit: contain; object-position: center; }
.photo-field[data-photo-aspect="portrait"] .photo-thumb { width: 60px; height: auto; aspect-ratio: 3 / 4; }
.photo-field[data-photo-aspect="horizontal"] .photo-thumb { width: 80px; height: auto; aspect-ratio: 4 / 3; }
.photo-field[data-photo-aspect="cover"] .photo-thumb { width: 88px; height: auto; aspect-ratio: 16 / 9; }
.app-information { display: grid; gap: 18px; }
.app-information .kv { margin: 0; }
.app-information .kv > div { min-width: 0; }
.app-information dd { overflow-wrap: anywhere; }
.app-information p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.app-information .legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.app-information .legal-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pine); }
.app-information [data-build-id] { font-variant-numeric: tabular-nums; }

.form-holding { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--sage); color: var(--ink); }
.form-holding > span { display: grid; gap: 2px; min-width: 0; }
.form-holding small { font-size: .73rem; color: var(--muted); }
.form-holding strong { font-size: .95rem; overflow-wrap: anywhere; }

/* Subscription overview: one hierarchy, legible limits, no simulated upgrades. */
.plans-page { max-width: 780px; margin-inline: auto; }
.plan-summary { border-radius: 20px; background: #1e5631; color: #f7fbed; padding: 22px; margin: 0 0 20px; box-shadow: 0 9px 24px #173c1e12; }
.plan-summary-heading { display: flex; gap: 13px; align-items: center; }
.plan-summary-heading > .icon { color: #c9e8b0; }
.plan-summary-heading span, .plan-summary-heading strong { display: block; }
.plan-summary-heading span { font-size: 12px; color: #d1e3ce; }
.plan-summary-heading strong { font-size: 24px; line-height: 1.3; margin-top: 3px; }
.plan-usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 20px; margin-top: 18px; border-top: 1px solid #ffffff24; }
.plan-usage > div > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #dcead6; }
.plan-usage strong { display: block; font-size: 23px; margin-top: 7px; }.plan-usage small { font-size: 13px; color: #c5d9c2; font-weight: 500; }
.plan-products { display: grid; gap: 16px; }.plan-product { padding: 23px; margin: 0; border-radius: 20px; }.plan-product.plan-current { background: #fff; border-color: #8fbaa0; }
.plan-product.plan-premium { background: #f7f9ef; border-color: #dce3c7; }
.plan-positioning { color: var(--muted); font-size: 13px; margin: 10px 0 18px; line-height: 1.5; }
.plan-price { border-bottom: 1px solid #dce5d8; padding: 0 0 18px; margin-bottom: 18px; }.plan-price strong { display: block; font-size: 23px; line-height: 1.25; letter-spacing: -.035em; }.plan-price small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 6px; }
.plan-product li { font-size: 13px; line-height: 1.55; gap: 9px; margin: 13px 0; }.plan-product li .icon { color: #2c774b; flex: 0 0 17px; margin-top: 2px; }.plan-product .button { margin-top: 15px; }
.subscription-status { margin-top: 20px; padding: 20px 22px; }.subscription-status h2 { font-size: 16px; }.subscription-status p { font-size: 13px; line-height: 1.6; }
.plan-retention { margin: 22px 2px; color: var(--muted); font-size: 12px; line-height: 1.65; }.plan-retention summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #29593d; font-weight: 650; }.plan-retention summary::before { content: '+'; font-size: 21px; margin-right: 9px; }.plan-retention[open] summary::before { content: '−'; }
.subscription-unavailable { text-align: center; padding: 12px 4px; }.subscription-unavailable > .icon { color: #2c774b; margin: 0 auto 14px; }.subscription-unavailable p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 14px 0 24px; }
@media(min-width:650px) { .plan-products { grid-template-columns: 1fr 1fr; }.plan-product { display: flex; flex-direction: column; }.plan-product ul { flex: 1; } }
@media(max-width:360px) { .plan-summary, .plan-product { padding: 18px; }.plan-usage { gap: 8px; }.plan-usage > div > span { font-size: 10px; }.plan-usage > div > span .icon { display: none; } }
.connection-sheet { padding: 6px 0; }.connection-symbol { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; background: #e6efdf; color: #2f6942; margin: 4px auto 18px; }.connection-sheet > h3 { text-align: center; font-size: 19px; }.connection-sheet > p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 14px 0 20px; }.connection-state { display: flex; gap: 9px; align-items: center; background: #f0f3eb; border-radius: 13px; padding: 16px; font-size: 12px; margin: 20px 0; }.connection-roles { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; }.connection-roles > div { padding: 16px; }.connection-roles > div + div { border-top: 1px solid var(--line); }.connection-roles strong { font-size: 13px; }.connection-roles p { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 5px; }.connection-person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* Subscription reference prices. Actual checkout continues to use provider amounts. */
.price-amount { display: inline-block; white-space: nowrap; color: var(--ink); }
.price-figure { display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }
.price-symbol { font-size: 20px; font-weight: 600; align-self: flex-start; padding-top: 7px; }
.price-whole { font-size: 44px; font-weight: 750; letter-spacing: -.055em; }
.price-cents { font-size: 21px; font-weight: 650; align-self: flex-start; padding-top: 4px; top: auto; }
.price-currency { font-size: 11px; font-weight: 650; margin-left: 4px; color: var(--muted); }
.plan-price .price-period { display: inline-block; margin-left: 8px; font-size: 13px; color: var(--muted); }
.pricing-proposal { margin: 28px 0; }
.pricing-proposal-heading h2 { font-size: 22px; margin: 0 0 8px; }
.price-proposal-footnote { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 14px 2px; }
.price-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.price-option { --plan-accent:#2e6555; background:linear-gradient(145deg,#fff,#f4f8f6); border:1px solid #d7e5df; border-top:4px solid var(--plan-accent); border-radius:20px; padding:20px 16px 16px; min-width:0; display:flex; flex-direction:column; box-shadow:0 8px 24px #153e2b08; }
.price-option-quarterly { --plan-accent:#3d7380; background:linear-gradient(145deg,#f7fcff,#eaf4f6); }
.price-option-semiannual { --plan-accent:#79613e; background:linear-gradient(145deg,#fffdf7,#f5eedc); }
.price-option-annual { --plan-accent:#205e42; background:linear-gradient(145deg,#e9f6e8,#d3eacb); border-color:#91b38c; box-shadow:0 8px 24px #205e4218; }
.price-option-top { display:flex; flex-direction:column; align-items:flex-start; gap:7px; min-height:58px; margin-bottom:14px; }
.price-option-kicker { color:var(--plan-accent); font-size:10px; font-weight:700; letter-spacing:.02em; }
.price-option h3 { font-size:17px; margin:0; }
.price-saving { color:var(--plan-accent); font-size:11px; font-weight:700; margin:16px 0; }
.price-option .price-whole { font-size:36px; }
.price-option .price-cents { font-size:17px; }
.price-option .price-symbol { font-size:16px; padding-top:5px; }
.price-option .price-currency { font-size:9px; }
.price-term { margin:8px 0 0; font-size:12px; font-weight:600; }
.price-equivalent { font-size:11px; line-height:1.5; color:var(--muted); margin:9px 0 0; }
.price-option .price-select { margin-top:auto; min-height:44px; background:var(--plan-accent); color:#fff; border:0; padding:10px 8px; font-size:12px; gap:5px; }
.price-select:focus-visible { outline:3px solid #133d29; outline-offset:3px; }
.price-select:hover { filter:brightness(.94); }
@media(min-width:850px) { .price-options { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:360px) { .price-options { grid-template-columns:1fr; }.price-option-top { min-height:0; } }


/* Worker linking: a review is distinct from a server-confirmed invitation. */
.team-connection-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.team-connection-heading .connection-symbol { width: 56px; height: 56px; border-radius: 18px; margin: 0; flex-shrink: 0; }
.team-connection-heading h3 { margin: 3px 0 0; font-size: 19px; }
.team-state-label { font-size: 11px; font-weight: 700; color: var(--muted); }
.team-connection .form { margin-bottom: 14px; }
.team-person { padding: 14px; border-radius: 14px; background: var(--soft, #f3f5ef); }
.team-person > div { min-width: 0; }
.team-person strong, .team-person small { display: block; overflow-wrap: anywhere; }
.team-person small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.team-access-scope { padding: 16px; border: 1px solid var(--line); border-radius: 14px; margin: 16px 0; }
.team-access-scope h3 { font-size: 14px; margin: 0 0 10px; }
.team-access-scope ul { padding-left: 18px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.team-access-scope li + li { margin-top: 9px; }
.team-connection-notice { display: flex; align-items: flex-start; gap: 10px; background: #f5f1e7; color: #6b592d; border-radius: 12px; padding: 14px; margin: 16px 0; }
.team-connection-notice svg { flex-shrink: 0; margin-top: 2px; }
.team-connection-notice p { margin: 0; font-size: 12px; line-height: 1.65; }
.team-connection .team-local-note { margin: 10px 0 18px; font-size: 11px; line-height: 1.5; text-align: center; }
.team-connection-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.team-empty { padding: 12px 0; font-size: 13px; line-height: 1.6; }
.team-code-field input { font-family: monospace; font-size: 14px; letter-spacing: .02em; }
.team-loading { display: flex; align-items: center; gap: 10px; min-height: 90px; color: var(--muted); }
.team-access-scope summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.team-access-scope[open] summary { margin-bottom: 12px; }

/* Species sections keep a consistent, touch-friendly entry point. */
.inventory-species .chip{display:inline-flex;align-items:center;gap:8px;min-height:50px;padding:10px 14px}

/* Quiet warning surfaces, distinct from informational and successful scans. */
.registration-scan summary { cursor:pointer; font-weight:750; }
.registration-scan .hint { margin:12px 0; }
.registration-scan .scan-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.scan-actions .button { gap:8px; background:#edf4ef; border-color:#d4e3d8; color:#23583c; min-height:48px; padding:10px; }
.scan-actions .button:focus-within, .photo-actions label:focus-within { outline:2px solid var(--pine); outline-offset:3px; }
.registration-scan [data-register-result]:empty { display:none; }
.registration-scan .scan-feedback { padding:12px 14px; border-radius:12px; border:1px solid transparent; overflow-wrap:anywhere; }
.registration-scan .scan-feedback.warning { background:#fbefef; border-color:#efd5d5; color:#903e48; }
.registration-scan .scan-feedback.info { background:#f1f5f2; color:#405d4c; }
.registration-scan .scan-feedback.success { background:#eaf5ed; color:#285d3c; }
.registration-scan .scan-feedback.warning .button { color:#903e48; border-color:#e4bec3; background:#fffafa; }
.photo-field > div { min-width:0; flex:1; }
.photo-actions { gap:8px; margin-top:9px; }
.photo-actions .small-link { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:8px 11px; border:1px solid #d8e5dc; border-radius:11px; background:#edf4ef; color:#28583e; text-decoration:none; cursor:pointer; }
.photo-actions .photo-remove { color:#903e48; background:#fbefef; border-color:#efd5d5; }
@media (max-width:380px) {
  .photo-field { gap:10px; }
  .photo-actions .small-link { padding:8px; font-size:12px; }
  .registration-scan .scan-actions .button { font-size:12px; }
}

/* v35: legible registration choices and essential form labels. */
.registration-choices .row strong { font-size:16px; line-height:1.35; }
.registration-choices .row small { font-size:13px; line-height:1.45; }
.registration-choices.entry-shortcuts { display:block; }
.form .field > span, .animal-field-label > label { font-size:14px; line-height:1.4; }
.form .hint, .form .field-help { font-size:13px; line-height:1.5; }
.kv dt { font-size:13px; line-height:1.4; }

.record-animal-picker { display:grid; gap:10px; min-width:0; }

/* Premium: keep the comparison scannable and the locked-entry action close. */
.plans-page .plan-products { gap: 12px; }
.plans-page .plan-product { padding: clamp(16px, 4vw, 22px); }
.plans-page .plan-product.plan-premium { background: linear-gradient(145deg,#e6f4e9,#f4f9ec); border-color: #9fc4aa; }
.plans-page .plan-premium .plan-top h2 { color: #1e5631; }
.plans-page .plan-positioning { margin: 7px 0 10px; }
.plans-page .plan-price { padding-bottom: 11px; margin-bottom: 9px; }
.plans-page .plan-product ul { margin-top: 5px; }
.plans-page .plan-product li { margin: 7px 0; }
.premium-access > p { margin: 0 0 14px; font-weight: 650; line-height: 1.5; color: #244f39; }
.premium-access > .buttons { gap: 8px; flex-wrap: wrap; }

/* The Agenda tile shares the calendar name with the large month grid.
   It must not inherit the month grid's padding or offset the calendar art. */
[data-action="agenda-detail"] > .tile-icon.calendar { padding: 0; }


/* Android landscape uses the same route and form as portrait, without a second pane. */
@media (orientation: landscape) and (min-width: 560px) {
  :root.rodevia-android { --screen: 850px; }
  .rodevia-android .topbar {
    min-height: 52px; padding-block: 4px;
  }
  .rodevia-android .page { padding-bottom: 72px; }
  .rodevia-android .bottom-nav { padding-block: 4px; }
  .rodevia-android .bottom-nav button {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; gap: 5px; font-size: .75rem;
  }
  .rodevia-android .bottom-nav .nav-icon { width: 34px; height: 34px; }
  .rodevia-android .holding-card { width: min(100%, 620px, max(310px, calc(177.78dvh - 275px))); margin-inline: auto; }
  .rodevia-android .sheet {
    width: min(calc(100% - 24px), 680px);
    inset: auto 0 6px; max-height: calc(100dvh - 12px);
    border-radius: 18px; overflow-y: auto; overscroll-behavior-y: contain;
  }
  .rodevia-android .sheet-head { padding: 6px 16px; }
  .rodevia-android .sheet-body { padding: 12px 16px 18px; }
  .rodevia-android .scan-preview { min-height: clamp(125px, 43dvh, 270px); }
  .rodevia-android .scan-preview video { object-fit: contain; }
  .rodevia-android .scan-frame {
    inset: 50% auto auto 50%; width: min(44%, 32dvh); height: auto;
    aspect-ratio: 1; transform: translate(-50%, -50%); box-shadow: none;
  }
}
