/* Urban Dairy Farm reference UI. Data and branding are rendered from CI3/AJAX. */
:root{--ud-green:#075a39;--ud-green-deep:#003d29;--ud-orange:#f3920b;--ud-mint:#edf7f1;--ud-ink:#172538;--ud-muted:#697786}
body.signed-in{background:#f2f8f5;color:var(--ud-ink)}
body.signed-in header{height:74px;left:230px;padding:0 22px;background:#fff;color:#182637;border-bottom:1px solid #e9efeb;box-shadow:0 2px 10px #183d2908}
body.signed-in header b{font-size:18px;color:#152237}
body.signed-in aside{width:230px;top:0;bottom:0;padding:0 10px 18px;background:linear-gradient(180deg,#003c29,#003a27);border:0;color:#fff;box-shadow:none}
body.signed-in aside .brand{height:155px;margin:0 -10px 8px;padding:12px 6px;display:flex;flex-direction:column;justify-content:center;gap:0;background:transparent;border:0;color:#fff;text-align:center}
body.signed-in aside .brand-mark{width:112px;height:112px;padding:3px;border:0;border-radius:50%;background:#fff;box-shadow:0 1px 7px #fff4}
body.signed-in aside .brand-mark img{width:100%;height:100%;object-fit:contain;border-radius:50%}
body.signed-in aside .brand>div{display:none}
body.signed-in aside .nav-group{padding:4px 8px 5px;color:#8bc8a7;font-size:9px;letter-spacing:.8px}
body.signed-in aside button{min-height:46px;margin:2px 0;padding:6px 9px;gap:10px;border-radius:9px;background:transparent;color:#eff8f2;font-size:12px;font-weight:550}
body.signed-in aside button:hover{background:#ffffff12}
body.signed-in aside button.selected{background:#08784e;color:#fff}
body.signed-in aside button.selected:before{left:-9px;height:32px;background:#8ee4a9}
body.signed-in aside .nav-icon{width:29px;height:29px;border-radius:8px;background:#ffffff14;color:#f4fff8;font-size:16px}
body.signed-in aside button.selected .nav-icon{background:#ffffff20;color:#fff;box-shadow:none}
body.signed-in main{margin-left:230px;margin-top:74px;padding:22px 24px 32px;max-width:none}
#content{max-width:1500px;margin:0 auto}
#message:not(:empty){color:#983e1b;background:#fff5ea;border-color:#f4dfc9}
/* Dashboard */
.dashboard-top{align-items:center;margin:0 0 14px;gap:16px}
.dashboard-top .overview-heading h1{font-size:28px;letter-spacing:-.55px;color:#101d31}
.dashboard-top .dashboard-greeting h2{font-size:15px}
.dashboard-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:12px 0 14px}
.dashboard-stat{min-height:112px;padding:16px;border-radius:14px;gap:15px;color:var(--ud-ink);background:#fff;box-shadow:0 4px 17px #254c3909}
.dash-stat-icon{flex:0 0 58px;width:58px;height:58px;border-radius:14px;font-size:25px}
.dashboard-stat-copy{display:flex;min-width:0;flex-direction:column;gap:3px}
.dashboard-stat-copy small{font-size:12px;color:#293a4f}
.dashboard-stat-copy strong{font-size:25px;line-height:1.1;color:#142236;overflow-wrap:anywhere}
.dashboard-stat-copy em{font-size:10px;font-style:normal;color:#16834c}
.dashboard-stat.red .dashboard-stat-copy em,.dashboard-stat.purple .dashboard-stat-copy em{color:#e2383d}
.dashboard-quick,.milk-chart-card,.recent-sales-card,.dashboard-shortcuts{border-radius:14px;border:1px solid #eaf0ec;background:#fff;box-shadow:0 4px 16px #173a2b08}
.dashboard-quick{padding:11px 14px;margin-bottom:13px}
.dashboard-quick h2,.dashboard-shortcuts h2{font-size:16px;color:#101d31;margin:0 0 9px}
.dashboard-quick-grid{gap:10px}
.dash-action{min-height:51px;border-radius:11px;font-size:12px;background:#e8f5ee;color:#12402d}
.dash-action.primary{background:#00633d;color:#fff}
.dash-action>span{font-size:20px}
.dashboard-lower{grid-template-columns:1.05fr .95fr;gap:13px;margin-bottom:13px}
.milk-chart-card,.recent-sales-card{padding:13px 14px;min-width:0}
.dash-section-heading{margin:0 0 9px}
.dash-section-heading h2{font-size:15px;color:#142236}
.milk-chart{height:185px;gap:10px;padding:6px 6px 0}
.chart-y-axis{font-size:9px;padding-bottom:21px}
.chart-bars{gap:4px}
.bar-pair{gap:3px}
.bar{width:min(12px,34%);border-radius:4px 4px 0 0}
.chart-day small{font-size:9px}
.recent-sales-card .tablewrap{overflow:auto}
.recent-sales-card th{font-size:9px;padding:8px 7px}
.recent-sales-card td{font-size:10px;padding:9px 7px}
.sale-status{border-radius:12px}
.dashboard-shortcuts{padding:11px 13px}
.shortcut-grid{gap:8px}
.shortcut-tile{min-height:58px;padding:8px;border-radius:10px;grid-template-columns:34px 1fr;column-gap:7px}
.shortcut-tile>span{width:32px;height:32px;border-radius:8px}
.shortcut-tile b{font-size:10px;white-space:normal}
.shortcut-tile small{font-size:8px;white-space:normal}
/* AJAX list action icons and pagination */
.row-action{display:inline-grid;place-items:center;width:34px;height:34px;margin:0 3px;padding:0;border:1px solid #dfe9e3;border-radius:9px;background:#f5faf7;color:#176b45;vertical-align:middle}
.row-action:hover{background:#e4f4eb;color:#084a30}
.row-action svg{width:17px;height:17px}
.row-action.ledger{color:#196ab2;background:#f0f6ff}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0;padding:13px 15px;background:#fff;border-top:1px solid #edf1ee;color:#647368;font-size:12px}
.pagination>div{display:flex;align-items:center;gap:8px}
.pagination button{min-width:78px;padding:8px 10px;border-radius:8px}
/* Shared professional MVC forms */
.panel.module-editor{width:min(100%,920px);margin:12px auto 28px;padding:0;border:1px solid #e4ebe6;border-radius:15px;background:#fff;box-shadow:0 8px 26px #193a280c;overflow:hidden}
.module-editor .editor-heading{padding:15px 20px;background:#edf7f1;border-bottom:1px solid #e1ece5}
.module-editor .editor-icon{width:40px;height:40px;border-radius:11px;background:#176c44}
.module-editor .editor-heading small{color:#718378;font-size:10px}
.module-editor .editor-heading h1{font-size:18px;color:#142c20;margin:2px 0 0}
.module-form{display:block}
.editor-section{padding:17px 20px;border-bottom:1px solid #eef2ef}
.editor-section h2{margin:0 0 14px;color:#284936;font-size:13px;font-weight:750}
.editor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.editor-field label{margin:0 0 5px;color:#334b3b;font-size:11px;font-weight:700}
.editor-field input,.editor-field select,.editor-field textarea{min-height:38px;border-color:#d8e2db;border-radius:7px;background:#fff;padding:8px 10px;font-size:12px;color:#24362c}
.editor-field textarea{min-height:74px}
.required-mark{color:#d14b43}
.editor-actions{padding:13px 20px;background:#fff}
.editor-actions button{min-height:39px;min-width:104px;border-radius:8px;font-size:12px}
.editor-actions button[type=submit]{background:#17683f}
/* Customer form reference */
.module-editor:has(.reference-form-grid){width:min(100%,700px);margin:12px auto 28px}
.module-editor:has(.reference-form-grid) .customer-form-banner{min-height:69px;padding:10px 15px;gap:10px;background:#edf7f1}
.customer-form-logo{width:36px;height:36px;object-fit:contain;border-radius:50%;background:#fff}
.customer-form-banner .form-brand-line{font-size:8px;letter-spacing:.45px;color:#76867b;margin-bottom:2px}
.customer-form-banner b{font-size:14px;color:#15271c}
.customer-form-banner small{font-size:9px;color:#738277;margin-top:1px}
.reference-form-grid{padding:15px 16px 11px;gap:10px 14px}
.reference-form-grid>label,.reference-form-grid .field-select{font-size:10px;font-weight:700;color:#33473b}
.reference-form-grid input,.reference-form-grid select{height:34px;min-height:34px;margin-top:5px;border:1px solid #d7e0da;border-radius:6px;padding:6px 9px;font-size:10px}
.form-section-label{padding-top:2px;font-size:10px;font-weight:750;color:#425e4c}
.shift-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.shift-buttons button{min-height:34px;margin:0;padding:5px 3px;border:1px solid #d9e1dc;border-radius:6px;background:#fff;color:#607067;font-size:9px}
.shift-buttons button.active{border-color:#17683f;background:#edf7f1;color:#17683f}
.daily-total{padding:10px 12px;border-radius:7px;background:#edf7f1}
.daily-total b{font-size:9px}
.daily-total small{font-size:8px}
.daily-total>strong{font-size:13px}
.form-hint{display:block;color:#79877d;font-size:8px;font-weight:400;line-height:1.4}
.module-editor:has(.reference-form-grid) .editor-actions{padding:8px 16px 15px}
/* Milk sale form reference */
.panel.sale-reference-editor{width:min(100%,760px);margin:12px auto 28px;padding:0}
.sale-reference-editor .sale-form-banner{display:flex;align-items:center;gap:10px;padding:10px 15px;background:#edf7f1;border-bottom:1px solid #e1ece5}
.sale-form-banner img{width:36px;height:36px;object-fit:contain;border-radius:50%;background:#fff}
.sale-form-banner small,.sale-form-banner span{display:block;color:#718378;font-size:9px}
.sale-form-banner b{display:block;color:#14271d;font-size:14px;margin:1px 0}
.sale-reference-editor .editor-section{padding:12px 16px}
.sale-reference-editor .editor-section h2{font-size:10px;margin-bottom:8px}
.sale-reference-editor .editor-grid{gap:8px 12px}
.sale-reference-editor .editor-field label{font-size:9px;margin-bottom:4px}
.sale-reference-editor .editor-field input,.sale-reference-editor .editor-field select{min-height:32px;height:32px;padding:5px 8px;font-size:10px}
.sale-reference-editor .sale-total-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 14px;border-radius:0;background:#edf7f1;color:#30483a}
.sale-reference-editor .sale-total-summary span{display:flex;flex-direction:row;justify-content:space-between;gap:8px;font-size:9px}
.sale-reference-editor .sale-total-summary b{font-size:9px}
.sale-reference-editor .sale-total-summary strong{font-size:9px;color:#152d20}
.sale-reference-editor .sale-total-summary .form-hint{grid-column:1/-1}
.sale-reference-editor .editor-actions{padding:9px 14px 15px}
.sale-reference-editor .editor-actions button[type=submit]{width:100%;background:#17683f}
/* ID previews */
.animal-id-preview,.staff-id-preview{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border:1px solid #dbe9df;border-radius:9px;background:#f2f9f4;color:#43604d}
.animal-id-preview strong,.staff-id-preview strong{font-size:17px;letter-spacing:.3px;color:#075a39}
.animal-id-preview span,.staff-id-preview span{font-size:10px;font-weight:700}
.animal-id-preview small,.staff-id-preview small{font-size:9px;color:#708078}
/* Responsive app shell */
@media(max-width:1100px) and (min-width:801px){body.signed-in aside{width:210px}body.signed-in header{left:210px}body.signed-in main{margin-left:210px;padding:18px}.dashboard-stat-grid{gap:9px}.dashboard-stat{padding:12px;gap:10px}.dash-stat-icon{flex-basis:48px;width:48px;height:48px}.dashboard-lower{grid-template-columns:1fr}.shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){body.signed-in header{height:62px;left:0;padding:0 12px;gap:9px}body.signed-in main{margin:62px 0 0;padding:13px 12px 100px}body.signed-in aside{top:0;width:275px;transform:translateX(-105%);transition:transform .2s;z-index:35;padding:0 11px 18px;box-shadow:8px 0 26px #102e2028}body.signed-in.menu-open aside{transform:translateX(0)}body.signed-in aside .brand{height:122px}.dashboard-top{align-items:flex-start;gap:8px;margin-bottom:12px}.overview-heading{display:none}.dashboard-greeting{width:100%;justify-content:space-between;text-align:left;gap:8px}.dashboard-greeting h2{font-size:16px}.dashboard-greeting p{font-size:9px}.dashboard-greeting .today-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-size:9px}.dashboard-greeting .shift-pill{padding:6px 8px}.dashboard-greeting .today-meta>span{padding:0;background:transparent;border:0}.dashboard-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 12px}.dashboard-stat{min-height:77px;padding:8px;gap:7px;border-radius:11px}.dash-stat-icon{flex-basis:39px;width:39px;height:39px;font-size:18px;border-radius:10px}.dashboard-stat-copy small{font-size:9px}.dashboard-stat-copy strong{font-size:17px}.dashboard-stat-copy em{font-size:8px}.dashboard-quick{padding:9px;margin-bottom:10px}.dashboard-quick h2{font-size:13px;margin-bottom:7px}.dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.dash-action{min-height:43px;padding:6px;font-size:9px;gap:6px}.dash-action>span{font-size:15px}.dashboard-lower{grid-template-columns:1fr;gap:10px;margin-bottom:10px}.milk-chart-card{display:none}.recent-sales-card{padding:9px}.dash-section-heading{margin-bottom:6px}.dash-section-heading h2{font-size:13px}.recent-sales-card th,.recent-sales-card td{padding:7px 5px;font-size:8px}.recent-sales-card th:nth-child(2),.recent-sales-card td:nth-child(2){display:none}.dashboard-shortcuts{display:none}body.signed-in #mobile-nav{height:66px;background:#00452d;border:0;border-radius:20px 20px 0 0;box-shadow:0 -5px 20px #063c2c22;padding:6px 8px max(7px,env(safe-area-inset-bottom));z-index:45}body.signed-in #mobile-nav button{color:#fff;min-width:48px;padding:4px 5px}body.signed-in #mobile-nav small{color:#e7f4eb;font-size:8px}body.signed-in #mobile-nav #mobile-add{width:54px;height:54px;min-width:54px;margin-top:-22px;border:4px solid #f5faf7;background:#ff9700;font-size:28px}
 #content{width:100%}.panel.module-editor,.panel.sale-reference-editor{width:100%;margin:0 auto 16px;border-radius:11px}.module-editor:has(.reference-form-grid) .customer-form-banner{min-height:59px;padding:8px 11px}.customer-form-logo,.sale-form-banner img{width:32px;height:32px}.reference-form-grid{padding:10px 11px;gap:9px 9px}.reference-form-grid input,.reference-form-grid select{height:32px;min-height:32px;font-size:9px}.shift-buttons button{min-height:32px;font-size:8px}.module-editor:has(.reference-form-grid) .editor-actions{position:sticky;bottom:66px;z-index:8;padding:7px 11px 12px;background:#fff}.module-editor:has(.reference-form-grid) .editor-actions button[type=submit]{min-height:36px}.module-editor .editor-heading{padding:11px 13px}.module-editor .editor-heading h1{font-size:16px}.editor-section{padding:12px}.editor-section h2{margin-bottom:9px;font-size:11px}.editor-grid{gap:10px 9px}.editor-field label{font-size:9px}.editor-field input,.editor-field select,.editor-field textarea{min-height:34px;padding:7px 8px;font-size:10px}.editor-actions{position:sticky;bottom:66px;z-index:8;padding:8px 12px;background:#fff}.editor-actions button{min-height:36px;font-size:10px}.sale-reference-editor .editor-section{padding:9px 11px}.sale-reference-editor .editor-grid{gap:7px 8px}.sale-reference-editor .editor-field input,.sale-reference-editor .editor-field select{height:30px;min-height:30px;font-size:9px}.sale-reference-editor .sale-total-summary{padding:8px 10px}.pagination{align-items:flex-start;flex-direction:column;padding:11px}.pagination>div{width:100%;justify-content:space-between}}
@media(max-width:370px){.reference-form-grid{grid-template-columns:1fr}.reference-form-grid .full-width,.form-section-label,.daily-total{grid-column:1}.reference-form-grid input,.reference-form-grid select{font-size:12px}.dashboard-stat-copy strong{font-size:15px}}
@media print{body.signed-in header,body.signed-in aside,#mobile-nav,#message{display:none!important}body.signed-in main{margin:0!important;padding:0!important}.row-action,.pagination{display:none!important}.module-editor,.surface{box-shadow:none!important}}
/* Customer and animal register pages follow the supplied list references. */
.customer-list-page,.animal-list-page{color:#19352c}
.customer-page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px}
.customer-page-heading h1,.animal-list-page .list-heading h1{margin:0;font-size:29px;color:#123c2b}
.customer-page-heading p,.animal-list-page .list-heading p{margin:5px 0 0;color:#728179;font-size:14px}
.customer-page-heading>div:last-child,.animal-list-page .list-heading>div:last-child{display:flex;gap:10px;align-items:center}
.customer-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}
.customer-summary article{display:flex;align-items:center;gap:13px;min-height:84px;padding:17px;border:1px solid #e2ebe5;border-radius:17px;background:#fff;box-shadow:0 5px 16px #153b2b08}
.customer-summary article>span,.customer-filter-heading>span,.customer-list-title>div>span{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#e8f7ef;color:#128451;font-size:21px;font-weight:700}
.customer-summary article:nth-child(2)>span{background:#e9f3ff;color:#1473b9}.customer-summary article:nth-child(3)>span{background:#fff4df;color:#c58100}
.customer-summary small,.customer-list-title small{display:block;color:#78857e;font-size:12px}.customer-summary strong{display:block;margin-top:3px;color:#183a2a;font-size:19px}
.customer-filter-card,.customer-list-panel,.animal-filter-card,.animal-list-panel{overflow:hidden;border:1px solid #e1e9e4;border-radius:18px;background:#fff;box-shadow:0 5px 16px #153b2b08}
.customer-filter-heading,.animal-filter-heading{display:flex;align-items:center;gap:11px;padding:16px 18px;border-bottom:1px solid #e7ece9}.customer-filter-heading b,.animal-filter-heading b{display:block;font-size:16px}.customer-filter-heading small,.animal-filter-heading small{display:block;margin-top:3px;color:#87918b;font-size:12px}
.customer-filter-grid{display:grid;grid-template-columns:1.5fr repeat(4,minmax(0,1fr));gap:12px;padding:17px 18px 8px}.customer-filter-grid label,.animal-filter-grid label{margin:0;color:#3d5147;font-size:12px}.customer-filter-grid input,.customer-filter-grid select,.animal-filter-grid input,.animal-filter-grid select{display:block;width:100%;height:43px;margin-top:7px;border:1px solid #dbe6df;border-radius:11px;background:#fff;padding:0 12px;color:#30483c}.customer-filter-actions{display:flex;justify-content:flex-end;gap:9px;padding:5px 18px 17px}.customer-filter-actions button{min-height:40px}.green-outline{background:#effaf4;border:1px solid #b9e9cc;color:#087342}.customer-list-panel,.animal-list-panel{margin-top:17px}.customer-list-title,.animal-list-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid #e8eeea}.customer-list-title>div,.animal-list-title>div{display:flex;align-items:center;gap:10px}.customer-list-title>div>span,.animal-list-title>div>span{width:36px;height:36px;border-radius:11px;font-size:18px}.customer-list-title b,.animal-list-title b{font-size:16px}.customer-list-title>strong{padding:6px 10px;border-radius:10px;background:#edf8f1;color:#168352;font-size:12px}.customer-list-page .tablewrap,.animal-list-page .tablewrap{border:0;border-radius:0}.customer-list-page table,.animal-list-page table{min-width:900px}.customer-list-page thead th,.animal-list-page thead th{background:#f3f6f5;color:#53665c;font-size:11px;letter-spacing:.035em;text-transform:uppercase}.customer-list-page tbody td,.animal-list-page tbody td{padding:13px 10px;border-bottom:1px solid #edf1ef;font-size:12px;vertical-align:middle}.customer-list-page tbody td:nth-child(2)>b,.customer-list-page tbody td:nth-child(6)>b{display:block;color:#173b2b}.customer-list-page tbody td:nth-child(2)>small,.customer-list-page tbody td:nth-child(6)>small{display:block;margin-top:3px;color:#87918b;font-size:10px}.customer-type-badge,.customer-shift-badge,.customer-status-badge,.customer-wallet-badge,.animal-tag-badge,.animal-gender-badge,.animal-state-badge,.animal-production-badge,.animal-breeding-badge{display:inline-block;padding:6px 9px;border-radius:9px;background:#eaf3ff;color:#2366a3;font-size:10px;font-weight:700;white-space:nowrap}.customer-shift-badge{background:#f2eaff;color:#6d42a9}.customer-status-badge.active,.animal-state-badge.active{background:#e6f7ee;color:#13814d}.customer-status-badge.inactive,.animal-state-badge.inactive{background:#edf0f2;color:#6f7c83}.customer-wallet-badge{background:#e9f6ef;color:#24825a}.customer-wallet-badge.due{background:#fff0ed;color:#bd4534}.customer-wallet-badge.advance{background:#e9f3ff;color:#2468a6}.customer-wallet-badge small{display:block;margin-top:2px;font-size:10px}.customer-mobile{white-space:nowrap;color:#31745a}.customer-filter-actions .pdf-button{background:#ed3348;color:white}
.animal-list-page .list-heading{align-items:center}.animal-filter-heading>span{color:#1676ff;font-size:20px}.animal-filter-heading>button{margin-left:auto;width:36px;height:34px;border:1px solid #e0e7ed;border-radius:9px;background:#fafcfd;color:#6b7782}.animal-filter-grid{display:grid;grid-template-columns:1.4fr repeat(4,minmax(0,1fr)) auto;gap:13px;align-items:end;padding:16px}.animal-filter-grid .search-box{display:flex;align-items:center;gap:8px;height:41px;margin-top:7px;padding:0 10px;border:1px solid #dbe4eb;border-radius:9px;color:#6e8292}.animal-filter-grid .search-box input{height:37px;margin:0;padding:0;border:0;outline:0}.animal-filter-actions{display:flex;gap:8px;align-items:end}.animal-filter-actions button{height:41px;min-width:44px}.animal-list-title>small{color:#84918a;font-size:11px}.animal-id-cell{display:flex;align-items:center;gap:10px;min-width:150px}.animal-id-cell>img,.animal-placeholder{display:grid;place-items:center;width:48px;height:48px;object-fit:cover;border:1px solid #e0e7e4;border-radius:12px;background:#f2f5f4;color:#94a4ad}.animal-id-cell>span>button{padding:0;border:0;background:none;color:#0874d8;font-weight:700}.animal-id-cell>span>small{display:block;margin-top:3px;color:#98a2a8;font-size:9px}.animal-tag-badge{border:1px solid #e2e8ed;background:#f8fafb;color:#586b79}.animal-gender-badge.female{background:#ffedf5;color:#c33e7c}.animal-gender-badge.male{background:#e8f3ff;color:#2870ae}.animal-production-badge.milking{background:#e9f8ff;color:#1680a5}.animal-production-badge.dry{background:#fff3df;color:#a67416}.animal-breeding-badge.pregnant{background:#fff0e6;color:#d56a22}
@media(max-width:850px){.customer-page-heading,.animal-list-page .list-heading{align-items:flex-start;flex-direction:column}.customer-summary{gap:9px}.customer-summary article{min-height:72px;padding:12px}.customer-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px}.customer-filter-grid label:first-child{grid-column:1/-1}.customer-filter-actions{flex-wrap:wrap}.animal-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:13px}.animal-filter-actions{grid-column:1/-1;justify-content:flex-end}.animal-list-title>small{display:none}}
@media(max-width:480px){.customer-page-heading h1,.animal-list-page .list-heading h1{font-size:24px}.customer-page-heading>div:last-child,.animal-list-page .list-heading>div:last-child{width:100%;flex-wrap:wrap}.customer-page-heading>div:last-child button,.animal-list-page .list-heading>div:last-child button{flex:1}.customer-summary{grid-template-columns:1fr}.customer-summary article{min-height:62px}.customer-filter-grid{grid-template-columns:1fr}.customer-filter-grid label:first-child{grid-column:auto}.customer-filter-actions{justify-content:stretch}.customer-filter-actions button{flex:1}.animal-filter-grid{grid-template-columns:1fr}.animal-filter-actions{grid-column:auto}.customer-list-title,.animal-list-title{padding:12px}}
/* Compact brand block matching the sidebar reference. */
body.signed-in aside .brand{height:72px;margin:0 -10px 8px;padding:10px 12px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:10px;background:transparent;border-bottom:1px solid #ffffff18;text-align:left}
body.signed-in aside .brand-mark{flex:0 0 40px;width:40px;height:40px;padding:0;border:0;border-radius:11px;background:#08784e;box-shadow:0 4px 12px #001f1540;overflow:hidden}
body.signed-in aside .brand-mark img{display:block;width:100%;height:100%;padding:2px;object-fit:contain;border-radius:9px;background:#fff}
body.signed-in aside .brand>div{display:block;min-width:0;color:#fff;font-size:12px;line-height:1.2;white-space:nowrap}
body.signed-in aside .brand>div b{display:block;color:#fff;font-size:12px;font-weight:750;letter-spacing:.1px}
body.signed-in aside .brand>div small{display:block;margin-top:4px;color:#9bcab2;font-size:8px;font-weight:700;letter-spacing:1.05px}
@media(max-width:800px){body.signed-in aside .brand{height:72px;justify-content:flex-start}}
#mobile-farm-name{display:none!important}
#message.is-success{display:block;padding:12px 16px;border:1px solid #b7e4c8;border-radius:10px;background:#eaf8ef;color:#17683f;font-size:13px;font-weight:650;box-shadow:0 4px 12px #17683f10}
#message.is-success::before{content:'✓';display:inline-grid;place-items:center;width:20px;height:20px;margin-right:8px;border-radius:50%;background:#168656;color:#fff;font-size:12px}
#message.is-error{display:block;padding:12px 16px;border:1px solid #f2bcbc;border-radius:10px;background:#fff0f0;color:#b4232c;font-size:13px}
/* Use the supplied full horizontal dairy wordmark as the only sidebar brand. */
body.signed-in aside .brand{height:76px;padding:8px 10px;justify-content:flex-start;align-items:center}
body.signed-in aside .brand-mark{flex:0 0 180px;width:180px;height:60px;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}
body.signed-in aside .brand-mark img{width:100%;height:100%;padding:0;border:0;border-radius:0;object-fit:contain;background:transparent}
#mobile-brand{margin-right:auto;gap:0}
#mobile-logo{width:142px;height:48px;object-fit:contain;border-radius:0;background:transparent}
.login-brand img{width:min(230px,100%);height:auto;max-height:100px;object-fit:contain}
@media(max-width:800px){body.signed-in aside .brand{height:76px}.login-brand img{max-width:190px}}

/* Add/edit forms use the available content width and stay left aligned. */
#content>.panel.module-editor,
#content>.panel.desktop-editor,
#content>.panel.sale-reference-editor,
#content>.module-editor.panel:has(.reference-form-grid){
 box-sizing:border-box;width:100%;max-width:none;margin:0 0 16px;
}
#content>.panel.module-editor:has(.reference-form-grid){width:100%;max-width:none;margin-left:0;margin-right:0}
@media(max-width:800px){
 #content>.panel.module-editor,#content>.panel.desktop-editor,#content>.panel.sale-reference-editor{width:100%;max-width:none;margin:0 0 14px}
}
.production-animal{display:flex;align-items:center;gap:10px;min-width:132px;color:#123c2b}
.production-animal>span{display:grid;place-items:center;width:44px;height:44px;border:1px solid #d7eadb;border-radius:10px;background:#eaf6ec;color:#128452;font-size:20px}
.production-animal>b{font-size:12px}.production-animal small,.production-staff small{display:block;margin-top:3px;color:#829088;font-size:10px;font-weight:500}
.production-breed{display:inline-block;padding:4px 7px;border:1px solid #dbe2e7;border-radius:7px;background:#f7f9fa;color:#40535f;font-size:10px;white-space:nowrap}
.production-shift{display:inline-block;padding:6px 9px;border-radius:20px;background:#eee5ff;color:#6842a4;font-size:10px;white-space:nowrap}
.production-quantity{color:#128452;font-size:13px;white-space:nowrap}.production-quantity small{font-size:10px;font-weight:500}
.production-staff b{color:#233e51;font-size:11px;white-space:nowrap}.production-staff b:first-letter{color:#157af2}
.row-action.edit{border-color:#247cff;background:#fff;color:#1674ed}.row-action.trash{border-color:#ee4756;background:#fff;color:#e23d4b}
.row-action.edit:hover{background:#edf5ff}.row-action.trash:hover{background:#fff0f0}
.desktop-editor .sale-total-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:12px;padding:18px;border:1px solid #dceae1;border-radius:14px;background:#f0f8f3;color:#284737}
.desktop-editor .sale-total-summary>span{display:flex;flex-direction:column;gap:5px}.desktop-editor .sale-total-summary>span>b{font-size:11px;color:#708278}.desktop-editor .sale-total-summary>span>strong{font-size:16px;color:#175e3c}
@media(max-width:800px){.desktop-editor .sale-total-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:13px}}

/* All add/edit forms use the full desktop content area and fit phone screens. */
@media(min-width:801px){
 #content>.panel:has(form),#content>.surface:has(form){box-sizing:border-box;width:100%;max-width:none;margin-left:0;margin-right:0}
 #content>.panel:has(form) form,#content>.surface:has(form) form{box-sizing:border-box;min-width:0;max-width:none}
 #content>.panel:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.panel:has(form) form select,#content>.panel:has(form) form textarea,
 #content>.surface:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.surface:has(form) form select,#content>.surface:has(form) form textarea{max-width:100%;box-sizing:border-box}
 #content>.surface.logo-settings form{display:block;width:100%;max-width:none;margin:0;padding:14px 0;border-bottom:1px solid #e8efeb}
 #content>.panel.user-editor{max-width:none}
}
@media(max-width:800px){
 #content>.panel:has(form),#content>.surface:has(form){box-sizing:border-box;width:100%;max-width:100%;margin-left:0;margin-right:0}
 #content>.panel:has(form) form,#content>.surface:has(form) form{box-sizing:border-box;min-width:0;max-width:100%}
 #content>.panel:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.panel:has(form) form select,#content>.panel:has(form) form textarea,
 #content>.surface:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.surface:has(form) form select,#content>.surface:has(form) form textarea{width:100%;max-width:100%;box-sizing:border-box}
 #content>.surface.logo-settings form{display:block;width:100%;max-width:100%;margin:0;padding:12px 0}
 .editor-grid,.reference-form-grid{grid-template-columns:minmax(0,1fr)}
 .module-form,.production-form{min-width:0;max-width:100%}
 .editor-actions{flex-wrap:wrap}
 .editor-actions button{max-width:100%}
}
@media(max-width:800px){
 #content>.panel:has(form) form label,#content>.surface:has(form) form label{font-size:13px;line-height:1.45}
 #content>.panel:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.panel:has(form) form select,#content>.panel:has(form) form textarea,
 #content>.surface:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.surface:has(form) form select,#content>.surface:has(form) form textarea{font-size:16px;line-height:1.35}
 #content>.panel:has(form) form button,#content>.surface:has(form) form button{font-size:14px;min-height:42px}
}
/* Match the supplied reference's readable form typography. */
@media(min-width:801px){
 #content>.panel:has(form) form label,#content>.surface:has(form) form label,.editor-field label{font-size:14px;line-height:1.4}
 #content>.panel:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.panel:has(form) form select,#content>.panel:has(form) form textarea,
 #content>.surface:has(form) form input:not([type=checkbox]):not([type=radio]),#content>.surface:has(form) form select,#content>.surface:has(form) form textarea{font-size:14px}
}
@media(max-width:800px){#content>.panel:has(form) form label,#content>.surface:has(form) form label,.editor-field label{font-size:14px}}
/* Four comfortable field columns on desktop, scaling down with the viewport. */
@media(min-width:1151px){.module-editor .editor-grid,.desktop-editor .editor-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:521px) and (max-width:1150px){.module-editor .editor-grid,.desktop-editor .editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.module-editor .editor-grid,.desktop-editor .editor-grid{grid-template-columns:minmax(0,1fr)}}
@media(min-width:360px) and (max-width:800px){.module-editor .editor-grid,.desktop-editor .editor-grid,.reference-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-editor .editor-grid>.full-width,.desktop-editor .editor-grid>.full-width{grid-column:1/-1}}
@media(max-width:359px){.module-editor .editor-grid,.desktop-editor .editor-grid,.reference-form-grid{grid-template-columns:minmax(0,1fr)}}

/* Milk Sale has no side summary column; use the full workspace width. */
.sales-desktop-editor .module-form{grid-template-columns:minmax(0,1fr)}
.sales-desktop-editor .walkin-customer-fields{grid-column:1/-1}
#content>.panel.module-list{width:100%;max-width:none;margin:0 0 18px}
#content>.panel.module-list>.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
#content>.panel.module-list>.toolbar input{flex:0 1 260px;min-width:180px}
@media(max-width:800px){#content>.panel.module-list>.toolbar{flex-wrap:wrap}#content>.panel.module-list>.toolbar input{flex:1 1 100%;min-width:0}}
/* Keep all module pages aligned to the full workspace, not centered in a narrow card. */
#content>.panel,#content>.surface{box-sizing:border-box;width:100%;max-width:none;margin-left:0;margin-right:0}
@media(max-width:800px){#content>.panel,#content>.surface{width:100%;max-width:100%;margin-left:0;margin-right:0}}

/* Mobile readability and centered add action — 2026-10-14. */
@media screen and (max-width:800px){
 body{font-size:15px;line-height:1.45}
 body.signed-in main{padding-bottom:calc(110px + env(safe-area-inset-bottom,0px))}
 .dashboard-greeting{flex-wrap:wrap;gap:10px}
 .dashboard-greeting h2{font-size:20px;line-height:1.3}
 .dashboard-greeting p,.dashboard-greeting .today-meta{font-size:13px;line-height:1.45}
 .dashboard-stat{min-height:100px;padding:12px 10px;align-items:flex-start}
 .dash-stat-copy,.dashboard-stat-copy{min-width:0}
 .dash-stat-copy small,.dashboard-stat-copy small{font-size:13px;line-height:1.4}
 .dash-stat-copy strong,.dashboard-stat-copy strong{font-size:23px;line-height:1.25;overflow-wrap:anywhere}
 .dash-stat-copy em,.dashboard-stat-copy em{font-size:12px;line-height:1.4}
 .dashboard-quick h2,.dash-section-heading h2,.dashboard-shortcuts h2{font-size:17px;line-height:1.35}
 .dash-action{font-size:14px;min-height:52px;padding:10px 8px;line-height:1.35;white-space:normal}
 .dash-action>span{font-size:20px;flex-shrink:0}
 .recent-sales-card{overflow-x:auto}
 .recent-sales-card th,.recent-sales-card td{font-size:13px;padding:10px 8px}
 .customer-list-page thead th,.animal-list-page thead th{font-size:12px}
 .customer-list-page tbody td,.animal-list-page tbody td{font-size:14px}
 .customer-list-page tbody td small,.animal-id-cell>span>small,
 .production-animal small,.production-staff small{font-size:12px}
 .customer-summary small,.customer-filter-heading small,.animal-filter-heading small,
 .customer-list-title small,.customer-filter-grid label,.animal-filter-grid label{font-size:14px}
 .production-animal>b,.production-quantity{font-size:15px}
 .production-breed,.production-shift,.customer-type-badge,.customer-shift-badge,
 .customer-status-badge,.customer-wallet-badge,.animal-tag-badge,.animal-gender-badge,
 .animal-state-badge,.animal-production-badge,.animal-breeding-badge{font-size:12px}
 body.signed-in aside button{font-size:15px;min-height:46px}
 body.signed-in aside .nav-group{font-size:12px}
 #message.is-success,#message.is-error{font-size:15px}
 body.signed-in #mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
  grid-template-rows:58px;align-items:center;height:auto;box-sizing:border-box;
  padding:6px 6px calc(8px + env(safe-area-inset-bottom,0px));overflow:visible}
 body.signed-in #mobile-nav button{grid-row:1;min-width:0;width:100%;margin:0;
  padding:5px 2px;min-height:48px;justify-content:center;align-items:center;gap:4px}
 body.signed-in #mobile-nav [data-mobile="dashboard"]{grid-column:1}
 body.signed-in #mobile-nav [data-mobile="sales"]{grid-column:2}
 body.signed-in #mobile-nav [data-mobile="animals"]{grid-column:4}
 body.signed-in #mobile-nav #mobile-more{grid-column:5}
 body.signed-in #mobile-nav small{font-size:12px;line-height:1.25;white-space:normal}
 body.signed-in #mobile-nav svg{width:24px;height:24px;flex-shrink:0}
 body.signed-in #mobile-nav #mobile-add{grid-column:3;grid-row:1;justify-self:center;
  align-self:center;display:grid;place-items:center;box-sizing:border-box;
  width:58px;height:58px;min-width:58px;min-height:58px;margin:0;padding:0;
  transform:translateY(-19px);border:4px solid #f5faf7;border-radius:50%;
  background:#ff9700;color:#fff;box-shadow:0 4px 12px #1d3c2d25}
 body.signed-in #mobile-nav #mobile-add span{display:block;font-size:34px;
  line-height:1;font-family:Arial,sans-serif;font-weight:400;transform:translateY(-1px)}
}

/* Keep Billing and lower menu items reachable above the floating navigation. */
@media screen and (max-width:800px){
 body.signed-in aside{position:fixed;display:block;top:0;bottom:0;
  height:100vh;height:100dvh;max-height:100dvh;box-sizing:border-box;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
  padding-bottom:calc(110px + env(safe-area-inset-bottom,0px));
  scroll-padding-bottom:calc(110px + env(safe-area-inset-bottom,0px))}
 body.signed-in.menu-open aside{z-index:55}
 body.signed-in aside button{flex-shrink:0}
}

/* Add forms: scroll actions fully above the mobile navigation. */
@media screen and (max-width:800px){
 body.signed-in main{height:auto;max-height:none;min-height:calc(100dvh - 62px);
  overflow:visible;padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))}
 body.signed-in #content{height:auto;max-height:none;overflow:visible}
 .module-editor,.desktop-editor,.sales-desktop-editor{height:auto;max-height:none;overflow:visible}
 .module-editor .editor-actions,.desktop-editor .editor-actions,
 .module-editor:has(.reference-form-grid) .editor-actions,
 #content .panel form .editor-actions,#content .surface form .editor-actions{
  position:static;bottom:auto;left:auto;right:auto;transform:none;
  display:flex;flex-wrap:wrap;gap:10px;padding:16px;margin-top:12px;
  background:#fff;z-index:auto}
 .module-editor .editor-actions button,.desktop-editor .editor-actions button{
  min-height:46px;font-size:16px;flex:1 1 120px;margin:0}
 #editform{height:auto;max-height:none;overflow:visible}
 #editform input,#editform select,#editform textarea{scroll-margin-bottom:150px}
}
