/* =====================  Вход с заставкой Нейрона (auth-ui.js)  ===================== */
.auth-screen{position:relative;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 16px;overflow:hidden;background:radial-gradient(900px 600px at 15% 10%,#e9e7fe 0%,transparent 60%),radial-gradient(700px 500px at 90% 90%,#d6f0e5 0%,transparent 60%),#f3f2fd}
.auth-glow{position:absolute;inset:auto;width:520px;height:520px;border-radius:50%;background:radial-gradient(circle,rgba(169,159,240,.45),transparent 65%);top:50%;left:50%;transform:translate(-50%,-50%);animation:auth-glow 2.4s ease-out forwards;pointer-events:none}
@keyframes auth-glow{0%{opacity:0;transform:translate(-50%,-50%) scale(.6)}40%{opacity:1}100%{opacity:.55;transform:translate(-50%,-62%) scale(1.15)}}

.auth-splash{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:-14px;z-index:2;pointer-events:none;animation:auth-splash 2.2s cubic-bezier(.6,0,.2,1) both}
.auth-neuron{width:120px;height:120px;object-fit:contain;filter:drop-shadow(0 12px 20px rgba(84,72,190,.28));animation:auth-pop .9s cubic-bezier(.2,1.5,.4,1) both,auth-float 4s ease-in-out 1s infinite}
.auth-hello{position:absolute;top:100%;margin:4px 0 0;white-space:nowrap;font-size:12px;font-weight:700;color:#3f3592;animation:auth-hello 2.2s ease forwards}
.auth-spark{position:absolute;width:14px;height:14px;background:#f6d36b;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);animation:auth-spark 1.6s ease-in-out .3s infinite}
.auth-spark.s1{top:10px;left:-10px}.auth-spark.s2{top:40px;right:-18px;animation-delay:.7s;width:10px;height:10px}.auth-spark.s3{bottom:60px;left:-24px;animation-delay:1.1s;width:9px;height:9px}
@keyframes auth-pop{0%{opacity:0;transform:scale(.3) rotate(-25deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes auth-float{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-8px) rotate(-4deg)}}
@keyframes auth-spark{0%,100%{opacity:0;transform:scale(.4)}50%{opacity:1;transform:scale(1.1) rotate(45deg)}}
@keyframes auth-hello{0%,25%{opacity:0;transform:translateY(8px)}45%,70%{opacity:1;transform:none}100%{opacity:0}}
/* сначала Нейрон крупно в центре экрана, потом «садится» над карточкой входа */
@keyframes auth-splash{0%,60%{transform:translateY(32vh) scale(1.9)}100%{transform:none}}

.auth-card{position:relative;z-index:1;width:100%;max-width:420px;margin-top:0;padding:28px;border-radius:28px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border:1px solid #e1def8;box-shadow:0 30px 70px rgba(63,53,146,.16);display:flex;flex-direction:column;gap:14px;opacity:0;animation:auth-card .7s cubic-bezier(.2,1,.3,1) 1.6s forwards}
@keyframes auth-card{0%{opacity:0;transform:translateY(30px)}100%{opacity:1;transform:none}}
.auth-brand{display:flex;align-items:center;gap:12px}
.auth-brand .brand-mark{width:42px;height:42px;flex:0 0 42px;border-radius:13px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#14b8a6,#4f46e5)}
.auth-brand .brand-mark .icon{width:22px;height:22px}
.auth-brand b{display:block;font-size:16px}
.auth-brand small{font-size:12px;color:var(--muted)}
.auth-card h1{margin:4px 0 0;font-size:28px}
.auth-demo-warning{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:14px;background:#fff7e0;border:1px solid #f1d58f;font-size:12.5px;line-height:1.4;color:#5c4400}
.auth-demo-warning .icon{width:16px;height:16px;flex:0 0 16px;margin-top:1px;color:#a15c00}
.auth-form{display:flex;flex-direction:column;gap:8px}
.auth-form label{font-size:14px;font-weight:600;margin-top:4px}
.auth-form input{height:48px;padding:0 14px;border-radius:14px;border:1.5px solid var(--line-strong);font:inherit;font-size:16px;background:#fff}
.auth-form input:focus{outline:none;border-color:#7c6fd6;box-shadow:0 0 0 4px rgba(124,111,214,.15)}
.auth-form .btn{margin-top:10px;min-height:50px;justify-content:center;font-size:16px}
.auth-demo{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.auth-demo>span{grid-column:1/-1;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.auth-demo button{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:#fff;font:inherit;text-align:left;cursor:pointer;color:var(--ink)}
.auth-demo button:hover{border-color:#7c6fd6;background:#f6f5ff}
.auth-demo .icon{grid-row:1/3;width:22px;height:22px;color:#7c6fd6}
.auth-demo b{font-size:14px}
.auth-demo small{font-size:11px;color:var(--muted)}
.auth-more{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;margin-top:2px}
.auth-more>small{font-size:11px;color:var(--muted)}
.auth-more>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.auth-more button{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:7px 10px;border-radius:12px}
.auth-more button b{font-size:12px}
.auth-more button small{font-size:10.5px}
.auth-note{display:flex;gap:8px;align-items:flex-start;margin:0;font-size:12px;color:var(--muted)}
.auth-note .icon{width:14px;height:14px;flex:0 0 14px;margin-top:1px}
.auth-logout{display:inline-flex;align-items:center;gap:6px}
.auth-logout .icon{width:16px;height:16px}
body.auth-welcome #app{animation:auth-welcome .8s ease}
@keyframes auth-welcome{0%{opacity:0;transform:scale(.985)}100%{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.auth-splash,.auth-card,.auth-neuron,.auth-glow,.auth-hello{animation-duration:.01s!important;animation-delay:0s!important}}

/* =====================  Живой алерт у врача (alerts-live.js)  ===================== */
.alert-live{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px;background:rgba(40,12,18,.35);backdrop-filter:blur(2px);animation:alert-fade .2s ease}
@keyframes alert-fade{from{opacity:0}to{opacity:1}}
.alert-live-card{width:100%;max-width:460px;padding:22px;border-radius:24px;background:#fff;border:2px solid #e05a5a;box-shadow:0 30px 80px rgba(160,30,30,.35);display:flex;flex-direction:column;gap:12px;animation:alert-pop .35s cubic-bezier(.2,1.4,.4,1)}
.alert-live-card.is-escalated{border-color:#a12a2a}
@keyframes alert-pop{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
.alert-live-head{display:flex;align-items:center;gap:12px}
.alert-live-head>div{flex:1;min-width:0}
.alert-live-head .eyebrow{color:#c03838}
.alert-live-head b{display:block;font-size:20px}
.alert-live-pulse{width:48px;height:48px;flex:0 0 48px;border-radius:50%;display:grid;place-items:center;background:#fdecec;color:#c03838;animation:alert-pulse 1.2s ease-out infinite}
.alert-live-pulse .icon{width:26px;height:26px}
@keyframes alert-pulse{0%{box-shadow:0 0 0 0 rgba(224,90,90,.55)}100%{box-shadow:0 0 0 18px rgba(224,90,90,0)}}
.alert-live-close{width:36px;height:36px;border-radius:50%;border:0;background:var(--tile);cursor:pointer;font-size:14px;color:var(--muted)}
.alert-live-card p{margin:0;font-size:15px;line-height:1.45}
.alert-live-meta{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.alert-live-meta .icon{width:15px;height:15px}
.alert-live-actions{display:flex;flex-wrap:wrap;gap:10px}
.alert-live-actions .btn{flex:1;justify-content:center;min-height:46px}
