/* GreenPaw logo palette: forest wordmark, leaf green, and fresh lime. */
:root {
  --greenpaw-forest: #0f4d2a;
  --greenpaw-leaf: #2e9e44;
  --greenpaw-lime: #8cc63f;
  --greenpaw-soft: #edf7df;
  --greenpaw-paper: #f6f9f2;
}
body { font-family: 'DM Sans', system-ui, sans-serif; }
  .tank-fill { height: 0; transition: height 1.2s cubic-bezier(.2,.8,.2,1); }
  .bar { height: 0; transition: height .9s cubic-bezier(.2,.8,.2,1); }
  :focus-visible { outline: 2px solid #2E9E44; outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
  ::-webkit-scrollbar { width: 8px; height: 8px } ::-webkit-scrollbar-thumb { background: #c9d6c8; border-radius: 8px }
.action{background:#0f4d2a;color:white;border-radius:12px;padding:10px 16px;font-weight:700;font-size:14px}.action:hover{background:#1b7a3e}.panel{background:white;border:1px solid #0f4d2a15;border-radius:24px;padding:24px;margin-bottom:20px}.field{display:block;width:100%;padding:11px;border:1px solid #b7c9bb;border-radius:10px;background:white;color:#0f4d2a;margin-top:6px}label{display:block;margin-bottom:16px}dialog{border:0;border-radius:24px;padding:28px;width:min(480px,calc(100% - 32px));color:#0f4d2a;max-height:90vh;overflow:auto}dialog::backdrop{background:#0f4d2a99}.data-table{width:100%;text-align:left;font-size:14px}.data-table td,.data-table th{padding:14px;border-bottom:1px solid #eee}.notice{padding:12px;background:#edf7df;border-radius:12px;margin-bottom:20px}

.toast { position:fixed; bottom:24px; right:24px; max-width:90vw; background:#0f4d2a; color:white; padding:16px; border-radius:12px; z-index:100; display:none; }

/* Refill dialog */
.refill-dialog{width:min(540px,calc(100% - 32px));padding:30px;background:#fcfef9;box-shadow:0 28px 100px #071f3550}
.refill-dialog form>h2{display:none}
.refill-heading{display:flex;align-items:center;gap:14px;margin-bottom:28px;position:relative;padding-right:24px}
.refill-icon{display:grid;place-items:center;flex-shrink:0;width:52px;height:56px;border-radius:17px;background:#e8efdf;color:#2e9e44;font-size:23px}
.refill-eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:#648069;margin:0 0 5px}
.refill-heading h3{font-family:'Bricolage Grotesque',sans-serif;font-size:27px;font-weight:800;line-height:1.2;margin:0 0 5px}
.refill-heading div>p:last-child{font-size:12px;color:#728075;margin:0}
.refill-close{position:absolute;right:-8px;top:-10px;width:32px;height:32px;border-radius:50%;font-size:25px;color:#718276;background:transparent;border:0;cursor:pointer}
.refill-close:hover{background:#edf0e8}
.refill-pets{border:0;padding:0;margin:0 0 20px;display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}
.refill-pets legend{font-size:13px;font-weight:700;margin-bottom:12px}
.refill-pet{position:relative;margin:0;cursor:pointer}
.refill-pet input{position:absolute;opacity:0;width:1px;height:1px}
.refill-pet-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;border:1.5px solid #dde4d9;border-radius:16px;padding:17px;background:white;transition:background .15s,border-color .15s}
.refill-pet-card>i{font-size:22px;color:#6c8569;margin-bottom:13px}
.refill-pet-card strong{font-size:14px}.refill-pet-card small{font-size:12px;color:#788276;margin-top:4px}
.refill-check{display:none;position:absolute;right:13px;top:13px;border-radius:50%;background:#1b7a3e;color:white;width:20px;height:20px;text-align:center;font-size:12px;line-height:20px}
.refill-pet input:checked+.refill-pet-card{border-color:#2e9e44;background:#f0f5e9}.refill-pet input:checked+.refill-pet-card .refill-check{display:block}
.refill-pet input:focus-visible+.refill-pet-card{outline:2px solid #2e9e44;outline-offset:3px}
.refill-stock{padding:16px;background:#f3f5ee;border-radius:14px;margin-bottom:22px}.refill-stock>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:12px}.refill-stock strong{font-weight:700}.refill-stock p{font-size:11px;color:#71816b;margin:8px 0 0}
.refill-track{height:6px;border-radius:8px;background:#dfe6d7;overflow:hidden;margin-top:11px}.refill-track span{display:block;height:100%;background:#59a632;border-radius:8px;transition:width .2s}
.refill-amount-label{font-size:13px;font-weight:700;margin-bottom:9px;display:flex;justify-content:space-between}.refill-amount-label span{font-size:11px;font-weight:400;color:#7b8778}
.refill-amount{display:flex;align-items:center;border:1.5px solid #cedac8;border-radius:12px;background:white;padding-right:17px}.refill-amount:focus-within{border-color:#2e9e44;box-shadow:0 0 0 3px #2e9e4412}.refill-amount input{width:100%;min-width:0;border:0;background:transparent;padding:13px 16px;font:700 22px 'DM Sans',sans-serif;color:#0f4d2a;border-radius:12px;outline:none}.refill-amount>span{font-size:14px;color:#7b8778}
.refill-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin:11px 0 18px}.refill-shortcuts button{border:1px solid #dce3d6;background:white;border-radius:8px;padding:7px 11px;font-size:11px;font-weight:700;color:#536b4d;cursor:pointer}.refill-shortcuts button:hover:enabled{background:#e8efdf;border-color:#8ba780}
.refill-preview{font-size:12px;color:#40643b;background:#edf3e5;padding:12px 14px;border-radius:10px;margin-bottom:20px}.refill-invalid{color:#a44828;background:#fff0e6}
.refill-dialog form>div:last-child{border-top:1px solid #e5e9df;padding-top:18px;display:flex;justify-content:flex-end;gap:10px}.refill-dialog [data-close]{border:1px solid #dce3d6;background:white;border-radius:11px;padding:11px 20px;font-size:13px;font-weight:700}.refill-dialog .action{padding:12px 25px;font-size:13px;box-shadow:0 3px 7px #0f4d2a15}
.refill-dialog button:disabled{opacity:.4;cursor:not-allowed}.refill-dialog #formError:empty{display:none}
@media(max-width:480px){.refill-dialog{padding:22px}.refill-heading{gap:10px}.refill-heading h3{font-size:24px}.refill-icon{width:43px;height:49px}.refill-heading div>p:last-child{max-width:200px}.refill-pet-card{padding:14px}.refill-stock>div:first-child{font-size:11px}}

.dropoff-note{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.6;color:#7a8576;margin:-5px 0 20px}.dropoff-note i{margin-top:3px;color:#8c9b80}.dropoff-dialog .refill-amount>span{font-size:12px}.dropoff-dialog .refill-icon{background:#e2f1d5;color:#2e9e44}

/* Shared theme: applied before page content to avoid a light flash. */
:root{color-scheme:light}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border:1px solid #0f4d2a20;border-radius:12px;background:#fff;color:#0f4d2a;cursor:pointer;transition:background .15s,color .15s}
.theme-toggle:hover{background:#e6eede}
html[data-theme="dark"]{color-scheme:dark;background:#101b17;color:#e3ede3}
html[data-theme="dark"] body{background:#101b17;color:#e3ede3}
html[data-theme="dark"] .bg-paper{background-color:#101b17}
html[data-theme="dark"] header{background:#101b17ed;border-color:#33473b}
html[data-theme="dark"] .bg-white,html[data-theme="dark"] .panel{background:#1a2921;border-color:#33473b}
html[data-theme="dark"] .bg-forest{background-color:#142c22}
html[data-theme="dark"] .bg-forest-800{background-color:#203f30}
html[data-theme="dark"] .text-forest{color:#e3ede3}
html[data-theme="dark"] [class*="text-forest/"]{color:#a8bbae}
html[data-theme="dark"] [class*="border-forest/"]{border-color:#33473b}
html[data-theme="dark"] [class*="divide-forest/"]>:not([hidden])~:not([hidden]){border-color:#33473b}
html[data-theme="dark"] .bg-moss-light,html[data-theme="dark"] .bg-moss-soft{background-color:#2b4933}
html[data-theme="dark"] .text-moss{color:#9dd6a6}
html[data-theme="dark"] .bg-accent{color:#172b20}
html[data-theme="dark"] .hover\:bg-paper:hover{background:#293d30}
html[data-theme="dark"] .hover\:text-forest:hover{color:#f1f6ee}
html[data-theme="dark"] .field{background:#132219;color:#e3ede3;border-color:#4d6453}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#93a899}
html[data-theme="dark"] dialog{background:#1a2921;color:#e3ede3;border:1px solid #3b5040;box-shadow:0 28px 100px #0008}
html[data-theme="dark"] dialog::backdrop{background:#030d09b8}
html[data-theme="dark"] .data-table td,html[data-theme="dark"] .data-table th{border-color:#33473b}
html[data-theme="dark"] .notice{background:#493723;color:#f5d7b4}
html[data-theme="dark"] .action{background:#8cc63f;color:#15271b}
html[data-theme="dark"] .action:hover{background:#b0e16f}
html[data-theme="dark"] .toast{background:#d2e7bf;color:#172b20;box-shadow:0 6px 24px #0004}
html[data-theme="dark"] .theme-toggle{background:#263b2e;border-color:#4a624e;color:#b0e16f}
html[data-theme="dark"] .theme-toggle:hover{background:#344e3c}
html[data-theme="dark"] .refill-icon{background:#304832;color:#b6d69e}
html[data-theme="dark"] .dropoff-dialog .refill-icon{background:#29452b;color:#b0e16f}
html[data-theme="dark"] .refill-eyebrow,html[data-theme="dark"] .refill-pet-card>i{color:#a3c68f}
html[data-theme="dark"] .refill-heading div>p:last-child,html[data-theme="dark"] .refill-pet-card small,html[data-theme="dark"] .refill-stock p,html[data-theme="dark"] .refill-amount-label span,html[data-theme="dark"] .refill-amount>span,html[data-theme="dark"] .dropoff-note,html[data-theme="dark"] .dropoff-note i{color:#a9bba9}
html[data-theme="dark"] .refill-close{color:#bed0bd}
html[data-theme="dark"] .refill-close:hover{background:#314534}
html[data-theme="dark"] .refill-pet-card{background:#17251d;border-color:#455b47}
html[data-theme="dark"] .refill-pet input:checked+.refill-pet-card{background:#2c422d;border-color:#b0ce91}
html[data-theme="dark"] .refill-check{background:#b0ce91;color:#172b20}
html[data-theme="dark"] .refill-stock{background:#142219}
html[data-theme="dark"] .refill-track{background:#354c37}
html[data-theme="dark"] .refill-track span{background:#8cc63f}
html[data-theme="dark"] .refill-amount{background:#132219;border-color:#577051}
html[data-theme="dark"] .refill-amount input{color:#e3ede3}
html[data-theme="dark"] .refill-amount:focus-within{border-color:#b0ce91;box-shadow:0 0 0 3px #b0ce9118}
html[data-theme="dark"] .refill-shortcuts button,html[data-theme="dark"] .refill-dialog [data-close]{background:#203025;border-color:#4a6049;color:#c8dbc1}
html[data-theme="dark"] .refill-shortcuts button:hover:enabled{background:#344b32;border-color:#91b47e}
html[data-theme="dark"] .refill-preview{background:#2d432b;color:#c2dfae}
html[data-theme="dark"] .refill-invalid{background:#4b3022;color:#f6c39f}
html[data-theme="dark"] .refill-dialog form>div:last-child{border-color:#3a4e3b}
html[data-theme="dark"] .text-red-700{color:#ffb0a5}
html[data-theme="dark"] .bg-red-100{background:#4d2a28}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#425d49}
@media(max-width:480px){header .header-actions{gap:8px}header .header-actions>span{display:none}}

/* Sign in */
.login-page{margin:0;min-height:100vh;background:#f6f9f2;color:#0f4d2a;display:grid;place-items:center;padding:40px;box-sizing:border-box}.login-page *{box-sizing:border-box}.login-theme{position:fixed;right:24px;top:24px;z-index:2}.login-layout{display:grid;grid-template-columns:1.05fr 1fr;width:min(100%,1000px);min-height:620px;border-radius:30px;overflow:hidden;background:white;box-shadow:0 24px 80px #0f4d2a12;border:1px solid #0f4d2a12}.login-story{background:#0f4d2a;color:#f0f5e7;padding:48px;position:relative;display:flex;flex-direction:column;overflow:hidden}.login-story:after{content:'';width:280px;height:280px;border:55px solid #8cc63f0b;border-radius:50%;position:absolute;bottom:-100px;right:-110px;pointer-events:none}.login-brand{display:flex;align-items:center;gap:12px;font:800 24px 'Bricolage Grotesque',sans-serif;text-decoration:none;color:inherit;margin-bottom:85px}.login-brand>span{display:grid;place-items:center;width:43px;height:43px;background:#8cc63f;border-radius:13px;color:#0f4d2a;font-size:22px}.login-kicker{font-size:10px;letter-spacing:2px;font-weight:700;color:#799875;margin:0 0 14px}.login-story>.login-kicker{color:#b2cd98}.login-story h1{font:800 clamp(38px,5vw,58px)/1.08 'Bricolage Grotesque',sans-serif;letter-spacing:-2px;margin:0 0 23px}.login-story>p:not(.login-kicker){font-size:14px;line-height:1.8;color:#b6c8b7;max-width:310px;margin:0}.login-story-footer{margin-top:auto;padding-top:65px;font-size:12px;color:#bacba8;display:flex;gap:10px;align-items:center}.login-card{padding:60px 48px;align-self:center}.login-symbol{display:grid;place-items:center;width:49px;height:49px;border-radius:16px;background:#eaf1e2;color:#5d884f;font-size:23px;margin-bottom:25px}.login-card h2{font:800 32px/1.2 'Bricolage Grotesque',sans-serif;margin:0 0 10px;letter-spacing:-.6px}.login-card #loginSubtitle{font-size:13px;line-height:1.7;color:#7b8977;margin:0 0 28px}.login-card label{font-size:12px;font-weight:700;margin-bottom:16px}.login-card .field{box-sizing:border-box;font:14px 'DM Sans',sans-serif;margin-top:9px;padding:13px;border-color:#d8e1d2;background:#fcfef9}.login-card label[for="password"]{margin-bottom:9px}.login-password{position:relative;margin-bottom:17px}.login-password .field{margin-top:0;padding-right:47px}.login-password button{position:absolute;right:5px;top:4px;width:38px;height:38px;border:0;border-radius:8px;background:transparent;color:#7b8977;cursor:pointer}.login-submit{width:100%;display:flex;align-items:center;justify-content:space-between;border:0;cursor:pointer;padding:14px 18px;margin-top:7px}.login-submit:disabled{opacity:.6;cursor:wait}#loginError{font-size:12px;line-height:1.6;color:#b54332;margin:10px 0}#loginError:empty{display:none}#loginStatus{font-size:12px;line-height:1.7;color:#7b8977}.login-footnote{font-size:11px;color:#8b9684;text-align:center;margin:24px 0 0}.login-footnote i{margin-right:5px}.login-page [hidden]{display:none!important}
html[data-theme="dark"] .login-layout{background:#1a2921;border-color:#33473b;box-shadow:0 24px 80px #0003}html[data-theme="dark"] .login-story{background:#142c22}html[data-theme="dark"] .login-symbol{background:#304832;color:#b6d69e}html[data-theme="dark"] .login-kicker{color:#a3c68f}html[data-theme="dark"] .login-card #loginSubtitle,html[data-theme="dark"] #loginStatus,html[data-theme="dark"] .login-footnote{color:#a9bba9}html[data-theme="dark"] .login-card .field{background:#132219;border-color:#4d6453}html[data-theme="dark"] #loginError{color:#ffb0a5}
@media(max-width:760px){.login-page{padding:70px 20px 30px}.login-layout{grid-template-columns:1fr;max-width:460px;min-height:0}.login-story{padding:25px 30px}.login-brand{margin-bottom:0}.login-story>p,.login-story h1,.login-story-footer{display:none}.login-card{padding:32px 30px}.login-card h2{font-size:29px}}

/* Low-stock hopper colors must remain readable against the dark dashboard. */
html[data-theme="dark"] .bg-red-50{background-color:#352622}
html[data-theme="dark"] .border-red-200{border-color:#9b6258}
html[data-theme="dark"] .text-red-600{color:#ffb0a5}

.stock-deduct-description{font-size:13px;line-height:1.7;margin:0 0 22px;color:#728075}
html[data-theme="dark"] .stock-deduct-description{color:#a9bba9}
dialog .action:disabled{opacity:.4;cursor:not-allowed}

.stock-remove-link{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:#a44828;font-size:12px;font-weight:700;cursor:pointer;margin:0 0 20px;padding:8px 0}.stock-remove-link:hover{text-decoration:underline}
.transaction-delete{border:1px solid #edc6c0;border-radius:9px;background:#fff5f2;color:#a6382a;font-size:12px;font-weight:700;padding:7px 12px;cursor:pointer}.transaction-delete:hover{background:#ffe5de}
.action.transaction-delete-confirm{background:#a6382a;color:white}
html[data-theme="dark"] .stock-remove-link{color:#f6bc9e}
html[data-theme="dark"] .transaction-delete{background:#432824;border-color:#875249;color:#ffb9a9}
html[data-theme="dark"] .transaction-delete:hover{background:#5a322b}

/* Consistent shared popup structure, including histories and confirmations. */
dialog.app-popup{box-sizing:border-box;margin:auto;padding:28px;width:min(540px,calc(100% - 32px));max-height:calc(100dvh - 40px);background:#fcfef9;box-shadow:0 24px 90px #071f3540;overscroll-behavior:contain}
.app-popup *{box-sizing:border-box}.popup-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.popup-header h2{font:800 25px/1.2 'Bricolage Grotesque',sans-serif;margin:0;color:inherit}.popup-eyebrow{font-size:10px;font-weight:700;letter-spacing:1.6px;color:#648069;margin:0 0 8px}.popup-close{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border:0;border-radius:50%;background:#edf1e7;color:#61755d;font-size:24px;cursor:pointer}.popup-close:hover{background:#dfe8d6}.popup-description{font-size:13px;color:#728075;margin:0 0 20px}.popup-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;padding-top:18px;border-top:1px solid #e5e9df}.popup-actions button{min-height:42px;font-family:inherit;cursor:pointer}.popup-cancel{padding:10px 20px;border:1px solid #dce3d6;border-radius:11px;background:white;color:inherit;font-size:13px;font-weight:700}.popup-cancel:hover{background:#edf1e7}.app-popup .field{box-sizing:border-box;font-family:inherit}.app-popup label{font-size:13px;font-weight:700}.app-popup #formError:empty{display:none}.app-popup #formError{font-size:12px;line-height:1.6}.app-popup.refill-dialog .popup-header{display:none}.app-popup .refill-heading{margin-top:2px}.app-popup .refill-pet{margin:0}.app-popup .refill-heading h3{margin-top:0}.app-popup.popup-wide{width:min(740px,calc(100% - 32px))}.popup-history{max-height:50dvh;overflow:auto;border:1px solid #e5e9df;border-radius:13px}.popup-history .data-table{border-collapse:collapse}.popup-history th{background:#f3f5ee;white-space:nowrap}.popup-history td{white-space:nowrap}.popup-history tbody tr:last-child td{border-bottom:0}
html[data-theme="dark"] dialog.app-popup{background:#1a2921}html[data-theme="dark"] .popup-eyebrow{color:#a3c68f}html[data-theme="dark"] .popup-close,html[data-theme="dark"] .popup-cancel{background:#263b2e;color:#d2e2c9;border-color:#4a6049}html[data-theme="dark"] .popup-close:hover,html[data-theme="dark"] .popup-cancel:hover{background:#344e3c}html[data-theme="dark"] .popup-actions,html[data-theme="dark"] .popup-history{border-color:#3a4e3b}html[data-theme="dark"] .popup-history th{background:#203025}html[data-theme="dark"] .popup-description{color:#a9bba9}
@media(max-width:480px){dialog.app-popup{padding:22px;max-height:calc(100dvh - 24px)}.popup-header h2{font-size:23px}.popup-actions{gap:8px}.popup-actions button{flex:1;padding-left:12px;padding-right:12px}.app-popup .refill-heading{padding-right:24px}.app-popup .refill-heading h3{font-size:23px}}

/* Use the supplied logo on its original white background. */
.brand-logo{display:block;width:100%;height:auto;object-fit:contain;border-radius:14px;background:#fff}
.sidebar-brand{display:block;flex-shrink:0;width:148px;margin:20px auto 8px}
.login-brand{width:180px;max-width:100%;margin-bottom:32px;position:relative;z-index:1}
@media(max-width:760px){.login-brand{width:130px;margin:0 auto}.login-story{padding:20px 30px}}

/* Edge glow: the hovered card's whole border lights up. */
.glow-card{--glow-color:#8cc63f;--glow-deep:#2e9e44;transition:box-shadow .3s,transform .3s}
.glow-card:not(.absolute):not(.fixed):not(.sticky){position:relative}
/* The whole edge of the hovered card lights up evenly. */
.glow-card::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:3px;pointer-events:none;z-index:2;opacity:0;transition:opacity .3s;
  background:linear-gradient(135deg,var(--glow-color),var(--glow-deep),var(--glow-color));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.glow-card:hover::after{opacity:1}
.glow-card:hover{transform:translateY(-3px);box-shadow:0 0 0 1px #8cc63f99,0 0 28px #8cc63f73,0 14px 40px -10px #2e9e4480}
html[data-theme="dark"] .glow-card{--glow-color:#b0e16f;--glow-deep:#8cc63f}
html[data-theme="dark"] .glow-card:hover{box-shadow:0 0 0 1px #b0e16f99,0 0 30px #8cc63f59,0 14px 40px -10px #0009}
@media (hover:none){.glow-card::after{display:none}.glow-card:hover{transform:none}}

/* Nature Green theme: leaf accents inspired by the GreenPaw machine. */
#sidebar{position:relative;background-image:url(../assets/leaves-soft.svg),linear-gradient(180deg,#0f4d2a 0%,#0b3d21 100%);background-repeat:no-repeat;background-position:left -30px bottom -20px,0 0;background-size:260px auto,100% 100%;border-top:3px solid #8cc63f;box-shadow:inset 0 3px 14px -6px #8cc63f}
#sidebar>*{position:relative;z-index:1}
main section.bg-forest{position:relative;background-image:url(../assets/leaves.svg),linear-gradient(135deg,#0f4d2a 0%,#146036 60%,#1b7a3e 100%);background-repeat:no-repeat;background-position:right -70px bottom -120px,0 0;background-size:260px auto,100% 100%}
main section.bg-forest>*{position:relative;z-index:1}
main .panel,main .bg-white.rounded-3xl{background-image:url(../assets/leaf-faint.svg);background-repeat:no-repeat;background-position:right -18px bottom -18px;background-size:110px 110px}
main .bg-white.rounded-2xl:not([data-tank-border]){background-image:url(../assets/leaf-faint.svg);background-repeat:no-repeat;background-position:right -12px bottom -12px;background-size:60px 60px}
main .panel,main .bg-white.rounded-3xl,main .bg-white.rounded-2xl:not([data-tank-border]){border:1.5px solid #2e9e44b3}
body.bg-paper{background-color:#f3f8ef;background-image:radial-gradient(circle at 100% 0,#8cc63f1f,transparent 40%),radial-gradient(circle at 0 100%,#2e9e4414,transparent 45%)}
html[data-theme="dark"] #sidebar{background-image:url(../assets/leaves-soft.svg),linear-gradient(180deg,#0d2a1b,#091f14);border-top-color:#8cc63f}
html[data-theme="dark"] main section.bg-forest{background-image:url(../assets/leaves.svg),linear-gradient(135deg,#0d2a1b,#123a26)}
html[data-theme="dark"] body.bg-paper{background-image:none}
html[data-theme="dark"] main .panel,html[data-theme="dark"] main .bg-white.rounded-3xl,html[data-theme="dark"] main .bg-white.rounded-2xl:not([data-tank-border]){border-color:#33473b}

/* Animated GreenPaw items falling behind the page content (see js/leaves.js). */
.leaf-layer{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
body>main,.login-layout{position:relative;z-index:1}
@media(min-width:768px){body>aside#sidebar{position:relative;z-index:2}}
.leaf-fall{position:absolute;top:-60px;display:block;opacity:var(--leaf-opacity,.4);animation:leaf-fall var(--leaf-dur,20s) linear var(--leaf-delay,0s) infinite;will-change:transform}
.leaf-fall img{display:block;width:100%;height:100%;animation:leaf-sway var(--sway-dur,4s) ease-in-out var(--sway-delay,0s) infinite alternate}
@keyframes leaf-fall{from{transform:translate3d(0,0,0) rotate(0deg)}to{transform:translate3d(60px,calc(100vh + 120px),0) rotate(calc(var(--leaf-spin,1)*540deg))}}
@keyframes leaf-sway{from{transform:translateX(-22px) rotate(-14deg)}to{transform:translateX(22px) rotate(14deg)}}
html[data-theme="dark"] .leaf-fall{opacity:calc(var(--leaf-opacity,.4)*.8)}
/* The leaves were requested explicitly, so they keep moving even when the OS turns animations off. */
@media (prefers-reduced-motion: reduce){.leaf-fall{animation:leaf-fall var(--leaf-dur,20s) linear var(--leaf-delay,0s) infinite!important}.leaf-fall img{animation:leaf-sway var(--sway-dur,4s) ease-in-out var(--sway-delay,0s) infinite alternate!important}}

/* Light mode: green lines instead of pale grey. */
html:not([data-theme="dark"]) [class*="border-forest/"]{border-color:#2e9e44b3}
html:not([data-theme="dark"]) [class*="divide-forest/"]>:not([hidden])~:not([hidden]){border-color:#2e9e4499}
html:not([data-theme="dark"]) .data-table td,html:not([data-theme="dark"]) .data-table th{border-bottom-color:#2e9e4499}
html:not([data-theme="dark"]) .data-table thead th{border-bottom:2px solid #2e9e44}
html:not([data-theme="dark"]) header{border-bottom-color:#2e9e44b3}
html:not([data-theme="dark"]) .field{border-color:#2e9e44b3}
html:not([data-theme="dark"]) .popup-actions,html:not([data-theme="dark"]) .popup-history,html:not([data-theme="dark"]) .refill-dialog form>div:last-child{border-color:#2e9e4499}

/* Smooth motion: page entrance, hovers, popups and toasts. */
:root{--ease-out:cubic-bezier(.22,1,.36,1)}
@keyframes gp-rise{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
@keyframes gp-fade{from{opacity:0}to{opacity:1}}
@keyframes gp-pop{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
@keyframes gp-toast{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:none}}
@keyframes gp-slide{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}
/* Entrance runs only on the first load, not on every re-render. */
body.page-enter [data-enter]{animation:gp-rise .7s var(--ease-out) both;animation-delay:calc(var(--enter-i,0)*80ms)}
body.page-enter header{animation:gp-fade .5s ease both}
body.page-enter #sidebar nav li{animation:gp-slide .5s var(--ease-out) both}
body.page-enter #sidebar nav li:nth-child(2){animation-delay:.05s}body.page-enter #sidebar nav li:nth-child(3){animation-delay:.1s}body.page-enter #sidebar nav li:nth-child(4){animation-delay:.15s}body.page-enter #sidebar nav li:nth-child(5){animation-delay:.2s}
/* Hover polish */
.glow-card{transition:box-shadow .45s var(--ease-out),transform .45s var(--ease-out)}
.glow-card::after{transition:opacity .45s var(--ease-out)}
#sidebar nav a{transition:background-color .3s var(--ease-out),color .3s var(--ease-out),transform .3s var(--ease-out)}
#sidebar nav a:hover{transform:translateX(4px)}
.action,main button,.theme-toggle,.popup-cancel,.popup-close,.refill-shortcuts button,.transaction-delete{transition:background-color .25s var(--ease-out),color .25s var(--ease-out),border-color .25s var(--ease-out),box-shadow .3s var(--ease-out),transform .25s var(--ease-out),filter .25s}
.action:hover:enabled,main button:hover:enabled{transform:translateY(-2px);box-shadow:0 8px 18px -8px #0f4d2a80}
.action:active:enabled,main button:active:enabled,.theme-toggle:active{transform:translateY(0) scale(.97);box-shadow:none}
.refill-pet-card{transition:background-color .25s var(--ease-out),border-color .25s var(--ease-out),transform .25s var(--ease-out),box-shadow .25s var(--ease-out)}
.refill-pet:hover .refill-pet-card{transform:translateY(-2px);box-shadow:0 8px 20px -10px #2e9e4480}
.data-table tbody tr{transition:background-color .25s ease}
.data-table tbody tr:hover{background-color:#8cc63f14}
.field{transition:border-color .25s ease,box-shadow .25s ease}
.field:focus{border-color:#2e9e44;box-shadow:0 0 0 3px #8cc63f40;outline:none}
/* Popups and toast */
dialog[open]{animation:gp-pop .38s var(--ease-out)}
dialog[open]::backdrop{animation:gp-fade .3s ease}
.toast{animation:gp-toast .4s var(--ease-out)}
/* Theme switch fades colours instead of snapping. */
body,header,#sidebar,main .panel,main .bg-white{transition:background-color .35s ease,border-color .35s ease,color .35s ease}
/* Page switch: content fades out before the next view slides in. */
main>div{transition:opacity .18s ease,transform .18s ease}
main>div.page-leave{opacity:0;transform:translateY(8px)}

/* Hardware Status: Test buttons */
.hw-test{display:inline-flex;align-items:center;gap:6px;border:1px solid #2e9e4466;border-radius:999px;background:#fff;color:#1b7a3e;font-size:12px;font-weight:700;padding:6px 12px;cursor:pointer;white-space:nowrap}
.hw-test:hover:enabled{background:#edf7df}
.hw-test:disabled{opacity:.6;cursor:wait}
html[data-theme="dark"] .hw-test{background:#203025;border-color:#4a6049;color:#b0e16f}

/* Hardware Status: wiring guide (40-pin header diagram) */
.wiring-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;align-items:start}
@media(max-width:900px){.wiring-grid{grid-template-columns:1fr}}
.pin-header{background:#0f4d2a;border-radius:20px;padding:16px 12px;color:#e3ede3;box-shadow:inset 0 0 0 1px #ffffff14}
.pin-head-legend{display:flex;gap:14px;justify-content:center;font-size:11px;margin-bottom:10px;color:#cfe6d3}
.pin-head-legend>span{display:inline-flex;align-items:center;gap:6px}.pin-head-legend .pin-dot{width:14px;height:14px;font-size:0}
.pin-row{display:grid;grid-template-columns:1fr 30px 30px 1fr;align-items:center;gap:6px;padding:2px 0}
.pin-dot{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:11px;font-weight:700;color:#0f4d2a;background:#c8d3c9;border:2px solid #ffffff33}
.pin-text{display:flex;flex-direction:column;line-height:1.15;font-size:12px;min-width:0}
.pin-text.left{text-align:right;align-items:flex-end}.pin-text.right{text-align:left;align-items:flex-start}
.pin-text small{font-size:10px;opacity:.6}.pin-text b{font-size:12px;white-space:nowrap}
.pin-text.used small{opacity:.8}
.pin-free{background:#33584099;color:#a9c9ad}
.pin-pwr{background:#e8a23a;color:#3b2200}
.pin-gnd{background:#1c1c1c;color:#fff;border-color:#555}
.pin-sensor{background:#3b82f6;color:#fff}.pin-text.pin-sensor b{color:#93c5fd}
.pin-buzzer{background:#a855f7;color:#fff}.pin-text.pin-buzzer b{color:#d8b4fe}
.pin-servo1{background:#f97316;color:#fff}.pin-text.pin-servo1 b{color:#fdba74}
.pin-servo2{background:#eab308;color:#3b2a00}.pin-text.pin-servo2 b{color:#fde047}
.pin-dog{background:#8cc63f;color:#163300}.pin-text.pin-dog b{color:#c3ec8b}
.pin-cat{background:#ec4899;color:#fff}.pin-text.pin-cat b{color:#f9a8d4}
.pin-power{background:#ef4444;color:#fff}.pin-text.pin-power b{color:#fca5a5}
.pin-camera{background:#14b8a6;color:#fff}
.wire-cards{display:grid;gap:10px}
.wire-card{border:1px solid #2e9e4440;border-radius:14px;padding:12px 14px;background:#fff}
.wire-title{display:flex;align-items:center;gap:8px;font-weight:700;margin:0 0 6px}
.wire-swatch{width:12px;height:12px;border-radius:50%;display:inline-block;flex-shrink:0}
.wire-card ul{margin:0;padding:0;list-style:none;font-size:13px}
.wire-card li{display:flex;justify-content:space-between;gap:10px;padding:3px 0;border-top:1px dashed #2e9e4426}
.wire-card li:first-child{border-top:0}.wire-card li span:first-child{color:#5e7f66;white-space:nowrap}.wire-card li span:last-child{text-align:right;font-weight:600}
html[data-theme="dark"] .wire-card{background:#17251d;border-color:#33473b}
html[data-theme="dark"] .wire-card li span:first-child{color:#a9bba9}
html[data-theme="dark"] .pin-header{background:#0a2416}
.pin-text.used{background:none!important;border:0}
.pin-text.used small{color:#cfe6d3}
