:root {
  color-scheme: light;
  --forest: #173b31;
  --forest-2: #285344;
  --forest-3: #dbe8df;
  --cream: #f4f4ef;
  --paper: #fffefa;
  --ink: #1d2d27;
  --muted: #7e8981;
  --line: #e5e8e0;
  --gold: #d5a75d;
  --rust: #ad5e43;
  --soft-rust: #f7e9e2;
  --blue: #638999;
  --shadow: 0 16px 48px rgba(24, 47, 38, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(213, 167, 93, .55); outline-offset: 2px; }
a { color: inherit; }
.serif { font-family: "Manrope", "DM Sans", sans-serif; letter-spacing: -.04em; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.tiny { color: var(--muted); font-size: 11px; line-height: 1.5; }
.caps { letter-spacing: .1em; text-transform: uppercase; }
.icon { display: inline-grid; width: 22px; height: 22px; place-items: center; flex: 0 0 auto; font-size: 18px; line-height: 1; }

/* Acceso */
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr); background: var(--paper); }
.auth-visual { position: relative; min-height: 700px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(28px, 5vw, 72px); color: white; background: #102820; }
.auth-visual::before { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, rgba(12, 30, 24, .56) 0%, rgba(18, 43, 34, .1) 40%, rgba(14, 35, 27, .83) 100%), linear-gradient(90deg, rgba(19, 55, 43, .55), transparent 80%), url('./public/portada.jpg') center / cover no-repeat; transform: scale(1.01); }
.auth-visual > * { position: relative; z-index: 1; }
.visual-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--forest); background: #e7e7d9; font-family: "Manrope", sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.08em; }
.visual-brand strong { display: block; font-size: 13px; letter-spacing: .12em; }
.visual-brand span { display: block; margin-top: 3px; color: rgba(255,255,255,.66); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.visual-copy { max-width: 560px; margin-bottom: 3vw; }
.visual-copy .eyebrow { color: #e9c27f; }
.visual-copy h1 { max-width: 560px; margin: 14px 0 18px; font-family: "Manrope", sans-serif; font-size: clamp(42px, 6.2vw, 80px); font-weight: 600; line-height: .98; letter-spacing: -.065em; }
.visual-copy p { max-width: 430px; color: rgba(255,255,255,.8); font-size: 15px; line-height: 1.7; }
.visual-foot { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.72); font-size: 11px; }
.visual-foot::before { width: 25px; height: 1px; content: ""; background: var(--gold); }
.auth-side { display: grid; place-items: center; padding: 36px; }
.auth-card { width: min(100%, 440px); }
.auth-card h2 { margin: 11px 0 8px; font-family: "Manrope", sans-serif; font-size: 34px; font-weight: 700; letter-spacing: -.055em; }
.auth-card > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.connection-note { display: flex; align-items: flex-start; gap: 12px; margin: 27px 0 22px; padding: 15px; border: 1px solid #eddfc3; border-radius: 14px; background: #fcf8ee; }
.connection-note .icon { color: #9c7339; }
.connection-note strong { display: block; margin: 1px 0 4px; color: #634d2d; font-size: 12px; }
.connection-note p { margin: 0; color: #806c4e; font-size: 11px; line-height: 1.55; }
.auth-form { display: grid; gap: 14px; margin-top: 27px; }
.field { display: grid; gap: 7px; }
.field label { color: #4e5b53; font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea, .filter-input { width: 100%; min-height: 46px; border: 1px solid #dfe3db; border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fff; transition: border .18s, box-shadow .18s; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-input:focus { border-color: #7b9b8c; box-shadow: 0 0 0 3px rgba(39, 84, 66, .08); outline: none; }
.field textarea { min-height: 96px; padding: 12px 13px; resize: vertical; }
.auth-form .btn { margin-top: 5px; }
.auth-switch { display: flex; justify-content: center; gap: 5px; margin-top: 19px; color: var(--muted); font-size: 12px; }
.text-button { border: 0; padding: 0; color: var(--forest-2); background: transparent; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.auth-config-list { margin: 21px 0 0; padding: 0; list-style: none; }
.auth-config-list li { display: flex; gap: 9px; margin: 10px 0; color: #607067; font-size: 11px; line-height: 1.45; }
.auth-config-list li::before { width: 17px; height: 17px; content: "✓"; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--forest); background: #e7eee8; font-size: 10px; font-weight: 700; }
.config-path { display: block; margin-top: 18px; border-radius: 9px; padding: 10px 12px; color: #486053; background: #f3f5f0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; overflow-wrap: anywhere; }

/* Aplicación */
.app-frame { min-height: 100svh; }
.topbar { position: sticky; z-index: 12; top: 0; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 clamp(20px, 4vw, 58px); border-bottom: 1px solid rgba(226, 230, 222, .85); background: rgba(255, 254, 250, .94); backdrop-filter: blur(14px); }
.top-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.top-brand .brand-mark { width: 37px; height: 37px; border-radius: 11px; background: var(--forest); color: #f1efe5; font-size: 15px; }
.top-brand strong { display: block; font-family: "Manrope", sans-serif; font-size: 13px; letter-spacing: -.02em; }
.top-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.sync-pill { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; color: #55665b; background: white; font-size: 10px; font-weight: 600; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #6e9d77; box-shadow: 0 0 0 3px rgba(110,157,119,.13); }
.sync-pill.offline .sync-dot { background: #d09344; box-shadow: 0 0 0 3px rgba(208,147,68,.13); }
.sync-pill.error .sync-dot { background: #bf6550; box-shadow: 0 0 0 3px rgba(191,101,80,.12); }
.user-chip { display: flex; align-items: center; gap: 8px; color: #4f5e55; font-size: 11px; }
.user-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--forest-3); font-size: 10px; font-weight: 700; }
.icon-button { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: #657168; background: var(--paper); }
.icon-button:hover { border-color: #becbc1; color: var(--forest); }
.workspace { width: min(1300px, 100%); margin: 0 auto; padding: 29px clamp(16px, 4vw, 54px) 70px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-head h1 { margin: 5px 0 0; font-family: "Manrope", sans-serif; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -.055em; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 0 16px; font-size: 11px; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.btn-primary { color: white; background: var(--forest); box-shadow: 0 5px 12px rgba(23,59,49,.14); }
.btn-primary:hover { background: var(--forest-2); }
.btn-secondary { border-color: var(--line); color: #435248; background: var(--paper); }
.btn-secondary:hover { border-color: #c4d0c6; background: #fbfcf8; }
.btn-quiet { color: #526358; background: #edf2ed; }
.btn-danger { color: #94533f; background: #f8ede8; }
.status-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; border: 1px solid #e4d6b4; border-radius: 12px; padding: 12px 15px; color: #755d34; background: #fbf7ec; font-size: 11px; line-height: 1.5; }
.status-banner .icon { font-size: 16px; }
.status-banner.is-error { border-color: #edd0c6; color: #8d4e3d; background: #fcf3ef; }
.status-banner.is-success { border-color: #d1e3d4; color: #436947; background: #f0f7f0; }
.hero-card { position: relative; min-height: 260px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; overflow: hidden; margin-bottom: 20px; border-radius: 18px; padding: 29px 32px; color: white; background: var(--forest); box-shadow: 0 12px 32px rgba(22, 52, 41, .13); }
.hero-card::before { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(16, 46, 35, .88), rgba(17, 49, 37, .48) 48%, rgba(14, 39, 31, .06)), linear-gradient(0deg, rgba(17, 42, 33, .38), transparent 54%), url('./public/portada.jpg') center 44% / cover no-repeat; }
.hero-card > * { position: relative; z-index: 1; }
.hero-copy { max-width: 600px; }
.hero-copy .eyebrow { color: #e2bd7a; }
.hero-copy h2 { margin: 10px 0 8px; font-family: "Manrope", sans-serif; font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -.06em; line-height: 1.03; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.6; }
.hero-date { min-width: 150px; align-self: flex-end; border-left: 1px solid rgba(255,255,255,.27); padding: 3px 0 3px 18px; color: rgba(255,255,255,.68); font-size: 10px; line-height: 1.6; text-align: right; }
.hero-date strong { display: block; margin-bottom: 4px; color: white; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 15px; padding: 17px 18px; background: var(--paper); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 600; }
.stat-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--forest-2); background: #edf3ed; font-size: 14px; }
.stat-value { font-family: "Manrope", sans-serif; font-size: 29px; font-weight: 700; letter-spacing: -.07em; line-height: 1; }
.stat-caption { color: var(--muted); font-size: 9px; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(275px, .65fr); gap: 17px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 19px; border-bottom: 1px solid #edf0e9; }
.panel-head h2, .panel-head h3 { margin: 0; font-family: "Manrope", sans-serif; font-size: 14px; letter-spacing: -.025em; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 17px 19px; }
.event-list { display: grid; }
.event-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 19px; border-bottom: 1px solid #f0f1ed; }
.event-row:last-child { border-bottom: 0; }
.event-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--forest-2); background: #eef3ed; font-size: 15px; }
.event-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 11px; font-weight: 700; }
.event-meta { color: var(--muted); font-size: 9px; line-height: 1.5; }
.event-time { color: #768179; font-size: 9px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; color: #69776d; background: #f0f2ed; font-size: 8px; font-weight: 700; white-space: nowrap; }
.badge.pending { color: #946a31; background: #fbf1d9; }
.badge.synced { color: #49714f; background: #eaf3e9; }
.quick-actions { display: grid; gap: 9px; }
.quick-action { display: flex; align-items: center; gap: 11px; width: 100%; border: 1px solid #edf0e9; border-radius: 12px; padding: 12px; color: var(--ink); background: #fff; text-align: left; transition: border .15s, background .15s; }
.quick-action:hover { border-color: #c6d4c9; background: #fafcf8; }
.quick-action .quick-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--forest); background: #edf3ed; font-size: 16px; }
.quick-action strong { display: block; font-size: 10px; }
.quick-action span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.blank-state { display: grid; justify-items: center; padding: 42px 20px; color: var(--muted); text-align: center; }
.blank-symbol { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 14px; color: var(--forest); background: #edf3ed; font-size: 19px; }
.blank-state strong { color: #526157; font-size: 11px; }
.blank-state p { max-width: 340px; margin: 6px 0 0; font-size: 10px; line-height: 1.6; }
.filters { display: grid; grid-template-columns: minmax(190px,1fr) minmax(160px,.8fr) minmax(130px,.55fr) minmax(130px,.55fr) auto; align-items: end; gap: 10px; margin: 0 0 15px; }
.filters .field label { font-size: 9px; }
.filters .field input, .filters .field select { min-height: 41px; font-size: 10px; }
.records-panel { overflow: hidden; }
.record-table { width: 100%; border-collapse: collapse; text-align: left; }
.record-table th { padding: 12px 15px; color: #8b958d; background: #fafbf8; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.record-table td { padding: 13px 15px; border-top: 1px solid #f0f1ed; color: #5b685f; font-size: 10px; vertical-align: top; }
.record-table td strong { display: block; margin-bottom: 4px; color: #2b3d32; font-size: 10px; }
.record-table .table-note { max-width: 280px; color: #7c867f; line-height: 1.55; }
.animal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.animal-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: white; }
.animal-card strong { display: block; margin: 10px 0 3px; font-family: "Manrope", sans-serif; font-size: 14px; }
.animal-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.animal-head { display: flex; align-items: center; justify-content: space-between; }
.animal-head .event-mark { width: 32px; height: 32px; }
.offline-callout { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #ecdcb8; border-radius: 12px; padding: 14px; color: #7e653d; background: #fcf8ee; }
.offline-callout strong { display: block; margin-bottom: 4px; font-size: 10px; }
.offline-callout p { margin: 0; font-size: 9px; line-height: 1.5; }
.excel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.excel-grid .panel-body { display: grid; gap: 16px; }
.excel-file-drop { min-height: 160px; display: grid; justify-items: center; align-content: center; gap: 8px; border: 1px dashed #becdc0; border-radius: 14px; padding: 20px; color: var(--forest); background: #f7faf6; text-align: center; cursor: pointer; }
.excel-file-drop:hover { border-color: var(--forest-2); background: #f1f7f1; }
.excel-file-drop strong { font-size: 12px; }
.excel-file-drop > span:not(.excel-file-icon) { color: var(--muted); font-size: 10px; }
.excel-file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--forest); background: #e8f0e8; font-size: 21px; }
.excel-file-drop input { width: min(320px,100%); margin-top: 4px; color: #5d6b60; font-size: 10px; }
.excel-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fff; }
.excel-preview > div:not(.excel-actions) { display: grid; gap: 4px; align-content: center; min-width: 0; }
.excel-preview strong { color: var(--forest); font-size: 17px; }
.excel-preview > div:first-child strong { font-size: 11px; }
.excel-preview span { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.excel-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.excel-actions .btn { min-height: 39px; }
.excel-result { display: grid; gap: 5px; border: 1px solid #cfe0ce; border-radius: 11px; padding: 12px; color: #416448; background: #f5faf3; }
.excel-result strong { font-size: 10px; }
.excel-result span, .excel-progress { color: var(--muted); font-size: 9px; line-height: 1.6; }
.excel-note { align-items: flex-start; }
.excel-copy { margin: 0; color: #647168; font-size: 11px; line-height: 1.7; }
.excel-export { justify-self: start; }
.excel-caveat { margin: 0; }
.animal-source-detail { padding-top: 7px; border-top: 1px solid #f0f1ed; }
.bottom-nav { display: none; }

/* Diálogos */
dialog { width: min(620px, calc(100vw - 24px)); max-height: min(90svh, 840px); border: 1px solid #e4e7df; border-radius: 20px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 28px 100px rgba(13,32,24,.3); }
dialog::backdrop { background: rgba(16, 35, 28, .48); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 21px 23px 16px; }
.dialog-head h2 { margin: 4px 0 0; font-family: "Manrope", sans-serif; font-size: 21px; letter-spacing: -.045em; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.dialog-form { display: grid; gap: 15px; overflow-y: auto; padding: 19px 23px 23px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-form .field label { font-size: 10px; }
.dialog-form .field input, .dialog-form .field select, .dialog-form .field textarea { min-height: 43px; font-size: 11px; }
.dialog-form .field textarea { min-height: 82px; }
.dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.dialog-foot .tiny { max-width: 270px; }
.dialog-actions { display: flex; gap: 8px; }
.toast-region { position: fixed; z-index: 30; right: 20px; bottom: 20px; display: grid; gap: 9px; pointer-events: none; }
.toast { max-width: min(380px, calc(100vw - 40px)); border: 1px solid #dce4dc; border-radius: 12px; padding: 12px 15px; color: #294635; background: #fffefa; box-shadow: 0 12px 35px rgba(18, 41, 30, .17); font-size: 11px; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast.warn { border-color: #ead9b5; color: #755b30; background: #fffcf4; }
.toast.error { border-color: #edd0c6; color: #8d4e3d; background: #fff9f6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: .9fr 1.1fr; }
  .auth-visual { min-height: 620px; padding: 28px; }
  .auth-side { padding: 28px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section-grid { grid-template-columns: 1fr; }
  .animal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .excel-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 310px; padding: 24px; }
  .auth-visual::before { background-position: center 40%; }
  .visual-copy { margin: 58px 0 2px; }
  .visual-copy h1 { max-width: 430px; font-size: 43px; }
  .visual-copy p { max-width: 360px; font-size: 12px; }
  .visual-foot { display: none; }
  .auth-side { padding: 27px 22px 40px; }
  .auth-card h2 { font-size: 29px; }
  .topbar { height: 62px; padding: 0 15px; }
  .top-brand .brand-mark { width: 33px; height: 33px; }
  .top-brand strong { font-size: 11px; }
  .top-brand span { font-size: 8px; }
  .top-actions { gap: 7px; }
  .user-chip { display: none; }
  .sync-pill { padding: 7px 9px; font-size: 9px; }
  .workspace { padding: 23px 15px 91px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-head h1 { font-size: 28px; }
  .page-head p { font-size: 11px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .hero-card { min-height: 231px; align-items: flex-end; margin-bottom: 13px; border-radius: 15px; padding: 21px; }
  .hero-card::before { background-position: center 45%; }
  .hero-copy h2 { max-width: 330px; font-size: 32px; }
  .hero-copy p { max-width: 300px; font-size: 10px; }
  .hero-date { display: none; }
  .stat-grid { gap: 9px; margin-bottom: 14px; }
  .stat-card { min-height: 102px; padding: 13px; border-radius: 13px; }
  .stat-top { font-size: 9px; }
  .stat-icon { width: 24px; height: 24px; }
  .stat-value { font-size: 25px; }
  .panel-head { padding: 15px; }
  .panel-body { padding: 14px; }
  .event-row { grid-template-columns: 36px minmax(0,1fr); gap: 10px; padding: 12px 14px; }
  .event-mark { width: 34px; height: 34px; }
  .event-time { grid-column: 2; margin-top: -5px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 9px; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .filters .btn { min-height: 41px; }
  .records-panel { overflow-x: auto; }
  .record-table { min-width: 700px; }
  .animal-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .animal-card { padding: 11px; }
  .bottom-nav { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3,1fr); padding: 8px 8px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid #e7e9e2; background: rgba(255,254,250,.96); backdrop-filter: blur(16px); }
  .bottom-nav button { display: grid; justify-items: center; gap: 4px; border: 0; padding: 4px; color: #879188; background: transparent; font-size: 8px; font-weight: 600; }
  .bottom-nav button .icon { font-size: 18px; }
  .bottom-nav button.active { color: var(--forest); }
  .bottom-nav button.active .icon { transform: translateY(-1px); }
  .dialog-head { padding: 18px 18px 14px; }
  .dialog-form { gap: 13px; padding: 16px 18px 19px; }
  .form-grid { gap: 11px; }
  .dialog-foot { align-items: flex-start; flex-direction: column; }
  .dialog-actions { width: 100%; }
  .dialog-actions .btn { flex: 1; }
  .toast-region { right: 12px; bottom: 76px; left: 12px; }
  .toast { max-width: 100%; }
}
@media (max-width: 370px) {
  .sync-pill { max-width: 37px; overflow: hidden; white-space: nowrap; }
  .sync-pill span:last-child { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .animal-grid { grid-template-columns: 1fr; }
  .excel-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .excel-actions { flex-direction: column-reverse; }
  .excel-actions .btn { width: 100%; }
}
