/* MediZeit v3: deliberately quiet, readable, mobile-first medication UI. */
:root{--ink:#111b2a;--muted:#687687;--teal:#149b82;--teal-dark:#087a66;--teal-light:#e8f7f3;--body:#f8fafb;--line:#e9eef1;--shadow:0 9px 30px rgba(23,46,63,.045)}
body{color:var(--ink);background:#fafcfd;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.shell{background:#fbfcfd;min-height:100dvh}
.sidebar{width:238px;flex:0 0 238px;background:#fff;border-right:1px solid #e9eff1;padding:34px 17px;box-shadow:none}
.brand{padding:0 9px;margin-bottom:62px;font-size:24px;letter-spacing:-.8px;color:#112936;white-space:nowrap}
.brand-logo{width:35px;height:35px;background:linear-gradient(145deg,#59cdb3,#087966);font-size:24px;border-radius:11px;box-shadow:none}
.navigation{gap:6px}.nav-item{min-height:56px;border-radius:13px;color:#647185;font-size:15px;font-weight:560;padding:14px 15px}.nav-item.active,.nav-item:hover{background:#e6f7f2;color:#067c69}.nav-item.active{font-weight:750}.nav-icon{width:25px;display:grid;place-items:center}.nav-icon svg{width:23px;height:23px}
.sidebar-footer{margin-top:auto;font-size:11px;color:#8b9ca5;border-top:1px solid #edf0f2}
.topbar{height:0;min-height:0;overflow:hidden;padding:0;border:0;background:transparent}
.content{max-width:1500px;padding:52px 5% 82px;margin:0 auto}
.simple-page-title{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:29px}
.simple-page-title h1{margin:0 0 6px;font-size:clamp(38px,4vw,57px);font-weight:820;letter-spacing:-2.1px;line-height:1.1}
.simple-page-title p{margin:0;color:#798493;font-size:20px;line-height:1.4}
.simple-page-title .mini-create{min-height:43px;color:#0d786c;background:#fff;border-color:#e4ebee}
.today-layout{display:grid;grid-template-columns:minmax(0,1.67fr) minmax(285px,.9fr);gap:22px;align-items:start}
.schedule-panel,.next-panel,.overview-panel{background:#fff;border:1px solid #e7edf1;border-radius:20px;box-shadow:0 12px 35px rgba(30,56,71,.04)}
.schedule-panel{padding:26px 25px 22px}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}.panel-title h2,.next-panel h2,.overview-panel h2{font-size:22px;line-height:1.3;letter-spacing:-.5px;margin:0;font-weight:785}.panel-title .btn{font-size:13px;border-radius:12px;color:#248672}
.reminders{display:flex;flex-direction:column;gap:11px}
.reminder-row{display:grid;grid-template-columns:125px minmax(0,1fr) 82px;gap:14px;align-items:center;padding:18px 18px;min-height:112px;border:1px solid #edf0f3;border-radius:17px;background:#fff;position:relative;transition:background .2s ease,border-color .2s ease}
.reminder-row.due{border-color:#bdebdc;background:#edfaf6}
.reminder-row.done{background:#f7fcf9}
.reminder-row.skipped{opacity:.72}
.reminder-when{border-right:1px solid #e4e9ee;padding-right:12px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.reminder-when strong{font-size:23px;letter-spacing:-.7px;font-weight:800;line-height:1.1;white-space:nowrap}
.reminder-state{font-size:12px;color:#8894a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.due .reminder-state{color:#068b71;font-weight:700}.done .reminder-state{color:#13886f}.reminder-day{color:#8794a0;font-size:11px}
.reminder-med{display:flex;align-items:center;gap:15px;min-width:0}
.pill-mark{background:color-mix(in srgb,var(--med-color,#149b82) 12%,white);color:var(--med-color,#149b82);border-radius:50%;width:51px;height:51px;flex:0 0 51px;font-size:inherit}
.pill-mark svg{width:26px;height:26px}
.reminder-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.reminder-copy strong{font-size:17px;font-weight:740;line-height:1.2;overflow-wrap:anywhere}.reminder-copy span{color:#707c8d;font-size:14px;line-height:1.3}.reminder-copy small{font-size:11px;color:#80919b;line-height:1.4}
.reminder-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;position:relative}
.reminder-check{width:47px;height:47px;flex:0 0 47px;display:grid;place-items:center;border:2px solid #d4dce2;background:#fff;color:#aeb9c0;border-radius:50%;font-size:26px;font-weight:650;line-height:1;transition:.18s}
.reminder-check.ready{border:0;background:#10a889;color:#fff;box-shadow:0 2px 8px rgba(12,146,111,.13)}
.reminder-check:hover{border-color:#0d9980;color:#0b9078}.reminder-check.ready:hover{background:#087d68;color:#fff}
.reminder-result{display:grid;place-items:center;background:#e0f4eb;color:#108a70;border-radius:50%;width:44px;height:44px;font-size:23px}.skipped .reminder-result{background:#f3f3f3;color:#7d8c99}
.reminder-more{position:relative;align-self:center}.reminder-more summary{list-style:none;cursor:pointer;border:0;background:transparent;color:#7a8b99;display:grid;place-items:center;width:25px;height:36px;font-size:21px;border-radius:7px}.reminder-more summary::-webkit-details-marker{display:none}.reminder-more summary:hover{background:#e8f1f1}.reminder-menu{position:absolute;right:0;top:35px;min-width:175px;padding:7px;border:1px solid #e2e9ec;background:white;box-shadow:0 12px 26px #15363e26;border-radius:12px;z-index:4;display:grid;gap:3px}.reminder-menu button{width:100%;background:transparent;border:0;padding:11px;border-radius:9px;text-align:left;color:#35465b;font-size:13px;white-space:nowrap}.reminder-menu button:hover{background:#f0f7f5}
.today-aside{display:grid;gap:18px}.next-panel,.overview-panel{padding:24px}
.next-panel h2,.overview-panel h2{margin-bottom:19px}.next-panel{background:linear-gradient(145deg,#f3fcf9 0%,#fff 75%);border-color:#dceee9}
.next-box{background:#f0faf6;border-radius:14px;display:flex;align-items:center;gap:14px;padding:16px 14px;margin-bottom:13px}.next-box .pill-mark{width:47px;height:47px;flex-basis:47px}.next-box>div:last-child{min-width:0;display:grid;gap:4px}.next-box strong{font-size:17px;overflow-wrap:anywhere}.next-box p{margin:0;font-size:13px;color:#73808b}.next-box b{font-size:22px;letter-spacing:-.6px}.next-box small{font-size:12px;color:#19947b;font-weight:600}.next-confirm{width:100%;min-height:51px!important;font-size:15px!important}
.overview-line{display:flex;align-items:center;gap:12px;padding:9px 0;color:#7e8998;font-size:14px}.overview-line b{font-size:22px;color:#152338;min-width:25px}.overview-bubble{height:39px;width:39px;flex:0 0 39px;border-radius:50%;display:grid;place-items:center;font-size:19px;font-weight:720}.overview-bubble.green{background:#dcf5ed;color:#079578}.overview-bubble.blue{background:#e9f4ff;color:#538ec5}.overview-bubble.muted{background:#f3f4f7;color:#8894a3}.aside-tools{display:grid;gap:9px}.aside-tools button{min-height:43px}
/* The remaining screens deliberately keep their original backend-connected forms. */
.page-head{align-items:center;margin-bottom:25px}.page-head h1{font-size:clamp(28px,3vw,38px);font-weight:810;letter-spacing:-1.3px}.page-head p{font-size:14px}.eyebrow{color:#8b9b9b;letter-spacing:1px}.btn{font-size:13px;font-weight:650;border-radius:12px}.btn.primary{background:#149b82}.btn.primary:hover{background:#087d69}.btn.outline{border-color:#e4eaf0;background:white}.btn.subtle{background:#e8f7f3;color:#077a68}.btn.danger{background:#fff4f3;color:#b33539}
.section-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.med-card,.rule-card,.settings-card,.panel{border-color:#e9eef1;box-shadow:0 6px 23px rgba(25,49,71,.035);border-radius:17px}
.med-card{min-height:190px}.med-card .pill-mark{width:45px;height:45px;flex-basis:45px}.med-card h3,.rule-card h3{font-size:17px;color:#172839}.rule-card{align-items:center}
.dialog{border-radius:22px;box-shadow:0 22px 65px #12273839}.dialog::backdrop{background:#1d304685}.modal-inner{padding:28px}.modal-title-row h2{font-weight:780}.kind-fields{border-color:#e8eeee;background:#fcfdfd}.weekdays input:checked+span{background:#159980;border-color:#159980}
.auth-screen{background:#f8fafb}.auth-panel{border:1px solid #e7eeef}.auth-panel .brand-logo{background:linear-gradient(135deg,#59cdb3,#087966)}
.toast{background:#19342f;color:#fff;bottom:22px}.toast.error{background:#a43d2e}
@media(max-width:1200px){.content{padding:36px 4% 85px}.today-layout{grid-template-columns:minmax(0,1.5fr) minmax(240px,.8fr);gap:15px}.schedule-panel{padding:19px}.next-panel,.overview-panel{padding:18px}.reminder-row{grid-template-columns:96px minmax(0,1fr) 79px;padding:14px 12px;gap:9px}.reminder-when strong{font-size:21px}.reminder-med{gap:9px}.reminder-copy strong{font-size:15px}.reminder-copy span{font-size:12px}.pill-mark{width:42px;height:42px;flex-basis:42px}.sidebar{width:210px;flex-basis:210px}}
@media(max-width:900px){.sidebar{width:182px;flex-basis:182px;padding:26px 12px}.brand{font-size:21px;margin-bottom:48px;padding:0 5px}.nav-item{font-size:13px;padding:12px 10px;gap:8px}.today-layout{grid-template-columns:1fr}.today-aside{grid-template-columns:repeat(2,minmax(0,1fr))}.aside-tools{grid-column:1/-1;grid-template-columns:1fr 1fr}.reminder-row{grid-template-columns:112px minmax(0,1fr) 80px}}
@media(max-width:760px){.sidebar{display:none}.main{width:100%}.topbar{display:none}.content{padding:32px 16px calc(104px + env(safe-area-inset-bottom));max-width:650px}
 .simple-page-title{margin-bottom:29px}.simple-page-title h1{font-size:43px;letter-spacing:-1.6px}.simple-page-title p{font-size:16px}.simple-page-title .mini-create{font-size:12px;min-height:42px;padding:9px 12px}
 .today-layout{grid-template-columns:1fr}.today-aside{grid-template-columns:1fr}.schedule-panel{border:0;box-shadow:none;background:transparent;padding:0}.panel-title{margin-bottom:16px}.panel-title h2{font-size:21px}.panel-title .btn{min-height:38px}
 .reminders{gap:11px}.reminder-row{grid-template-columns:90px minmax(0,1fr) 72px;min-height:107px;padding:14px 12px;gap:8px;border-radius:17px;box-shadow:0 4px 16px rgba(37,58,76,.03)}.reminder-when strong{font-size:20px}.reminder-state{font-size:11px}.reminder-med{gap:10px}.pill-mark{width:42px;height:42px;flex-basis:42px}.pill-mark svg{width:23px;height:23px}.reminder-copy strong{font-size:15px}.reminder-copy span{font-size:12px}.reminder-copy small{font-size:11px}.reminder-check{height:42px;width:42px;flex-basis:42px;font-size:24px}.reminder-more summary{width:23px}.next-panel,.overview-panel{border-radius:17px;padding:20px}
 .mobile-nav{height:calc(74px + env(safe-area-inset-bottom));background:#ffffffed;backdrop-filter:blur(14px);border-top:1px solid #edf1f2;box-shadow:0 -6px 25px #122c3c0a;padding:6px 6px env(safe-area-inset-bottom);justify-content:space-around}
 .mobile-nav button{flex:1;min-width:0;gap:5px;border-radius:12px;font-size:inherit;color:#7b8896;padding:5px 1px;white-space:nowrap}.mobile-nav button.active{background:#e7f9f3;color:#077e69}.mobile-nav button span{display:grid;place-items:center}.mobile-nav svg{width:21px;height:21px}.mobile-nav small{font-size:10px;font-weight:600}.page-head{align-items:flex-start}.page-head h1{font-size:29px}.section-grid,.settings-grid{grid-template-columns:1fr}.toast{bottom:calc(85px + env(safe-area-inset-bottom))}.modal-inner{padding:21px}.dialog{max-height:92dvh}
}
@media(max-width:440px){.content{padding:23px 12px calc(100px + env(safe-area-inset-bottom))}.simple-page-title h1{font-size:39px}.simple-page-title p{font-size:15px}.reminder-row{grid-template-columns:66px minmax(0,1fr) 56px;padding:13px 10px;gap:7px;min-height:100px}.reminder-when strong{font-size:18px}.reminder-state{font-size:10px;white-space:normal}.reminder-med{gap:8px}.pill-mark{width:36px;height:36px;flex-basis:36px}.pill-mark svg{width:20px;height:20px}.reminder-copy strong{font-size:14px}.reminder-copy span{font-size:11px}.reminder-copy small{display:none}.reminder-check{width:36px;height:36px;flex-basis:36px;font-size:23px}.reminder-actions{gap:0}.reminder-more summary{width:20px}.reminder-menu{right:-5px}.panel-title h2{font-size:19px}.mini-create{font-size:11px!important}.mobile-nav button small{font-size:9px}.page-head{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* mobile brand, consistent with the minimal reference */
.mobile-brand{display:none}
.brand-logo{font-size:0!important;position:relative;overflow:hidden;background:transparent!important;border-radius:0!important;box-shadow:none!important}
.brand-logo::before,.brand-logo::after{position:absolute;content:"";width:47%;height:72%;background:#23b99b;top:14%;border-radius:72% 20% 70% 20%}
.brand-logo::before{left:8%;transform:rotate(-33deg);background:#67cdb4}
.brand-logo::after{right:8%;transform:rotate(38deg);background:#087b6b}
@media(max-width:760px){.mobile-brand{display:flex;align-items:center;gap:9px;padding:19px 17px 0}.mobile-brand .brand-logo{width:30px;height:30px;flex-basis:30px}.mobile-brand strong{font-size:23px;letter-spacing:-.8px;color:#152536}.mobile-brand strong span{color:#158a74}.mobile-brand button{margin-left:auto;border:1px solid #d7eee7;background:#ebf9f4;color:#0b806a;border-radius:12px;width:38px;height:38px;font-size:26px}.content{padding-top:26px}.today-aside{display:none}}


/* Small clear info and shared-account UI */
.med-info-link{border:0;background:#e9f6f0;color:#177e69;border-radius:8px;cursor:pointer;padding:4px 9px;font:inherit;font-size:.76rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;width:max-content;margin:3px 0}
.med-info-link:hover,.med-info-link:focus-visible{background:#d3eae2}
.info-stack{display:grid;gap:16px;padding:10px 0}
.info-stack>div{border:1px solid #e6efeb;background:#f9fcfb;border-radius:12px;padding:13px}
.info-stack p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.info-stack small{color:#63736f}

/* MediZeit Synology v8 identity — clean and light, built around the new app icon */
:root{--ink:#162c3a;--muted:#667c8c;--teal:#0e93a9;--teal-dark:#087a95;--teal-light:#e9f8fc;--body:#f6fafc;--line:#e0eaf1;--shadow:0 12px 30px rgba(32,77,103,.06)}
body{background:linear-gradient(135deg,#eaf9fc 0,#f5fbfc 28%,#f8fbff 70%) fixed;color:#1a3340}
.shell{background:transparent}
.sidebar{background:linear-gradient(180deg,#fff,#f8fcfe);border-right:1px solid #e2edf1;box-shadow:4px 0 24px rgba(23,78,114,.025)}
.brand-logo,.auth-panel .brand-logo{background:#dff3fa url('/icon-192.png?v=8') center/cover no-repeat!important;border-radius:12px!important;box-shadow:0 2px 10px rgba(19,103,151,.12)!important;font-size:0!important}
.brand-logo::before,.brand-logo::after{display:none!important;content:none!important}
.brand-logo.large{border-radius:22px!important;box-shadow:0 8px 24px rgba(19,103,151,.14)!important}
.brand{font-weight:800;color:#173b50}
.brand-highlight,.mobile-brand strong span{color:#0b8aaf}
.navigation .nav-item.active,.navigation .nav-item:hover{background:#e5f6fb;color:#086e94}
.mobile-nav button.active{background:#e2f4fb;color:#096d93}
.mobile-brand{background:transparent}
.mobile-brand button{background:#e3f6fb;border-color:#c7eaf5;color:#08769c}
.auth-screen{background:radial-gradient(circle at 15% 8%,#d4f5fa,transparent 42%),linear-gradient(145deg,#f7fafb,#edf7fc)}
.auth-panel{border:1px solid #deedf1;box-shadow:0 22px 70px rgba(30,85,117,.10);border-radius:25px}
.auth-panel h1{color:#19415a;letter-spacing:-1.3px}
.content{max-width:1420px}
.simple-page-title h1{font-size:clamp(34px,3.7vw,47px);letter-spacing:-1.65px;color:#183d52}
.simple-page-title p{color:#698292}
.schedule-panel,.next-panel,.overview-panel,.med-card,.rule-card,.settings-card,.panel{background:#fff;border:1px solid #dce9f0;border-radius:21px;box-shadow:0 9px 27px rgba(28,82,114,.045)}
.next-panel{background:linear-gradient(145deg,#eaf8fc,#fff 85%);border-color:#d0ebf5}
.next-box{background:#eaf8fb}
.btn.primary{background:#0c92b1}
.btn.primary:hover{background:#08758f}
.btn.subtle,.med-info-link{background:#e4f5fb;color:#086f91}
.med-info-link:hover,.med-info-link:focus-visible{background:#d4edf6}
.weekdays input:checked+span{background:#0d8caa;border-color:#0d8caa}
.dialog{border-radius:23px}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{outline-color:#0b94b3}
@media(max-width:760px){
  .content{padding-top:23px}
  .mobile-brand{padding-top:18px}
  .mobile-brand .brand-logo{width:37px;height:37px;flex:0 0 37px;border-radius:12px!important}
  .mobile-brand strong{color:#163a51}
  .mobile-nav{background:#ffffffed;border-top:1px solid #dcecf3}
  .simple-page-title h1{font-size:clamp(32px,8.8vw,42px)}
  .schedule-panel{background:transparent;border:0;box-shadow:none}
  .reminder-row{background:#fff;border-color:#dce8f0;box-shadow:0 4px 17px rgba(18,72,110,.04)}
}

/* MediZeit v9 — Datum im Mittelpunkt, Heute dezent */
.simple-page-title{align-items:flex-start}
.simple-page-title>div{min-width:0;flex:1 1 auto}
.simple-page-title h1{font-size:18px;font-weight:700;letter-spacing:0;line-height:1.2;color:#6b8596;margin:0 0 8px}
.simple-page-title p{font-size:clamp(31px,3.3vw,44px);font-weight:800;line-height:1.13;letter-spacing:-1.4px;color:#183d52;overflow-wrap:normal}
@media(max-width:760px){
  .simple-page-title{flex-wrap:wrap;gap:14px}
  .simple-page-title>div{flex:1 1 100%}
  .simple-page-title h1{font-size:16px;letter-spacing:0;margin-bottom:7px}
  .simple-page-title p{font-size:clamp(29px,7vw,36px);letter-spacing:-1px}
}
@media(max-width:370px){
  .simple-page-title p{font-size:28px}
}

/* MediZeit catalog autocomplete v10 */
.med-catalog-field{position:relative}
.med-catalog-results{position:relative;z-index:9;margin:8px 0 3px;max-height:258px;overflow-y:auto;background:#fff;border:1px solid #d1e4ec;box-shadow:0 11px 28px rgba(24,69,94,.10);border-radius:14px;padding:5px}
.med-catalog-results.hidden{display:none}
.med-catalog-choice{width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;border:0;border-radius:10px;background:#fff;color:#193d50;cursor:pointer;padding:11px 13px;font:inherit}
.med-catalog-choice:hover,.med-catalog-choice:focus-visible{background:#e8f6fb;outline:2px solid #b8e2ed}
.med-catalog-choice strong{font-size:14px;line-height:1.22;overflow-wrap:anywhere}
.med-catalog-choice small{font-size:12px;color:#627c8d;line-height:1.35}
.med-catalog-loading{padding:12px;color:#648394;font-size:13px}
#medCatalogHint{font-size:12px;line-height:1.4;margin-top:6px}

/* v11 — catalog lookup only when requested */
.med-search-row{display:flex;align-items:stretch;gap:10px}
.med-search-row #medName{flex:1 1 0;min-width:0}
.med-search-button{flex:0 0 auto;min-height:44px;padding:10px 18px;white-space:nowrap}
@media(max-width:420px){.med-search-row{gap:8px}.med-search-button{padding:10px 13px}}

/* v12 — original live autocomplete + separate, explicit EMA research */
.med-research-area{border:1px solid #cfe8ef;background:#f6fcfe;padding:15px;border-radius:15px;display:grid;gap:9px}
.med-research-area>button{justify-self:start}
.med-research-area>button:disabled{opacity:.45;cursor:not-allowed}
.med-research-panel{background:#fff;border:1px solid #d7e9ee;border-radius:12px;padding:14px;display:grid;gap:10px;line-height:1.5;color:#26485a}
.med-research-panel.hidden{display:none}
.med-research-heading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px;align-items:center}
.med-research-heading small,.med-research-copy small{color:#697e8a;font-size:12px}
.med-research-copy{display:grid;gap:7px}
.med-research-copy p,.med-research-panel p{margin:0;font-size:13px;overflow-wrap:anywhere}
.med-research-links{display:flex;gap:9px 18px;flex-wrap:wrap}
.med-research-links a{color:#087caa;text-decoration:underline;font-size:13px}
.med-research-error{color:#a22a2a}
.med-search-row{display:contents}

/* v13 NEX research: line breaks and source readability */
.med-research-copy p{white-space:pre-line;font-size:14px;line-height:1.55}
.med-research-links{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.med-research-links a{overflow-wrap:anywhere}
.med-match-note{padding:9px 11px;border-radius:9px;background:#edf7fb;color:#215b70;font-size:12px}

/* v15 — native time input, consistent page actions, visible dialog feedback */
.rule-time-rows{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.rule-time-row{display:flex;align-items:center;gap:10px}
.rule-time-row input[type=time]{flex:1 1 0;min-width:0;min-height:52px!important;font-size:19px!important;font-weight:700!important;font-variant-numeric:tabular-nums;text-align:center;border-radius:13px!important;border-color:#cde3eb!important;background:#fff!important;color:#143d52!important;color-scheme:light}
.rule-time-remove{flex:0 0 41px;height:41px;border:1px solid #e2eaf0;background:#fff;color:#637989;border-radius:11px;font-size:24px;line-height:1}
.add-rule-time{margin-top:2px}
.dialog-feedback{position:sticky;top:0;z-index:90;background:#e9f7fc;color:#075e7e;border:1px solid #b9e0ec;border-radius:12px;padding:13px 15px;margin:0 0 18px;font-size:14px;font-weight:650;line-height:1.45;box-shadow:0 8px 24px #1947671a}
.dialog-feedback.error{background:#fff0ee;border-color:#f3b7ad;color:#9a3025}
.page-head>.btn{flex:0 0 auto}
.simple-page-title .mini-create{color:#fff!important;background:#0c92b1!important;border-color:#0c92b1!important;flex:0 0 auto}
@media(max-width:760px){
 .mobile-brand .mobile-intake-button{width:auto;height:40px;min-width:0;max-width:135px;padding:0 13px;font-size:13px;font-weight:750;white-space:nowrap;background:#0c92b1;color:#fff;border:0;border-radius:11px;box-shadow:0 3px 10px #0d7b9930}
 .simple-page-title .mini-create{display:none}
 .page-head{align-items:center;gap:12px;flex-wrap:wrap}
 .page-head>.btn{min-height:41px;font-size:12px;padding:9px 13px}
 .rule-time-row input[type=time]{font-size:21px!important;min-height:55px!important}
}
@media(max-width:400px){
 .page-head>.btn{width:100%;justify-content:center}
 .mobile-brand .mobile-intake-button{font-size:12px;padding:0 10px}
}

/* v16 — unified form rhythm and responsive widths */
:root{--field-border:#d8e7ee;--field-focus:#0b93b1}
.dialog{width:min(620px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:min(90dvh,820px);overflow-y:auto;overscroll-behavior:contain;border-radius:22px}
.dialog.compact-dialog{width:min(480px,calc(100vw - 28px))}
.dialog .modal-inner{padding:26px;min-width:0}
.dialog .modal-title-row{margin-bottom:20px}
.dialog .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px;align-items:start}
.dialog .form-grid>div{min-width:0;width:100%}
.dialog .form-grid>.full{grid-column:1 / -1}
.dialog .form-grid label{font-size:13px;line-height:1.35;margin:0 0 8px;font-weight:680}
.dialog input:not([type=checkbox]):not([type=color]):not([type=hidden]),.dialog select{box-sizing:border-box;min-width:0;width:100%;height:49px;min-height:49px;max-width:100%;border:1px solid var(--field-border);border-radius:12px;padding:11px 13px;font-size:15px;line-height:1.35;background:#fff;color:#193c4e}
.dialog textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:84px;padding:12px 13px;line-height:1.5;font-size:15px;border:1px solid var(--field-border);border-radius:12px}
.dialog input[type=color]{box-sizing:border-box;width:100%;height:49px;min-height:49px;padding:6px;border:1px solid var(--field-border);border-radius:12px}
.dialog input:focus-visible,.dialog textarea:focus-visible,.dialog select:focus-visible{outline:2px solid var(--field-focus);outline-offset:1px}
.dialog .kind-fields{padding:16px;border-radius:15px}
.dialog .weekdays{display:flex;gap:6px;flex-wrap:wrap}
.dialog .weekdays span{min-width:39px;height:38px;width:auto}
.dialog .switch-row{display:flex;align-items:center;min-height:42px}
.dialog .switch-row label{margin:0}
.dialog .modal-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;padding-top:16px;margin-top:24px}
.dialog .modal-actions .btn{min-height:46px;padding:12px 18px}
.dialog .med-catalog-results{max-width:100%;margin-top:9px}
.dialog .med-research-area{padding:14px;gap:8px;width:100%}
.dialog .rule-time-row{display:flex;align-items:center;gap:9px;min-width:0}
.dialog .rule-time-row input[type=time]{height:55px!important;min-height:55px!important;font-size:20px!important;padding:8px 12px!important;flex:1 1 auto}
.page-head{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:15px}
.page-head h1{margin:0;line-height:1.17}
.page-head .btn{height:44px;min-height:44px;padding:10px 16px}
.simple-page-title .mini-create{height:44px;min-height:44px}
@media(max-width:760px){
 .dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:93dvh;border-radius:20px}
 .dialog .modal-inner{padding:20px}
 .dialog .form-grid,.dialog .kind-fields .form-grid{grid-template-columns:minmax(0,1fr);gap:16px}
 .dialog .form-grid>.full{grid-column:1}
 .dialog input:not([type=checkbox]):not([type=color]):not([type=hidden]),.dialog select,.dialog textarea{font-size:16px}
 .dialog .modal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .dialog .modal-actions .btn{min-width:0;padding:10px}
 .dialog .weekdays span{min-width:37px}
 .page-head{flex-wrap:wrap}
 .page-head h1{flex:1 1 auto;font-size:clamp(23px,6vw,29px)}
 .page-head .btn{height:44px;min-height:44px;font-size:13px;padding:9px 13px}
}
@media(max-width:390px){
 .page-head{gap:9px}
 .page-head h1{flex-basis:100%}
 .page-head>.btn{width:100%;justify-content:center}
 .dialog .modal-inner{padding:17px}
}

/* v16 final spacing details */
@media(min-width:761px){
 .dialog .form-grid>div:not(.full)>label{min-height:34px;display:flex;align-items:flex-end}
}
@media(max-width:760px){
 .dialog .form-grid>div>label{min-height:0}
 .dialog .form-grid>div{width:100%}
 .dialog .kind-fields .form-grid{width:100%}
 .dialog .modal-inner{width:100%;box-sizing:border-box}
}
