:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#142c3b;background:#f4f7f8;font-size:16px;line-height:1.45}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a{color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #55b9d6;outline-offset:2px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#eff6f8,#dcebef)}.login-card{width:min(100%,420px);background:#fff;border:1px solid #d6e3e8;border-radius:20px;padding:32px;box-shadow:0 20px 60px #123c5516}.brand-mark{width:40px;height:40px;border-radius:12px;background:#123c55;color:#fff;display:grid;place-items:center;font-size:28px;font-weight:700;line-height:1}.login-card h1{font-size:1.75rem;margin:20px 0 4px;letter-spacing:-.04em}.muted{color:#526775}.hint{font-size:.88rem;color:#526775}.login-card .hint{margin:0 0 22px}.shell{min-height:100vh;display:grid;grid-template-columns:228px minmax(0,1fr)}.sidebar{background:#123c55;color:#eaf5f8;padding:27px 18px;display:flex;flex-direction:column;gap:24px}.sidebar .logo{display:flex;align-items:center;gap:12px;font-size:1.1rem;font-weight:700;letter-spacing:-.025em}.sidebar .brand-mark{background:#fff;color:#123c55;width:34px;height:34px;font-size:23px}.nav{display:grid;gap:7px}.nav button,.sidebar-footer button{background:transparent;color:inherit;border:0;text-align:left;padding:12px 14px;border-radius:10px;width:100%}.nav button.active,.nav button:hover,.sidebar-footer button:hover{background:#ffffff20}.sidebar-footer{margin-top:auto;font-size:.82rem;color:#c2d7df}.content{padding:30px clamp(20px,3.4vw,56px) 70px;max-width:1480px;width:100%;margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:25px}.eyebrow{font-size:.76rem;font-weight:750;letter-spacing:.11em;text-transform:uppercase;color:#4e7889;margin:0 0 6px}.topbar h1{font-size:clamp(1.65rem,2.6vw,2.2rem);line-height:1.14;letter-spacing:-.045em;margin:0}.top-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.button{border:1px solid #c7d8df;border-radius:10px;background:#fff;color:#173b50;padding:10px 15px;font-weight:650;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.button:hover{background:#eaf3f6}.button.primary{background:#13617c;border-color:#13617c;color:#fff}.button.primary:hover{background:#0f5068}.button.danger{color:#9b3434;border-color:#e4b8b8}.button.text{background:transparent;border-color:transparent}.button.small{padding:6px 10px;min-height:36px;font-size:.86rem}.icon-btn{min-width:44px;min-height:44px;border:1px solid #cfdee3;background:#fff;border-radius:10px;color:#163d50;font-size:1.25rem}.card{background:#fff;border:1px solid #dae5e9;border-radius:16px;box-shadow:0 4px 16px #19445807}.section{padding:22px}.section+.section{margin-top:16px}.stack{display:grid;gap:14px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.searchbox{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #bfcfd7;border-radius:12px;padding:0 15px;min-height:52px}.searchbox input{border:0;outline:0;flex:1;width:100%;min-width:0;background:transparent}.searchbox:focus-within{outline:3px solid #a6dfed}.searchbox .glass{font-size:1.12rem;color:#55707d}.search-zone{margin-bottom:24px}.search-results{margin-top:12px}.grid-main{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(275px,.72fr);gap:20px;align-items:start}.card-title{font-size:1.1rem;letter-spacing:-.02em;margin:0}.subhead{margin:0;color:#526775;font-size:.9rem}.calendar-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 20px 12px}.calendar-controls{display:flex;gap:6px}.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:0 14px}.calendar-week{color:#607885;font-size:.77rem;text-align:center;font-weight:750}.calendar-week span{padding:8px 0}.calendar-grid{padding-bottom:16px}.day{height:81px;border:1px solid transparent;background:#fff;border-radius:9px;text-align:left;padding:8px;display:flex;flex-direction:column;justify-content:space-between;color:#223e4c}.day:hover{background:#edf5f8;border-color:#a5c4d1}.day.today .number{border-radius:50%;background:#dceff4;padding:2px 7px;margin:-2px -7px}.day.selected{background:#e6f3f7;border-color:#277a98}.day.outside{color:#a1b1b8;background:#fafcfc}.day .count{display:inline-flex;align-self:flex-start;font-size:.74rem;font-weight:700;color:#196a86;background:#e5f1f5;padding:2px 7px;border-radius:6px;max-width:100%}.day .count.zero{color:#91a5ad;background:transparent;padding-left:0}.date-head{margin:0 0 4px;font-size:1.1rem}.appointment,.list-item{width:100%;text-align:left;border:1px solid #e2eaed;background:#fff;border-radius:11px;padding:13px;display:flex;justify-content:space-between;gap:10px;align-items:center}.appointment:hover,.list-item:hover{background:#f3f8fa;border-color:#b6d2dc}.appointment+.appointment,.list-item+.list-item{margin-top:9px}.list-main{font-weight:700}.secondary{font-size:.88rem;color:#536b76;margin-top:3px}.chip{display:inline-block;background:#e8f3f6;color:#175f79;border-radius:7px;padding:4px 8px;font-size:.75rem;font-weight:700;white-space:nowrap}.chip.completed{background:#e7f1ec;color:#2a6949}.chip.cancelled{background:#f0f1f2;color:#626c70}.empty{padding:23px;border:1px dashed #c6d8df;border-radius:12px;color:#57717c;text-align:center}.empty p{margin:0 0 12px}.alert{padding:12px 14px;background:#fef6e7;border:1px solid #eed5a8;border-radius:10px;color:#765118;font-size:.9rem}.notice{padding:12px 14px;background:#eaf4f7;border-radius:10px;color:#2d5f72;font-size:.9rem}.error{padding:10px 12px;background:#fff0f0;color:#9e3030;border-radius:9px;font-size:.9rem}.success{padding:10px 12px;background:#e8f5ee;color:#236747;border-radius:9px;font-size:.9rem}.field{display:grid;gap:6px;min-width:0}.field label{font-weight:650;font-size:.88rem;color:#244556}.field input,.field select,.field textarea{width:100%;border:1px solid #bfcfd7;background:#fff;color:#172f3b;border-radius:10px;padding:11px 12px;min-height:44px}.field textarea{resize:vertical;min-height:120px}.field .help{font-size:.79rem;color:#60747e}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.full{grid-column:1/-1}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.layout-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.55fr);gap:18px;align-items:start}.kv{display:grid;grid-template-columns:150px 1fr;gap:8px 15px;font-size:.92rem}.kv dt{color:#657c87}.kv dd{margin:0;font-weight:550;min-width:0;overflow-wrap:anywhere}.heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.heading-row h2{font-size:1.05rem;margin:0}.segmented{display:flex;gap:6px;background:#e9f0f3;padding:5px;border-radius:11px;width:max-content}.segmented button{border:0;background:transparent;border-radius:8px;padding:8px 13px;color:#426071;font-weight:700}.segmented button.active{background:#fff;color:#163e50;box-shadow:0 1px 5px #15394918}.mini-list{display:grid;gap:9px}.person-link{border:1px solid #d8e5e9;padding:11px 13px;border-radius:9px;background:#fff;text-align:left;display:flex;justify-content:space-between;gap:8px;align-items:center}.person-link:hover{background:#f0f7f9}.back{border:0;background:transparent;color:#246880;padding:0;margin:0 0 16px;font-weight:650}.back:hover{text-decoration:underline}.divider{border:0;border-top:1px solid #e2eaed;margin:20px 0}.smallprint{font-size:.8rem;color:#6c7e86}.auth-toggle{display:flex;gap:8px;align-items:center}.auth-toggle input{flex:1}.archive-text{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7fafb;padding:14px;border-radius:10px;max-height:480px;overflow:auto}.mobile-nav{display:none}.toast{position:fixed;bottom:23px;right:23px;background:#153e51;color:#fff;padding:12px 16px;border-radius:10px;z-index:20;box-shadow:0 10px 35px #173d4e33}.hidden{display:none!important}@media(max-width:1000px){.grid-main,.layout-detail{grid-template-columns:1fr}.sidebar{width:190px}.shell{grid-template-columns:190px minmax(0,1fr)}}@media(max-width:700px){.shell{display:block}.sidebar{display:none}.content{padding:20px 15px 95px}.topbar{align-items:flex-start}.top-actions{justify-content:flex-end}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #d6e3e8;padding:8px 12px max(8px,env(safe-area-inset-bottom));z-index:10;justify-content:space-around}.mobile-nav button{border:0;background:transparent;color:#506977;padding:8px 15px;min-height:44px;font-weight:650}.mobile-nav button.active{color:#13617c;background:#e8f3f7;border-radius:9px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.calendar-grid,.calendar-week{gap:2px;padding-left:8px;padding-right:8px}.day{height:65px;padding:6px 4px}.day .count{font-size:.66rem;padding:2px 4px}.day .count.zero{display:none}.section{padding:17px}.login-card{padding:24px}.kv{grid-template-columns:120px 1fr}.topbar h1{font-size:1.65rem}}@media(max-width:390px){.topbar{display:block}.top-actions{margin-top:14px}.day{height:60px}.day .count{font-size:.63rem}}

/* Desktop usability refinements */
.topbar{align-items:flex-end;min-height:72px}.top-actions{align-self:flex-end}.topbar .eyebrow{text-transform:none;letter-spacing:.01em;font-size:.86rem;margin-bottom:3px}.searchbox .glass{width:22px;height:22px;flex:none;color:#4d6f7d}.search-zone{position:relative}.search-list{position:absolute;left:0;right:0;top:100%;z-index:5;padding:7px;box-shadow:0 14px 34px #173d4e1a}.search-hit{display:flex;width:100%;border:0;background:transparent;padding:10px 12px;align-items:center;gap:12px;text-align:left;border-radius:8px;color:#244556}.search-hit:hover{background:#eef6f8}.search-scroll{display:flex;align-items:center;min-width:0;overflow-x:auto;white-space:nowrap;gap:12px;scrollbar-width:thin;flex:1}.search-scroll strong{color:#123c55}.search-scroll span{color:#637b86;font-size:.88rem}.calendar-card{overflow:hidden}.calendar-top{min-height:76px;padding:15px 20px;align-items:center;border-bottom:1px solid #edf1f3}.calendar-top .card-title{font-size:1.35rem}.calendar-week,.calendar-grid{gap:0;padding-left:0;padding-right:0}.calendar-week{border-bottom:1px solid #e1e9ec}.calendar-week span{padding:10px 0}.calendar-grid{padding-bottom:0}.day{height:103px;border:0;border-right:1px solid #edf1f3;border-bottom:1px solid #edf1f3;border-radius:0;padding:9px 10px;position:relative;justify-content:flex-start;gap:6px}.day:nth-child(7n){border-right:0}.day.today .number{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#13617c;color:white;padding:0;margin:-3px 0 0 -3px}.day.selected{background:#eaf5f8;box-shadow:inset 0 0 0 2px #5e9eb5}.day.outside{background:#fafbfc}.day.holiday{background:#fffaf0}.day.holiday.selected{background:#fdf3dc}.holiday-label{font-size:.69rem;line-height:1.12;color:#9b6420;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.holiday-note{font-size:.82rem;color:#99611a;margin:5px 0}.calendar-legend{display:flex;align-items:center;gap:7px;padding:11px 16px;font-size:.77rem;color:#657c87}.holiday-dot{width:10px;height:10px;border-radius:3px;background:#f4deb2}.day-panel{min-width:0}.day-panel .heading-row{margin-bottom:19px}.day-panel .date-head{line-height:1.3}.appointment{align-items:flex-start;padding:14px;min-width:0}.appointment-lines{display:grid;gap:3px;min-width:0;flex:1}.appt-time{font-weight:750;color:#123c55;font-size:1.02rem}.scroll-line{display:block;white-space:nowrap;overflow-x:auto;scrollbar-width:thin;max-width:100%;font-size:.89rem;color:#375565}.scroll-line strong{color:#193d50}.appt-service{font-size:.85rem;color:#617783}.appointment .chip{flex:none;margin-top:2px}.appointment.no-show{background:#f6f7f8;color:#65737b}.chip.noshow{background:#e9ecee;color:#626b70}.month-dialog{border:1px solid #c7d8df;border-radius:18px;padding:24px;width:min(440px,calc(100% - 32px));box-shadow:0 24px 70px #123c5540}.month-dialog::backdrop{background:#142c3b80}.month-dialog h2{font-size:1.3rem;margin:0}.month-dialog .hint{margin:7px 0 19px}.month-chooser{display:grid;grid-template-columns:1fr 1fr;gap:14px}.month-chooser select{height:172px;overflow:auto}.month-chooser option{padding:6px}.month-dialog .actions{justify-content:flex-end}.picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.selection-panel{padding:15px;border:1px solid #dde8ec;border-radius:12px;background:#f9fbfc}.selection-panel select{margin-top:3px}.selection-panel .help{min-height:15px}.linked-pills{display:flex;flex-wrap:wrap;gap:8px;min-height:27px}.linked-pill{display:inline-flex;align-items:center;gap:8px;background:#e8f3f6;border:1px solid #cde4eb;border-radius:9px;padding:6px 8px;font-size:.86rem;color:#1c5369}.linked-pill button{border:0;background:transparent;font-size:1.2rem;line-height:1;color:#38687a;padding:0 2px}.picker-results{max-height:210px;overflow-y:auto}.picker-result{display:flex;align-items:center;gap:10px;width:100%;border:1px solid #e0e9ed;background:#fff;padding:10px 12px;text-align:left;color:#25485a}.picker-result+.picker-result{border-top:0}.picker-result:hover{background:#f0f7f9}.picker-result span:nth-child(2){font-size:.83rem;color:#667c87;flex:1}.picker-result span:last-child{font-size:1.2rem}.address-suggest{display:block;border:1px solid #b7d4de;border-radius:8px;background:#eaf5f8;padding:9px 10px;text-align:left;color:#205970;width:100%}.field input[hidden]{display:none}.appointment-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}.appointment-actions .button{width:100%;min-width:0;text-align:center}
@media(max-width:700px){.topbar{align-items:flex-start;min-height:0}.top-actions{align-self:auto}.day{height:73px;padding:5px 4px}.day.today .number{width:23px;height:23px;margin:-1px 0 0 -2px}.day .count{font-size:.6rem}.holiday-label{font-size:.58rem}.calendar-top{padding:12px}.calendar-top .card-title{font-size:1.06rem}.calendar-legend{padding:9px 12px}.appointment-actions{grid-template-columns:1fr 1fr}}

/* V2 shared type, calendars, lists, invoice */
.field label,.selection-panel label,.picker-heading label{font-size:1.125rem;font-weight:720;line-height:1.25;color:#193e51}.field input,.field select,.field textarea{font-size:1rem}.field .help,.help{font-size:.875rem;color:#627783}.topbar .eyebrow.practice-name{font-size:1.29rem;font-weight:720;color:#2b6f87;line-height:1.25;margin-bottom:5px}.layout-detail>.section+.section,.layout-detail>.stack+.section,.stack>.section+.section{margin-top:0}.layout-detail>.section{align-self:start}.selection-panel .picker-heading{min-height:44px}.button.add-related{width:146px;min-height:42px;font-size:.94rem}.address-section{border-top:1px solid #e3ecef;padding-top:20px}.address-section h2{font-size:1.13rem;margin:0 0 14px}.address-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}.inline-error{color:#b63737;font-size:.86rem;min-height:0;line-height:1.35}.inline-error:empty{display:none}.date-trigger,.time-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;border:1px solid #bfcfd7;background:#fff;border-radius:10px;padding:11px 12px;text-align:left;color:#172f3b;font-size:1rem}.date-trigger:hover,.time-trigger:hover{border-color:#5e9eb5;background:#f7fbfc}.date-trigger>span:last-child{font-size:1.3rem;color:#2b6f87}.calendar-dialog,.time-dialog{border:0;padding:0;background:transparent;box-shadow:0 24px 70px #123c5540;max-width:calc(100vw - 28px);border-radius:16px}.calendar-dialog::backdrop,.time-dialog::backdrop{background:#142c3b80}.calendar-dialog{width:min(440px,calc(100vw - 28px))}.calendar-dialog .calendar-card{width:100%}.calendar-dialog .calendar-top{min-height:68px}.calendar-dialog .calendar-grid .day{aspect-ratio:1/1;height:auto;min-height:48px;align-items:flex-start}.calendar-picker-footer{display:flex;justify-content:flex-end;padding:12px;border-top:1px solid #e5ecef}.time-dialog{width:min(340px,calc(100vw - 28px));background:#fff}.time-sheet{padding:18px}.time-sheet h2{font-size:1.14rem;margin:0}.time-sheet .help{margin:10px 0 0}.wheel-fade{height:400px;overflow:hidden;mask-image:linear-gradient(to bottom,transparent 0,#000 32px,#000 calc(100% - 32px),transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 32px,#000 calc(100% - 32px),transparent 100%)}.time-wheel{height:400px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-snap-type:y proximity}.time-option{height:40px;width:100%;border:0;border-bottom:1px solid #e9eff2;background:white;color:#1b4053;display:flex;align-items:center;justify-content:space-between;padding:0 17px;scroll-snap-align:start;font-size:.98rem}.time-option:hover:not(:disabled),.time-option.selected{background:#e9f4f8;color:#135c77;font-weight:750}.time-option:disabled{opacity:1;background:#f5f6f7;color:#9daab0;cursor:not-allowed}.time-option small{color:#9b6870;font-size:.78rem}.gst-check{display:flex;align-items:center;gap:10px;align-self:end;min-height:48px;padding:10px 13px;background:#f7fafb;border:1px solid #d9e5e9;border-radius:10px;font-size:.94rem}.gst-check input{width:19px;height:19px;accent-color:#13617c}.gst-check strong{margin-left:auto;color:#155a75}.linked-pills{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:9px}.linked-card{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#f7fafb;border:1px solid #d9e5e9;border-radius:11px}.linked-avatar,.record-avatar,.profile-avatar{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:10px;background:#dcecf1;color:#225a70;font-weight:750}.linked-card strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:.94rem}.unlink-button{border:0;background:transparent;color:#77626a;font-size:.78rem;padding:5px}.unlink-button:hover{text-decoration:underline}.directory-card{margin-top:16px}.directory-card .heading-row{margin-bottom:20px}.record-row{display:flex;align-items:center;gap:8px;border:1px solid #e1eaed;background:#fff;border-radius:12px;padding:6px;margin-bottom:10px}.record-row:hover{background:#f8fbfc;border-color:#bcd3db}.record-open{display:flex;align-items:center;min-width:0;flex:1;gap:13px;padding:8px;border:0;background:transparent;text-align:left;color:#183d50}.record-text{display:grid;gap:5px;min-width:0;flex:1}.record-text>strong{font-size:1rem;white-space:nowrap;overflow-x:auto}.record-metadata{display:flex;gap:7px 13px;align-items:center;min-width:0;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;font-size:.86rem}.meta-species{color:#2f6981;font-weight:700}.meta-breed{color:#54717e}.meta-client{color:#716283;font-weight:600}.meta-phone{color:#506e7d}.search-scroll{gap:7px}.search-scroll strong{font-size:1rem;margin-right:4px}.search-scroll .meta-species{color:#2f6981;font-weight:700}.search-scroll .meta-breed{color:#54717e}.search-scroll .meta-client{color:#716283;font-weight:600}.search-scroll span+span::before,.record-metadata span+span::before{content:'·';color:#a5b8bf;margin-right:7px}.trash-btn{display:grid;place-items:center;width:39px;height:39px;flex:none;border:1px solid #e5d7d9;background:#fff;color:#98565d;border-radius:10px}.trash-btn:hover{background:#fff1f1;color:#9b3434}.profile-link{display:flex!important;gap:9px;align-items:center;background:#ffffff16!important;margin-bottom:15px;border:1px solid #ffffff26!important}.profile-link strong{display:block;color:white}.profile-link small{display:block;font-size:.75rem;color:#bfd7e0}.profile-avatar{background:#e2f1f5;color:#14516a}.revenue-total{font-size:2rem;margin:13px 0 0}.revenue-row,.invoice-service{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #e8eef0}.invoice-preview{margin-bottom:16px}.invoice-preview p{font-size:.92rem}.invoice-preview .kv{margin-top:18px}.add-medication{display:flex;gap:8px;min-width:0}.add-medication select{border:1px solid #bfcfd7;border-radius:10px;padding:9px;max-width:230px;min-width:0}.invoice-line{display:grid;grid-template-columns:minmax(150px,1.5fr) minmax(140px,1.5fr) 80px 115px 40px;gap:9px;align-items:end;padding:12px;background:#f7fafb;border:1px solid #e1eaed;border-radius:12px}.invoice-line .field label{font-size:.85rem}.invoice-total{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;background:#eaf4f7;border-radius:10px;padding:14px}.invoice-total strong{color:#105875;font-size:1.14rem}.appointment-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.appointment-actions .trash-btn{justify-self:end}.appointment.no-show{background:#f4f5f6}.search-hit{padding:13px 12px}.day-panel .appointment{margin-bottom:10px}
@media(max-width:900px){.address-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-line{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-line .trash-btn{grid-column:2;justify-self:end}}
@media(max-width:700px){.content{padding:20px 14px 112px}.mobile-nav{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));border:1px solid #dce6e9;border-radius:19px;box-shadow:0 12px 38px #193c5024;background:#fafdfff0;backdrop-filter:blur(18px);padding:6px;gap:4px;justify-content:space-around}.mobile-nav button{flex:1;padding:9px 3px;font-size:.77rem;min-width:0;border-radius:13px}.mobile-nav button.active{background:#e1f0f5;color:#135e77}.grid-main{gap:14px}.calendar-card{width:100%}.calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-card .calendar-grid .day{height:auto;min-height:0;aspect-ratio:1/1;padding:5px 4px;gap:2px;overflow:hidden}.calendar-card .calendar-grid .day.outside{aspect-ratio:1/1}.calendar-card .calendar-grid .holiday-label{font-size:.55rem;max-width:100%}.calendar-card .calendar-grid .count{font-size:.57rem;padding:1px 3px}.calendar-top{min-height:65px}.calendar-top .card-title{font-size:1.08rem}.calendar-week span{font-size:.7rem}.day-panel{padding:17px}.appointment{border-radius:13px}.appointment-lines{gap:5px}.appointment .chip{font-size:.7rem}.topbar .eyebrow.practice-name{font-size:1.29rem}.record-row{padding:3px}.record-open{gap:9px;padding:8px 4px}.record-metadata{gap:5px 9px}.directory-card{padding:16px}.directory-card .heading-row .button{min-width:110px}.address-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.address-grid .field:nth-child(3),.address-grid .field:nth-child(4){grid-column:1/-1}.calendar-dialog .calendar-grid .day{min-height:0;aspect-ratio:1/1}.invoice-line{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-line .trash-btn{grid-column:2;justify-self:end}}
@media(max-width:390px){.calendar-card .calendar-grid .count{font-size:.51rem}.calendar-card .calendar-grid .holiday-label{display:none}.calendar-card .calendar-grid .day.holiday::after{content:'';position:absolute;bottom:4px;left:5px;width:5px;height:5px;border-radius:50%;background:#c4914a}.calendar-controls{gap:3px}.calendar-controls .icon-btn{min-width:37px}.calendar-controls .button{min-height:37px}}
@media print{.sidebar,.mobile-nav,.topbar,.back,#invoice-form,.invoice-preview .actions,.invoice-preview .trash-btn,.invoice-preview .help{display:none!important}.shell,.layout-detail{display:block}.content{padding:0}.invoice-preview{border:0;box-shadow:none}}
@media(max-width:700px){.calendar-card .calendar-grid .day .count{font-size:0!important;width:7px;height:7px;padding:0!important;border-radius:50%;margin-top:auto;background:#2a7996}.calendar-card .calendar-grid .day .holiday-label{line-height:1.05}.calendar-card .calendar-grid .day .number{font-size:.86rem}}
.calendar-title-button{border:0;background:transparent;color:#1b4356;font-size:1.2rem;font-weight:750;letter-spacing:-.02em;padding:5px 2px;text-align:left}.calendar-title-button:hover{color:#13617c}.picker-month-panel{padding:16px 18px}.picker-month-panel .month-chooser{margin-bottom:15px}.picker-month-panel select{height:172px}.picker-month-panel option{padding:6px}
.native-backed-select{display:none!important}.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;padding:11px 12px;text-align:left;border:1px solid #bfcfd7;background:#fff;color:#172f3b;border-radius:10px;font-size:1rem}.select-trigger::after{content:'⌄';font-size:1.15rem;color:#2b6f87}.select-trigger:hover{border-color:#5e9eb5;background:#f7fbfc}

/* V3: stable geometry and clear controls */
.form-grid,.address-grid{align-items:start}.form-grid>.field,.address-grid>.field{align-self:start;min-width:0}.field input:not([type=checkbox]):not([type=hidden]),.field select,.field .select-trigger,.field .date-trigger,.field .time-trigger,.selection-panel>select,.selection-panel>.select-trigger,.add-medication select{box-sizing:border-box;height:48px;min-height:48px;max-height:48px;width:100%}.field input[hidden]{display:none!important}.field textarea{min-height:96px;resize:vertical}.field label{display:block;min-height:24px;margin-bottom:7px}.inline-error{display:block;margin-top:5px}.inline-error:empty{display:none}.address-section h2{font-size:1.13rem;color:#193e51}.address-grid .field label{font-size:.88rem;font-weight:650;color:#43616e;min-height:20px;margin-bottom:7px}.address-search-field{margin-bottom:17px}.address-results{display:grid;gap:3px;margin-top:7px;max-height:220px;overflow:auto}.address-result{border:1px solid #d9e5e9;border-radius:9px;background:#fff;color:#244c5e;padding:10px 12px;text-align:left}.address-result:hover{background:#edf6f9}.address-search-field .help{margin:7px 0 0}.field.date-field,.field.time-field{align-self:start}.date-trigger svg{width:20px;height:20px;flex:none;color:#2b6f87}.age-guidance{display:flex;align-items:end;min-height:79px}.age-guidance .help{margin:0 0 9px}.linked-card{min-width:0;align-items:center;justify-content:space-between;gap:14px}.linked-profile{display:grid;gap:3px;min-width:0;flex:1;border:0;background:transparent;text-align:left;color:#193e51;cursor:pointer}.linked-profile strong{font-size:1rem}.linked-profile span{font-size:.82rem;color:#5d7480;white-space:nowrap;overflow-x:auto;scrollbar-width:thin}.linked-profile:hover strong{text-decoration:underline}.unlink-button{font-size:.88rem;font-weight:700;color:#8b4a54;padding:8px 4px;cursor:pointer}.unlink-button:hover{color:#a73542}.linked-client-field .picker-heading .button{color:#fff;background:#176887;border-color:#176887}.client-pet-hit{border:1px solid #e1eaed;margin:8px 0;border-radius:12px}.record-heading-actions{display:flex;gap:12px;align-items:center;margin-left:auto}.record-heading-actions .trash-btn{position:static}.invoice-field-heading{font-size:1.13rem;font-weight:720;color:#193e51;border-top:1px solid #e2ebef;padding-top:15px}.appointment-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:22px}.appointment-primary-actions,.appointment-secondary-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px}.appointment-actions .button{width:auto;min-width:0}.appointment-secondary-actions{border-top:1px solid #e6edf0;padding-top:13px}.appointment-secondary-actions .trash-btn{margin-left:auto}.appointment-secondary-actions .button.danger{color:#95535c;border-color:#e5d7d9;background:#fff}.appointment-secondary-actions .button.danger:hover{background:#fff1f1}.wheel-fade{-webkit-mask-image:none!important;mask-image:none!important}.wheel-fade .time-wheel{height:100%;scrollbar-width:thin}.calendar-week span{text-align:right;padding:10px 9px 10px 0}.calendar-grid .day{align-items:flex-end;text-align:right}.calendar-grid .day .number{margin-left:auto}.day.today .number{margin-left:auto;margin-right:-3px}.calendar-grid .day .count,.calendar-grid .day .holiday-label{margin-left:auto}.calendar-grid .day.outside{display:block}.calendar-grid{grid-template-rows:repeat(6,minmax(0,1fr))}.month-chooser{grid-template-columns:minmax(95px,1fr) minmax(0,2fr);align-items:start}.month-chooser .field{min-width:0}.month-chooser .field label,.month-label{font-size:.9rem;font-weight:700;color:#284b5d;display:block;margin-bottom:9px}.month-chooser select[size]{height:220px;max-height:220px;width:100%;border:1px solid #d5e3e8;border-radius:10px}.month-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.month-choice{min-height:46px;border:1px solid #d8e5e9;border-radius:9px;background:#fff;color:#2a5365;font-size:.82rem;cursor:pointer}.month-choice:hover,.month-choice.selected{background:#e7f3f7;border-color:#73a6b8;color:#145f79;font-weight:700}.calendar-dialog .calendar-card{height:auto;min-height:0}.calendar-dialog .calendar-grid{grid-template-rows:repeat(6,minmax(0,1fr))}.calendar-dialog .calendar-grid .day{aspect-ratio:1/1;min-height:0;height:auto;align-items:flex-end}.calendar-dialog .picker-month-panel{min-height:360px}.calendar-dialog .picker-month-panel .month-chooser{margin-bottom:0}.month-dialog{width:min(480px,calc(100vw - 28px))}.month-dialog .month-chooser{margin-bottom:12px}
@media(max-width:700px){.calendar-card .calendar-grid{grid-template-rows:repeat(6,minmax(0,1fr))}.calendar-card .calendar-grid .day{aspect-ratio:1/1;align-items:flex-end}.calendar-week span{padding-right:5px}.day.today .number{margin-left:auto;margin-right:0}.calendar-dialog .calendar-card .calendar-grid .day{aspect-ratio:1/1;min-height:0}.month-choice{font-size:.73rem;min-height:40px}.appointment-primary-actions,.appointment-secondary-actions{align-items:stretch}.appointment-primary-actions .button{flex:1}.appointment-secondary-actions .button{font-size:.82rem}.linked-pills{grid-template-columns:1fr}}

/* v4: scoped additions; retain approved calendar and form styles. */
.meta-age{font-size:.78rem;font-weight:650;letter-spacing:.01em;color:#4c8390;background:#e8f4f4;border-radius:999px;padding:3px 8px;white-space:nowrap}
.weight-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #e5ecef;color:#4b6570}.weight-row>span:last-child{display:flex;align-items:center;gap:8px}.weight-edit{border:0;background:transparent;color:#27758a;font-weight:700;cursor:pointer;padding:8px}.weight-edit:hover,.contact-link:hover{text-decoration:underline}
.soft-action.button{background:#e7f3f5;border:1px solid #bcd8dc;color:#225d6d;font-weight:700}.soft-action.button:hover{background:#d5eaf0}
.invoice-locked.button{background:#e9edef;color:#85929a;border-color:#d8dfe2;cursor:not-allowed;opacity:1}
.appointment-picker-results{display:grid;gap:8px;margin-top:9px;max-height:290px;overflow:auto}.appointment-client-hit,.appointment-pet-hit{width:100%;display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;text-align:left;padding:12px 15px;border:1px solid #dce7e9;border-radius:12px;background:#fff;color:#264d5b;cursor:pointer}.appointment-client-hit strong,.appointment-pet-hit strong{font-size:1rem;white-space:nowrap}.appointment-client-hit span,.appointment-client-hit small{color:#64808b}.appointment-client-hit small{margin-left:auto}.appointment-pet-hit .meta-client{margin-left:auto}.appointment-client-hit:hover,.appointment-pet-hit:hover,.appointment-client-hit.selected,.appointment-pet-hit.selected{border-color:#7ab5c2;background:#edf8f8;box-shadow:inset 3px 0 #348da0}
.contact-link{color:#17718b;text-underline-offset:3px;overflow-wrap:anywhere}
.visually-hidden-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0,0,0,0)}.file-pick{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 14px;border:1.5px dashed #a7c9d0;border-radius:13px;background:#f4fafb;cursor:pointer;color:#27566b}.file-pick:hover{background:#eaf5f7}.file-pick-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#dceef1;font-size:1.4rem}.file-pick #file-name{font-size:.84rem;color:#617b86;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.visually-hidden-file:focus-visible+.file-pick{outline:3px solid #388ba3;outline-offset:2px}
.revenue-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0}.revenue-summary>div{padding:18px;border-radius:14px;background:#edf5f5}.revenue-summary small,.revenue-summary strong{display:block}.revenue-summary small{color:#617985}.revenue-summary strong{font-size:1.55rem;color:#1e5468;margin-top:6px}.revenue-period{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.revenue-period .field{min-width:190px;flex:1}.revenue-period .button{margin-bottom:1px}.revenue-subhead{margin-top:26px}.revenue-cost-row{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(2,minmax(110px,1fr));align-items:end;gap:14px;padding:13px 0;border-bottom:1px solid #e6edef}.revenue-cost-row strong,.revenue-cost-row small{display:block}.revenue-cost-row small{color:#70838b;margin-top:3px}.revenue-cost-row label{font-size:.82rem;color:#55717d;font-weight:650}.revenue-cost-row input{display:block;width:100%;margin-top:5px}
.ai-example .ai-one-line{font-size:1.1rem;font-weight:650;line-height:1.55;color:#225668;border-left:3px solid #64a6b5;padding-left:13px}.ai-cards{display:grid;gap:10px;margin-top:19px}.ai-card{width:100%;text-align:left;border:1px solid #dbe8e9;border-radius:12px;background:#f9fcfc;padding:15px;cursor:pointer}.ai-card:hover,.ai-card:focus-visible{background:#eaf7f8;border-color:#87bdc8}.ai-card span,.ai-card strong,.ai-card small{display:block}.ai-card span{color:#347c8b;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em}.ai-card strong{color:#294e5d;margin:5px 0}.ai-card small{color:#3c8495}.source-dense{font-size:.91rem;line-height:1.52;color:#506875}.source-dense p{margin:8px 0;padding:7px;border-radius:8px;scroll-margin-top:25px}.source-highlight{background:#fff1c8;outline:2px solid #edce76}
@media(max-width:700px){.revenue-summary{grid-template-columns:1fr}.revenue-cost-row{grid-template-columns:1fr 1fr}.revenue-cost-row>div{grid-column:1/-1}.appointment-pet-hit .meta-client{margin-left:0}}

/* V5: calmer hierarchy and separate touch layout */
.meta-age{background:none;border:0;border-radius:0;padding:0;font-size:.88rem;font-weight:550;color:#586f7b;letter-spacing:0}.record-metadata>span+span::before,.search-scroll>span+span::before{content:'·';color:#7f9ca9;margin-right:9px;font-weight:700}.record-metadata .meta-age{white-space:nowrap}.record-metadata .meta-client{color:#6f6580}
.age-choices{display:flex;flex-wrap:nowrap;gap:10px}.age-choices .button{flex:1;min-width:0;white-space:nowrap}
.species-other-field[hidden]{display:none!important}
#appointment-form .selection-panel{border:0;background:transparent;border-radius:0;padding:5px 0 14px;border-bottom:1px solid #e2eaed;min-width:0}
#appointment-form .selection-panel .picker-heading{min-height:0;margin-bottom:10px;align-items:center}
#appointment-form .selection-panel .picker-heading label{white-space:nowrap;min-height:0;margin:0;font-size:1rem}
#appointment-form .selection-panel .button.add-related{background:transparent;color:#176887;border:0;padding:7px 2px;min-height:36px;width:auto;font-size:.88rem;font-weight:700}
#appointment-form .selection-panel .button.add-related:hover{text-decoration:underline;background:transparent}
#appointment-form .appointment-picker-results{gap:0;margin-top:5px;max-height:255px}
#appointment-form .appointment-client-hit,#appointment-form .appointment-pet-hit{display:flex;border:0;border-bottom:1px solid #e8eef0;border-radius:0;background:transparent;box-shadow:none;padding:11px 6px;min-height:48px;gap:5px 10px}
#appointment-form .appointment-client-hit:hover,#appointment-form .appointment-pet-hit:hover,#appointment-form .appointment-client-hit.selected,#appointment-form .appointment-pet-hit.selected{background:#eef6f7;box-shadow:inset 3px 0 #398ca0}
#appointment-form .appointment-client-hit span,#appointment-form .appointment-client-hit small{font-size:.83rem}
#appointment-form .appointment-pet-hit{display:grid;grid-template-columns:1fr;gap:3px}
#appointment-form .pet-hit-main{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-size:.88rem;color:#58717d}
#appointment-form .pet-hit-main strong{font-size:1rem;color:#203f50}
#appointment-form .pet-hit-detail{display:block;font-size:.8rem;color:#69808a;margin-left:0}
#appointment-form .invoice-field-heading{font-size:1rem;border-top:0;padding-top:6px}
#appointment-form .gst-check{border:0!important;background:transparent!important;padding:0!important;min-height:48px}
#appointment-form .field label{line-height:1.28}
.file-pick{height:124px;min-height:124px;display:flex;justify-content:center;gap:18px;padding:20px 24px;background:#fbfdfd;border:1.5px dashed #9cbec7;border-radius:15px;color:#265b6b;transition:background .15s,border-color .15s}
.file-pick:hover,.file-pick.drag-over{background:#f1f9fa;border-color:#34859a}
.file-pick-icon{width:46px;height:46px;background:#e5f2f4;color:#22758d;border-radius:13px;flex:none;font-size:1.5rem}
.file-pick-copy{display:grid;gap:4px;min-width:0}
.file-pick-copy strong{font-size:1rem;color:#254b5b;font-weight:700}
.file-pick #file-name{font-size:.82rem;color:#68808a;white-space:normal;overflow-wrap:anywhere}
.field input.visually-hidden-file{position:absolute!important;width:1px!important;height:1px!important;min-height:1px!important;max-height:1px!important;opacity:0!important;padding:0!important;pointer-events:none!important}
.import-example-entry{border-top:1px solid #e5edef;margin-top:26px;padding-top:20px;display:flex;align-items:center;flex-wrap:wrap;gap:7px 16px}.import-example-entry p{font-weight:650;margin:0}.import-example-entry small{display:block;flex-basis:100%;color:#71858d}.import-example-entry .button{min-height:38px}
.reviewed-record{background:#fff;border:1px solid #dae5e9;border-radius:16px;padding:clamp(18px,2.5vw,32px)}.reviewed-head{display:flex;align-items:start;gap:12px;justify-content:space-between;margin-bottom:18px}.reviewed-head h2{margin:0;font-size:1.4rem;line-height:1.2}.reviewed-head .eyebrow{font-size:.72rem}.reviewed-summary{font-size:.98rem;font-weight:560;color:#3d6373;margin:9px 0 0}.reviewed-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,.8fr);gap:26px}.reviewed-main{min-width:0}.reviewed-source{border-left:1px solid #e4edef;padding-left:24px;min-width:0}.reviewed-source-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;justify-content:space-between}.reviewed-source-head h3{font-size:1rem;margin:0}.reviewed-source-head a{font-size:.83rem;color:#176f86;text-decoration:none;font-weight:700}.reviewed-source-head a:hover{text-decoration:underline}.reviewed-source .archive-text{background:transparent;padding:0}.reviewed-source .secondary{margin:7px 0 15px}
.ai-cards{gap:0;margin-top:0}.ai-card{background:transparent;border:0;border-bottom:1px solid #e2ebed;border-radius:0;padding:15px 7px;text-align:left}.ai-card:hover,.ai-card:focus-visible{background:#f2f8f9;border:0;border-bottom:1px solid #c8dee3}.ai-card .ai-card-title{font-size:1rem;font-weight:750;letter-spacing:0;text-transform:none;color:#164d62}.ai-card strong{font-size:.9rem;line-height:1.5;font-weight:500;color:#395969}.ai-card small{font-size:.8rem;font-weight:650}.ai-one-line{margin:0 0 10px;font-size:1rem;font-weight:620;line-height:1.5;color:#285667}.source-dense p{padding:9px 11px}
.invoice-view-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:5px 0 20px}.invoice-view-actions>div{display:flex;gap:9px;flex-wrap:wrap}.invoice-view-actions .invoice-edit-action{background:transparent;border-color:transparent;color:#246d81}
.invoice-paper{max-width:900px;margin:0 auto;background:#fff;border:1px solid #dce5e8;border-radius:14px;padding:clamp(26px,4vw,56px);box-shadow:0 14px 40px #173d4e0a;color:#203746}.invoice-paper-head{display:flex;justify-content:space-between;align-items:start;gap:24px;border-bottom:2px solid #203e50;padding-bottom:24px}.invoice-brand{font-size:.95rem;font-weight:750;color:#1b6178;margin:0}.invoice-brand span{font-size:.76rem;color:#70858e}.invoice-paper h2{font-size:2.1rem;line-height:1.1;letter-spacing:-.04em;margin:18px 0 6px}.invoice-number{font-size:.9rem;color:#5d7480;margin:0}.invoice-date{text-align:right;display:grid;gap:3px;font-size:.85rem;color:#58717d}.invoice-date strong{color:#366b59}.invoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:35px;padding:27px 0}.invoice-parties>div{display:grid;align-content:start;gap:3px;overflow-wrap:anywhere}.invoice-parties small{font-size:.68rem;letter-spacing:.09em;color:#70818b;font-weight:750;margin-bottom:5px}.invoice-parties strong{font-size:1.01rem;color:#183d51}.invoice-parties span{font-size:.86rem;color:#526c78}.invoice-patient{display:flex;gap:7px 17px;flex-wrap:wrap;align-items:baseline;padding:13px 0;border-top:1px solid #e3eaed;border-bottom:1px solid #e3eaed;font-size:.84rem;color:#627984}.invoice-patient strong{font-size:.96rem;color:#1c4355}.invoice-items{margin-top:28px}.invoice-items-head,.invoice-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px}.invoice-items-head{font-size:.76rem;font-weight:750;color:#657b86;padding:0 0 9px;border-bottom:1px solid #dce6e9}.invoice-item{padding:15px 0;border-bottom:1px solid #edf1f3;align-items:start}.invoice-item>div{display:grid;gap:3px;min-width:0}.invoice-item strong{font-weight:650;font-size:.93rem}.invoice-item small{font-size:.8rem;color:#6e818a}.invoice-paper-totals{margin:24px 0 0 auto;width:min(100%,330px);display:grid;gap:9px}.invoice-paper-totals>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:.88rem}.invoice-paper-totals span{color:#617984}.invoice-paper-grand{border-top:2px solid #294c5e;padding-top:14px;margin-top:6px}.invoice-paper-grand span,.invoice-paper-grand strong{font-size:1.25rem;color:#173c4e;font-weight:750}.invoice-footnote{border-top:1px solid #e4ebee;padding-top:17px;margin-top:48px;color:#7a8d95;font-size:.73rem}
.invoice-editor{max-width:1000px;margin:0 auto}.invoice-editor .heading-row h2{font-size:1.12rem}.invoice-editor .muted{margin:0 0 20px;font-size:.85rem}.invoice-base{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #e2eaed;font-size:.92rem}.invoice-section-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:28px 0 12px}.invoice-section-head h3{font-size:1.06rem;margin:0}.invoice-section-head .add-medication{display:flex;gap:8px;align-items:center;min-width:0}.invoice-section-head select{height:42px;border:1px solid #bdcfd6;border-radius:9px;background:#fff;color:#254656;padding:0 10px;max-width:220px}.invoice-section-head .button{white-space:nowrap}.service-line,.invoice-line{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(110px,.8fr) 40px;gap:12px;align-items:end;padding:11px 0;background:transparent;border:0;border-bottom:1px solid #e5edef;border-radius:0}.invoice-line{grid-template-columns:minmax(170px,1.2fr) minmax(130px,1fr) 74px minmax(110px,.72fr) 40px}.invoice-line .field label,.service-line .field label{min-height:39px;line-height:1.2;font-size:.82rem}.invoice-line .field label small,.service-line .field label small{font-size:.72rem;font-weight:500;color:#738791}.invoice-line .trash-btn,.service-line .trash-btn{margin-bottom:4px}.invoice-total{max-width:410px;margin:30px 0 0 auto;display:grid;gap:6px}.invoice-total>div,.invoice-total>.invoice-gst-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:7px 0;font-size:.9rem}.invoice-total strong{font-weight:650}.invoice-total .invoice-subtotal{border-top:1px solid #dce7e9;padding-top:13px;margin-top:6px}.invoice-gst-row{cursor:pointer;color:#4b6674}.invoice-gst-row span{display:flex;gap:9px;align-items:center}.invoice-gst-row input{width:17px;height:17px;margin:0;accent-color:#176887}.invoice-total .invoice-grand-total{border-top:2px solid #33596b;margin-top:7px;padding-top:16px;font-size:1.22rem;font-weight:750;color:#183d51}.invoice-grand-total strong{font-weight:750}.invoice-confirm-actions{justify-content:flex-end}.invoice-confirm-actions .button.primary{width:auto;min-width:150px}
.invoice-index .heading-row{margin-bottom:7px}.invoice-index-row{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;width:100%;border:0;border-bottom:1px solid #e8eef0;background:#fff;padding:17px 5px;color:#1d4254}.invoice-index-row:hover{background:#f3f8f9}.invoice-index-row span{display:grid;gap:3px}.invoice-index-row small{color:#647b87}.invoice-index-row>strong{white-space:nowrap}
@media(max-width:1000px){.reviewed-layout{grid-template-columns:1fr}.reviewed-source{border-left:0;border-top:1px solid #e4edef;padding:20px 0 0}.invoice-line{grid-template-columns:repeat(2,minmax(0,1fr)) 40px}.invoice-line .qty-field{grid-column:1}.invoice-line .price-field{grid-column:2}.invoice-line .trash-btn{grid-column:3;grid-row:2}}
@media(max-width:700px){
 :root{font-size:16px}.content{padding:18px 17px calc(112px + env(safe-area-inset-bottom))}.topbar h1{font-size:1.78rem;line-height:1.08}.topbar{margin-bottom:21px}.topbar .eyebrow{font-size:.82rem}.content-calendar .topbar{display:flex;align-items:flex-end;gap:10px}.content-calendar .topbar>div:first-child{min-width:0}.content-calendar .top-actions{display:flex;align-self:flex-end;flex-wrap:nowrap}.content-calendar .top-actions .button{min-height:42px;padding:8px 11px;white-space:nowrap;font-size:.84rem}.section{padding:19px}.field label,.selection-panel label,.picker-heading label{font-size:.99rem!important;line-height:1.3}.form-grid{gap:17px}.field input,.field textarea,.select-trigger,.date-trigger,.time-trigger{font-size:1rem!important}
 .mobile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;left:0;right:0;bottom:0;padding:7px 4px max(7px,env(safe-area-inset-bottom));border:0;border-top:1px solid #e8edef;border-radius:0;box-shadow:0 -4px 20px #1a42500c;background:#fff;backdrop-filter:none}.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;min-height:55px;padding:4px 1px;font-size:.81rem;line-height:1.1;white-space:nowrap;border-radius:0;color:#5f7580}.mobile-nav button.active{background:transparent;color:#13617c;font-weight:760}.nav-icon{font-size:1.24rem;line-height:1.15;height:22px;font-weight:500}
 #appointment-form .selection-panel .picker-heading{display:flex;align-items:center;justify-content:space-between;gap:9px}.selection-panel .picker-heading label{white-space:nowrap!important;font-size:1rem!important}.selection-panel .picker-heading .button.add-related{font-size:.83rem!important;padding:7px 2px!important;min-height:38px!important;flex:none;white-space:nowrap}.appointment-picker-results{max-height:230px}.appointment-pet-hit .pet-hit-main{display:flex;flex-wrap:wrap;gap:2px 9px}.appointment-pet-hit .pet-hit-main span{font-size:.84rem}.appointment-pet-hit .pet-hit-detail{font-size:.79rem}.appointment-client-hit{gap:4px 9px!important}.appointment-client-hit small{margin-left:auto!important}.appointment-client-hit strong{font-size:.94rem!important}
 .layout-detail{display:grid;gap:14px}.appointment-actions{margin-top:22px;gap:10px}.appointment-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.appointment-primary-actions .button{white-space:normal;font-size:.87rem;line-height:1.22;min-height:52px;padding:9px}.appointment-secondary-actions{display:flex;gap:8px;border-top:1px solid #ecf0f2;padding-top:13px}.appointment-secondary-actions .button{font-size:.82rem;min-height:42px;padding:8px 10px;width:auto}.appointment-secondary-actions .trash-btn{margin-left:auto}.kv{grid-template-columns:105px minmax(0,1fr);gap:10px 8px;font-size:.89rem}.person-link{border:0;border-bottom:1px solid #e9eef0;border-radius:0;padding:12px 0;min-height:49px;width:100%;font-size:.91rem}.person-link:last-child{border-bottom:0}
 .age-choices{gap:8px}.age-choices .button{font-size:.86rem;padding:9px 7px}.meta-age{font-size:.83rem}.file-pick{height:132px;min-height:132px;gap:12px;justify-content:flex-start}.file-pick-icon{width:42px;height:42px}.reviewed-record{padding:18px}.reviewed-layout{gap:15px}.reviewed-head h2{font-size:1.2rem}.invoice-paper{padding:24px 18px;border-radius:12px}.invoice-paper h2{font-size:1.8rem}.invoice-parties{gap:13px}.invoice-patient{gap:5px 10px}.invoice-view-actions>div{width:100%;display:grid;grid-template-columns:1fr 1fr}.invoice-view-actions .button{font-size:.82rem;padding:8px}.invoice-view-actions .invoice-edit-action{grid-column:1/-1;justify-self:start}.invoice-section-head{display:block}.invoice-section-head .add-medication{margin-top:12px}.invoice-section-head select{flex:1;max-width:none;min-width:0}.invoice-section-head .button{font-size:.82rem;padding:8px}.invoice-line,.service-line{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.invoice-line .field:first-child,.invoice-line .dose-field,.service-line .field:first-child{grid-column:1/-1}.invoice-line .qty-field{grid-column:1}.invoice-line .price-field{grid-column:2}.invoice-line .trash-btn,.service-line .trash-btn{grid-column:2;grid-row:auto;justify-self:end}.invoice-line .field label,.service-line .field label{min-height:0}.invoice-total{margin:25px 0 0}.invoice-confirm-actions .button.primary{min-width:0;width:auto}.invoice-index-row{align-items:start}.invoice-index-row>strong{font-size:.85rem}
}
@media(max-width:390px){.mobile-nav button{font-size:.74rem}.content-calendar .top-actions .button{font-size:.78rem;padding:7px 8px}.topbar h1{font-size:1.6rem}.invoice-parties{grid-template-columns:1fr}.appointment-secondary-actions .button{font-size:.76rem;padding:7px 8px}}
@media print{.invoice-view-actions,.invoice-paper+.help{display:none!important}.invoice-paper{border:0;box-shadow:none;margin:0;max-width:none;padding:0}.invoice-paper-head{padding-top:0}.content{padding:0}.invoice-paper-totals{break-inside:avoid}}
.reviewed-layout.ungenerated{grid-template-columns:minmax(0,1fr) minmax(230px,.38fr)}
.invoice-base{align-items:center}.invoice-base label{font-weight:650;color:#284f61}.invoice-base label small{font-size:.75rem;color:#718690;font-weight:500}.invoice-base input{width:125px;height:42px;border:1px solid #bfd0d7;border-radius:9px;padding:8px 10px;text-align:right;color:#193e50}
@media(max-width:1000px){.reviewed-layout.ungenerated{grid-template-columns:1fr}}
@media(max-width:700px){body,.shell,.content,.layout-detail,.card,.record-row,.record-open,.search-hit{min-width:0;max-width:100%}body{overflow-x:hidden}.search-scroll{min-width:0;max-width:100%}.invoice-base input{width:105px;flex:none}}
.mobile-nav .nav-icon{display:grid;place-items:center}.mobile-nav .nav-icon svg{width:21px;height:21px}

/* Final demo: a quieter clinical record and a single itemised invoice. */
.imported-row .record-text>strong{font-size:.97rem;font-weight:580;line-height:1.4;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.imported-row .record-text>strong::-webkit-scrollbar{height:0}
.imported-row .record-open:hover .record-text>strong,.imported-row .record-open:focus-visible .record-text>strong{scrollbar-width:thin;scrollbar-color:#c7d8df transparent}
.imported-row .record-open:hover .record-text>strong::-webkit-scrollbar,.imported-row .record-open:focus-visible .record-text>strong::-webkit-scrollbar{height:3px}
.imported-row .record-text>strong::-webkit-scrollbar-thumb{background:#c7d8df;border-radius:5px}
.imported-row .secondary{font-size:.82rem;color:#788994}
.appointment-primary-actions{display:flex;align-items:center;gap:11px;flex-wrap:wrap}
.invoice-status-note{font-size:.84rem;color:#728692}
.appointment-secondary-actions{align-items:center;flex-wrap:wrap}
.appointment-secondary-actions .button{font-size:.87rem;font-weight:570}
.appointment-secondary-actions .button.danger{color:#9b5c62;border-color:transparent;background:transparent}
.appointment-delete{margin-left:auto;padding-left:15px;border-left:1px solid #e7edef}
.appointment-delete{display:flex;align-items:center;gap:4px}.appointment-delete>span{font-size:.72rem;color:#98757a}
.appointment-delete .trash-btn{width:36px;height:36px;border:0;color:#9b7378;background:transparent}
.invoice-editor{max-width:900px;padding:clamp(22px,3.5vw,42px)}
.invoice-editor .heading-row h2{font-size:1.25rem;font-weight:670;letter-spacing:-.025em}
.invoice-editor .muted{font-size:.86rem;margin:4px 0 26px}
.invoice-add-row{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding-bottom:22px;border-bottom:1px solid #e2eaed}
.invoice-add-row>div>label{display:block;font-size:.84rem;font-weight:650;color:#375667;margin-bottom:8px}
.invoice-add-row .add-medication select{max-width:none;flex:1}
.invoice-sort-help{font-size:.78rem;color:#71858e;margin:17px 0 5px}
.invoice-rows{display:grid;gap:0}
.invoice-entry{padding:17px 0;border-bottom:1px solid #e7edef}
.invoice-entry-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.invoice-kind{font-size:.78rem;color:#69818b;letter-spacing:.02em}
.invoice-reorder{display:flex;align-items:center;gap:4px;color:#8aa0a8}
.invoice-reorder button{border:0;background:transparent;color:#537380;min-width:30px;min-height:30px;border-radius:7px;font-size:1rem}
.invoice-reorder button:hover{background:#edf5f6}.invoice-reorder button:disabled{opacity:.3}
.drag-invoice-row{cursor:grab;padding:3px 8px;user-select:none;font-size:1rem;letter-spacing:-.12em}.drag-invoice-row:active{cursor:grabbing}
.invoice-entry-grid{display:grid;grid-template-columns:minmax(180px,2fr) minmax(105px,.75fr) 78px 100px 61px;gap:11px;align-items:end}
.invoice-entry.medication .invoice-entry-grid{grid-template-columns:minmax(150px,1.5fr) minmax(135px,1.2fr) minmax(105px,.72fr) 75px 95px 61px}
.invoice-entry .field label{display:block;font-size:.76rem;font-weight:550;color:#67808c;min-height:0;margin-bottom:6px}
.invoice-entry .field input{height:43px;font-size:.91rem}
.invoice-entry input[type=number]{font-variant-numeric:tabular-nums}
.item-amount{height:43px;display:flex;flex-direction:column;justify-content:center;text-align:right;font-variant-numeric:tabular-nums}
.item-amount small{font-size:.67rem;color:#82949b}.item-amount span{font-size:.9rem;color:#2b4b5b}
.invoice-remove{height:43px;border:0;background:transparent;color:#9a5b60;font-size:.78rem;padding:0 4px}.invoice-remove:hover{text-decoration:underline}
.invoice-empty{font-size:.87rem;color:#6c8490;padding:18px 0}
.invoice-total{max-width:350px;background:transparent;border-radius:0;padding:0;margin:32px 0 20px auto;display:grid;gap:0;color:#3b5867;font-variant-numeric:tabular-nums}
.invoice-total>div,.invoice-total>.invoice-gst-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:9px 0;border-bottom:1px solid #e7edef;font-size:.9rem}
.invoice-total .invoice-grand-total{border:0;border-top:1.5px solid #426575;border-bottom:0;margin-top:3px;padding-top:17px;font-size:1rem}
.invoice-total .invoice-grand-total strong{font-size:1.2rem;font-weight:680;color:#1f485a}
.invoice-view-wrap{max-width:900px;margin:0 auto}
.invoice-view-actions{max-width:none;margin:4px 0 15px;padding:0 2px;align-items:center}
.invoice-view-actions>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.invoice-view-actions .button{font-size:.82rem;min-height:38px;padding:7px 11px}
.invoice-view-actions .invoice-edit-action{border-color:transparent;background:transparent}
.invoice-under-note{max-width:900px;margin:12px auto}
.invoice-paper{max-width:none;margin:0;padding:clamp(26px,4vw,53px);box-shadow:0 8px 26px #173d4e08}
.invoice-paper-head{border-bottom:1px solid #a4b8c2;padding-bottom:25px}
.invoice-paper h2{font-weight:650;font-size:2rem;letter-spacing:-.04em}
.invoice-number{font-size:.82rem}
.invoice-date{text-align:right;color:#667d88}.invoice-date strong{color:#2e5363;font-weight:600}
.invoice-parties{padding:27px 0 24px}
.invoice-patient{display:grid;grid-template-columns:1.3fr 1.3fr .7fr;align-items:start;gap:18px;border-top:1px solid #e2eaed;border-bottom:1px solid #e2eaed;padding:18px 0}
.invoice-patient>div{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.invoice-patient small{font-size:.69rem;color:#7a8e97}.invoice-patient strong{font-size:.88rem;font-weight:600;color:#2a4b5a}
.invoice-patient span{font-size:.78rem;color:#687f8b}
.invoice-items{margin-top:26px;font-variant-numeric:tabular-nums}
.invoice-items-head,.invoice-item{display:grid;grid-template-columns:minmax(0,1fr) 100px 75px 100px;gap:15px;align-items:start}
.invoice-items-head{font-size:.72rem;font-weight:630;color:#6d848f}
.invoice-items-head span:not(:first-child),.invoice-item>span{text-align:right}
.invoice-item{padding:14px 0;font-size:.88rem;color:#375767}
.invoice-item strong{font-size:.9rem;font-weight:570;color:#263f4e}
.invoice-item small{font-size:.76rem}
.invoice-paper-totals{width:min(100%,350px);gap:0;font-variant-numeric:tabular-nums}
.invoice-paper-totals>div{padding:8px 0;font-size:.87rem}.invoice-paper-grand{border-top:1.5px solid #426575}
.invoice-paper-grand span,.invoice-paper-grand strong{font-size:1.12rem;font-weight:670}
.invoice-payment{margin-top:38px;border-top:1px solid #e1e9ec;padding-top:17px;display:grid;grid-template-columns:1fr 1fr;gap:0 24px;overflow-wrap:anywhere}
.invoice-payment h3{font-size:.72rem;font-weight:650;color:#6d838d;margin:0 0 4px}
.invoice-payment p{font-size:.86rem;white-space:pre-line;color:#2e4e5d;margin:0}
.invoice-footnote{margin-top:26px}
.profile-week-label{font-size:.86rem;font-weight:620;color:#486a7b;margin:0 0 3px}
.profile-week-dates{font-size:.85rem;font-weight:400;color:#728792;margin:0}
.profile-payment{padding-top:18px;border-top:1px solid #e1e9ec;display:grid;gap:12px}
.profile-payment h3{font-size:1rem;margin:0;font-weight:650}.profile-payment .help{margin:-8px 0 4px}
.cost-invoice{padding:19px 0;border-top:1px solid #e0e8ec}
.cost-invoice-head{display:flex;gap:12px;justify-content:space-between;align-items:baseline;margin-bottom:11px;font-size:.9rem;color:#294b5c}
.cost-invoice-head strong{font-weight:630}.cost-invoice-head span{font-size:.78rem;color:#768b95}
.cost-item-head,.cost-item-row{display:grid;grid-template-columns:minmax(0,1fr) 60px 120px 110px;gap:12px;align-items:center}
.cost-item-head{padding:5px 0 7px;font-size:.71rem;color:#738994;border-bottom:1px solid #e7edef}
.cost-item-row{padding:9px 0;border-bottom:1px solid #f0f3f4;font-size:.87rem;font-variant-numeric:tabular-nums}
.cost-item-row>span:nth-child(n+2),.cost-item-head>span:nth-child(n+2){text-align:right}
.cost-item-row small{display:block;color:#8296a0;font-size:.72rem;margin-top:2px}
.cost-item-row input{width:100%;height:37px;padding:5px 9px;text-align:right;border:1px solid #cddce2;border-radius:8px;background:#fff;color:#274a5a;font-size:.88rem}
@media(max-width:1000px){.invoice-entry-grid,.invoice-entry.medication .invoice-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-entry .item-description,.invoice-entry .item-dose{grid-column:1/-1}.invoice-entry .item-amount{text-align:left}.invoice-entry .invoice-remove{text-align:right}}
@media(max-width:700px){.invoice-add-row{grid-template-columns:1fr}.invoice-view-actions{align-items:flex-start}.invoice-view-actions>div{width:100%;display:flex;justify-content:flex-start}.invoice-view-actions .button{width:auto;font-size:.78rem}.invoice-paper{padding:24px 18px}.invoice-patient{grid-template-columns:1fr 1fr}.invoice-patient>div:first-child{grid-column:1/-1}.invoice-items-head{display:none}.invoice-item{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.invoice-item>div{grid-column:1/-1}.invoice-item>span{text-align:left;font-size:.82rem}.invoice-item>span:before{display:block;color:#81949c;font-size:.66rem}.invoice-item>span:nth-child(2):before{content:'Price / unit'}.invoice-item>span:nth-child(3):before{content:'Quantity'}.invoice-item>span:nth-child(4):before{content:'Amount'}.invoice-payment{grid-template-columns:1fr;gap:4px}.invoice-payment p{margin-bottom:12px}.cost-item-head,.cost-item-row{grid-template-columns:minmax(0,1fr) 44px 83px 84px;gap:5px}.cost-item-head{font-size:.63rem}.cost-item-row{font-size:.76rem}.cost-item-row input{font-size:.76rem;padding:5px}.appointment-delete{margin-left:0}}
@media print{.invoice-view-actions,.invoice-under-note{display:none!important}.invoice-view-wrap{max-width:none}.invoice-paper{border:0;box-shadow:none;padding:0}.invoice-payment{break-inside:avoid}}

/* Fixed identity colours and profile spacing. */
.search-hit.pet-hit .search-scroll strong,.pet-record .record-text>strong{color:#17617c}
.search-hit.client-hit .search-scroll strong,.client-record .record-text>strong{color:#904c59}
.search-scroll .meta-client,.record-metadata .meta-client{color:#904c59;font-weight:600}
.search-scroll .meta-type-client,.record-metadata .meta-type-client{color:#a46773;font-size:.78rem;font-weight:650}
.search-scroll .meta-pets,.record-metadata .meta-pets{color:#336b82;font-size:.86rem}
.appointment-delete>span{display:none}
.appointment-delete{padding-left:12px}
.profile-more{display:flex;justify-content:flex-end;margin:17px 0 23px}
.profile-more .button{min-width:113px}
@media(max-width:700px){.profile-more{justify-content:flex-end;margin:21px 0 25px}.profile-more .button{min-height:42px}}

/* Search below the desktop title, as in V5. Mobile keeps the direct input below its header. */
.topbar.has-global-search{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;min-height:72px;margin-bottom:25px}
.topbar.has-global-search .topbar-heading{min-width:0}
.topbar.has-global-search .top-actions{align-self:flex-end;justify-content:flex-end}
.topbar.has-global-search .top-actions:empty{display:none}
.global-search{width:100%;margin-bottom:24px}
.global-search .searchbox{min-height:52px}
@media(min-width:701px){.global-search .searchbox{border-radius:999px}}
.global-search .search-list{max-height:min(65vh,530px);overflow-y:auto}
.search-hit.invoice-hit .search-scroll strong{color:#445d69}
.search-scroll .meta-type-invoice{color:#677f89;font-size:.78rem;font-weight:650}
.address-search-field .address-example{font-size:.8rem;line-height:1.4;color:#718791;margin:2px 0 0;overflow-wrap:anywhere}
.address-search-field.has-query .address-example,#address-status:empty{display:none}
/* The saved-state acknowledgement is a spacious status card, not an action button. */
.toast{top:auto;left:auto;right:23px;bottom:23px;transform:none;max-width:min(90vw,380px);text-align:left;padding:12px 16px;background:#153e51;border:0;border-radius:10px;font-size:.9rem;font-weight:550;pointer-events:none}
.toast.save-feedback{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:min(300px,calc(100vw - 48px));min-height:158px;padding:24px 28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;background:#f9fdfb;color:#274c42;border:1px solid #dcece5;border-radius:20px;box-shadow:0 24px 65px #153e5140;font-weight:600;font-size:1.16rem;letter-spacing:-.02em}
.save-check{display:grid;place-items:center;width:51px;height:51px;border-radius:50%;background:#def2e7;color:#287b59}
.save-check svg{width:28px;height:28px}
.save-message{display:block;line-height:1.3}
@media(max-width:700px){.topbar.has-global-search{display:flex;align-items:flex-end;min-height:0;margin-bottom:12px}.topbar.has-global-search .top-actions{margin:0;align-self:flex-end}.global-search{margin-bottom:20px}.global-search .searchbox{min-height:48px}.global-search .search-list{max-height:min(36dvh,300px)}.address-search-field .address-example{font-size:.79rem;margin-top:4px}.toast.save-feedback{min-height:150px}}
@media(max-width:390px){.topbar.has-global-search{display:flex}.topbar.has-global-search .top-actions{margin:0}.topbar.has-global-search .top-actions .button{font-size:.78rem;padding:7px 8px}}
