:root {
  color-scheme: light;
  --ink: #1f2734;
  --muted: #7e8982;
  --line: #e6e9ef;
  --paper: #ffffff;
  --canvas: #f5f6f8;
  --green: #303c51;
  --green-dark: #252e3e;
  --green-soft: #e8ebf0;
  --orange: #c47a31;
  --orange-soft: #fff1dc;
  --red: #b14b3f;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; overscroll-behavior-y: none; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; overscroll-behavior-y: none; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
body.auth-checking .app-shell { visibility: hidden; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--canvas); }
.auth-screen[hidden] { display: none; }
.auth-card { width: min(100%, 500px); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgb(32 40 55 / 0.071); text-align: left; }
.auth-brand { gap: 13px; margin: 0 0 30px; font-size: 30px; letter-spacing: -1.5px; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
.auth-brand .brand-mark span:first-child { top: 6px; left: 20px; width: 7px; height: 36px; }
.auth-brand .brand-mark span:last-child { top: 20px; left: 6px; width: 36px; height: 7px; }
.auth-card h1 { margin-bottom: 8px; font-size: 28px; }
.auth-intro { margin-bottom: 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.local-simulator-note { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #eadfb9; border-radius: 9px; color: #705b29; background: #fffaf0; box-shadow: 0 2px 8px #66501a0b; font-size: 11px; line-height: 1.5; }
.local-simulator-note summary { cursor: pointer; font-weight: 700; }
.local-simulator-note summary::marker { color: #b48a3c; }
.local-simulator-note p { margin: 8px 0 0; font-size: 11px; line-height: 1.55; }
.local-simulator-banner { padding: 7px 9px; border: 1px solid #eadfb9; border-radius: 20px; color: #705b29; background: #fffaf0; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.auth-card input { width: 100%; min-height: 44px; margin: 0 0 17px; padding: 0 12px; border: 1px solid #dfe3ea; border-radius: 9px; background: #fff; box-shadow: inset 0 1px 2px rgb(32 40 55 / 0.039), 0 2px 7px rgb(32 40 55 / 0.043); transition: border-color .16s ease, box-shadow .16s ease; }
.auth-card input:focus { border-color: #7f8ca2; outline: 0; box-shadow: 0 0 0 3px rgb(48 60 81 / 0.094), 0 3px 9px rgb(32 40 55 / 0.063); }
.auth-card #auth-form { display: grid; gap: 13px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-field { display: grid; gap: 6px; }
.auth-field .field-label { margin: 0; color: #394760; font-size: 11px; }
.auth-field input { min-height: 47px; margin: 0; }
.auth-field input::placeholder { color: #a0aaa2; }
.auth-submit { width: 100%; min-height: 46px; margin-top: 1px; font-size: 12px; box-shadow: 0 4px 10px rgb(48 60 81 / 0.145); }
.auth-secondary-actions { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid #e7eaef; }
.auth-mode-toggle, .auth-recovery-toggle { width: max-content; max-width: 100%; margin: 0; text-align: left; }
.auth-mode-toggle { color: var(--green-dark); font-weight: 700; }
.auth-recovery-toggle { color: var(--muted); font-size: 10px; }
.auth-secondary-actions .text-button { justify-self: start; margin-left: 0; }
.auth-message { min-height: 17px; margin: 14px 0 0; color: #a04a36; font-size: 11px; }
.auth-card > .auth-message:empty { visibility: hidden; }
.auth-session { display: flex; flex-direction: column; align-items: stretch; gap: 9px; padding-top: 15px; border-top: 1px solid var(--line); }
.auth-account-heading { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.auth-account-heading > strong { font-size: 16px; }
.auth-account-heading .text-button { margin: 0; text-align: left; }
.auth-session > span { color: var(--muted); font-size: 12px; }
.auth-session p { margin: 3px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.botiquin-management { width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
.botiquin-management h2 { margin: 0 0 7px; font-size: 16px; }
.botiquin-management > p { margin: 0 0 12px; }
.botiquin-management > .auth-message:empty { display: none; }
.botiquin-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.botiquin-list li { display: flex; align-items: center; min-height: 42px; padding: 9px 12px; border: 1px solid #c2cad7; border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgb(32 40 55 / 0.035); font-size: 13px; font-weight: 600; text-align: left; transition: box-shadow .16s ease, background .16s ease; }
.botiquin-list li:hover { background: #fcfcfd; box-shadow: 0 5px 12px rgb(32 40 55 / 0.071); }
.botiquin-choice { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font-weight: inherit; cursor: pointer; }
.botiquin-choice:focus-visible { outline: 3px solid #dadfe7; outline-offset: 3px; }
.create-botiquin-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 14px; border: 1px solid #dde1e8; border-radius: 11px; background: #f7f8f9; box-shadow: 0 3px 10px rgb(32 40 55 / 0.047); text-align: left; }
.create-botiquin-form .field-label { margin: 0; color: #36435b; font-size: 11px; }
.create-botiquin-form input { min-height: 46px; margin: 0; border-color: #cbd1dc; background: #fff; box-shadow: inset 0 1px 2px rgb(32 40 55 / 0.039), 0 2px 7px rgb(32 40 55 / 0.047); }
.create-botiquin-form input:hover { border-color: #bac1cd; background: #fcfcfd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.create-botiquin-form input:focus { border-color: #7f8ca2; outline: 0; box-shadow: 0 0 0 3px rgb(48 60 81 / 0.094), 0 3px 9px rgb(32 40 55 / 0.063); }
.create-botiquin-form button { min-height: 44px; justify-self: start; white-space: nowrap; }
.profile-management { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 16px; margin: 0 0 20px; padding: 12px; border: 1px solid #c2cad7; border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgb(32 40 55 / 0.051); }
#profile-management { padding-block: 12px; }
.profile-management > ul { display: grid; align-content: start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-management > ul > li { padding: 10px 12px; border: 1px solid #c2cad7; border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgb(32 40 55 / 0.035); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.profile-management > ul > li:hover { background: #fcfcfd; box-shadow: 0 5px 12px rgb(32 40 55 / 0.071); }
.members-management { padding: 15px; border: 1px solid #c2cad7; border-radius: 11px; background: #fafbfc; box-shadow: 0 3px 10px rgb(32 40 55 / 0.035); }
.members-management h3 { margin: 0 0 10px; font-size: 13px; }
.members-management > ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 7px; margin: 0 0 12px; padding: 0; list-style: none; }
.members-management > ul > li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #c2cad7; border-radius: 8px; color: var(--muted); background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.031); font-size: 11px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.members-management > ul > li:hover { background: #fcfcfd; box-shadow: 0 4px 10px rgb(32 40 55 / 0.063); }
.profile-management .profile-caregiver-list { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.profile-management .profile-caregiver-list li, .profile-caregiver-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.profile-caregiver-controls { justify-content: flex-start; margin-top: 9px; }
.profile-caregiver-controls select { min-width: 0; flex: 1; min-height: 38px; padding: 0 9px; border: 1px solid #d5dae3; border-radius: 7px; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.031); transition: border-color .16s ease, box-shadow .16s ease; }
.profile-caregiver-controls select:hover { border-color: #bac1cd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.profile-caregiver-controls select:focus { border-color: #7f8ca2; outline: 0; box-shadow: 0 0 0 3px rgb(48 60 81 / 0.094); }
.profile-management form { display: grid; align-content: start; gap: 8px; padding: 14px; border: 1px solid #c2cad7; border-radius: 10px; background: #fff; box-shadow: 0 3px 9px rgb(32 40 55 / 0.035); }
#invite-member-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; column-gap: 10px; row-gap: 6px; padding: 12px 14px; }
#invite-member-form .field-label { grid-column: 1; grid-row: 1; margin: 0; }
#invite-member-email { grid-column: 1; grid-row: 2; width: 100%; min-width: 0; }
#invite-member-form .button { grid-column: 2; grid-row: 2; width: 100%; min-height: 42px; border-color: #c2cad7; box-shadow: inset 0 1px 2px rgb(32 40 55 / 0.031), 0 2px 6px rgb(32 40 55 / 0.031); }
#invite-member-form .button:hover { border-color: #7b889f; box-shadow: 0 3px 9px rgb(32 40 55 / 0.071); }
#invite-member-message:empty { display: none; }
#invite-member-message:not(:empty) { margin: 8px 0 0; }
#invite-member-message[data-kind="success"] { color: #286549; }
.profile-management form input { min-height: 42px; padding: 0 10px; border: 1px solid #d5dae3; border-radius: 8px; background: #fff; box-shadow: inset 0 1px 2px rgb(32 40 55 / 0.031), 0 2px 6px rgb(32 40 55 / 0.031); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.profile-management form input:hover { border-color: #bac1cd; background: #fcfcfd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.profile-management form input:focus { border-color: #7f8ca2; outline: 0; box-shadow: 0 0 0 3px rgb(48 60 81 / 0.094), 0 3px 9px rgb(32 40 55 / 0.063); }
.invite-link-container { display: flex; gap: 8px; align-items: center; }
.invite-link-container input { min-width: 0; flex: 1; }
.auth-password-form { display: grid; width: 100%; gap: 7px; padding-top: 14px; border-top: 1px solid var(--line); }
.auth-password-toggle { align-self: flex-start; margin: 8px 0 0; color: var(--muted); text-align: left; }
.auth-password-form h2 { margin: 0 0 3px; font-size: 15px; }
.auth-password-form input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid #e5eae5; border-radius: 8px; }
.profile-management-message { margin: 0; }
#create-profile-form { min-width: 0; }
#profile-management-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 10px; margin: 0; padding: 0; list-style: none; }

.profile-inline-field { display: grid; min-width: 0; gap: 5px; }
.profile-inline-field .field-label { margin: 0; }
.profile-inline-field input { width: 100%; min-width: 0; margin: 0; }

.profile-avatar-control { position: relative; display: flex; align-items: center; justify-content: flex-end; flex-direction: column; gap: 5px; width: 58px; }
.profile-avatar-label { margin: 0; color: #53675a; text-align: center; }
.profile-avatar-button { position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 1px solid #c2cad7; border-radius: 50%; color: #475978; background: #eff1f4; box-shadow: 0 2px 7px rgb(32 40 55 / 0.039); cursor: pointer; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.profile-avatar-button:hover { background: #e6e9ef; box-shadow: 0 4px 10px rgb(32 40 55 / 0.086); transform: translateY(-1px); }
.profile-avatar-button:focus-visible { outline: 3px solid #dadfe7; outline-offset: 2px; }
.profile-avatar-button:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.avatar-art { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; }
.avatar-art svg { display: block; width: 100%; height: 100%; }
.avatar-boy, .avatar-girl, .avatar-adult-man, .avatar-adult-woman, .avatar-grandfather, .avatar-grandmother { background: transparent; }
.avatar-add-mark { position: absolute; right: -2px; bottom: -1px; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: var(--green); box-shadow: 0 2px 5px rgb(32 40 55 / 0.145); font-size: 15px; font-weight: 700; line-height: 1; }
.avatar-picker-content { padding: 24px; }
.avatar-picker-options { display: grid; grid-template-columns: repeat(3, minmax(76px, 1fr)); gap: 9px; padding: 12px; border: 1px solid #c2cad7; border-radius: 11px; background: #f7f8fa; }
.avatar-picker-dialog { width: min(410px, calc(100vw - 30px)); }
.remove-profile-dialog .dialog-intro { padding: 13px; border: 1px solid #e6e9ef; border-radius: 9px; background: #f7f8fa; line-height: 1.6; }
.avatar-option { display: grid; justify-items: center; gap: 4px; min-width: 65px; padding: 6px 4px; border: 1px solid #dadfe7; border-radius: 9px; color: #596a5d; background: #fff; box-shadow: 0 2px 5px rgb(32 40 55 / 0.031); cursor: pointer; font-size: 9px; font-weight: 700; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.avatar-option .avatar-art { width: 34px; height: 34px; }
.avatar-option:hover, .avatar-option.selected { border-color: #8e9aae; background: #f2f4f7; box-shadow: 0 3px 8px rgb(32 40 55 / 0.071); }
.care-profile-card { position: relative; min-width: 0; padding: 11px 13px; border: 1px solid #c2cad7; border-radius: 10px; background: #fff; box-shadow: 0 2px 7px rgb(32 40 55 / 0.035); transition: background .16s ease, box-shadow .16s ease; }
.care-profile-card:hover { background: #fcfcfd; box-shadow: 0 5px 12px rgb(32 40 55 / 0.071); }
.care-profile-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.existing-profile-avatar { flex: 0 0 auto; width: 42px; }
.existing-profile-avatar .profile-avatar-button { width: 40px; height: 40px; }
.existing-profile-avatar .avatar-add-mark { width: 17px; height: 17px; font-size: 12px; }
.care-profile-identity { display: flex; min-width: 0; flex: 1; align-items: center; }
.care-profile-identity strong { overflow: hidden; color: #2b3648; font: 700 14px "Manrope", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.care-profile-heading > .remove-profile-button { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #ead4d1; border-radius: 7px; color: #a34d43; background: #fff8f6; box-shadow: 0 1px 4px rgb(32 40 55 / 0.031); cursor: pointer; font-size: 9px; font-weight: 700; }
.care-profile-heading > .remove-profile-button:hover { background: #fff0ed; box-shadow: 0 3px 8px #a34d4318; }
.care-profile-card .profile-caregiver-list { margin: 7px 0 0 52px; }
.care-profile-card .profile-caregiver-list li { padding-top: 6px; border-top: 1px solid #ebeef2; font-size: 10px; }
.care-profile-card .profile-caregiver-controls { margin-left: 52px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; width: 246px; padding: 27px 18px 18px; background: #fff; border-right: 2px solid #c7cdd9; box-shadow: 6px 0 18px rgb(32 40 55 / 0.071); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; margin: 2px 0 31px 6px; color: var(--ink); text-decoration: none; font: 800 21px/1 "Manrope", sans-serif; letter-spacing: -1.1px; }
.brand-mark { position: relative; display: inline-block; width: 28px; height: 28px; overflow: hidden; border-radius: 9px; background: var(--green); transform: rotate(-7deg); }
.brand-mark span:first-child, .brand-mark span:last-child { position: absolute; top: 4px; left: 12px; width: 5px; height: 20px; border-radius: 5px; background: #fff; }
.brand-mark span:last-child { top: 11px; left: 4px; width: 20px; height: 5px; }
.botiquin-switcher-wrap { position: relative; z-index: 6; width: 100%; margin: 0 0 28px; }
.space-switcher { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.space-switcher:hover, .space-switcher[aria-expanded="true"] { border-color: #c2cad7; background: #fcfcfd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.space-switcher:focus-visible { outline: 3px solid #dadfe7; outline-offset: 2px; }
.botiquin-switcher-menu { position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; width: min(300px, calc(100vw - 32px)); padding: 13px; border: 1px solid #c2cad7; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgb(32 40 55 / 0.125); }
.botiquin-switcher-menu[hidden] { display: none; }
.botiquin-switcher-menu > strong { display: block; margin: 0 0 8px 2px; color: #2e394d; font-size: 12px; }
.botiquin-switcher-menu ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.botiquin-switcher-option { min-width: 0; }
.botiquin-switcher-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid #dadfe7; border-radius: 8px; color: #37455d; background: #fff; box-shadow: 0 1px 4px rgb(32 40 55 / 0.031); cursor: pointer; text-align: left; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.botiquin-switcher-choice:hover, .botiquin-switcher-choice:focus-visible { border-color: #abb4c3; outline: 0; background: #f7f8f9; box-shadow: 0 3px 8px rgb(32 40 55 / 0.071); }
.botiquin-switcher-choice[aria-current="true"] { border-color: #abb4c3; color: #313d53; background: #eef0f4; font-weight: 700; }
.botiquin-switcher-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botiquin-switcher-choice small { flex: 0 0 auto; color: #829087; font-size: 9px; }
.botiquin-switcher-status { margin: 8px 2px 0; color: #9b5d4b; font-size: 10px; line-height: 1.4; }
.botiquin-switcher-status:empty { display: none; }
.space-avatar, .person-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; color: #344259; background: #e5e8ed; font-weight: 700; }
.space-copy, .account-row > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.space-copy strong, .account-row strong { font-size: 12px; font-weight: 700; }
.space-copy small, .account-row small { color: var(--muted); font-size: 10px; }
.chevron { color: #8b968e; font-size: 17px; }
.nav-label { margin: 0 0 11px 10px; color: #a3aaa4; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 42px; padding: 0 11px; border-radius: 9px; color: #69766e; text-decoration: none; font-size: 12px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.nav-link:hover { color: var(--green); background: #f6f7f9; }
.nav-link.active { color: var(--green-dark); background: #eef0f3; }
.nav-disabled { color: #9da69f; cursor: default; }
.nav-disabled:hover { color: #9da69f; background: transparent; }
.nav-icon { display: grid; place-items: center; width: 17px; color: #78867d; font-size: 18px; line-height: 1; }
.active .nav-icon { color: var(--green); }
.sidebar-bottom { display: grid; gap: 12px; margin-top: auto; }
.sidebar-bottom #settings-nav-link { min-height: 48px; margin-bottom: 8px; padding: 0 12px; border: 1px solid #c2cad7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgb(32 40 55 / 0.043); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.sidebar-bottom #settings-nav-link:hover { border-color: #7b889f; color: var(--green); background: #f7f8f9; box-shadow: 0 7px 18px rgb(32 40 55 / 0.086); transform: translateY(-1px); }
.sidebar-bottom #settings-nav-link.active { border-color: #abb4c3; color: var(--green-dark); background: #eef0f3; box-shadow: 0 3px 10px rgb(32 40 55 / 0.071); }
.sidebar-bottom #settings-nav-link .nav-icon { width: 17px; height: auto; border-radius: 0; color: #78867d; background: transparent; font-size: 18px; }
.help-card strong { display: block; margin-top: 7px; font-size: 11px; }
.help-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.help-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: var(--green); background: #e0e4eb; }
.account-row { display: flex; align-items: center; gap: 9px; padding: 0 1px 0 13px; }
.account-row .person-avatar { width: 32px; height: 32px; border-radius: 50%; color: #824f30; background: #f8eadd; font-size: 12px; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: #727e75; background: transparent; cursor: pointer; font-size: 20px; }
.icon-button:hover { background: #f2f3f6; }
.main-content { min-height: 100vh; margin-left: 246px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 46px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.66); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #929b94; font-size: 11px; }
.breadcrumbs strong { color: #46564c; font-weight: 600; }
.breadcrumb-separator { color: #c8cec9; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e2e6ec; border-radius: 20px; color: #68766d; background: #fff; font-size: 10px; }
.demo-pill > span { width: 6px; height: 6px; border-radius: 50%; background: #828ea4; }
.notification-button { display: inline-flex; width: auto; min-height: 36px; gap: 7px; padding: 0 11px; border: 1px solid var(--line); color: #53675a; background: #fff; box-shadow: 0 2px 7px rgb(32 40 55 / 0.043); font-size: 10px; font-weight: 700; }
.notification-button:hover { background: #f7f8fa; box-shadow: 0 4px 10px rgb(32 40 55 / 0.071); }
.notification-mark { position: relative; display: inline-grid; place-items: center; width: 17px; height: 19px; font-size: 16px; }
.notification-mark i { position: absolute; top: 1px; right: 0; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: #d87a51; }
.mobile-avatar { display: none; }
.mobile-settings-link { display: none; text-decoration: none; }
.content-wrap { width: min(1120px, 100%); margin: 0 auto; padding: 43px 46px 50px; }
.settings-grid { display: grid; gap: 14px; max-width: 760px; }
.settings-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 20px 22px; border: 1px solid #c2cad7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgb(32 40 55 / 0.043); }
.settings-card h2 { margin: 0 0 5px; font: 700 15px "Manrope", sans-serif; }
.settings-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-card .button { white-space: nowrap; }
.settings-card > .button { width: 160px; min-height: 40px; }
.settings-password-form { display: grid; grid-column: 1 / -1; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-password-form[hidden] { display: none; }
.settings-password-form label { color: var(--ink); font-size: 11px; font-weight: 700; }
.settings-password-form input { min-height: 42px; padding: 0 12px; border: 1px solid #c2cad7; border-radius: 8px; background: #fff; }
.settings-password-form .button { justify-self: start; }
.settings-password-form p { min-height: 16px; color: var(--green); }
.settings-card #settings-logout { grid-column: 2; justify-self: end; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.eyebrow { margin: 0 0 9px; color: #829188; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: #212938; font: 700 30px/1.2 "Manrope", sans-serif; letter-spacing: -1px; }
.page-intro { margin: 0; color: #7e8982; font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 700; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 3px 7px rgb(41 52 71 / 0.094); }
.button-primary:hover { background: var(--green-dark); box-shadow: 0 5px 12px rgb(41 52 71 / 0.133); }
.button-secondary { color: #58655d; border-color: #e5eae5; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.035); }
.button-secondary:hover { border-color: #cad0db; background: #fafbfc; box-shadow: 0 4px 10px rgb(32 40 55 / 0.071); }
.plus { font-size: 18px; font-weight: 400; line-height: 1; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.summary-card { position: relative; min-height: 132px; padding: 17px 19px; overflow: hidden; border: 1px solid #c2cad7; border-radius: 12px; background: white; box-shadow: 0 5px 16px rgb(32 40 55 / 0.043); transition: transform .16s ease, box-shadow .16s ease; }
.summary-card[data-summary-filter] { display: block; width: 100%; cursor: pointer; text-align: left; }
.summary-card[data-summary-filter]:focus-visible { outline: 3px solid #b1b9c6; outline-offset: 3px; }
.summary-card.is-selected { box-shadow: 0 0 0 3px #b1b9c6, 0 8px 20px rgb(32 40 55 / 0.141); }
.summary-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgb(32 40 55 / 0.071); }
.summary-primary { color: white; border-color: var(--green); background: linear-gradient(145deg, #38465f, #293446); box-shadow: 0 7px 18px rgb(48 60 81 / 0.149); }
.summary-low-stock { color: #fff; border-color: #245d9b; background: linear-gradient(145deg, #3479c3, #245b99); box-shadow: 0 7px 18px #245d9b30; }
.summary-low-stock:hover { border-color: #194d87; box-shadow: 0 9px 20px #245d9b40; }
.summary-expiring { color: #fff; border-color: #a8460d; background: linear-gradient(145deg, #c65e17, #a8460d); box-shadow: 0 7px 18px #a8460d30; }
.summary-expiring:hover { border-color: #8e390a; box-shadow: 0 9px 20px #a8460d40; }
.summary-top { display: flex; align-items: center; justify-content: space-between; min-height: 27px; }
.summary-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-size: 16px; }
.inventory-icon { color: #e9ecf1; background: #ffffff20; }
.low-icon { color: #fff; background: #ffffff26; }
.expiry-icon { color: #fff; background: #ffffff26; }
.summary-trend, .summary-caption { color: #9ba69d; font-size: 9px; }
.summary-trend { color: #d3d8e1; }
.summary-low-stock .summary-caption { color: #e0edff; }
.summary-expiring .summary-caption { color: #ffead8; }
.summary-number { display: block; margin-top: 12px; font: 700 27px/1 "Manrope", sans-serif; letter-spacing: -.6px; }
.summary-label { display: block; margin-top: 5px; color: #7d8980; font-size: 10px; }
.summary-primary .summary-label { color: #d3d9e2; }
.summary-low-stock .summary-label { color: #e0edff; }
.summary-expiring .summary-label { color: #ffead8; }
.summary-decoration { position: absolute; right: 17px; bottom: -18px; color: #ffffff0e; font-size: 91px; line-height: 1; }
.summary-low-stock .low-decoration { color: #ffffff18; }
.summary-expiring .expiry-decoration { color: #ffffff20; }
.inventory-panel { overflow: hidden; border: 1px solid #c2cad7; border-radius: 14px; background: white; box-shadow: 0 7px 24px rgb(32 40 55 / 0.051); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 21px 22px 14px; }
.panel-heading h2 { margin: 0 0 5px; color: #273143; font: 700 15px/1.3 "Manrope", sans-serif; letter-spacing: -.25px; }
.panel-heading p { margin: 0; color: #929b94; font-size: 10px; }
.inventory-search-row { display: flex; align-items: center; gap: 9px; padding: 0 22px 16px; border-bottom: 1px solid var(--line); }
.inventory-search-row .search-box { min-width: 0; flex: 1; width: auto; }
.inventory-cima-button { flex: 0 0 auto; white-space: nowrap; }
.panel-tools { display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; align-items: center; gap: 10px; width: 100%; height: 80px; padding: 0 16px; border: 1px solid #e6e9ef; border-radius: 10px; color: #829087; background: white; }
.search-box > span { font-size: 20px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.search-box input::placeholder { color: #a5aea7; }
.search-box kbd { flex: 0 0 auto; padding: 3px 5px; border: 1px solid #edf0ec; border-radius: 4px; color: #a2aaa3; background: #fafbfa; font: 9px "DM Sans", sans-serif; }
.filter-button { min-height: 36px; padding: 0 10px; font-size: 10px; }
#active-filter-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: #d48244; }
.filter-tabs { display: flex; align-items: center; gap: 8px; padding: 9px 22px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.filter-tab { position: relative; display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 1px solid #d3d8e1; border-radius: 8px; color: #77847a; background: #fff; box-shadow: 0 1px 4px rgb(32 40 55 / 0.031); cursor: pointer; font-size: 10px; font-weight: 600; transition: box-shadow .16s ease, background .16s ease; }
.filter-tab:hover { background: #fcfcfd; box-shadow: 0 3px 8px rgb(32 40 55 / 0.071); }
.filter-tab span { display: grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; border-radius: 10px; color: #818d83; background: #f0f2f5; font-size: 9px; }
.filter-tab.selected { border-color: #d0d5df; color: var(--green-dark); background: #eef0f4; box-shadow: inset 0 0 0 1px #eef0f4, 0 2px 5px rgb(48 60 81 / 0.063); }
.filter-tab.selected span { color: var(--green); background: #ebedf1; }
.table-head, .medicine-row { display: grid; grid-template-columns: 24px minmax(270px, 3fr) minmax(95px, .55fr) minmax(115px, .7fr) minmax(132px, .6fr); align-items: center; column-gap: 12px; }
.table-head { min-height: 48px; padding: 0 22px; color: #344158; border-bottom: 1px solid #d9dee6; background: #f1f2f5; font-size: 10px; font-weight: 800; letter-spacing: .55px; }
.table-head > span:not(:empty) { width: max-content; padding: 6px 8px; border: 1px solid #d5dae3; border-radius: 6px; color: #344158; background: #e9ecf0; box-shadow: inset 0 1px 1px #ffffffaa; font-size: 10px; font-weight: 800; letter-spacing: .55px; }
.table-head > span:nth-child(2) { margin-left: 41px; }
.table-head > span:last-child { justify-self: center; text-align: center; }
.inventory-bulk-bar { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 22px; border-bottom: 1px solid #edeff3; background: #fff; }
.select-all-medicines, .medicine-select { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: #647268; cursor: pointer; }
.select-all-medicines { font-size: 10px; font-weight: 600; }
.select-all-medicines input, .medicine-select input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); cursor: pointer; }
.selection-status { min-width: 0; flex: 1; color: #929b94; font-size: 9px; }
.delete-selected-button { min-height: 32px; padding-inline: 11px; border-color: #f0d9d5; color: #a04b40; background: #fff9f8; font-size: 9px; }
.delete-selected-button:hover:not(:disabled) { border-color: #dfbcb6; background: #fff2ef; }
.delete-selected-button:disabled { border-color: #ecefeb; color: #a9b0aa; background: #f7f8f9; cursor: not-allowed; }
.medicine-select { justify-content: center; }
.inventory-list { display: grid; gap: 8px; min-height: 90px; padding: 9px 10px; background: #f9fafb; }
.medicine-row { position: relative; height: 96px; min-height: 96px; padding: 8px 12px; border: 1px solid #c2cad7; border-radius: 11px; background: #fff; box-shadow: 0 3px 9px rgb(32 40 55 / 0.035); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.medicine-row:hover { transform: translateY(-1px); border-color: #d9dde5; box-shadow: 0 6px 14px rgb(32 40 55 / 0.063); }
.medicine-name-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.medicine-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
.medicine-icon-sage { color: #4c6082; background: #eaedf1; }
.medicine-icon-peach { color: #b67655; background: #fbede4; }
.medicine-icon-lavender { color: #7d6d96; background: #f0edf6; }
.medicine-copy { display: flex; width: 100%; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; gap: 5px; }
.medicine-title-wrap { display: grid; width: 100%; min-width: 0; gap: 3px; }
.medicine-title { display: -webkit-box; overflow: hidden; width: 100%; max-height: 2.7em; color: #2f3c51; font-size: 11px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.medicine-format { overflow: hidden; width: 100%; color: #909990; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.medicine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.leaflet-link { display: inline-flex; align-items: center; width: max-content; min-height: 25px; padding: 0 9px; border: 1px solid #e0e4eb; border-radius: 7px; color: #41526f; background: #f4f6f8; box-shadow: 0 2px 5px rgb(32 40 55 / 0.063); font-size: 9px; font-weight: 700; text-decoration: none; }
.leaflet-link:hover { border-color: #cbd1dc; color: #334158; background: #eef0f3; box-shadow: 0 3px 8px rgb(32 40 55 / 0.086); }
.lot-toggle { width: max-content; padding: 0; border: 0; color: #516589; background: transparent; cursor: pointer; font: 600 8px "DM Sans", sans-serif; text-align: left; }
.lot-toggle:hover, .lot-toggle:focus-visible { color: #334158; text-decoration: underline; }
.lot-empty { color: #a0a8a1 !important; font-size: 8px !important; }
.lot-details { margin: 0 10px; padding: 13px 15px; border: 1px solid #c2cad7; border-radius: 11px; background: #f7f8f9; box-shadow: 0 3px 9px rgb(32 40 55 / 0.035); }
.lot-details[hidden] { display: none; }
.lot-details-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #536357; font-size: 9px; }
.lot-details-heading > div { display: flex; align-items: center; gap: 8px; }
.lot-details-heading span { color: #9aa39c; font-size: 8px; }
.add-lot-inline { min-height: 36px; padding: 0 13px; border-color: #bbc2ce; color: #35435b; background: #fff; box-shadow: 0 2px 7px rgb(32 40 55 / 0.063); font-size: 10px; font-weight: 700; }
.add-lot-inline:hover, .add-lot-inline:focus-visible { border-color: #7b889f; background: #f1f2f5; box-shadow: 0 3px 10px rgb(32 40 55 / 0.094); }
.lot-empty-detail { margin: 10px 0 0; color: #87938a; font-size: 10px; }
.lot-details-list { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.lot-detail-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, .7fr) minmax(130px, .8fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #c2cad7; border-radius: 7px; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.031); font-size: 9px; }
.lot-detail-batch { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.lot-detail-batch strong { overflow: hidden; color: #49594d; text-overflow: ellipsis; white-space: nowrap; }
.lot-detail-batch small { color: #8b968e; font-size: 8px; }
.lot-detail-quantity { color: #768278; white-space: nowrap; }
.lot-detail-quantity strong { color: #49594d; }
.lot-detail-expiry { color: #768278; }
.lot-detail-actions { display: flex; align-items: center; gap: 7px; }
.lot-action { min-height: 32px; padding: 0 11px; border: 1px solid #bfc5d0; border-radius: 7px; color: #35435b; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.051); cursor: pointer; font: 700 10px "DM Sans", sans-serif; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.lot-action:hover, .lot-action:focus-visible { border-color: #7b889f; background: #f1f2f5; box-shadow: 0 3px 9px rgb(32 40 55 / 0.09); }
.lot-remove-action { border-color: #e6c9c4; color: #a44c42; }
.lot-remove-action:hover, .lot-remove-action:focus-visible { border-color: #d59b92; background: #fff4f2; box-shadow: 0 3px 9px #8f3b2d18; }
.button-danger { border: 1px solid #a9493c; color: #fff; background: #a9493c; }
.button-danger:hover, .button-danger:focus-visible { border-color: #8d382d; background: #8d382d; }
.lot-expired { border-color: #f1ddda; background: #fffaf9; }
.lot-expired .lot-detail-batch small { color: #a44c42; }
.stock-cell { display: flex; align-items: baseline; gap: 5px; }
.stock-cell strong { color: #2e394d; font: 800 17px "Manrope", sans-serif; }
.stock-cell span { color: #738176; font-size: 10px; }
.expiry-cell { display: flex; flex-direction: column; gap: 4px; }
.cell-caption { display: none; }
.expiry-cell strong { color: #3a4962; font-size: 12px; font-weight: 700; }
.expiry-cell > span { color: #bd784a; font-size: 9px; }
.status-cell { display: flex; flex-direction: column; align-items: flex-end; justify-self: end; gap: 3px; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; width: max-content; min-height: 19px; padding: 0 7px; border-radius: 6px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.essential-badge { color: #fff; border: 1px solid #293446; background: linear-gradient(145deg, #38465f, #293446); box-shadow: 0 2px 5px rgb(48 60 81 / 0.141); }
.warning-badge { color: #fff; border: 1px solid #245d9b; background: linear-gradient(145deg, #3479c3, #245b99); box-shadow: 0 2px 5px #245d9b24; }
.danger-badge { color: #a44c42; background: #faeae7; }
.expiry-badge { color: #fff; border: 1px solid #a8460d; background: linear-gradient(145deg, #c65e17, #a8460d); box-shadow: 0 2px 5px #a8460d24; }
.okay-badge { color: #55805b; background: #edf5ec; }
.medicine-name-button { display: inline-flex; align-items: center; width: max-content; max-width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.medicine-name-button small { display: inline-flex; align-items: center; width: max-content; min-height: 25px; padding: 0 9px; border: 1px solid #e0e4eb; border-radius: 7px; color: #41526f; background: #f4f6f8; box-shadow: 0 2px 5px rgb(32 40 55 / 0.063); font-size: 9px; font-weight: 700; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.medicine-name-button:hover small, .medicine-name-button:focus-visible small { border-color: #cbd1dc; background: #eef0f3; box-shadow: 0 3px 8px rgb(32 40 55 / 0.086); }
.medicine-name-button:focus-visible { outline: 2px solid #dadfe7; outline-offset: 3px; }
.mobile-status { display: none; }
.empty-state { display: flex; align-items: center; flex-direction: column; padding: 31px 16px 35px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 10px; border-radius: 50%; color: #738379; background: #f1f2f5; font-size: 21px; }
.empty-state strong { color: #4b5c50; font-size: 11px; }
.empty-state p { margin: 5px 0 0; color: #929b94; font-size: 10px; }
.panel-footer { display: flex; align-items: center; gap: 7px; min-height: 41px; padding: 0 22px; border-top: 1px solid #f0f2ef; color: #99a29b; font-size: 9px; }
.footer-dot { width: 6px; height: 6px; border-radius: 50%; background: #93b38f; }
.text-button { margin-left: auto; padding: 5px 0; border: 0; color: #68776d; background: transparent; cursor: pointer; font-size: 10px; }
.text-button span { margin-left: 3px; font-size: 13px; }
.demo-note { margin: 13px 2px 0; color: #9ba49d; font-size: 9px; }
.care-note { margin: -12px 0 20px; color: #7c897f; font-size: 11px; line-height: 1.5; }
.treatment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.treatment-card, .treatment-empty { min-width: 0; padding: 19px; border: 1px solid #c2cad7; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgb(32 40 55 / 0.051); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.treatment-card:hover, .treatment-empty:hover { box-shadow: 0 8px 20px rgb(32 40 55 / 0.075); }
.treatment-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.treatment-person { display: inline-block; margin-bottom: 7px; color: #718277; font-size: 9px; font-weight: 700; letter-spacing: .3px; }
.treatment-card h2 { margin: 0; color: #2b3648; font: 700 15px/1.35 "Manrope", sans-serif; }
.treatment-card-heading p { margin: 3px 0 0; color: #8e9991; font-size: 10px; }
.treatment-dose { flex: 0 0 auto; padding: 8px 10px; border-radius: 8px; color: #344158; background: #eef0f3; font: 700 12px "Manrope", sans-serif; text-align: center; }
.treatment-dose small { display: block; margin-top: 3px; color: #829185; font: 9px "DM Sans", sans-serif; }
.treatment-schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; margin-top: 15px; padding-top: 13px; border-top: 1px solid #eceef2; }
.treatment-schedule { display: flex; flex: 1 1 auto; align-items: flex-start; gap: 9px; min-width: 0; }
.schedule-icon { color: #738a77; font-size: 17px; line-height: 1; }
.treatment-schedule strong, .treatment-schedule small { display: block; }
.treatment-schedule strong { color: #506257; font-size: 10px; line-height: 1.5; }
.treatment-schedule small { margin-top: 3px; color: #919b94; font-size: 9px; }
.treatment-instructions { margin: 11px 0 0; color: #7e8982; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.treatment-card-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 12px; }
.treatment-card-actions > .button { min-width: 180px; }
.remove-treatment-button { border-color: #ead4d1; color: #a34d43; background: #fff8f6; box-shadow: 0 2px 6px rgb(32 40 55 / 0.035); }
.remove-treatment-button:hover, .remove-treatment-button:focus-visible { border-color: #d8b8b3; background: #fff4f2; box-shadow: 0 4px 10px rgb(32 40 55 / 0.071); }
.treatment-empty { grid-column: 1 / -1; display: flex; align-items: center; flex-direction: column; padding: 27px 18px; text-align: center; }
.treatment-empty strong { color: #4b5c50; font-size: 12px; }
.treatment-empty p { max-width: 360px; margin: 6px 0 0; color: #929b94; font-size: 10px; line-height: 1.5; }
.upcoming-section { margin-top: 27px; padding: 20px 22px 12px; border: 1px solid #c2cad7; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgb(32 40 55 / 0.051); }
.upcoming-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.upcoming-heading .eyebrow { margin-bottom: 4px; }
.upcoming-heading h2 { margin: 0; color: #2b3648; font: 700 15px "Manrope", sans-serif; }
.scheduled-count { color: #829087; font-size: 9px; }
.upcoming-takes-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.upcoming-take { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px; border: 1px solid #c2cad7; border-radius: 10px; background: #fafbfc; box-shadow: 0 3px 8px rgb(32 40 55 / 0.035); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.upcoming-take:hover { background: #fff; box-shadow: 0 5px 12px rgb(32 40 55 / 0.071); }
.upcoming-take time { display: grid; flex: 0 0 52px; gap: 3px; color: #546a90; font-size: 9px; text-align: center; }
.upcoming-take time strong { font-size: 9px; text-transform: capitalize; }
.upcoming-take time span { color: #89958c; }
.upcoming-take > div { display: grid; min-width: 0; gap: 4px; }
.upcoming-take > div strong { overflow: hidden; color: #4e5f53; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-take > div small { overflow: hidden; color: #919b94; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-take .take-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 5px; }
.take-action { min-height: 32px; padding: 0 9px; border: 1px solid #d4d9e2; border-radius: 7px; color: #58655d; background: #fff; box-shadow: 0 2px 5px rgb(32 40 55 / 0.035); cursor: pointer; font-size: 9px; font-weight: 700; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.take-action:hover:not(:disabled) { border-color: #b9c0cd; background: #f8f9fa; box-shadow: 0 3px 8px rgb(32 40 55 / 0.071); }
.take-confirm-action { border-color: #dadee6; color: #344158; background: #f2f4f7; }
.take-omit-action { color: #8a7771; }
.take-action:disabled { color: #aab1ab; background: #f5f6f4; cursor: not-allowed; }
.upcoming-empty { grid-column: 1 / -1; padding: 14px 0; border-top: 1px solid #f0f2ef; color: #919b94; font-size: 10px; line-height: 1.5; }
.treatment-dialog { width: min(560px, calc(100vw - 30px)); }
.treatment-dialog input:not([type=checkbox]), .treatment-dialog select, .treatment-dialog textarea { border-color: #c2cad7; box-shadow: 0 2px 6px rgb(32 40 55 / 0.031); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.treatment-dialog input:not([type=checkbox]):hover, .treatment-dialog select:hover, .treatment-dialog textarea:hover { background: #fcfcfd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.treatment-dialog input:not([type=checkbox]):focus, .treatment-dialog select:focus { border-color: #8390a6; outline: 0; box-shadow: 0 0 0 3px #e9ecf0; }
.treatment-dialog textarea { width: 100%; padding: 10px; resize: vertical; border: 1px solid #c2cad7; border-radius: 7px; outline: 0; color: #2e394d; background: #fff; font: 11px/1.5 "DM Sans", sans-serif; }
.treatment-dialog textarea:focus { border-color: #8390a6; box-shadow: 0 0 0 3px #e9ecf0; }
.weekday-fieldset { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.weekday-fieldset .field-label { margin: 0 0 8px; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-options label { cursor: pointer; }
.weekday-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.weekday-options span { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #e2e6ec; border-radius: 50%; color: #738076; background: #fff; font-size: 10px; font-weight: 700; }
.weekday-options input:checked + span { border-color: #7e8ba1; color: #344158; background: #eef0f3; }
.weekday-options input:focus-visible + span { outline: 3px solid #dadfe7; }
.field-help { display: block; margin-top: 6px; color: #919b94; font-size: 9px; line-height: 1.5; }
#treatment-schedule-fields[hidden] { display: none; }
.treatment-form-message { margin: 12px 0 0; padding: 9px 11px; border: 1px solid #e7bfb6; border-radius: 7px; color: #963e32; background: #fff5f2; font-size: 11px; line-height: 1.45; }

.lot-dialog { width: min(450px, calc(100vw - 30px)); max-height: min(90vh, 720px); padding: 0; overflow-y: auto; border: 1px solid #e8ece7; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgb(31 39 52 / 0.188); }
.lot-dialog::backdrop { background: rgb(27 34 47 / 0.439); backdrop-filter: blur(2px); }
.lot-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-heading h2 { margin: 0; font: 700 20px "Manrope", sans-serif; letter-spacing: -.5px; }
.dialog-heading .eyebrow { margin-bottom: 7px; }
.close-button { width: auto; min-width: 68px; height: 32px; gap: 4px; margin: -3px -5px 0 0; padding: 0 8px; border: 1px solid #e6e9ee; background: #fff; font-size: 13px; }
.close-labeled { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 82px; white-space: nowrap; line-height: 1; }
.close-labeled > span:first-child { font-size: 17px; line-height: 1; }
.close-labeled > span:last-child { font-size: 10px; font-weight: 700; }
.dialog-intro { margin: 10px 0 20px; color: #818c84; font-size: 11px; line-height: 1.5; }
.cima-search { padding: 16px; border: 1px solid #dde1e8; border-radius: 12px; background: #f5f6f8; box-shadow: 0 4px 12px rgb(32 40 55 / 0.043); }
.cima-search-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.cima-search-heading strong, .cima-search-heading span { display: block; }
.cima-search-heading strong { color: #344158; font-size: 12px; }
.cima-search-heading div > span { margin-top: 4px; color: #78887a; font-size: 10px; }
.cima-seal { display: grid !important; place-items: center; width: 22px; height: 22px; border: 1px solid #dbdfe7; border-radius: 7px; color: #4d6183; background: #fff; font: 700 10px "Manrope", sans-serif; }
.cima-search-controls { display: flex; gap: 8px; margin-top: 13px; }
.cima-search-controls input { flex: 1; min-width: 0; height: 46px !important; padding-inline: 13px !important; border-color: #d7dce4 !important; border-radius: 9px !important; background: #fff !important; font-size: 12px !important; }
.cima-search-controls input:focus { border-color: #8490a6 !important; box-shadow: 0 0 0 3px #e4e7ed !important; }
.cima-search-controls .button { min-height: 46px; padding-inline: 15px; border-radius: 9px; font-size: 11px; }
.cima-search-controls .button span { font-size: 17px; line-height: 1; }
.scanner-controls { display: flex; align-items: center; gap: 10px; }
.scan-button { min-height: 46px; padding-inline: 14px; border-color: #c9d0db; color: #334056; background: #e8ebf0; font-size: 11px; }
.scan-button:hover { border-color: #adb5c4; background: #dee2e9; }
.scan-button span { font-size: 16px; line-height: 1; }
.scan-button:focus-visible, .cima-search-controls .button:focus-visible { outline: 3px solid #c8cfda; outline-offset: 2px; }
.scanner-video:not([hidden]) { display: block; width: 100%; max-height: 220px; margin-top: 8px; border-radius: 8px; background: #151b24; object-fit: cover; }
.cima-search-status { margin: 9px 1px 0; color: #748477; font-size: 10px; line-height: 1.45; }
#scanner-status { color: #3a4a64; font-size: 12px; line-height: 1.5; }
html[data-theme="dark"] #scanner-status { color: #c8cfdb; }
.cima-search-results { display: grid; gap: 5px; max-height: 190px; margin-top: 7px; overflow-y: auto; }
.cima-result { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; padding: 9px; border: 1px solid #e5e8ed; border-radius: 7px; color: #435248; background: #fff; cursor: pointer; text-align: left; }
.cima-result:hover, .cima-result:focus-visible { border-color: #a9b1c0; outline: 0; background: #fcfcfd; }
.cima-result strong, .cima-result small { display: block; }
.cima-result strong { font-size: 9px; font-weight: 700; line-height: 1.35; }
.cima-result small { margin-top: 4px; color: #8b968d; font-size: 8px; line-height: 1.4; }
.cima-result-mark { flex: 0 0 auto; color: #77927b; font-size: 14px; }
.manual-entry { margin-top: 12px; border: 1px solid #e2e5eb; border-radius: 10px; background: #fff; box-shadow: 0 3px 9px rgb(32 40 55 / 0.031); }
.manual-entry[open] { border-color: #d5dae3; }
.manual-entry-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 13px; border-radius: 9px; color: #526157; cursor: pointer; list-style: none; }
.manual-entry-summary::-webkit-details-marker { display: none; }
.manual-entry-summary::marker { content: ""; }
.manual-entry-summary:hover { background: #fafafb; }
.manual-entry-summary:focus-visible { outline: 3px solid #dee2e9; outline-offset: 2px; }
.manual-entry-summary strong, .manual-entry-summary small { display: block; }
.manual-entry-summary strong { font-size: 11px; }
.manual-entry-summary small { margin-top: 4px; color: #89958b; font-size: 9px; line-height: 1.4; }
.manual-entry-chevron { flex: 0 0 auto; color: #4e6285; font-size: 18px; transition: transform .15s ease; }
.manual-entry[open] .manual-entry-chevron { transform: rotate(180deg); }
.manual-entry-fields { padding: 1px 13px 14px; border-top: 1px solid #ebeef2; }
.manual-entry-fields > .field-label:first-child { margin-top: 13px; }
.initial-stock-fields { margin-top: 13px; padding: 13px; border: 1px solid #dadfe7; border-radius: 11px; background: #f5f6f8; box-shadow: 0 3px 10px rgb(32 40 55 / 0.043); }
.initial-stock-fields h3 { margin: 0; color: #344158; font: 700 13px "Manrope", sans-serif; }
.initial-stock-fields p { margin: 4px 0 1px; color: #748477; font-size: 10px; line-height: 1.5; }
.initial-stock-fields .field-label { margin-top: 12px; }
.initial-stock-fields input, .initial-stock-fields select { border-color: #cfd5df; box-shadow: inset 0 1px 2px rgb(32 40 55 / 0.039), 0 2px 7px rgb(32 40 55 / 0.043); }
.initial-stock-fields input:focus, .initial-stock-fields select:focus { border-color: #8390a6; box-shadow: 0 0 0 3px #e9ecf0; }
.field-label { display: block; margin: 15px 0 7px; color: #526157; font-size: 10px; font-weight: 700; }
.optional-label { color: #9da69f; font-weight: 400; }
.lot-dialog input:not([type=checkbox]), .lot-dialog select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #c2cad7; border-radius: 7px; outline: 0; color: #2e394d; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.031); font-size: 11px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.lot-dialog input:not([type=checkbox]):hover, .lot-dialog select:hover { background: #fcfcfd; box-shadow: 0 3px 9px rgb(32 40 55 / 0.063); }
.lot-dialog input:focus, .lot-dialog select:focus { border-color: #8390a6; box-shadow: 0 0 0 3px #e9ecf0; }
.lot-dialog input[readonly] { color: #78867c; background: #f6f7f9; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-columns .field-label { margin-top: 13px; }
.essential-toggle { display: flex; align-items: center; gap: 11px; margin: 19px 0 4px; cursor: pointer; }
.essential-toggle > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-ui { position: relative; width: 34px; height: 19px; border-radius: 12px; background: #dfe5df; transition: background .15s ease; }
.toggle-ui::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; content: ""; transition: transform .15s ease; }
.essential-toggle input:checked + .toggle-ui { background: var(--green); }
.essential-toggle input:checked + .toggle-ui::after { transform: translateX(15px); }
.essential-toggle input:focus-visible + .toggle-ui { outline: 3px solid #dadfe7; }
.essential-toggle strong, .essential-toggle small { display: block; }
.essential-toggle strong { color: #4a5c4f; font-size: 10px; }
.essential-toggle small { margin-top: 3px; color: #959e97; font-size: 9px; }
.threshold-label { margin-top: 15px; }
.threshold-input { position: relative; }
.threshold-input input { padding-right: 60px !important; }
.threshold-input span { position: absolute; top: 12px; right: 10px; color: #89948d; font-size: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; padding-top: 15px; border-top: 1px solid #edf0ec; }
.dialog-actions .button { min-width: 94px; }
.movement-history-content { padding: 24px; }
.movement-history-dialog { width: min(650px, calc(100vw - 30px)); }
.movement-history-list { display: grid; gap: 0; max-height: min(60vh, 520px); margin: 0; padding: 0; overflow: auto; list-style: none; }
.movement-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #edf0ec; }
.movement-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.movement-row strong { color: #2e394d; font-size: 12px; }
.movement-row span, .movement-meta time { color: #818c84; font-size: 10px; line-height: 1.5; }
.movement-meta { display: grid; flex-shrink: 0; gap: 4px; text-align: right; }
.movement-meta strong { color: #465878; }
.movement-empty { padding: 20px 0; color: #818c84; font-size: 12px; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; padding: 12px 16px; border-radius: 9px; color: white; background: #2b3649; box-shadow: 0 9px 24px rgb(31 39 52 / 0.188); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; font-size: 11px; }
.toast.visible { opacity: 1; transform: translateY(0); }

.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.overview-metric { display: flex; min-height: 130px; flex-direction: column; align-items: flex-start; padding: 18px; border: 1px solid transparent; border-radius: 12px; color: #fff; box-shadow: 0 6px 16px rgb(32 40 55 / 0.106); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.overview-metric:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgb(32 40 55 / 0.157); }
.overview-metric:focus-visible, .overview-entry:focus-visible, .calendar-day:focus-visible, .calendar-nav-button:focus-visible, .calendar-today-button:focus-visible, .calendar-take:focus-visible { outline: 3px solid #949fb2; outline-offset: 2px; }
.overview-metric span { font-size: 11px; font-weight: 700; }
.overview-metric strong { margin-top: auto; font: 700 31px/1.1 "Manrope", sans-serif; }
.overview-metric small { margin-top: 5px; color: #ffffffda; font-size: 10px; }
.overview-metric-green { background: linear-gradient(145deg, #38465f, #293446); }
.overview-metric-blue { background: linear-gradient(145deg, #3479c3, #245b99); }
.overview-metric-orange { background: linear-gradient(145deg, #c65e17, #a8460d); }
.overview-metric-sage { background: linear-gradient(145deg, #586f97, #41516e); }
.overview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.overview-panel, .calendar-panel { min-width: 0; padding: 19px; border: 1px solid #c2cad7; border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgb(32 40 55 / 0.051); }
.overview-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.overview-panel-heading .eyebrow { margin-bottom: 4px; }
.overview-panel-heading h2 { margin: 0; font: 700 15px "Manrope", sans-serif; }
.overview-panel-heading a { color: var(--green); font-size: 10px; font-weight: 700; text-decoration: none; }
.overview-panel-heading a:hover { text-decoration: underline; }
.overview-list, .calendar-day-takes { display: grid; gap: 8px; }
.overview-entry, .calendar-take { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px; border: 1px solid #c2cad7; border-radius: 9px; color: var(--ink); background: #fbfcfd; box-shadow: 0 2px 7px rgb(32 40 55 / 0.035); text-decoration: none; transition: background .16s ease, box-shadow .16s ease; }
.overview-entry:hover, .calendar-take:hover { background: #f5f7f9; box-shadow: 0 5px 12px rgb(32 40 55 / 0.078); }
.overview-entry > div:first-child, .calendar-take > div { min-width: 0; }
.overview-entry strong, .calendar-take strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.overview-entry small, .calendar-take small { display: block; margin-top: 4px; color: #738176; font-size: 9px; }
.overview-entry time { flex: 0 0 auto; color: #5a6f5e; font-size: 10px; font-weight: 700; line-height: 1.5; text-align: right; }
.overview-entry-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.overview-badge { padding: 4px 6px; border-radius: 5px; color: #fff; font-size: 8px; font-weight: 700; white-space: nowrap; }
.badge-blue { background: #2867aa; }
.badge-orange { background: #b95311; }
.badge-green { background: #344259; }
.overview-empty { padding: 17px 12px; border: 1px dashed #c9d0db; border-radius: 9px; color: #69796d; background: #fafafb; font-size: 11px; line-height: 1.5; }
.calendar-toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 19px; }
.calendar-month-controls { display: flex; align-items: center; gap: 7px; }
.calendar-month-controls h2 { min-width: 150px; margin: 0; font: 700 19px "Manrope", sans-serif; text-align: center; }
.calendar-nav-button, .calendar-today-button { min-width: 34px; min-height: 34px; border: 1px solid #c2cad7; border-radius: 8px; color: #334057; background: #fff; box-shadow: 0 2px 6px rgb(32 40 55 / 0.043); cursor: pointer; font-weight: 700; }
.calendar-nav-button { font-size: 22px; line-height: 1; }
.calendar-nav-button:hover, .calendar-today-button:hover { background: #eff1f5; }
.calendar-today-button { padding: 0 11px; font-size: 10px; }
.calendar-filter-label { display: grid; gap: 5px; color: #394862; font-size: 10px; font-weight: 700; }
.calendar-filter-label select { min-width: 170px; min-height: 36px; padding: 0 9px; border: 1px solid #c2cad7; border-radius: 8px; background: #fff; }
.calendar-profile-select { position: relative; display: block; min-width: 170px; }
.calendar-profile-select .visually-hidden-select { position: absolute; width: 1px; min-width: 0; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.calendar-profile-trigger { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); box-shadow: 0 2px 6px rgb(32 40 55 / 0.035); cursor: pointer; font: inherit; font-size: 11px; text-align: left; }
.calendar-profile-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-profile-trigger:hover, .calendar-profile-trigger[aria-expanded="true"] { border-color: #9eb6d2; box-shadow: 0 4px 10px rgb(32 40 55 / 0.071); }
.calendar-profile-trigger:focus-visible, .calendar-profile-option:focus-visible { outline: 3px solid #7f8ca2; outline-offset: 2px; }
.calendar-profile-options { position: absolute; z-index: 12; top: calc(100% + 6px); right: 0; width: max(100%, 220px); max-height: min(280px, 40vh); overflow: auto; padding: 5px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 12px 28px #17283b24; }
.calendar-profile-option { display: flex; width: 100%; min-height: 40px; align-items: center; padding: 8px 10px; border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; font: inherit; font-size: 12px; text-align: left; }
.calendar-profile-option:hover, .calendar-profile-option[aria-selected="true"] { color: var(--green-dark); background: var(--green-soft); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekdays { margin-bottom: 6px; color: #6b7b6e; font-size: 10px; font-weight: 800; text-align: center; }
.calendar-day { display: flex; min-width: 0; min-height: 72px; flex-direction: column; align-items: flex-start; padding: 9px; border: 1px solid #d6dbe4; border-radius: 8px; color: #2c374a; background: #fff; box-shadow: 0 1px 4px rgb(32 40 55 / 0.031); cursor: pointer; text-align: left; transition: background .16s ease, box-shadow .16s ease; }
.calendar-day:hover { background: #f5f7f9; box-shadow: 0 3px 9px rgb(32 40 55 / 0.071); }
.calendar-day.outside-month { color: #a2afa4; background: #f7f8fa; }
.calendar-day.is-today strong { display: grid; place-items: center; width: 22px; height: 22px; margin: -3px 0 0 -3px; border-radius: 50%; color: #fff; background: var(--green); }
.calendar-day.is-selected { border-color: #394862; background: #eff1f4; box-shadow: inset 0 0 0 1px #394862; }
.calendar-day strong { font-size: 11px; }
.calendar-day-meta { margin-top: auto; color: #627c69; font-size: 9px; }
.calendar-dots { display: flex; gap: 3px; min-height: 5px; margin-top: 4px; }
.calendar-dot { width: 5px; height: 5px; border-radius: 50%; }
.dot-pending { background: #3479c3; }
.dot-confirmed { background: #2c6a4c; }
.dot-omitted { background: #b3a59d; }
.calendar-day-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e0e4eb; }
.calendar-day-panel .overview-panel-heading span { color: #6d7a70; font-size: 10px; }
.calendar-take time { flex: 0 0 43px; color: #35435b; font-size: 12px; font-weight: 800; }
.calendar-take > div { flex: 1; }
.calendar-take-status { flex: 0 0 auto; padding: 5px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.status-pending { color: #265f9a; background: #eaf2fd; }
.status-confirmed { color: #286549; background: #e9f4eb; }
.status-omitted { color: #756a63; background: #f1efed; }
.calendar-footnote { margin: 13px 0 0; color: #718075; font-size: 10px; line-height: 1.5; }
@media (min-width: 1450px) { .content-wrap { padding-top: 52px; } }
@media (max-width: 1120px) {
  .sidebar { width: 218px; padding-inline: 15px; }
  .main-content { margin-left: 218px; }
  .topbar { padding-inline: 32px; }
  .content-wrap { padding-inline: 32px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .heading-actions { flex-wrap: wrap; }
  .table-head, .medicine-row { grid-template-columns: 22px minmax(200px, 3fr) minmax(75px, .55fr) minmax(105px, .7fr) minmax(125px, .6fr); column-gap: 8px; }
  .medicine-row, .table-head { padding-inline: 16px; }
  .status-badge { padding-inline: 6px; font-size: 8px; }
}
@media (max-width: 850px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-columns { grid-template-columns: 1fr; }
  .sidebar { width: 190px; padding-inline: 12px; }
  .main-content { margin-left: 190px; }
  .topbar { padding-inline: 24px; }
  .content-wrap { padding: 34px 24px 40px; }
  .table-head { display: none; }
  .medicine-row { grid-template-columns: 22px minmax(0, 1.5fr) minmax(78px, .6fr); height: auto; min-height: 82px; padding-inline: 18px; }
  .medicine-select { grid-column: 1; grid-row: 1; align-self: start; padding-top: 6px; }
  .medicine-name-cell { grid-column: 2; grid-row: 1; }
  .expiry-cell { grid-column: 2; padding-left: 49px; margin-top: -7px; }
  .status-cell { display: none; }
  .mobile-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 2px; }
  .stock-cell { grid-column: 3; grid-row: 1; justify-self: end; }
  .expiry-cell { grid-row: 2; }
  .cell-caption { display: block; color: #65776a; font-size: 9px; font-weight: 800; line-height: 1.25; letter-spacing: .15px; }
  .treatment-list { grid-template-columns: 1fr; }
  .upcoming-takes-list { grid-template-columns: 1fr; }
  .profile-management { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .overview-grid { gap: 8px; }
  .overview-metric { min-height: 105px; padding: 12px; }
  .overview-metric span { font-size: 10px; }
  .overview-metric strong { font-size: 26px; }
  .overview-metric small { font-size: 8px; }
  .overview-panel, .calendar-panel { padding: 13px; }
  .overview-panel-heading h2 { font-size: 13px; }
  .overview-entry { align-items: flex-start; }
  .overview-entry-badges { max-width: 112px; }
  .calendar-toolbar { align-items: stretch; gap: 11px; }
  .calendar-month-controls { justify-content: space-between; width: 100%; }
  .calendar-month-controls h2 { min-width: 0; font-size: 16px; }
  .calendar-filter-label, .calendar-profile-select { width: 100%; min-width: 0; }
  .calendar-weekdays, .calendar-grid { gap: 3px; }
  .calendar-weekdays { font-size: 8px; }
  .calendar-day { position: relative; min-height: 51px; align-items: center; padding: 5px; text-align: center; }
  .calendar-day strong { position: absolute; top: 50%; left: 50%; margin: 0; font-size: 10px; transform: translate(-50%, -50%); }
  .calendar-day.is-today strong { margin: 0; }
  .calendar-day-meta { display: none; }
  .calendar-dots { align-self: center; margin-top: auto; }
  .calendar-take { gap: 7px; padding: 9px; }
  .calendar-take strong { font-size: 10px; }
  .calendar-take-status { font-size: 8px; }
  body { font-size: 13px; }
  .sidebar { position: relative; inset: auto; display: flex; width: auto; height: 59px; flex-direction: row; align-items: center; padding: 0 16px; border-right: 0; border-bottom: 1px solid #c7cdd9; box-shadow: 0 3px 10px rgb(32 40 55 / 0.063); }
  .brand { gap: 8px; margin: 0; font-size: 19px; }
  .brand-mark { width: 25px; height: 25px; border-radius: 8px; }
  .brand-mark span:first-child { top: 3px; left: 10px; height: 19px; }
  .brand-mark span:last-child { top: 10px; left: 3px; width: 19px; }
  .auth-card { padding: 25px 20px; }
  .auth-brand { gap: 13px; margin-bottom: 26px; font-size: 29px; }
  .auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
  .auth-brand .brand-mark span:first-child { top: 6px; left: 20px; width: 7px; height: 36px; }
  .auth-brand .brand-mark span:last-child { top: 20px; left: 6px; width: 36px; height: 7px; }
  .auth-card #auth-form { gap: 12px; padding: 0; }
  .auth-intro { font-size: 12px; }
  .botiquin-switcher-wrap { width: min(230px, calc(100vw - 155px)); margin: 0 0 0 auto; }
  .space-switcher { min-height: auto; gap: 7px; padding: 0; border: 0; }
  .space-switcher:hover, .space-switcher[aria-expanded="true"] { border-color: transparent; background: transparent; box-shadow: none; }
  .botiquin-switcher-menu { right: 0; left: auto; width: min(300px, calc(100vw - 24px)); }
  .space-avatar { width: 29px; height: 29px; border-radius: 9px; font-size: 11px; }
  .space-copy { gap: 0; }
  .space-copy strong { font-size: 10px; }
  .space-copy small { display: none; }
  .chevron { font-size: 14px; }
  .nav-label, .sidebar-bottom { display: none; }
  .main-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 7px 5px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #e8ece7; background: #ffffffed; box-shadow: 0 -5px 20px rgb(33 41 56 / 0.047); backdrop-filter: blur(12px); }
  .main-nav .nav-link { display: flex; min-height: 48px; flex-direction: column; justify-content: center; gap: 3px; padding: 3px 2px; border-radius: 8px; color: #88928a; font-size: 8px; }
  .main-nav .nav-link.active { color: var(--green); background: #eff1f5; }
  .nav-icon { width: auto; font-size: 17px; }
  #treatments-nav-link .nav-icon { font-size: 25px; }
  .main-content { min-height: calc(100vh - 59px); min-height: calc(100dvh - 59px); margin-left: 0; }
  .topbar { height: 43px; padding: 0 17px; background: transparent; }
  .breadcrumbs { gap: 7px; font-size: 9px; }
  .topbar-actions { gap: 8px; }
  .demo-pill { gap: 5px; padding: 5px 7px; font-size: 8px; }
  .demo-pill > span { width: 5px; height: 5px; }
  .notification-button { width: auto; min-height: 30px; height: 30px; gap: 5px; padding: 0 8px; font-size: 9px; }
  .notification-mark { width: 15px; height: 17px; font-size: 14px; }
  .notification-mark i { top: 0; right: -1px; }
  .mobile-avatar { display: grid; width: 27px; height: 27px; border-radius: 50%; font-size: 10px; }
  .mobile-settings-link { display: inline-grid; width: 30px; height: 30px; border: 1px solid #c2cad7; background: #fff; font-size: 18px; }
  .settings-card { grid-template-columns: 1fr; padding: 16px; }
  .settings-card .button, .settings-card #settings-logout { grid-column: 1; justify-self: start; }
  .content-wrap { padding: 19px 15px calc(92px + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .heading-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 7px; }
  .heading-actions .button { min-width: 0; padding-inline: 7px; font-size: 9px; }
  .eyebrow { margin-bottom: 5px; font-size: 8px; }
  h1 { margin-bottom: 5px; font-size: 25px; }
  .page-intro { max-width: 290px; font-size: 10px; line-height: 1.5; }
  .page-heading .button { min-height: 37px; }
  .summary-grid { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr); gap: 9px; margin: 0 0 17px; padding: 0; overflow: visible; }
  .summary-card { width: 100%; min-width: 0; min-height: 102px; padding: 12px; border-radius: 12px; }
  .summary-icon { width: 24px; height: 24px; border-radius: 8px; font-size: 14px; }
  .summary-top { min-height: 24px; }
  .summary-trend, .summary-caption { max-width: 90px; font-size: 8px; text-align: right; }
  .summary-number { margin-top: 10px; font-size: 24px; }
  .summary-label { margin-top: 4px; font-size: 9px; }
  .summary-decoration { right: 9px; bottom: -14px; font-size: 67px; }
  .inventory-panel { border-radius: 10px; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px 14px 9px; }
  .inventory-search-row { gap: 6px; padding: 0 14px 13px; }
  .inventory-cima-button { min-height: 35px; padding: 0 9px; font-size: 9px; }
  .panel-heading h2 { font-size: 14px; }
  .panel-heading p { font-size: 9px; }
  .panel-tools { width: 100%; gap: 6px; }
  .search-box { flex: 1; width: auto; height: 70px; }
  .search-box input { font-size: 15px; }
  .search-box kbd { display: none; }
  .filter-button { min-height: 35px; }
  .filter-tabs { gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
  .filter-tab { flex: 0 0 auto; min-height: 32px; padding: 0 8px; font-size: 9px; }
  .inventory-bulk-bar { flex-wrap: wrap; gap: 7px 10px; padding: 8px 12px; }
  .select-all-medicines { font-size: 9px; }
  .selection-status { flex: 1 1 90px; text-align: right; }
  .delete-selected-button { width: 100%; min-height: 37px; }
  .inventory-list { gap: 7px; padding: 7px; }
  .medicine-row { grid-template-columns: 22px minmax(0, 1fr) 72px; column-gap: 6px; height: auto; min-height: 89px; padding: 11px 8px; }
  .lot-details { margin: 0 7px; padding: 10px 12px 12px; }
  .lot-detail-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .lot-detail-expiry { grid-column: 1 / -1; }
  .lot-detail-actions { grid-column: 1 / -1; justify-self: end; }
  .medicine-name-cell { align-self: start; gap: 8px; }
  .medicine-symbol { width: 32px; height: 32px; border-radius: 9px; font-size: 17px; }
  .medicine-copy { gap: 4px; }
  .medicine-title { font-size: 10px; }
  .medicine-format { font-size: 8px; }
  .medicine-actions { gap: 5px; }
  .medicine-name-button small, .leaflet-link { min-height: 24px; padding-inline: 8px; font-size: 8px; }
  .mobile-status { gap: 3px; }
  .status-badge { min-height: 20px; padding: 0 6px; font-size: 8px; }
  .expiry-cell { padding-left: 0; margin-top: 0; gap: 3px; }
  .expiry-cell strong { font-size: 11px; }
  .expiry-cell > span { font-size: 8px; }
  .stock-cell { align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 4px; }
  .stock-cell strong { font-size: 15px; }
  .stock-cell span { font-size: 9px; }
  .cell-caption, .expiry-cell .cell-caption { font-size: 9px; }
  .panel-footer { min-height: 38px; padding: 0 12px; font-size: 8px; }
  .text-button { font-size: 9px; }
  .demo-note { max-width: 290px; font-size: 8px; line-height: 1.5; }
  #profile-management-list { grid-template-columns: 1fr; }
  .profile-management { padding: 12px; }
  #create-profile-form { padding: 10px; }
  .avatar-picker-content { padding: 18px; }
  .avatar-picker-options { gap: 6px; padding: 9px; }
  .lot-dialog { border-radius: 13px; }
  .lot-dialog form { padding: 19px; }
.movement-history-content { padding: 19px; }
  .dialog-heading h2 { font-size: 18px; }
  .dialog-intro { font-size: 10px; }
.movement-row { gap: 10px; }
.movement-row span, .movement-meta time { font-size: 9px; }
  .toast { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); left: 12px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6e9ef;
  --muted: #a9b9ae;
  --line: #2e3a4e;
  --paper: #19202b;
  --canvas: #10141b;
  --green: #41526f;
  --green-dark: #4c6082;
  --green-soft: #222a39;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .auth-screen { color: var(--ink); background: var(--canvas); }
html[data-theme="dark"] :is(.sidebar, .topbar, .auth-card, .settings-card, .inventory-panel, .overview-panel, .calendar-panel, .treatment-card, .treatment-empty, .care-profile-card, .medicine-row, .botiquin-switcher-menu, .dialog-content, dialog, .lot-detail-row, .movement-row, .calendar-take, .overview-entry, .profile-management, .auth-session, .auth-account-heading) {
  color: var(--ink); background: #19202b; border-color: #36445c; box-shadow: 0 5px 18px #0004;
}
html[data-theme="dark"] :is(.main-nav, .filter-tabs, .inventory-list, .inventory-bulk-bar, .panel-footer, .table-head, .calendar-toolbar, .calendar-day-panel, .avatar-picker-options, .create-botiquin-form, .help-card, .search-box, .space-switcher, .botiquin-switcher-choice, .profile-avatar-button, .overview-empty, .overview-metric-sage) {
  color: var(--ink); background: #1f2735; border-color: #36445c;
}
html[data-theme="dark"] :is(.button-secondary, .filter-tab, .calendar-nav-button, .calendar-today-button, .mobile-settings-link, .medicine-name-button small, .table-head > span:not(:empty), .search-box kbd, .nav-link.active) {
  color: #dee2e9; background: #283244; border-color: #425371;
}
html[data-theme="dark"] :is(.button-secondary:hover, .filter-tab:hover, .space-switcher:hover, .botiquin-switcher-choice:hover, .nav-link:hover, .medicine-row:hover, .care-profile-card:hover) { color: #f7f8fa; background: #2f3b4f; }
html[data-theme="dark"] :is(input:not([type="checkbox"]), select, textarea) { color: #f1f2f5; background: #151b24; border-color: #41526f; }
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #a8b8ac; }
html[data-theme="dark"] :is(input:disabled, select:disabled, button:disabled) { opacity: .68; }
html[data-theme="dark"] :is(h1, h2, .panel-heading h2, .treatment-card h2, .care-profile-identity strong, .breadcrumbs strong, .settings-card h2, .table-head > span:not(:empty), .medicine-title, .medicine-name, .summary-number, .stock-cell strong) { color: #eff1f5; }
html[data-theme="dark"] :is(.page-intro, .eyebrow, .panel-heading p, .medicine-format, .breadcrumbs, .nav-label, .summary-label, .settings-card p, .settings-card label, .field-label, .cell-caption, .treatment-card-heading p, .account-row small, .space-copy small) { color: #a9baad; }
html[data-theme="dark"] :is(.medicine-icon-sage, .medicine-icon-peach, .medicine-icon-lavender, .space-avatar, .person-avatar, .help-icon) { background: #323f55; color: #e8eaef; }
html[data-theme="dark"] :is(.filter-tab.selected, .botiquin-switcher-choice[aria-current="true"], .nav-link.active) { color: #e9ecf0; background: #2f3c51; }
html[data-theme="dark"] :is(.summary-primary, .summary-low-stock, .summary-expiring, .overview-metric-green, .overview-metric-blue, .overview-metric-orange) { color: #fff; }
html[data-theme="dark"] :is(.summary-primary, .summary-low-stock, .summary-expiring) .summary-label { color: #f1f3f6; }
html[data-theme="dark"] :is(.local-simulator-note, .local-simulator-banner) { color: #f4d9a2; background: #423521; border-color: #79623c; }
html[data-theme="dark"] :is(.remove-profile-dialog .dialog-intro, .treatment-form-message, .auth-message) { color: #f2b2a4; background: #3b2624; border-color: #89554c; }
html[data-theme="dark"] :is(.settings-password-form p, .auth-message:empty) { background: transparent; border: 0; }
html[data-theme="dark"] :is(.lot-details, .upcoming-section, .upcoming-take, .cima-search, .manual-entry, .initial-stock-fields, .calendar-day, .calendar-day.outside-month, .weekday-options span, .cima-result, .close-button, .add-lot-inline, .lot-action, .take-action, .leaflet-link, .filter-tab span, .cima-seal) { color: #e3e6ec; background: #212938; border-color: #3f4f6a; }
html[data-theme="dark"] :is(.calendar-day:hover, .cima-result:hover, .manual-entry-summary:hover, .upcoming-take:hover, .overview-entry:hover) { background: #2a3547; }
html[data-theme="dark"] :is(.medicine-row, .care-profile-card, .calendar-day, .upcoming-take, .cima-result, .lot-dialog) { color: #e6e9ef; }
html[data-theme="dark"] :is(.lot-dialog input:not([type="checkbox"]), .lot-dialog select, .treatment-dialog textarea, .treatment-dialog input:not([type="checkbox"]), .treatment-dialog select) { color: #eff1f5; background: #151b24; border-color: #41526f; }
html[data-theme="dark"] .cima-search-controls input { color: #eff1f5 !important; background: #151b24 !important; border-color: #41526f !important; }
html[data-theme="dark"] :is(.lot-dialog input:not([type="checkbox"]):hover, .lot-dialog select:hover, .treatment-dialog input:not([type="checkbox"]):hover, .treatment-dialog select:hover, .treatment-dialog textarea:hover) { background: #212938; }
html[data-theme="dark"] :is(.medicine-name-button small, .leaflet-link, .add-lot-inline, .lot-action, .take-action) { color: #e2e5eb; }
html[data-theme="dark"] :is(.calendar-day strong, .overview-panel-heading h2, .lot-detail-row strong, .treatment-card strong) { color: #eff1f5; }
html[data-theme="dark"] :is(.members-management, .profile-management form, .profile-management > ul > li, .members-management > ul > li, .botiquin-list li, .avatar-option, .demo-pill, .notification-button, .summary-card:not(.summary-primary):not(.summary-low-stock):not(.summary-expiring)) {
  color: #e6e9ef; background: #1f2735; border-color: #36445c;
}
html[data-theme="dark"] :is(.members-management > ul > li, .profile-management > ul > li, .botiquin-list li, .avatar-option, .demo-pill, .notification-button) { box-shadow: 0 2px 8px #0003; }
html[data-theme="dark"] :is(.members-management > ul > li:hover, .profile-management > ul > li:hover, .botiquin-list li:hover, .avatar-option:hover, .avatar-option.selected, .notification-button:hover) { background: #2a3547; }
html[data-theme="dark"] :is(.profile-management form input:hover, .auth-card input:hover, .profile-caregiver-controls select:hover) { color: #f1f2f5; background: #212938; }
html[data-theme="dark"] :is(.treatment-empty strong, .treatment-empty p, .profile-avatar-label, .profile-management .field-label, .members-management h3, .summary-card:not(.summary-primary):not(.summary-low-stock):not(.summary-expiring) .summary-label) { color: #d4dae3; }
html[data-theme="dark"] :is(.profile-management .profile-caregiver-list li, .care-profile-card .profile-caregiver-list li, .treatment-card-actions, .settings-password-form, .account-row, .panel-footer) { border-color: #36445c; }
html[data-theme="dark"] :is(.remove-profile-button, .remove-treatment-button, .delete-selected-button, .lot-remove-action) { color: #f5b2a5; background: #422b29; border-color: #88564f; }
html[data-theme="dark"] .remove-treatment-button:hover, html[data-theme="dark"] .remove-treatment-button:focus-visible { color: #ffd5ce; background: #50302d; border-color: #a96a60; box-shadow: 0 4px 10px #0004; }
html[data-theme="dark"] :is(.button-secondary:disabled, .filter-tab:disabled, .notification-button:disabled) { color: #aeb7c5; background: #283244; }
html[data-theme="dark"] .sidebar-bottom #settings-nav-link { color: #dee2e9; background: #19202b; border-color: #36445c; box-shadow: 0 5px 16px #0004; }
html[data-theme="dark"] .sidebar-bottom #settings-nav-link:hover { color: #f7f8fa; background: #1f2735; border-color: #7b889f; box-shadow: 0 7px 18px #0005; }
html[data-theme="dark"] .sidebar-bottom #settings-nav-link.active { color: #e9ecf0; background: #293447; border-color: #506487; }
html[data-theme="dark"] .sidebar-bottom #settings-nav-link .nav-icon { color: #78867d; background: transparent; }
html[data-theme="dark"] .summary-card.is-selected { box-shadow: 0 0 0 3px #a5aebe, 0 8px 20px #0005; }
html[data-theme="dark"] :is(.empty-icon, .scan-button, .toggle-ui) { color: #dee2e9; background: #283244; border-color: #425371; }
html[data-theme="dark"] .scan-button:hover { background: #323f56; }
html[data-theme="dark"] .avatar-add-mark { border-color: #19202b; }
html[data-theme="dark"] .weekday-options input:checked + span { color: #fff; background: #3d4d68; border-color: #b0b8c5; box-shadow: 0 0 0 2px rgb(176 184 197 / 0.251); }
html[data-theme="dark"] .weekday-options label:hover span { border-color: #b0b8c5; }
html[data-theme="dark"] .weekday-options input:focus-visible + span { outline: 3px solid #b9c0cd; outline-offset: 2px; }
