:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #163246;
  background: #edf5f7;
  font-synthesis: none;
  --navy: #163246;
  --teal: #087e8b;
  --teal-dark: #056471;
  --mint: #dff4f1;
  --sky: #e7f5fa;
  --line: #d4e3e8;
  --muted: #66808e;
  --danger: #b33f4a;
  --shadow: 0 18px 50px rgba(26, 65, 82, .11);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: linear-gradient(145deg, #078f98 0%, #53bfc0 26%, #d8f0ee 56%, #ffffff 100%); }

.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(4px); pointer-events: none; opacity: .72; }
.ambient-one { width: 420px; height: 420px; top: -210px; right: -145px; background: radial-gradient(circle, #aee6df 0%, transparent 68%); animation: drift 11s ease-in-out infinite alternate; }
.ambient-two { width: 330px; height: 330px; left: -180px; bottom: -130px; background: radial-gradient(circle, #b9ddea 0%, transparent 68%); animation: drift 14s ease-in-out infinite alternate-reverse; }

main { width: min(100%, 680px); margin: auto; padding: 24px 14px 34px; animation: page-in .55s ease-out both; }
.site-clock { position: fixed; z-index: 20; top: 10px; right: 12px; display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px; border: 1px solid rgba(161,211,214,.9); border-radius: 9px; background: rgba(255,255,255,.82); box-shadow: 0 5px 16px rgba(24,69,84,.1); color: #216274; font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; backdrop-filter: blur(10px); }
.site-clock ~ main { padding-top: 54px; }

.hero { display: flex; align-items: center; gap: 13px; padding: 3px 2px 16px; }
.brand-mark { position: relative; width: 46px; height: 46px; flex: 0 0 46px; }
.cross { position: absolute; inset: 4px; display: block; border-radius: 12px; background: linear-gradient(145deg, #0b97a2, #076c79); box-shadow: 0 10px 24px rgba(8, 126, 139, .26), inset 0 1px 1px rgba(255,255,255,.35); }
.cross::before, .cross::after { content: ""; position: absolute; top: 50%; left: 50%; width: 19px; height: 4px; border-radius: 3px; background: #fff; transform: translate(-50%, -50%); }
.cross::after { transform: translate(-50%, -50%) rotate(90deg); }
.pulse-ring { position: absolute; inset: 0; border: 1px solid rgba(8,126,139,.25); border-radius: 15px; animation: pulse 2.8s ease-out infinite; }
.brand-copy { min-width: 0; }
h1 { margin: 0; color: var(--navy); font-size: clamp(1.3rem, 5vw, 1.65rem); font-weight: 760; line-height: 1.14; letter-spacing: -.035em; }

.vitals { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; height: 30px; margin: 0 0 12px; padding: 0 10px; overflow: hidden; border: 1px solid rgba(8,126,139,.12); border-radius: 9px; background: rgba(255,255,255,.52); color: var(--teal); }
.vitals svg { width: 100%; height: 23px; overflow: visible; }
.vitals-line-right { transform: scaleX(-1); }
.vitals path { fill: none; stroke: #18a0a8; stroke-width: 1.7; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; animation: ecg 3.6s linear infinite; }
.vitals span { font-size: .61rem; font-weight: 800; letter-spacing: .12em; text-align: center; white-space: nowrap; }
.monthly-calls-chart { overflow:hidden; margin:0 0 12px; border:1px solid rgba(170,211,213,.9); border-radius:14px; background:linear-gradient(145deg,rgba(255,255,255,.95),rgba(237,249,248,.88)); box-shadow:0 10px 26px rgba(23,79,91,.075); animation:result-in .28s ease-out both; }
.monthly-calls-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px 10px; border-bottom:1px solid #dcebed; background:linear-gradient(115deg,#ebf8f7,#f9fcfc); }
.monthly-calls-head .eyebrow { margin:0 0 2px; color:#087e8b; font-size:.58rem; font-weight:850; letter-spacing:.09em; }
.monthly-calls-head h2 { margin:0; color:#244d5f; font-size:.91rem; }
.monthly-calls-head button { min-height:31px; padding:6px 9px; border:1px solid #b8d8db; border-radius:8px; background:#fff; color:#176574; font-size:.7rem; font-weight:780; transition:transform .16s ease, border-color .16s ease, background .16s ease; }
.monthly-calls-head button:hover { transform:translateY(-1px); border-color:#087e8b; background:#eaf8f7; }
.monthly-calls-controls { display:flex; align-items:center; gap:4px; }
.monthly-calls-controls #monthly-calls-previous, .monthly-calls-controls #monthly-calls-next { min-width:31px; padding:4px 7px; font-size:1.18rem; line-height:1; }
.monthly-calls-controls button:disabled { cursor:default; opacity:.42; transform:none; }
.monthly-calls-body { padding:10px 11px 9px; }
.monthly-calls-legend { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:7px; color:#577482; font-size:.67rem; font-weight:720; }
.monthly-calls-legend span { display:inline-flex; align-items:center; gap:5px; }
.monthly-calls-legend i { width:9px; height:9px; border-radius:3px; }
.monthly-calls-legend .received { background:#5d9fd3; }
.monthly-calls-legend .served { background:#0a9a91; }
.monthly-calls-hint { margin:0 0 4px; color:#6b8691; font-size:.62rem; font-weight:650; }
.monthly-calls-scroll { overflow-x:auto; padding:5px 1px 2px; }
.monthly-calls-bars { display:flex; min-width:630px; height:164px; align-items:stretch; gap:3px; padding:0 2px; border-bottom:1px solid #c8dce1; }
.monthly-call-day { display:grid; min-width:17px; flex:1 1 0; grid-template-rows:minmax(0,1fr) auto; gap:5px; }
.monthly-call-columns { display:flex; min-height:0; align-items:flex-end; justify-content:center; gap:2px; border-radius:4px 4px 0 0; background:linear-gradient(to top,rgba(210,230,234,.25),transparent); }
.monthly-call-bar { width:calc(50% - 1px); min-height:2px; border-radius:4px 4px 1px 1px; transition:height .35s ease; }
.monthly-call-bar.received { background:linear-gradient(to top,#4c92c8,#81b9df); }
.monthly-call-bar.served { background:linear-gradient(to top,#07877f,#35b9a8); }
.monthly-call-day.future .monthly-call-columns { opacity:.26; }
.monthly-call-label { color:#78909a; font-size:.54rem; font-weight:700; line-height:1; text-align:center; }
.monthly-calls-note { min-height:1.1em; margin:7px 1px 0; color:#66808e; font-size:.63rem; line-height:1.35; }

.user-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin: 0 0 10px; padding: 11px 12px; border: 1px solid rgba(202,221,228,.9); border-radius: 13px; background: rgba(255,255,255,.88); box-shadow: 0 7px 20px rgba(31,72,88,.06); color: var(--muted); font-size: .78rem; }
.profile-avatar-wrap { position: relative; align-self: start; padding-bottom: 6px; }
.profile-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #0b97a2, #076c79); color: #fff; box-shadow: 0 8px 18px rgba(8,126,139,.2); font-size: .95rem; font-weight: 800; letter-spacing: .04em; }
.profile-admin-badge { position: absolute; bottom: 0; left: 50%; display: grid; width: 17px; height: 17px; place-items: center; border: 2px solid #fff; border-radius: 5px; background: var(--navy); color: #fff; transform: translateX(-50%); font-size: .58rem; font-weight: 900; line-height: 1; }
.session-user { display: flex; min-width: 0; flex-direction: column; }
.session-user strong { overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; }
.session-user small { margin-top: 2px; color: var(--teal); font-size: .7rem; font-weight: 650; }
.session-actions { display: flex; align-items: center; gap: 6px; }
.session-actions a, .session-actions button { padding: 5px 8px; border: 1px solid #c8dbe1; border-radius: 7px; background: #fff; color: #315467; font-size: .76rem; font-weight: 650; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.session-actions a:hover, .session-actions button:hover { border-color: var(--teal); background: #eef8f8; }

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(24,160,168,.32); outline-offset: 2px; }

.section-search { margin-bottom: 9px; padding: 11px 12px 12px; border: 1px solid rgba(202,221,228,.9); border-radius: 13px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(31,72,88,.055); backdrop-filter: blur(12px); }
.section-search label { display: block; margin: 0 0 6px 2px; color: #456274; font-size: .74rem; font-weight: 750; letter-spacing: .03em; }
.section-search input { min-height: 40px; padding: 8px 12px 8px 36px; background: #f8fbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366808e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 11px center; }

.document-groups, .subactions { display: flex; flex-direction: column; gap: 7px; }
.document-groups { margin-bottom: 10px; }
.category-toggle, .subactions > button { position: relative; min-height: 44px; padding: 9px 13px; overflow: hidden; text-align: left; color: #3a5668; border: 1px solid rgba(202,221,228,.95); border-radius: 12px; background: rgba(255,255,255,.88); box-shadow: 0 7px 18px rgba(31,72,88,.055); font-size: .875rem; font-weight: 620; line-height: 1.3; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.category-toggle::before, .subactions > button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.48) 48%, transparent 70%); transform: translateX(-120%); transition: transform .5s ease; pointer-events: none; }
.category-toggle:hover, .subactions > button:hover { transform: translateY(-2px); border-color: rgba(8,126,139,.55); box-shadow: 0 12px 25px rgba(22,75,91,.11); background: #fff; }
.category-toggle:hover::before, .subactions > button:hover::before { transform: translateX(120%); }
.category-toggle:active, .subactions > button:active, .primary:active, .secondary:active, .copy:active { transform: translateY(0) scale(.985); }
.category-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; }
.category-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.category-copy strong { color: var(--navy); font-size: .9rem; font-weight: 720; transition: color .18s ease; }
.category-copy small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.category-toggle.active { border-color: var(--teal); background: linear-gradient(135deg, #087e8b, #0a9198); color: #fff; box-shadow: 0 12px 28px rgba(8,126,139,.22); }
.category-toggle.active .category-copy strong, .category-toggle.active .category-copy small { color: #fff; }
.panic-entry { border-color: rgba(179,63,74,.35); background: linear-gradient(135deg, #fff, #fff4f5); }
.panic-entry .category-copy strong { color: #a72e3b; }
.subactions { padding: 1px 0 3px 12px; animation: reveal .25s ease-out both; }
.subactions > button { padding-left: 36px; }
.subactions > button::after { content: ""; position: absolute; top: 50%; left: 15px; width: 8px; height: 8px; border: 2px solid #42aeb4; border-radius: 50%; transform: translateY(-50%); transition: background .18s ease, box-shadow .18s ease; }
.subactions > button.active { border-color: var(--teal); background: linear-gradient(135deg, #087e8b, #0a9297); color: #fff; box-shadow: 0 11px 24px rgba(8,126,139,.22); }
.subactions > button.active::after { border-color: #fff; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.16); }
.subactions > .workspace { width: 100%; margin: 1px 0 4px; box-shadow: 0 13px 34px rgba(26,65,82,.1); }
.search-empty { margin: 4px 2px 0; color: var(--muted); font-size: .85rem; }

.icd-shell { width: min(100%, 760px); }
.icd-search-card { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.icd-search-head { padding: 16px; border-bottom: 1px solid #e4eef1; background: linear-gradient(120deg, rgba(231,245,250,.9), rgba(223,244,241,.55)); }
.icd-search-head h2 { margin: 2px 0 4px; font-size: 1.12rem; }
.icd-search-head p:last-child { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.icd-search-box { position: relative; padding: 14px 16px 10px; }
.icd-search-box input { width: 100%; min-height: 46px; padding: 10px 42px 10px 40px; border: 1px solid #bed8de; border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23087e8b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 13px center; color: var(--navy); font-size: 1rem; box-shadow: 0 6px 18px rgba(31,72,88,.055); }
.icd-clear { position: absolute; top: 21px; right: 23px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #66808e; font-size: 1.25rem; line-height: 1; }
.icd-clear:hover { background: #edf7f7; color: var(--teal); }
.icd-status { min-height: 24px; margin: 0; padding: 0 17px 9px; color: var(--muted); font-size: .76rem; }
.icd-results { display: grid; gap: 7px; margin: 0; padding: 0 12px 14px; list-style: none; }
.icd-result { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 12px; border: 1px solid #d9e6ea; border-radius: 11px; background: #fff; animation: result-in .2s ease-out both; }
.icd-code { min-width: 64px; padding: 5px 7px; border-radius: 7px; background: #e4f5f3; color: #056b76; font-size: .8rem; font-weight: 820; text-align: center; letter-spacing: .025em; }
.icd-name { color: #294b5e; font-size: .84rem; font-weight: 620; line-height: 1.42; }
.icd-empty { margin: 0 16px 16px; padding: 24px 15px; border: 1px dashed #c8dce1; border-radius: 11px; background: #f8fbfc; color: var(--muted); font-size: .84rem; text-align: center; }
.icd-footnote { margin: 11px 2px 0; color: var(--muted); font-size: .68rem; line-height: 1.4; text-align: center; }

.care-shell { width: min(100%, 760px); }
.care-card { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.care-card-head { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid #e4eef1; background: linear-gradient(110deg, rgba(231,245,250,.85), rgba(223,244,241,.5)); }
.care-card-head h2 { margin: 2px 0 0; font-size: 1.12rem; }
.care-form { padding: 13px; }
.add-care-item { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: 7px; }
.add-care-item span { font-size: 1.1rem; line-height: 1; }
.care-empty { margin: 10px 2px 2px; padding: 18px 12px; border: 1px dashed #c7dce2; border-radius: 11px; background: #f7fbfc; color: var(--muted); font-size: .8rem; line-height: 1.4; text-align: center; }
.care-items { display: grid; gap: 8px; margin-top: 10px; }
.care-item { overflow: hidden; border: 1px solid rgba(8,126,139,.38); border-radius: 12px; background: #f9fdfd; box-shadow: 0 7px 18px rgba(8,126,139,.06); animation: result-in .22s ease-out both; }
.care-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 44px; padding: 8px 9px; background: linear-gradient(120deg, #eaf7f6, #f4fbfc); }
.care-item-number { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: var(--teal); color: #fff; font-size: .76rem; font-weight: 820; }
.care-item-title { color: #315467; font-size: .84rem; font-weight: 720; line-height: 1.3; }
.care-item-remove { width: 30px; height: 30px; padding: 0; border: 1px solid #e3c5c8; border-radius: 8px; background: #fff8f9; color: #a43d47; font-size: 1rem; line-height: 1; }
.care-item-remove:hover { border-color: #c75d68; background: #fff0f2; }
.care-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 9px; border-top: 1px solid #dcebed; animation: reveal .2s ease-out both; }
.care-details.single { grid-template-columns: 1fr; }
.care-details input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #c7dce2; border-radius: 9px; background: #fff; color: var(--navy); font-size: .82rem; }
.care-form .form-actions { margin-top: 13px; }
.care-result { margin-top: 11px; }
.antibiotics-shell { width: min(100%, 760px); }
.antibiotics-card { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.antibiotics-card-head { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid #e4eef1; background: linear-gradient(110deg, rgba(231,245,250,.85), rgba(223,244,241,.5)); }
.antibiotics-card-head h2 { margin: 2px 0 0; font-size: 1.12rem; }
.antibiotics-form { padding: 13px; }
.antibiotic-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.antibiotic-option { min-height: 48px; padding: 8px; border: 1px solid #c9dde3; border-radius: 10px; background: #f8fcfd; color: #486574; font-size: .78rem; font-weight: 760; line-height: 1.25; transition: .18s ease; }
.antibiotic-option:hover, .antibiotic-option.active { border-color: var(--teal); background: linear-gradient(135deg, #087e8b, #0c9e9d); color: #fff; box-shadow: 0 7px 16px rgba(8,126,139,.2); transform: translateY(-1px); }
.antibiotic-weight-field { max-width: 260px; margin: 13px auto 0; }
.antibiotics-form .error { min-height: 0; margin: 8px 0 0; text-align: center; }
.antibiotic-result { margin: 0 13px 13px; padding: 15px; border: 1px solid #b9ddd8; border-radius: 13px; background: linear-gradient(135deg, #effaf8, #f7fcfd); animation: result-in .22s ease-out both; }
.antibiotic-result h3 { margin: 3px 0 12px; color: #153e50; font-size: 1.05rem; }
.antibiotic-dose, .antibiotic-frequency { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid #d5e9e7; }
.antibiotic-dose span, .antibiotic-frequency span { color: #587482; font-size: .78rem; }
.antibiotic-dose strong, .antibiotic-frequency strong { color: #087e8b; font-size: 1rem; text-align: right; }
.antibiotic-note { margin: 0 15px 15px; color: #66808e; font-size: .72rem; line-height: 1.45; text-align: center; }
.manipulation-dialog { width: min(calc(100% - 24px), 620px); max-height: min(82vh, 720px); padding: 0; overflow: hidden; border: 0; border-radius: 17px; background: #fff; color: var(--navy); box-shadow: 0 28px 80px rgba(18,52,69,.3); }
.manipulation-dialog::backdrop { background: rgba(14,42,57,.46); backdrop-filter: blur(3px); }
.manipulation-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-bottom: 1px solid #e2ecef; background: linear-gradient(120deg, #eaf7f6, #f3fafb); }
.manipulation-dialog-head h2 { margin: 2px 0 0; font-size: 1.08rem; }
.manipulation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: calc(min(82vh, 720px) - 72px); padding: 11px; overflow-y: auto; }
.manipulation-choice { min-height: 43px; padding: 9px 11px; border: 1px solid #d3e3e8; border-radius: 10px; background: #fff; color: #315467; font-size: .8rem; font-weight: 680; line-height: 1.3; text-align: left; transition: transform .16s ease, border-color .18s ease, background .18s ease; }
.manipulation-choice:hover { transform: translateY(-1px); border-color: var(--teal); background: #eef9f8; }

.panic-dialog { width: min(calc(100% - 24px), 480px); padding: 25px 20px 21px; border: 0; border-radius: 19px; background: #fff; color: var(--navy); box-shadow: 0 30px 90px rgba(80,0,10,.38); text-align: center; }
.panic-dialog::backdrop { background: rgba(48,0,7,.68); backdrop-filter: blur(3px); }
.panic-dialog > .notification-close { position: absolute; top: 10px; right: 10px; }
.panic-dialog-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: #b81226; color: #fff; box-shadow: 0 0 0 8px rgba(184,18,38,.11); font-size: 1.55rem; font-weight: 900; }
.panic-dialog h2 { margin: 0 auto 19px; max-width: 400px; color: #7d1722; font-size: 1rem; line-height: 1.42; }
.panic-hold { position: relative; isolation: isolate; width: 100%; min-height: 88px; overflow: hidden; touch-action: none; user-select: none; border: 0; border-radius: 15px; background: #bd1429; color: #fff; box-shadow: 0 13px 30px rgba(180,15,36,.28); font-size: .9rem; font-weight: 850; letter-spacing: .055em; }
.panic-hold::before { content: ""; position: absolute; z-index: -1; inset: 0; background: #720814; transform: scaleX(0); transform-origin: left; }
.panic-hold.holding::before { transform: scaleX(1); transition: transform 3s linear; }
.panic-hold:active { transform: scale(.99); }
.panic-dialog-status { min-height: 20px; margin: 10px 0 0; color: #a72e3b; font-size: .72rem; font-weight: 820; letter-spacing: .06em; }
.global-panic-overlay { position: fixed; z-index: 2000; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px; background: #ce001e; color: #fff; text-align: center; animation: panic-flash .58s steps(2, end) infinite; }
.panic-alert-symbol { display: grid; width: 82px; height: 82px; place-items: center; border: 5px solid #fff; border-radius: 50%; font-size: 3rem; font-weight: 950; line-height: 1; }
.global-panic-overlay h2 { margin: 20px 0 10px; color: #fff; font-size: clamp(1.35rem, 6vw, 2.35rem); line-height: 1.2; }
.global-panic-overlay > p { max-width: 720px; margin: 0; font-size: clamp(1rem, 4vw, 1.35rem); font-weight: 760; line-height: 1.42; }
.panic-call-button { margin-top: 18px; padding: 11px 18px; border: 2px solid #fff; border-radius: 11px; background: #fff; color: #9e0017; box-shadow: 0 10px 24px rgba(74,0,10,.22); font-size: .9rem; font-weight: 850; text-decoration: none; }
.panic-call-button:active { transform: scale(.98); }
.panic-deactivate { position: absolute; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); left: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; }
.panic-deactivate small { max-width: 260px; color: rgba(255,255,255,.88); font-size: .68rem; line-height: 1.25; }
.panic-deactivate button { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.65); border-radius: 7px; background: #090909; color: #fff; font-size: .68rem; font-weight: 850; }
.panic-deactivate button:disabled { cursor: wait; opacity: .8; }
.global-panic-overlay.dispatcher-alert { top: 0; right: 0; bottom: auto; left: 0; min-height: 50dvh; padding: 22px 22px 70px; border-radius: 0 0 24px 24px; box-shadow: 0 22px 70px rgba(91,0,13,.46); }
.global-panic-overlay.dispatcher-alert .panic-alert-symbol { width: 60px; height: 60px; border-width: 4px; font-size: 2.15rem; }
.global-panic-overlay.dispatcher-alert h2 { max-width: 900px; margin: 14px 0 12px; font-size: clamp(1.15rem, 4vw, 2rem); }
.panic-dispatcher-instructions { display: grid; gap: 5px; font-size: clamp(.95rem, 2.5vw, 1.2rem); line-height: 1.3; }
.panic-dispatcher-instructions[hidden] { display: none; }
.panic-mute-button { margin-top: 16px; min-height: 40px; padding: 9px 15px; border: 1px solid rgba(255,255,255,.72); border-radius: 10px; background: rgba(20,0,3,.7); color: #fff; font-size: .82rem; font-weight: 800; }
.panic-mute-button:active { transform: scale(.98); }
.global-panic-overlay.dispatcher-alert .panic-deactivate { bottom: 13px; }

@media (max-height: 620px) {
  .global-panic-overlay.dispatcher-alert { min-height: 58dvh; padding-top: 13px; }
  .global-panic-overlay.dispatcher-alert .panic-alert-symbol { width: 44px; height: 44px; font-size: 1.65rem; }
  .global-panic-overlay.dispatcher-alert h2 { margin: 8px 0; }
  .panic-mute-button { margin-top: 9px; }
}

.planning-shell, .statistics-shell { width: min(100%, 780px); }
.templates-shell { width: min(100%, 860px); display: grid; gap: 12px; }
.template-search-card, .template-section { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.template-search-card { position: relative; padding: 13px; }
.template-search-card label { display: block; margin: 0 0 6px; color: #315467; font-size: .76rem; font-weight: 750; }
.template-search-card input { min-height: 44px; padding-left: 40px; background: #fbfdfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23087e8b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 13px center; }
.template-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px 11px; border-bottom: 1px solid #e1ecef; background: linear-gradient(120deg, #edf8f7, #f8fbfc); }
.template-section-head h2 { margin-top: 2px; }
.template-section-controls { display: flex; align-items: center; gap: 7px; }
.template-count { display: grid; min-width: 32px; height: 32px; padding: 0 8px; place-items: center; border-radius: 10px; background: #dff3f1; color: var(--teal-dark); font-size: .77rem; font-weight: 850; }
.template-create-toggle { min-height: 34px; padding: 7px 10px; border: 1px solid #afd4d5; border-radius: 9px; background: #fff; color: var(--teal-dark); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.template-create-toggle[aria-expanded="true"] { border-color: var(--teal); background: #e8f7f5; }
.template-create-toggle[hidden] { display: none; }
.template-create-form { display: grid; grid-template-columns: minmax(170px,.72fr) minmax(0,1.6fr); gap: 9px; padding: 12px 14px; border-bottom: 1px solid #e5eef0; background: #fbfdfd; }
.template-create-form .field { margin: 0; }
.template-create-form textarea { min-height: 72px; resize: vertical; }
.template-form-actions { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; }
.template-form-actions button { min-height: 40px; }
.template-form-actions .card-message { min-height: 0; margin: 0; }
.template-list { display: grid; gap: 9px; padding: 12px; }
.template-card { overflow: hidden; border: 1px solid #d5e4e8; border-radius: 13px; background: #fff; box-shadow: 0 7px 20px rgba(26,65,82,.055); }
.template-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 12px 8px; }
.template-card h3 { font-size: .91rem; }
.template-card header small { flex: 0 0 auto; color: var(--muted); font-size: .67rem; }
.template-body { margin: 0 12px; padding: 10px 11px; overflow: auto; border: 1px solid #e0eaed; border-radius: 9px; background: #f7fafb; color: #25485a; font: inherit; font-size: .82rem; line-height: 1.48; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.template-body::selection, .template-body *::selection { background: #78d9d2; color: #102f3e; }
.template-card-actions { display: flex; gap: 7px; padding: 9px 12px 11px; }
.template-card-actions button { min-height: 36px; padding: 7px 11px; font-size: .73rem; }
.template-copy.copied { border-color: #158477; background: #e2f6f2; color: #087668; }
.template-delete { border: 1px solid #efcbd0; border-radius: 9px; background: #fff7f8; color: #a72e3b; font-weight: 750; }
.template-empty { margin: 0; padding: 16px; color: var(--muted); font-size: .8rem; text-align: center; }
.template-empty[hidden], .template-create-form[hidden] { display: none; }
.planning-card, .statistics-card { margin-bottom: 11px; overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.plan-two-two { width: calc(100% - 24px); min-height: 43px; margin: 12px; }
.calendar-toolbar { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 8px; padding: 2px 12px 10px; }
.calendar-toolbar h2 { margin: 0; font-size: 1.05rem; text-align: center; }
.calendar-toolbar button { width: 40px; height: 36px; padding: 0; border: 1px solid #c8dce1; border-radius: 9px; background: #f7fbfc; color: var(--teal-dark); font-size: 1.4rem; }
.calendar-weekdays, .shift-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; padding: 0 12px; }
.calendar-weekdays { padding-bottom: 5px; color: var(--muted); font-size: .68rem; font-weight: 750; text-align: center; }
.shift-calendar { padding-bottom: 12px; }
.calendar-spacer { min-width: 0; }
.calendar-day { position: relative; display: flex; min-width: 0; min-height: 72px; align-items: flex-start; flex-direction: column; gap: 3px; padding: 7px; border: 1px solid #d9e6ea; border-radius: 10px; background: #fbfdfe; color: #456274; text-align: left; transition: transform .14s ease, border-color .18s ease, background .18s ease; }
.calendar-day:hover { transform: translateY(-1px); border-color: #6ab6bc; }
.calendar-day > strong { font-size: .8rem; }
.calendar-day.working-day { border-color: #55b5b9; background: linear-gradient(145deg, #e1f5f2, #f0faf9); color: #075f6a; box-shadow: inset 0 0 0 1px rgba(8,126,139,.05); }
.calendar-day.moving-source { border-color: #d19a36; background: #fff6df; }
.shift-label { font-size: .66rem; font-weight: 800; }
.shift-calls { margin-top: auto; padding: 2px 4px; border-radius: 5px; background: #087e8b; color: #fff; font-size: .59rem; font-weight: 800; white-space: nowrap; }
.move-target { margin: auto; color: #26a2aa; font-size: 1.2rem; font-weight: 600; }
.calendar-note { margin: 0; padding: 0 13px 12px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.planning-card > .error { margin: 0; padding: 0 13px 12px; }
.move-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 12px 10px; padding: 8px 9px; border-radius: 9px; background: #fff5dc; color: #7c5a18; font-size: .74rem; font-weight: 680; }
.move-hint button { padding: 4px 7px; border: 1px solid #d6b66e; border-radius: 7px; background: #fff; color: #765315; font-size: .7rem; }
.schedule-dialog > p { color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: center; }
.schedule-dialog form { padding: 0; }
.schedule-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.shift-dialog-actions { display: grid; gap: 8px; margin-top: 14px; }
.shift-dialog-actions button { width: 100%; }

.statistics-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid #e2ecef; background: linear-gradient(120deg, #eaf7f6, #f3fafb); }
.statistics-heading h2 { margin: 2px 0 0; font-size: 1.08rem; }
.shift-hours { display: flex; gap: 5px; padding: 3px; border-radius: 10px; background: #dcebed; }
.shift-hours button { min-height: 33px; padding: 6px 9px; border: 0; border-radius: 8px; background: transparent; color: #587382; font-size: .72rem; font-weight: 750; }
.shift-hours button.active { background: #fff; color: var(--teal-dark); box-shadow: 0 3px 9px rgba(31,72,88,.1); }
.efficiency-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 15px; }
.efficiency-ring { --efficiency: 0deg; position: relative; display: grid; width: 104px; height: 104px; place-content: center; border-radius: 50%; background: conic-gradient(var(--teal) var(--efficiency), #e1ecef 0); text-align: center; }
.efficiency-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.efficiency-ring strong, .efficiency-ring span { position: relative; z-index: 1; }
.efficiency-ring strong { color: var(--navy); font-size: 1.25rem; }
.efficiency-ring span { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.efficiency-panel dl { display: grid; gap: 8px; margin: 0; }
.efficiency-panel dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid #e3ecef; }
.efficiency-panel dt { color: var(--muted); font-size: .74rem; }
.efficiency-panel dd { margin: 0; color: var(--navy); font-size: .9rem; font-weight: 820; }
.today-statistics .panel-heading, .statistics-card > .panel-heading { padding: 13px 14px; }
.today-statistics .panel-heading h2 { margin-top: 2px; font-size: 1rem; }
.counter-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.call-counter { overflow: hidden; border: 1px solid #d6e5e9; border-radius: 11px; background: #fff; }
.counter-add { display: flex; width: 100%; min-height: 70px; align-items: center; justify-content: space-between; gap: 7px; padding: 10px; border: 0; background: linear-gradient(145deg, #f5fbfb, #eaf7f6); color: #315467; text-align: left; }
.counter-add span { font-size: .76rem; font-weight: 720; line-height: 1.3; }
.counter-add b { color: var(--teal); font-size: 1rem; }
.counter-value { display: grid; grid-template-columns: 34px 1fr; align-items: center; border-top: 1px solid #e1ebee; }
.counter-value button { width: 34px; min-height: 34px; padding: 0; border: 0; border-right: 1px solid #e1ebee; background: #fff7f8; color: #a43d47; font-size: 1rem; }
.counter-value strong { color: var(--navy); text-align: center; }
.statistics-note { margin: 0; padding: 0 13px 11px; color: var(--muted); font-size: .69rem; line-height: 1.4; }
.today-statistics > .error { margin: 0; padding: 0 13px 12px; }
.monthly-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.monthly-totals div { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; background: #f0f8f8; }
.monthly-totals span { color: var(--muted); font-size: .68rem; line-height: 1.3; }
.monthly-totals strong { color: var(--teal-dark); font-size: 1.25rem; }
.daily-history { display: grid; gap: 6px; padding: 0 12px 12px; }
.history-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #dbe7ea; border-radius: 9px; background: #fff; }
.history-row strong { color: #315467; font-size: .74rem; }
.history-row span { overflow: hidden; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.history-row b { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #e4f5f3; color: var(--teal-dark); font-size: .76rem; }

.workspace { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: workspace-in .32s ease-out both; }
.workspace-heading { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid #e6eef1; background: linear-gradient(110deg, rgba(231,245,250,.78), rgba(223,244,241,.45)); }
.document-icon { position: relative; width: 34px; height: 38px; flex: 0 0 34px; border: 1.5px solid #52aeb5; border-radius: 7px; background: rgba(255,255,255,.7); }
.document-icon::before { content: ""; position: absolute; top: 8px; left: 8px; width: 16px; height: 2px; border-radius: 2px; background: #52aeb5; box-shadow: 0 6px #8bc7cb, 0 12px #8bc7cb; }
.eyebrow { margin: 0 0 3px; color: var(--teal); font-size: .67rem; font-weight: 800; letter-spacing: .12em; }
h2 { margin: 0; color: var(--navy); font-size: 1.08rem; font-weight: 720; line-height: 1.3; letter-spacing: -.015em; }

form { padding: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
label, legend { color: #294b5e; font-size: .82rem; font-weight: 690; }
input, textarea, select { width: 100%; padding: 9px 11px; color: var(--navy); border: 1px solid #c9dbe2; border-radius: 9px; background: #fbfdfe; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.diagnosis-picker { position: relative; }
.diagnosis-picker input { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23087e8b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.diagnosis-results { position: absolute; z-index: 30; top: calc(100% - 17px); right: 0; left: 0; max-height: 245px; padding: 5px; overflow-y: auto; border: 1px solid #bcd5da; border-radius: 11px; background: #fff; box-shadow: 0 16px 38px rgba(19,54,70,.2); }
.diagnosis-results[hidden] { display: none; }
.diagnosis-option { display: grid; width: 100%; grid-template-columns: 62px minmax(0,1fr); gap: 8px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: #315467; font-size: .76rem; line-height: 1.3; text-align: left; }
.diagnosis-option:hover, .diagnosis-option:focus-visible { background: #eaf7f6; outline: none; }
.diagnosis-option strong { color: var(--teal-dark); font-size: .8rem; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: .67rem; line-height: 1.35; }
input:hover, textarea:hover, select:hover { border-color: #9ebfc9; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(8,126,139,.09); }
input, select { min-height: 41px; }
textarea { min-height: 68px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #90a2ac; }
fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.date-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 7px; }
.date-grid .field { margin: 0; }
.checkbox-field { margin: 3px 0 13px; padding: 10px 11px; border-radius: 9px; background: #f3f9fa; }
.checkbox-field label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.checkbox-field input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--teal); }
.sex-field { margin: 0 0 13px; }
.sex-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:7px; }
.sex-options label { display:flex; align-items:center; justify-content:center; gap:7px; min-height:41px; padding:8px; border:1px solid #c9dbe2; border-radius:9px; background:#fbfdfe; color:#315467; cursor:pointer; transition:border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.sex-options input { width:17px; min-height:0; margin:0; accent-color:var(--teal); }
.sex-options label:has(input:checked) { border-color:var(--teal); background:#eaf8f7; box-shadow:0 0 0 3px rgba(8,126,139,.08); }

.form-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.dispatcher-form-actions { grid-template-columns: 1.35fr .8fr 1fr; }
.dispatcher-form-card input[type="number"] { font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.primary, .copy { border: 0; border-radius: 9px; background: linear-gradient(135deg, #087e8b, #0a959a); color: #fff; box-shadow: 0 8px 18px rgba(8,126,139,.2); font-weight: 700; transition: transform .16s ease, box-shadow .18s ease, filter .18s ease; }
.primary, .secondary { min-height: 42px; padding: 10px 13px; }
.primary:hover, .copy:hover { filter: brightness(1.06); box-shadow: 0 12px 24px rgba(8,126,139,.27); transform: translateY(-1px); }
.secondary { border: 1px solid #c8dbe1; border-radius: 9px; background: #f8fbfc; color: #315467; font-weight: 670; transition: transform .16s ease, border-color .18s ease, background .18s ease; }
.secondary:hover { transform: translateY(-1px); border-color: var(--teal); background: #eef8f8; }
.error { min-height: 1.2em; margin: 0 0 8px; color: var(--danger); font-size: .82rem; }

.result { padding: 17px; border-top: 1px solid #dce9ed; background: linear-gradient(145deg, #f8fcfc, #f1f8fa); animation: result-in .3s ease-out both; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
h3 { margin: 0; color: var(--navy); font-size: .95rem; }
.copy { display: flex; align-items: center; gap: 8px; padding: 8px 11px; font-size: .8rem; }
pre { margin: 0; padding: 13px; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid #d4e3e8; border-left: 3px solid #28a1aa; border-radius: 9px; background: #fff; color: #203f52; box-shadow: 0 5px 15px rgba(30,73,90,.045); font: .95rem/1.55 system-ui, sans-serif; }
.feedback { min-height: 1.2em; margin: 7px 0 0; color: var(--teal); font-size: .8rem; }
.pending { padding: 25px 17px; color: var(--muted); }
.pending p { margin: 0; }
.invalid { border-color: var(--danger); background: #fffafb; box-shadow: 0 0 0 4px rgba(179,63,74,.07); }

.auth-page { display: grid; place-items: center; padding: 16px; }
.auth-shell { width: min(100%, 430px); padding: 0; }
.auth-card, .admin-card { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand > .cross { position: relative; inset: auto; width: 38px; height: 38px; flex: 0 0 38px; }
.auth-card > .auth-brand { padding: 18px 18px 15px; background: linear-gradient(110deg, rgba(231,245,250,.82), rgba(223,244,241,.5)); }
.auth-card > .auth-brand h1 { font-size: 1.18rem; }
.auth-heading { padding: 18px 18px 0; }
.auth-form { padding-top: 13px; }
.auth-submit { width: 100%; }
button:disabled { cursor: wait; opacity: .65; }

.admin-shell { width: min(100%, 820px); display: grid; gap: 14px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 2px 3px; }
.link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; text-decoration: none; }
.admin-card { box-shadow: 0 10px 32px rgba(26,65,82,.08); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #e3ecef; background: #f6fafb; }
.panel-heading h2 { font-size: 1rem; }
.counter { display: grid; min-width: 27px; height: 27px; place-items: center; border-radius: 9px; background: var(--mint); color: var(--teal); font-size: .78rem; font-weight: 800; }
.admin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; }
.admin-form .field { margin: 0; }
.admin-form .error { grid-column: 1 / -1; order: 2; margin: 0; }
.admin-form .primary { grid-column: 1 / -1; }
.users-list { display: grid; gap: 9px; padding: 14px; }
.user-card { display: grid; grid-template-areas: "identity login password actions" "identity department role shift" ". message message message"; grid-template-columns: 86px minmax(0, 1fr) minmax(0, 1fr) minmax(130px, .95fr); align-items: end; gap: 10px; padding: 12px; border: 1px solid #d8e5e9; border-radius: 12px; background: #fbfdfe; }
.user-card .field { margin: 0; }
.user-identity { grid-area: identity; display: flex; min-width: 86px; flex-direction: column; align-items: center; gap: 6px; }
.login-field { grid-area: login; }
.password-field { grid-area: password; }
.department-field { grid-area: department; }
.role-field { grid-area: role; }
.shift-hours-field { grid-area: shift; }
.user-card-actions { display:grid; grid-area:actions; gap:6px; min-width:92px; }
.user-card-actions button { min-height:38px; padding:8px 10px; }
.user-avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; background: linear-gradient(135deg, #087e8b, #0a959a); color: #fff; font-weight: 800; }
.role-badge { padding: 3px 6px; border-radius: 999px; background: #eaf1f4; color: #536d7c; font-size: .65rem; font-weight: 700; }
.role-badge.admin { background: #dff4f1; color: #087e8b; }
.role-badge.dispatcher { background: #e8effb; color: #42679a; }
.current-role { width: fit-content; margin-top: 2px; padding: 2px 7px; border-radius: 999px; background: #e5f3f2; color: #087e8b; font-size: .64rem; font-weight: 800; letter-spacing: .025em; }
.admin-tools { overflow: hidden; }
.admin-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 14px; }
.admin-tool-grid button, .admin-tool-grid a { display:flex; min-height:52px; align-items:center; justify-content:center; padding:10px 12px; border:1px solid #a9d7d5; border-radius:11px; background:linear-gradient(135deg,#f7fcfc,#e4f5f3); color:#176574; box-shadow:0 5px 14px rgba(8,126,139,.07); font-size:.78rem; font-weight:800; line-height:1.3; text-align:center; text-decoration:none; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.admin-tool-grid button:hover, .admin-tool-grid a:hover { transform:translateY(-2px); border-color:#36a2a5; background:#dff4f1; box-shadow:0 10px 22px rgba(8,126,139,.14); }
#brigade-load-report { position:static; overflow:visible; border:1px solid #a9d7d5; border-radius:11px; padding:10px 12px; background:linear-gradient(135deg,#f7fcfc,#e4f5f3); color:#176574; box-shadow:0 5px 14px rgba(8,126,139,.07); font-weight:800; text-align:center; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
#brigade-load-report::before, #brigade-load-report::after { display:none; }
#brigade-load-report:hover { transform:translateY(-2px); border-color:#36a2a5; background:#dff4f1; box-shadow:0 10px 22px rgba(8,126,139,.14); filter:none; }
#brigade-load-report:focus-visible { outline:3px solid rgba(8,126,139,.25); outline-offset:3px; }
#brigade-load-report:active { transform:translateY(0) scale(.985); }
#brigade-load-report:disabled { cursor:wait; opacity:.72; transform:none; }
@keyframes report-ready-pulse { 0%,100% { transform:scale(1); opacity:1; } 50% { transform:scale(1.35); opacity:.58; } }
#transport-request-button, #technical-maintenance-button { border-color:#a9d7d5; background:linear-gradient(135deg,#f7fcfc,#e4f5f3); color:#176574; text-align:center; }
#transport-request-button:hover, #technical-maintenance-button:hover { border-color:#36a2a5; background:#dff4f1; box-shadow:0 10px 22px rgba(8,126,139,.14); }
.technical-maintenance-card .panel-heading { align-items:flex-start; }
.technical-maintenance-card .panel-heading h2 { margin-top:2px; }
.technical-maintenance-form { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:11px; padding:15px; }
.technical-maintenance-form .field { margin:0; }
.maintenance-description, .technical-maintenance-form .error, .technical-maintenance-form .form-actions, .technical-maintenance-form .feedback { grid-column:1 / -1; }
.maintenance-description { margin:0; padding:10px 11px; border-radius:10px; background:#fff9e9; color:#715f38; font-size:.78rem; line-height:1.42; }
.employee-statistics-body { padding:14px; }
.employee-statistics-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,.42fr); gap:10px; }
.employee-statistics-controls .field { margin:0; }
.employee-statistics-body > .error { margin:9px 0 0; }
.employee-statistics-results { display:grid; gap:9px; margin-top:12px; }
.employee-statistics-result { overflow:hidden; border:1px solid #cfe2e5; border-radius:12px; background:#fbfdfe; box-shadow:0 5px 15px rgba(31,72,88,.04); }
.employee-statistics-result header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; border-bottom:1px solid #deebed; background:linear-gradient(110deg,#eef9f8,#fbfdfe); }
.employee-statistics-result header strong, .employee-statistics-result header small { display:block; }
.employee-statistics-result header strong { color:#254d60; font-size:.88rem; }
.employee-statistics-result header small { margin-top:3px; color:#718794; font-size:.68rem; }
.employee-statistics-result header span, .statistics-shift-format { padding:4px 7px; border-radius:8px; background:#dff3f1; color:#087e8b; font-size:.68rem; font-weight:820; white-space:nowrap; }
.employee-statistics-result dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:0; padding:10px; }
.employee-statistics-result dl div, .personal-statistics-grid article { display:flex; min-width:0; flex-direction:column; gap:5px; padding:10px; border-radius:10px; background:#f1f9f9; }
.employee-statistics-result dt, .personal-statistics-grid span { color:#637e8b; font-size:.68rem; font-weight:700; line-height:1.3; }
.employee-statistics-result dd, .personal-statistics-grid strong { margin:0; color:#087e8b; font-size:1.2rem; font-weight:850; font-variant-numeric:tabular-nums; }
.personal-statistics-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; padding:14px; }
.statistics-heading-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.statistics-month-picker { display:flex; align-items:center; gap:6px; color:#5c7785; font-size:.68rem; font-weight:780; white-space:nowrap; }
.statistics-month-picker input { width:126px; min-height:32px; padding:5px 7px; font-size:.74rem; }
.statistics-source-note { margin:0; padding:0 14px 14px; color:#718794; font-size:.72rem; line-height:1.4; }
.employee-statistics-overview > .error { margin:0; padding:0 14px 14px; }
.transport-request-card { overflow:hidden; }
.transport-request-card .panel-heading { align-items:flex-start; }
.transport-request-card .panel-heading h2 { margin-top:2px; }
.transport-request-form { padding:15px; }
.transport-date-field { width:min(100%, 300px); }
.transport-cars { display:grid; gap:10px; margin-top:13px; }
.transport-car { overflow:hidden; border:1px solid #cce1e5; border-radius:13px; background:#fbfdfe; box-shadow:0 5px 16px rgba(26,65,82,.045); }
.transport-car > header { display:flex; align-items:center; gap:9px; padding:10px 12px; border-bottom:1px solid #dce9ec; background:linear-gradient(115deg,#eef9f8,#f8fbfc); }
.transport-car > header p { margin:0 0 1px; color:#66808e; font-size:.61rem; font-weight:800; letter-spacing:.08em; }
.transport-car > header h3 { color:#215063; font-size:.9rem; }
.transport-car-number { display:grid; width:29px; height:29px; place-items:center; border-radius:9px; background:#087e8b; color:#fff; font-size:.84rem; font-weight:850; }
.transport-doctor-rows { display:grid; gap:8px; padding:10px; }
.transport-doctor-row { display:grid; grid-template-columns:minmax(190px,1.6fr) minmax(80px,.6fr) minmax(80px,.6fr) minmax(145px,1fr) minmax(170px,1.25fr) auto; gap:7px; align-items:end; padding:8px; border:1px solid #dce9ec; border-radius:10px; background:#fff; }
.transport-doctor-row .field { margin:0; gap:3px; }
.transport-doctor-row label { font-size:.68rem; }
.transport-doctor-row input, .transport-doctor-row select { min-height:38px; height:38px; padding:7px 8px; font-size:.82rem; }
.transport-add-doctor { width:calc(100% - 20px); min-height:37px; margin:0 10px 10px; border:1px solid #50b88b; border-radius:9px; background:#effbf5; color:#197554; font-size:.77rem; font-weight:800; transition:transform .16s ease, background .16s ease, box-shadow .16s ease; }
.transport-add-car { width:100%; min-height:42px; margin-top:10px; border:1px dashed #53aaa8; border-radius:11px; background:#f2faf9; color:#087e8b; font-size:.82rem; font-weight:800; transition:transform .16s ease, border-color .16s ease, background .16s ease; }
.transport-add-car:hover { transform:translateY(-1px); border-color:#087e8b; background:#e4f5f3; }
.transport-add-doctor:hover { transform:translateY(-1px); background:#ddf7e9; box-shadow:0 6px 13px rgba(36,145,99,.14); }
.transport-remove-doctor { min-height:38px; padding:7px 10px; border:1px solid #e7c0c4; border-radius:9px; background:#fff6f7; color:#a43844; font-size:.71rem; font-weight:750; }
.transport-request-actions { width:min(100%, 470px); margin-top:3px; }
.transport-result { padding:15px; border-top:1px solid #dce9ed; background:linear-gradient(145deg,#f8fcfc,#f1f8fa); }
@media (max-width:900px) { .transport-doctor-row { grid-template-columns:repeat(2,minmax(0,1fr)); } .transport-doctor-row .field:first-child { grid-column:1 / -1; } .transport-remove-doctor { grid-column:1 / -1; } }
@media (max-width:520px) { .transport-request-form, .transport-result { padding:13px; } .transport-doctor-row { grid-template-columns:1fr; } .transport-doctor-row .field:first-child, .transport-remove-doctor { grid-column:auto; } .transport-request-actions { width:100%; } }
.admin-tools > .card-message { min-height: 20px; padding: 0 14px 10px; }
.top-employees-card { overflow:hidden; }
.top-employees-card .panel-heading { align-items:flex-start; }
.top-employees-card h2 { margin-top:2px; }
.top-employees-rule { padding:4px 7px; border-radius:8px; background:#e0f4f1; color:#087e8b; font-size:.67rem; font-weight:800; white-space:nowrap; }
.top-employees-list { display:grid; gap:8px; padding:12px 14px; }
.top-employee { display:grid; grid-template-columns:31px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border:1px solid #d7e7e9; border-radius:11px; background:#fbfdfe; }
.top-employee-place { display:grid; width:31px; height:31px; place-items:center; border-radius:9px; background:#e6f2f3; color:#567482; font-size:.84rem; font-weight:850; }
.top-employee.top-1 .top-employee-place { background:#fff0be; color:#9a6b00; }
.top-employee.top-2 .top-employee-place { background:#e8eff2; color:#5d707a; }
.top-employee.top-3 .top-employee-place { background:#f6e5d8; color:#935d38; }
.top-employee strong, .top-employee small { display:block; }
.top-employee strong { overflow:hidden; color:#294b5e; font-size:.84rem; text-overflow:ellipsis; white-space:nowrap; }
.top-employee small { margin-top:3px; color:#718794; font-size:.66rem; }
.top-employee b { color:#087e8b; font-size:.78rem; white-space:nowrap; }
.low-employees-section { border-top:1px solid #dce9ec; }
.low-employees-section h3 { margin:0; padding:13px 14px 3px; color:#315467; font-size:.91rem; }
.low-load-employee { border-color:#eadfbd; background:#fffdf8; }
.low-load-employee .top-employee-place { background:#fff2d7; color:#a06d19; }
.card-message { grid-area: message; min-height: 1.1em; margin: 0; color: var(--teal); font-size: .76rem; }
.card-message.failed { color: var(--danger); }

.notice-badge { display: inline-grid; min-width: 19px; height: 19px; margin-left: 4px; padding: 0 5px; place-items: center; border-radius: 999px; background: #c43f4c; color: #fff; font-size: .68rem; font-weight: 850; line-height: 1; }
.notification-toast { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: flex; width: min(calc(100% - 32px), 390px); flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #a9d8d2; border-radius: 13px; background: #effbf8; color: #294b5e; box-shadow: 0 18px 48px rgba(22,65,82,.2); animation: result-in .3s ease-out both; }
.notification-toast strong { color: #087e8b; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.notification-toast span { font-size: .9rem; line-height: 1.4; }
.notification-bell { position: relative; display: grid; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; place-items: center; border: 1px solid #c8dbe1; border-radius: 11px; background: linear-gradient(145deg, #fff, #f1f8f9); color: var(--teal); box-shadow: 0 5px 14px rgba(31,72,88,.07); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.notification-bell:hover { transform: translateY(-1px); border-color: var(--teal); box-shadow: 0 8px 18px rgba(8,126,139,.13); }
.notification-bell.has-unread svg { animation: bell-ring 2.8s ease-in-out infinite; transform-origin: 50% 15%; }
.notification-bell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-count { position: absolute; top: -6px; right: -6px; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border: 2px solid #fff; border-radius: 999px; background: #c43f4c; color: #fff; font-size: .62rem; font-weight: 850; line-height: 1; }
.notification-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(17,46,61,.34); backdrop-filter: blur(2px); animation: fade-in .2s ease-out both; }
.notification-panel { position: fixed; z-index: 31; top: 12px; right: 12px; bottom: 12px; display: flex; width: min(calc(100% - 24px), 410px); flex-direction: column; overflow: hidden; border: 1px solid rgba(178,211,219,.95); border-radius: 18px; background: #f7fbfc; box-shadow: 0 24px 80px rgba(17,46,61,.28); animation: panel-in .28s ease-out both; }
.notification-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; border-bottom: 1px solid #dce9ed; background: linear-gradient(125deg, #fff, #e5f5f2); }
.notification-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; place-items: center; border: 1px solid #c8dbe1; border-radius: 10px; background: rgba(255,255,255,.85); color: #466575; font-size: 1.35rem; line-height: 1; transition: border-color .18s ease, color .18s ease, transform .18s ease; }
.notification-close:hover { transform: rotate(4deg); border-color: var(--teal); color: var(--teal); }
.notification-list { display: grid; gap: 8px; padding: 12px; overflow-y: auto; }
.notification-item { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px; border: 1px solid #d8e6ea; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(31,72,88,.04); }
.notification-item.unread { border-color: #8dcbd0; background: linear-gradient(135deg, #fff, #eef9f8); }
.notification-item.unread::after { content: ""; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #c43f4c; box-shadow: 0 0 0 3px rgba(196,63,76,.09); }
.notification-item-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #e2f4f2; color: #087e8b; font-size: .92rem; font-weight: 850; }
.notification-item.department_changed .notification-item-icon { background: #e8f1fa; color: #376f9b; }
.notification-item.password_changed .notification-item-icon { background: #fff2dd; color: #a06d19; font-size: 1.2rem; }
.notification-item.personal_data_changed .notification-item-icon { background: #eef0fb; color: #5d64a1; }
.notification-item.shift_hours_changed .notification-item-icon { background:#e7f5fb; color:#27759b; }
.notification-item.maintenance .notification-item-icon { background:#fff2d4; color:#a06d19; }
.notification-item p { margin: 1px 14px 4px 0; color: #294b5e; font-size: .84rem; font-weight: 680; line-height: 1.4; }
.notification-item time { color: var(--muted); font-size: .69rem; font-weight: 600; }
.notification-empty { margin: auto; padding: 30px 20px; color: var(--muted); text-align: center; }
.notifications-open { overflow: hidden; }

.emergency-shell { width: min(100%, 920px); display: grid; gap: 10px; }
.page-header { position: relative; display: flex; min-height: 68px; align-items: center; gap: 11px; padding: 11px 14px; overflow: hidden; border: 1px solid rgba(180,216,222,.8); border-radius: 16px; background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(223,244,241,.86)); box-shadow: 0 9px 28px rgba(26,65,82,.07); }
.page-header::after { content: ""; position: absolute; top: -48px; right: -28px; width: 140px; height: 140px; border: 24px solid rgba(8,126,139,.045); border-radius: 50%; pointer-events: none; }
.page-title-mark { position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.page-title-mark .cross { inset: 0; border-radius: 11px; }
.page-title-copy { position: relative; z-index: 1; min-width: 0; }
.back-link { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid #c8dbe1; border-radius: 12px; background: rgba(255,255,255,.9); color: var(--teal); box-shadow: 0 6px 18px rgba(31,72,88,.07); font-size: 1.75rem; line-height: 1; text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.back-link:hover { transform: translateX(-2px); border-color: var(--teal); background: #fff; }
.information-card, .filter-card { overflow: hidden; border: 1px solid rgba(199,220,227,.95); border-radius: 15px; background: rgba(255,255,255,.92); box-shadow: 0 10px 32px rgba(26,65,82,.07); }
.information-card { margin-bottom: 10px; padding: 14px 16px; border-left: 4px solid #18a0a8; color: #35576a; }
.information-card p { margin: 0 0 11px; font-size: .91rem; line-height: 1.5; }
.information-card p:last-of-type { margin-bottom: 8px; }
.information-card ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 0; padding-left: 20px; }
.information-card li { padding-left: 2px; color: #294b5e; font-size: .86rem; line-height: 1.4; }
.information-card li::marker { color: var(--teal); }
.emergency-form-card { border-radius: 15px; }
.emergency-form-card .workspace-heading { padding: 12px 15px; background: linear-gradient(110deg, rgba(220,244,241,.86), rgba(231,245,250,.72)); }
.emergency-form-card form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; padding: 14px 15px 15px; }
.emergency-form-card .field { gap: 5px; margin-bottom: 10px; }
.emergency-form-card .field:first-child, .emergency-form-card .residence-field, .emergency-form-card .workplace-field, .emergency-form-card .diagnosis-picker, .emergency-form-card .date-fields, .emergency-form-card .error, .submit-notice { grid-column: 1 / -1; }
.patient-name-fields { display:grid; grid-column:1 / -1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.patient-name-fields .field { margin:0; }
.emergency-form-card .patient-name-fields .field:first-child { grid-column:auto; }
.emergency-form-card label { display: flex; align-items: center; gap: 6px; font-size: .78rem; }
.emergency-form-card label::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #22a5ad; box-shadow: 0 0 0 3px rgba(34,165,173,.09); }
.emergency-form-card input, .emergency-form-card select { height: 42px; min-height: 42px; padding: 8px 11px; border-color: #c7dce2; border-radius: 10px; background: #fff; box-shadow: inset 0 1px 2px rgba(31,72,88,.025); }
.emergency-form-card input[readonly] { color: #466575; border-color: #d4e4e8; background: linear-gradient(135deg, #eef6f7, #f5fafb); font-weight: 650; }
.field-note { margin: 1px 0 0; padding: 7px 9px; border-left: 2px solid #55b5b9; border-radius: 0 7px 7px 0; background: #f0f8f8; color: var(--muted); font-size: .7rem; line-height: 1.38; }
.workplace-field .field-note { width:100%; text-align:justify; text-align-last:left; }
.emergency-form-card .sex-field { margin:0 0 10px; padding:0; }
.emergency-form-card .sex-field legend { margin-bottom:5px; font-size:.78rem; }
.emergency-form-card .sex-options { gap:5px; margin-top:0; }
.emergency-form-card .sex-options label { min-height:32px; padding:5px 7px; border-radius:8px; font-size:.71rem; }
.emergency-form-card .sex-options label::before { display:none; }
.emergency-form-card .sex-options input { width:14px; }
.date-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.date-fields .field { margin-bottom: 10px; }
.submit-notice { position: relative; width: 100%; min-height: 43px; padding: 9px 14px; overflow: hidden; }
.submit-notice::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.25) 48%, transparent 66%); transform: translateX(-130%); transition: transform .55s ease; }
.submit-notice:hover::after { transform: translateX(130%); }
.sent-dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sent-dialog-actions .secondary, .sent-dialog-actions .primary { min-height:40px; }

.filter-card { margin-bottom: 12px; }
.filter-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr); gap: 0 12px; padding: 13px 15px 15px; }
.filter-form > .date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.filter-form > .field { margin-bottom: 12px; }
.filter-actions { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.filter-actions button { min-height: 40px; padding: 8px 10px; }
.notice-list-card { overflow: visible; }
.notices-list { display: grid; gap: 8px; padding: 12px; }
.notice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; padding: 12px; border: 1px solid #d5e4e9; border-left: 4px solid #e0a84b; border-radius: 12px; background: #fffdf8; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.notice-row.confirmed { border-color: #a9d8c5; border-left-color: #2b9c6e; background: #effaf5; }
.notice-row-heading { display: flex; grid-column: 1 / -1; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid rgba(195,215,222,.7); }
.notice-row-heading h3 { overflow-wrap: anywhere; }
.notice-number { display:grid; width:25px; height:25px; flex:0 0 25px; place-items:center; border-radius:50%; background:linear-gradient(145deg,#0b97a2,#076c79); color:#fff; box-shadow:0 4px 10px rgba(8,126,139,.2); font-size:.68rem; font-weight:850; }
.notice-row-heading time { flex: 0 0 auto; color: var(--muted); font-size: .72rem; font-weight: 650; }
.notice-data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 12px; }
.notice-data { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.notice-data:nth-child(6), .notice-data:nth-child(7), .notice-data:nth-child(9) { grid-column: span 2; }
.notice-data span { color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .025em; }
.notice-data strong { overflow-wrap: anywhere; color: #294b5e; font-size: .78rem; font-weight: 650; line-height: 1.35; }
.notice-row-actions { display: flex; min-width: 108px; align-self: end; flex-direction: column; gap: 7px; }
.notice-row-actions button { min-height: 38px; padding: 8px 10px; }
.confirmed-button { border: 1px solid #8ccbb0; border-radius: 9px; background: #dff4e9; color: #267a58; font-weight: 750; }
.confirmed-button:disabled { cursor: default; opacity: 1; }
.danger-button { border: 1px solid #e2bdc1; border-radius: 9px; background: #fff7f8; color: #a53843; font-weight: 720; transition: transform .16s ease, border-color .18s ease, background .18s ease; }
.danger-button:hover { transform: translateY(-1px); border-color: #c75d68; background: #fff0f2; }
.empty-state { margin: 0; padding: 26px 16px; color: var(--muted); text-align: center; }
.notice-list-card > .error { margin: 0; padding: 0 14px 12px; }

.sent-dialog { width: min(calc(100% - 28px), 430px); padding: 22px; border: 0; border-radius: 17px; background: #fff; color: var(--navy); box-shadow: 0 28px 80px rgba(18,52,69,.3); }
.sent-dialog::backdrop { background: rgba(14,42,57,.46); backdrop-filter: blur(3px); }
.success-mark { display: grid; width: 48px; height: 48px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: #dff4e9; color: #21845e; font-size: 1.45rem; font-weight: 900; }
.sent-dialog h2 { text-align: center; }
.sent-dialog dl { display: grid; gap: 9px; margin: 17px 0; }
.sent-dialog dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #e1eaed; }
.sent-dialog dt { color: var(--muted); font-size: .75rem; font-weight: 650; }
.sent-dialog dd { margin: 0; overflow-wrap: anywhere; color: #294b5e; font-size: .86rem; font-weight: 700; }
.sent-dialog button { width: 100%; min-height: 42px; }
.delete-mark { display: grid; width: 48px; height: 48px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: #fff0f2; color: #b33f4a; font-size: 1.5rem; font-weight: 800; }
.delete-dialog > p:not(.error) { margin: 13px 0 8px; color: #526d7b; font-size: .86rem; line-height: 1.48; text-align: center; }
.delete-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
@keyframes workspace-in { from { opacity: 0; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes result-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { opacity: .65; transform: scale(.88); } 70%,100% { opacity: 0; transform: scale(1.2); } }
@keyframes ecg { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(18px,14px,0) scale(1.06); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-in { from { opacity: 0; transform: translateX(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes bell-ring { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(10deg); } 90% { transform: rotate(-9deg); } 94% { transform: rotate(6deg); } 98% { transform: rotate(-3deg); } }
@keyframes panic-flash { 0%, 100% { background-color: #a90018; } 50% { background-color: #ff1734; } }

@media (max-width: 430px) {
  main { padding: 13px 10px 24px; }
  .hero { gap: 10px; padding-bottom: 12px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .vitals { margin-bottom: 9px; }
  .vitals { gap: 6px; padding-inline: 7px; }
  .vitals span { font-size: .56rem; letter-spacing: .07em; }
  .user-panel { grid-template-columns: auto minmax(0, 1fr) auto; }
  .session-actions { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .session-actions a, .session-actions button { text-align: center; }
  .section-search { padding: 9px 10px 10px; }
  .document-groups, .subactions { gap: 6px; }
  .category-toggle, .subactions > button { min-height: 40px; padding: 8px 11px; }
  .subactions > button { padding-left: 34px; }
  .workspace-heading, form, .result { padding: 13px; }
  .form-actions { grid-template-columns: 1fr; }
  .result-heading { align-items: stretch; flex-direction: column; }
  .copy { justify-content: center; }
  .admin-header { align-items: stretch; flex-direction: column; }
  .admin-form { grid-template-columns: 1fr; }
  .user-card { grid-template-areas: "identity" "login" "password" "department" "role" "shift" "message" "actions"; grid-template-columns: 1fr; }
  .admin-form .primary { min-width: 0; }
  .user-identity { min-width: 0; flex-direction: row; justify-content: flex-start; }
  .emergency-shell { padding-top: 11px; }
  .page-header { gap: 9px; }
  .page-header h1 { font-size: 1.3rem; }
  .page-title-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .information-card { padding: 13px 14px; }
  .information-card ul { grid-template-columns: 1fr; gap: 5px; }
  .emergency-form-card form, .filter-form { grid-template-columns: 1fr; }
  .emergency-form-card .field { grid-column: 1; }
  .date-fields, .filter-form > .date-fields { grid-template-columns: 1fr; gap: 0; }
  .filter-actions { grid-template-columns: 1fr; }
  .notice-row { grid-template-columns: 1fr; }
  .notice-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-data:nth-child(6), .notice-data:nth-child(7), .notice-data:nth-child(9) { grid-column: 1 / -1; }
  .notice-row-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .sent-dialog { padding: 19px 16px; }
  .sent-dialog dl div { grid-template-columns: 1fr; gap: 2px; }
  .notification-toast { right: 10px; bottom: 10px; width: calc(100% - 20px); }
  .notification-panel { top: 58px; right: 8px; bottom: 8px; width: calc(100% - 16px); border-radius: 17px; }
  .notification-panel-header { padding: 14px; }
  .icd-search-head { padding: 13px; }
  .icd-search-box { padding: 11px 11px 8px; }
  .icd-clear { top: 18px; right: 17px; }
  .icd-results { padding: 0 9px 11px; }
  .icd-result { gap: 8px; padding: 9px; }
  .care-card-head { padding: 13px; }
  .care-form { padding: 10px; }
  .care-details { grid-template-columns: 1fr; }
  .antibiotic-choice { grid-template-columns: 1fr; }
  .manipulation-list { grid-template-columns: 1fr; }
  .calendar-weekdays, .shift-calendar { gap: 3px; padding-right: 8px; padding-left: 8px; }
  .calendar-day { min-height: 59px; padding: 5px 4px; border-radius: 8px; }
  .shift-label { font-size: .58rem; }
  .shift-calls { padding: 2px 3px; font-size: .52rem; }
  .statistics-heading { align-items: stretch; flex-direction: column; }
  .shift-hours { display: grid; grid-template-columns: 1fr 1fr; }
  .efficiency-panel { gap: 13px; }
  .efficiency-ring { width: 92px; height: 92px; }
  .counter-list { grid-template-columns: 1fr; }
  .counter-add { min-height: 53px; }
  .monthly-totals { gap: 5px; }
  .monthly-totals div { padding: 8px; }
  .history-row { grid-template-columns: 82px minmax(0, 1fr) auto; }
}

@media (max-width: 620px) {
  .template-create-form { grid-template-columns: 1fr; }
  .template-form-actions { align-items: stretch; flex-direction: column; }
  .template-form-actions button { width: 100%; }
  .template-card > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .template-section-head { align-items: flex-start; }
  .template-section-controls { align-items: flex-end; flex-direction: column; }
  .template-create-toggle { min-height: 32px; padding: 6px 8px; }
}

@media (hover: none) and (pointer: coarse) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.dispatcher-shell { width: min(100%, 1120px); display: grid; gap: 12px; }
.dispatcher-form-card { overflow: hidden; border: 1px solid #cbdfe4; border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: 0 12px 36px rgba(26,65,82,.08); }
.dispatcher-form-card form { padding: 15px; }
.dispatcher-form-card fieldset { margin-bottom: 13px; }
.dispatcher-form-card legend { color: var(--navy); font-size: .9rem; }
.dispatcher-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dispatcher-fields-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dispatcher-fields .field { margin: 0; }
.dispatcher-report { padding: 19px; overflow: hidden; border: 1px solid #bfd7dd; border-radius: 16px; background: #fff; color: #173b4d; box-shadow: 0 16px 42px rgba(26,65,82,.1); }
.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #0b8791; }
.report-brand { display: flex; align-items: center; gap: 11px; }
.report-cross { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #087e8b; color: #fff; font-size: 1.7rem; font-weight: 500; }
.report-brand p, .report-date span { margin: 0; color: #67808d; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.report-brand h1 { margin-top: 2px; font-size: 1.25rem; }
.report-date { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.report-date strong { font-size: 1rem; }
.report-summary { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.report-summary article { display: flex; min-height: 84px; flex-direction: column; justify-content: space-between; padding: 11px; border: 1px solid #d6e5e9; border-radius: 11px; background: linear-gradient(145deg, #f8fbfc, #eef7f6); }
.report-summary span { color: #607986; font-size: .68rem; font-weight: 700; line-height: 1.3; }
.report-summary strong { color: #087e8b; font-size: 1.55rem; }
.report-analytics { display: grid; grid-template-columns: 1.4fr 1.4fr .8fr .8fr; gap: 9px; margin-top: 10px; }
.report-analytics article { min-height: 130px; padding: 12px; border: 1px solid #d6e5e9; border-radius: 11px; }
.comparison-card h2 { margin-bottom: 13px; font-size: .82rem; }
.compare-bars { display: grid; gap: 11px; }
.compare-bars > div { display: grid; gap: 4px; }
.compare-bars span { display: flex; justify-content: space-between; color: #607986; font-size: .67rem; }
.compare-bars i { display: block; height: 8px; overflow: hidden; border-radius: 9px; background: #e6eff2; }
.compare-bars em { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #087e8b, #36b9ae); }
.compare-bars > div:nth-child(2) em { background: #8da8b2; }
.load-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: linear-gradient(145deg, #f2faf9, #fff); }
.load-card span, .load-card small { color: #607986; font-size: .65rem; font-weight: 700; }
.load-card strong { margin: 6px 0 3px; color: #087e8b; font-size: 2rem; }
.report-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 13px; padding-top: 9px; border-top: 1px solid #d8e5e9; color: #718794; font-size: .64rem; }
.pdf-actions { display: flex; align-items: center; gap: 12px; }
.pdf-actions button { min-width: 190px; }
.pdf-actions span { color: #087e8b; font-size: .78rem; font-weight: 700; }

@media (max-width: 700px) {
  .dispatcher-fields, .dispatcher-fields-wide, .report-analytics, .technical-maintenance-form { grid-template-columns: 1fr; }
  .employee-statistics-result dl, .personal-statistics-grid, .employee-statistics-controls { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-heading { align-items: flex-start; flex-direction: column; }
  .report-date { align-items: flex-start; }
}

@page { size: A4 landscape; margin: 10mm; }
@media print {
  html, body { width: 297mm; min-height: 210mm; background: #fff !important; }
  body { padding: 0; }
  .no-print, .ambient { display: none !important; }
  main.dispatcher-shell { display: block; width: auto; max-width: none; padding: 0; }
  .dispatcher-report { display: block !important; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .report-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .report-analytics { grid-template-columns: 1.4fr 1.4fr .8fr .8fr; }
  .report-summary article, .report-analytics article { break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

.doctor-load-fieldset { overflow-x: auto; }
.doctor-load-labels, .doctor-load-row { display: grid; grid-template-columns: minmax(230px,2.2fr) repeat(5,minmax(82px,.75fr)) 34px; gap: 7px; align-items: end; min-width: 800px; }
.doctor-load-labels { padding: 0 2px 6px; color: #607986; font-size: .67rem; font-weight: 750; }
.doctor-rows { display: grid; gap: 7px; }
.doctor-load-row { padding: 8px; border: 1px solid #d6e5e9; border-radius: 11px; background: #f8fbfc; }
.doctor-load-row .field { gap: 3px; margin: 0; }
.doctor-load-row label { display: none; }
.doctor-load-row input, .doctor-load-row select { min-height: 38px; height: 38px; padding: 7px 9px; }
.doctor-load-row input.load-value-low { border-color: #db6470; background: #fff1f2; color: #9f2636; box-shadow: inset 0 0 0 1px rgba(190,57,73,.1); }
.doctor-load-row input.load-value-good { border-color: #43aa83; background: #edfbf4; color: #146a4f; box-shadow: inset 0 0 0 1px rgba(28,142,99,.1); }
.remove-doctor { width: 34px; min-height: 38px; padding: 0; border: 1px solid #e2bdc1; border-radius: 9px; background: #fff7f8; color: #a53843; font-size: 1.2rem; }
.add-doctor { width: 100%; margin-top: 9px; }
.doctor-totals { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 13px 0; }
.doctor-totals div { display: flex; min-height: 67px; flex-direction: column; justify-content: space-between; padding: 10px; border: 1px solid #bcded9; border-radius: 10px; background: #eff9f7; }
.doctor-totals span { color: #607986; font-size: .66rem; line-height: 1.25; }
.doctor-totals strong { color: #087e8b; font-size: 1.3rem; }
.report-doctors { margin-top: 12px; }
.report-doctors h2 { margin-bottom: 7px; font-size: .88rem; }
.report-doctor-table { overflow-x: auto; border: 1px solid #d6e5e9; border-radius: 10px; }
.report-doctor-head, .report-doctor-row { display: grid; grid-template-columns: minmax(220px,2fr) repeat(5,minmax(80px,.7fr)); min-width: 720px; }
.report-doctor-head { background: #087e8b; color: #fff; }
.report-doctor-head span, .report-doctor-row span, .report-doctor-row strong { padding: 8px; font-size: .68rem; }
.report-doctor-row { border-top: 1px solid #dce8eb; }
.report-doctor-row:nth-child(even) { background: #f3f8f9; }
.report-doctor-row strong { font-weight: 700; }

@media (max-width:700px) {
  .doctor-load-labels { display:none; }
  .doctor-load-row { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .doctor-load-row .doctor-select { grid-column:1 / -1; }
  .doctor-load-row label { display:block; }
  .remove-doctor { grid-column:1 / -1; width:100%; }
  .doctor-totals { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.reports-history-shell { width:min(100%,1050px); display:grid; gap:12px; }
.report-history-filter, .report-history-card { overflow:hidden; border:1px solid #cedfe4; border-radius:15px; background:rgba(255,255,255,.95); box-shadow:0 10px 32px rgba(26,65,82,.07); }
.report-history-filter form { display:grid; grid-template-columns:minmax(190px,1fr) auto auto; gap:9px; align-items:end; padding:14px; }
.report-history-filter .field { margin:0; }
.reports-history-list { display:grid; gap:10px; padding:12px; }
.history-report { overflow:hidden; border:1px solid #d4e4e8; border-radius:13px; background:#fbfdfe; }
.history-report > header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; border-bottom:1px solid #dce8eb; background:linear-gradient(120deg,#f5fbfa,#fff); }
.history-report h2 { margin-top:2px; font-size:1rem; }
.history-report-author { display:flex; flex-direction:column; align-items:flex-end; gap:2px; text-align:right; }
.history-report-author strong { color:#315467; font-size:.76rem; }
.history-report-author time { color:var(--muted); font-size:.68rem; }
.history-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; padding:11px; }
.history-metrics div { display:flex; min-height:57px; flex-direction:column; justify-content:space-between; padding:8px; border:1px solid #d9e7ea; border-radius:9px; background:#fff; }
.history-metrics span { color:var(--muted); font-size:.63rem; line-height:1.25; }
.history-metrics strong { color:#087e8b; font-size:1.12rem; }
.history-details { border-top:1px solid #dce8eb; }
.history-details summary { padding:10px 13px; cursor:pointer; color:#087e8b; font-size:.76rem; font-weight:750; }
.history-doctor-table { overflow-x:auto; padding:0 10px 10px; }
.history-doctor-head, .history-doctor-row { display:grid; grid-template-columns:minmax(230px,2fr) repeat(5,minmax(78px,.7fr)); min-width:700px; }
.history-doctor-head { border-radius:8px 8px 0 0; background:#087e8b; color:#fff; }
.history-doctor-head span, .history-doctor-row span, .history-doctor-row strong { padding:7px 8px; font-size:.68rem; }
.history-doctor-row { border:1px solid #dbe7ea; border-top:0; background:#fff; }
.history-doctor-row:nth-child(odd) { background:#f3f8f9; }
.history-no-doctors { margin:0; padding:12px; color:var(--muted); font-size:.74rem; text-align:center; }

@media(max-width:600px){
 .report-history-filter form { grid-template-columns:1fr; }
 .history-report > header { align-items:flex-start; flex-direction:column; }
 .history-report-author { align-items:flex-start; text-align:left; }
 .history-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.report-edit-window { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; padding:11px 12px; border:1px solid #9cd2cb; border-radius:11px; background:linear-gradient(120deg,#e9f8f5,#f8fcfc); }
.report-edit-window > div { display:flex; min-width:0; flex-direction:column; gap:3px; }
.report-edit-window strong { color:#087e8b; font-size:.82rem; }
.report-edit-window span { color:#526f7c; font-size:.74rem; }
.report-edit-window button { flex:0 0 auto; }
.dispatcher-note-field { margin-top: 13px; }
.dispatcher-note-field label { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.dispatcher-note-field label span { color:#66808e; font-size:.72rem; font-weight:650; }
.dispatcher-note-field textarea { min-height:108px; max-height:260px; resize:vertical; }
.report-dispatcher-note { margin-top:14px; padding:13px; border:1px solid #bcded9; border-radius:11px; background:#f2faf8; }
.report-dispatcher-note h2 { margin:0 0 7px; color:#087e8b; font-size:.9rem; }
.report-dispatcher-note p { margin:0; white-space:pre-wrap; color:#315467; font-size:.82rem; line-height:1.48; }
.history-report-actions { display:flex; justify-content:flex-end; padding:9px 11px 11px; border-top:1px solid #dce8eb; }
.history-report-actions a { min-height:36px; padding:7px 11px; font-size:.73rem; }
@media(max-width:600px){.report-edit-window{align-items:stretch;flex-direction:column}.report-edit-window button{width:100%}}
