:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203941;
  background: #f3f6f7;
  --brand: #008b92;
  --line: #e2e9eb;
  --muted: #6b8188;
}
body { background: #f3f6f7; }
#app { max-width: 1680px; margin: 0 auto; min-height: 100vh; border: 0; border-radius: 0; background: #f6f8f9; }
.app-header { min-height: 92px; padding: 18px 32px; gap: 28px; }
.logo { width: 110px; height: 54px; }
.brand-label { border-left: 1px solid var(--line); padding-left: 26px; letter-spacing: .1em; font-size: 10px; font-weight: 600; }
.brand-label small { letter-spacing: 0; color: #233f48; font-size: 14px; margin-top: 3px; }
.header-status { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-left: auto; color: #62787d; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #36ae92; box-shadow: 0 0 0 4px #36ae9215; }
.header-profile { margin-left: 18px; border-left: 1px solid var(--line); padding-left: 24px; }
.header-profile>div { font-weight: 600; }
.header-profile small { font-weight: 400; font-size: 11px; }
.header-profile button { border: 0; background: #f1f5f5; font-size: 12px; }
.app-body { grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 146px); }
#navigation { background: #183c44; padding: 32px 16px 24px; gap: 7px; }
.nav-label { font-size: 9px; letter-spacing: .14em; color: #93afb4; padding: 0 14px 16px; }
#navigation a { color: #b7cbd0; display: flex; align-items: center; gap: 12px; padding: 13px 14px; font-size: 13px; font-weight: 500; border-radius: 10px; }
#navigation a:hover { background: #ffffff0a; color: white; }
#navigation a[aria-current=page] { background: #2c5961; color: white; box-shadow: inset 3px 0 #62d5c3; }
#navigation svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#navigation .nav-count { margin-left: auto; color: #d0e3e4; background: #ffffff12; border-radius: 5px; min-width: 22px; text-align: center; font-size: 10px; }
.nav-bottom { margin-top: auto; padding: 30px 12px 0; color: #c8dbde; font-size: 11px; line-height: 2; }
.nav-bottom .status-dot { margin-right: 9px; }
.nav-bottom small { color: #809fa5; font-size: 10px; margin-top: 5px; }
#main { padding: 34px 38px 48px; }
h1 { font-size: 29px; line-height: 1.25; letter-spacing: -.035em; font-weight: 650; color: #183840; }
h2 { font-weight: 600; letter-spacing: -.02em; }
h3 { font-weight: 600; }
.title { margin-bottom: 26px; }
.title p { font-size: 13px; margin-top: 9px; }
button, input, select, textarea { border-radius: 10px; }
button { min-height: 42px; font-weight: 500; transition: background .15s, box-shadow .15s; }
button.primary, .primary-link { background: #008b92; border-color: #008b92; box-shadow: 0 3px 8px #008b9217; color: #fff; }
.primary-link { display: inline-block; border-radius: 10px; padding: 12px 17px; font-size: 12px; font-weight: 600; text-decoration: none; }
.primary-link:hover, button.primary:hover { background: #007c83; text-decoration: none; }
input, select, textarea { min-height: 44px; border-color: #dde6e8; }
input::placeholder, textarea::placeholder { color: #92a1a7; }
input[type=search] { padding-left: 17px; background: #fff; }
.filters { gap: 12px; margin-bottom: 22px; }
.filters input[type=search] { max-width: 420px; }
.card { border: 1px solid #e5ebed; border-radius: 16px; padding: 22px; box-shadow: 0 3px 12px #153b4503; }
.stats { gap: 16px; }
.stats .card { padding: 24px; }
.stats .card:first-child { background: #e8f4f2; border-color: #d6ebe6; }
.stats .amount.large { font-size: 32px; font-weight: 600; letter-spacing: -.04em; }
.table-wrap { border-radius: 16px; border-color: #e4e9eb; }
th { background: #f0f5f5; color: #6b858b; font-size: 11px; letter-spacing: .02em; }
td, th { padding: 19px 18px; }
tbody tr:hover { background: #fbfdfd; }
.person { font-weight: 500; gap: 12px; }
.person small { font-weight: 400; font-size: 11px; margin-top: 3px; }
.avatar { width: 44px!important; height: 44px!important; min-width: 44px; max-width: 44px; flex-basis: 44px; border: 2px solid white; box-shadow: 0 0 0 1px #e3e9eb; }
.avatar.large { width: 76px!important; height: 76px!important; min-width: 76px; max-width: 76px; flex-basis: 76px; }
.badge { border-radius: 7px; padding: 5px 9px; font-size: 10px; font-weight: 500; background: #e7f5f1; color: #327e6c; }
.badge.warm { background: #fff2df; color: #a27637; }
.team-summary { display: flex; justify-content: space-between; gap: 30px; align-items: center; background: #e8f1ef; border: 1px solid #dce9e6; border-radius: 18px; padding: 30px 32px; margin-bottom: 28px; }
.eyebrow { font-size: 10px; letter-spacing: .09em; font-weight: 600; color: #50847f; text-transform: uppercase; }
.team-summary h2 { margin: 8px 0; color: #264b4a; font-size: 24px; }
.team-summary p { color: #6a8584; font-size: 12px; max-width: 440px; }
.team-number { display: flex; align-items: center; gap: 18px; padding-left: 36px; border-left: 1px solid #cbddd8; }
.team-number strong { font-size: 56px; font-weight: 500; letter-spacing: -.06em; color: #3a766d; line-height: 1; }
.team-number span { font-size: 11px; color: #76918b; white-space: nowrap; }
.team-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.doctor-card { background: white; border: 1px solid #e0e8e9; border-radius: 18px; overflow: hidden; transition: box-shadow .2s; }
.doctor-card:hover { box-shadow: 0 8px 25px #123b480b; }
.doctor-top { min-height: 112px; background: #edf2f2; padding: 24px 26px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.doctor-card:nth-child(2n) .doctor-top { background: #f4f0e9; }
.doctor-photo { width: 100px; height: 100px; object-fit: cover; border: 5px solid white; border-radius: 22px; margin-bottom: -20px; box-shadow: 0 5px 12px #143c440a; }
.room-tag { font-size: 10px; background: #ffffffb5; color: #7b9094; padding: 5px 9px; border-radius: 6px; }
.doctor-copy { padding: 32px 26px 0; }
.doctor-copy h2 { font-size: 20px; margin: 5px 0 8px; }
.doctor-copy h2 a { color: #223f48; }
.doctor-copy>p { color: #8a9ca1; font-size: 11px; min-height: 18px; }
.doctor-next { display: flex; align-items: center; gap: 12px; margin: 21px 0; padding: 13px 14px; border-radius: 10px; background: #f7f9f9; }
.doctor-next small { font-size: 10px; margin-bottom: 2px; }
.doctor-next a, .doctor-next>div>span { font-size: 12px; color: #365b63; font-weight: 500; }
.calendar-mark { display: grid; place-items: center; height: 32px; width: 32px; background: white; border: 1px solid #e4ecec; border-radius: 8px; color: #4b8d88; font-size: 20px; }
.doctor-bottom { border-top: 1px solid #edf1f2; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; color: #8a9ca1; }
.doctor-bottom a { color: #00878b; font-weight: 600; }
.doctor-bottom a span { margin-left: 12px; }
.tabs { gap: 16px; margin: 25px 0; }
.tabs a { padding-bottom: 13px; font-size: 12px; }
.app-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 28px; background: white; font-size: 10px; color: #83989e; }
.app-footer span { color: #9aabb0; }
dialog { border: 0; border-radius: 20px; padding: 30px; box-shadow: 0 24px 100px #133a4433; }
dialog::backdrop { background: #13343e70; backdrop-filter: blur(4px); }
dialog label { font-size: 12px; }
#toast { z-index: 100; background: #173e45; border: 1px solid #ffffff15; box-shadow: 0 10px 35px #133b4533; }
@media(min-width:1450px) { .team-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:1100px) {
 .app-body { grid-template-columns: 190px minmax(0,1fr); }
 #main { padding: 28px 24px; }
 #navigation { padding-inline: 10px; }
 .header-status { display: none; }
 .header-profile { margin-left: auto; }
 .team-summary { padding: 24px; }
 .doctor-top { padding-inline: 20px; }
 .doctor-copy { padding-inline: 20px; }
}
@media(max-width:760px) {
 .app-header { min-height: 78px; padding: 12px 18px; gap: 12px; }
 .logo { width: 94px; height: 46px; }
 .header-profile { padding-left: 14px; gap: 10px; border: 0; }
 .header-profile button { padding: 8px 10px; min-height: 38px; }
 .app-body { display: block; min-height: calc(100vh - 140px); }
 #navigation { flex-direction: row; padding: 9px 12px; gap: 5px; border: 0; }
 #navigation a { flex-direction: column; gap: 4px; font-size: 10px; padding: 8px 13px; }
 #navigation a[aria-current=page] { box-shadow: inset 0 -2px #62d5c3; }
 #navigation .nav-count, .nav-label, .nav-bottom { display: none; }
 #navigation svg { width: 18px; height: 18px; }
 #main { padding: 24px 16px 34px; }
 h1 { font-size: 26px; }
 .title { gap: 16px; }
 .title p { font-size: 12px; max-width: 280px; }
 .primary-link { padding: 11px 14px; }
 .team-summary { padding: 22px; margin-bottom: 22px; }
 .team-summary h2 { font-size: 21px; }
 .team-summary p { font-size: 11px; }
 .team-number { display: none; }
 .team-grid { gap: 16px; grid-template-columns: 1fr; }
 .doctor-top { padding-top: 20px; min-height: 96px; }
 .doctor-photo { width: 88px; height: 88px; border-radius: 20px; }
 .doctor-copy { padding-top: 29px; }
 .doctor-copy h2 { font-size: 21px; }
 .filters input[type=search] { max-width: none; width: 100%; min-width: 0; }
 .card { padding: 18px; }
 .stats { gap: 10px; }
 .stats .card { padding: 18px; }
 .stats .amount.large { font-size: 28px; }
 .responsive-table td { overflow-wrap: anywhere; }
 .responsive-table td .person { max-width: 100%; }
 .responsive-table td:before { max-width: 40%; white-space: normal; }
 .tabs { gap: 8px; }
 .tabs a { margin-right: 6px; }
 dialog { padding: 22px 18px; width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: 90dvh; }
 input, select, textarea { font-size: 16px; }
 .form-grid label { font-size: 12px; }
 .app-footer { padding: 16px; font-size: 9px; }
 .chat-header { flex-wrap: wrap; gap: 12px; }
 .compose { padding: 10px; gap: 6px; flex-wrap: wrap; }
 .compose textarea { min-width: 160px; }
 .compose button[type=submit] { margin-left: auto; }
}
.integration-card { max-width: 620px; }
.integration-card h2 { margin: 12px 0; }
.integration-card>p { color: var(--muted); margin-bottom: 20px; }
.integration-card label { display: block; margin: 16px 0; font-size: 12px; color: var(--muted); }
.integration-card input { display: block; width: 100%; margin-top: 6px; }
.integration-card>a { display: inline-block; margin-top: 20px; font-size: 12px; }
.integration-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; font-size: 12px; }
.integration-bar>span { margin-right: auto; }
.connected-messenger .dialog-link { width: 100%; text-align: left; border: 0; }
.connected-messenger .dialog-link>span { min-width: 0; }
.connected-messenger .dialog-link small { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-initials { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #e6f0ee; color: #35766b; }
.connected-messenger .messages { max-height: 650px; overflow: auto; }
.chat-footer { padding: 18px; display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legacy-messages { margin-top: 32px; }
.legacy-messages summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-bottom: 20px; }
@media(max-width:760px) { .connected-messenger .dialog-link { min-width: 190px; } }

.connected-messenger .dialog-list { max-height: 620px; overflow-y: auto; overscroll-behavior: contain; }
@media(max-width:760px) { .connected-messenger .dialog-list { max-height: 120px; overflow-x: auto; overflow-y: hidden; } }
.osmo-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:16px;border-top:1px solid #e2e8f0;background:#fff}.osmo-compose textarea{grid-column:1/-1;min-height:80px;resize:vertical;width:100%;box-sizing:border-box}.osmo-compose label{font-size:12px;min-width:0}.osmo-compose input{max-width:100%;font-size:12px}.osmo-compose .error{grid-column:1/-1;margin:0}.osmo-compose .chosen-file{overflow-wrap:anywhere}.osmo-call{position:fixed;z-index:1000;right:20px;bottom:20px;width:min(350px,calc(100vw - 40px));box-sizing:border-box;background:#102b39;color:#fff;padding:22px;border-radius:22px;box-shadow:0 12px 50px #0005}.osmo-call button{margin:4px;padding:10px}.call-actions{display:flex;flex-wrap:wrap}.connected-messenger .messages{max-height:470px;overflow-y:auto}.connected-messenger .bubble div{white-space:pre-wrap;overflow-wrap:anywhere}
.connected-messenger .dialogs{min-width:0}.osmo-compose .remove-file{justify-self:start}.osmo-compose [hidden]{display:none}.osmo-compose input{box-sizing:border-box;min-width:0;width:100%}@media(max-width:760px){.connected-messenger{grid-template-columns:minmax(0,1fr)}.osmo-compose{grid-template-columns:minmax(0,1fr)}.osmo-compose>*{max-width:100%;min-width:0}.connected-messenger .chat-header{flex-wrap:wrap}}
#messenger-launcher{position:fixed;right:22px;bottom:20px;z-index:800;background:#176c70;color:white;border:0;border-radius:30px;padding:15px 22px;box-shadow:0 8px 30px #17353d44;font-weight:700}#messenger-window{position:fixed;right:20px;bottom:20px;width:min(970px,calc(100vw - 40px));height:min(760px,calc(100dvh - 40px));z-index:850;display:flex;flex-direction:column;background:#f6f9fa;border:1px solid #dce6e8;border-radius:20px;box-shadow:0 24px 90px #0b273855;overflow:hidden}#messenger-window[hidden],#messenger-launcher[hidden]{display:none}.messenger-window-head{display:flex;align-items:center;justify-content:space-between;background:#173c46;color:#fff;padding:12px 18px;flex-shrink:0;cursor:move;touch-action:none}.messenger-window-head button{color:#fff;background:#ffffff18;border:0;font-size:20px;padding:5px 13px;margin-left:6px}.messenger-window-body{padding:14px;overflow:auto;min-height:0;flex:1}.messenger-window-body .integration-bar{font-size:12px;margin-bottom:10px}.messenger-window-body .connected-messenger{grid-template-columns:230px minmax(0,1fr)}.messenger-window-body .messages{min-height:180px;max-height:280px}.messenger-window-body .dialog-list{max-height:520px}.messenger-window-body .osmo-compose{padding:12px;gap:6px}.messenger-window-body textarea{min-height:64px}.messenger-window-body .chat-footer{padding:8px 12px}#messenger-window.expanded{inset:12px!important;width:auto;height:auto}.messenger-window-body .integration-bar>a{display:none}@media(max-width:760px){#messenger-window{inset:8px!important;width:auto;height:auto;border-radius:14px}.messenger-window-body{padding:8px}.messenger-window-body .connected-messenger{grid-template-columns:minmax(0,1fr)}.messenger-window-body .dialog-list{max-height:100px}.messenger-window-body .messages{max-height:35dvh}.messenger-window-head{padding:10px 12px}#messenger-launcher{bottom:14px;right:14px}}
.admin-invitation{margin:18px 0}.admin-invite-url{display:block;width:100%;margin:8px 0;box-sizing:border-box}.admin-invitation small{display:block;color:var(--muted);margin-top:10px}#administrators-root>.card{margin-bottom:20px}#administrators-root .table-wrap{overflow:auto}
.staff-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:20px}.staff-link-result{width:100%}.staff-link-result input{display:block;width:100%;margin-top:6px;box-sizing:border-box}.staff-link-result small{color:var(--muted)}
.doctors-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}.doctors-toolbar .staff-controls{margin:0;gap:8px;flex:1}.doctors-toolbar .filters{margin:0}.doctors-toolbar .filters input{width:300px;max-width:100%}.doctors-list{background:#fff;border:1px solid #e0e8e5;border-radius:16px;overflow:hidden}.doctors-list-head,.doctor-list-row{display:grid;grid-template-columns:minmax(210px,1.6fr) minmax(140px,1fr) 80px minmax(135px,1fr) 90px;align-items:center;gap:18px;padding:16px 22px}.doctors-list-head{background:#f8faf9;color:#81918b;font-size:11px;font-weight:600;border-bottom:1px solid #e5ece8}.doctor-list-row{min-height:92px;border-bottom:1px solid #edf1ef}.doctor-list-row:last-child{border-bottom:0}.doctor-list-row:hover{background:#f8fbf9}.doctor-list-person{display:flex;align-items:center;gap:13px;min-width:0;color:#263e37}.doctor-list-person img{width:48px;height:48px;object-fit:cover;border-radius:50%;flex-shrink:0;background:#edf3f0}.doctor-list-person strong{display:block;font-size:14px;font-weight:600;line-height:1.45;overflow-wrap:anywhere}.doctor-list-person small{display:block;font-size:11px;color:#8a9992;margin-top:4px}.doctor-list-specialty{font-size:13px;color:#50675d}.doctor-list-room span{display:inline-block;background:#eef5f0;border-radius:7px;padding:5px 10px;color:#507361;font-size:12px}.doctor-list-next{font-size:12px}.doctor-list-open{display:flex;align-items:center;justify-content:flex-end;gap:7px;font-size:12px;font-weight:600;color:#31836c}.doctor-list-open span{font-size:18px}@media(max-width:1100px){.doctors-list-head,.doctor-list-row{grid-template-columns:minmax(170px,1.5fr) minmax(110px,1fr) 65px minmax(110px,1fr) 75px;gap:10px;padding:14px}.doctor-list-person{gap:9px}.doctor-list-person img{width:40px;height:40px}}@media(max-width:760px){.doctors-toolbar{gap:12px}.doctors-toolbar .staff-controls{flex-basis:100%}.doctors-toolbar .filters,.doctors-toolbar .filters input{width:100%}.doctors-list-head{display:none}.doctor-list-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:16px}.doctor-list-person{grid-column:1;grid-row:1;gap:12px}.doctor-list-person img{width:44px;height:44px}.doctor-list-person strong{font-size:14px}.doctor-list-open{grid-column:2;grid-row:1;font-size:11px}.doctor-list-specialty{grid-column:1;padding-left:56px;font-size:12px}.doctor-list-room{grid-column:2;grid-row:2}.doctor-list-room span:before{content:'Каб. '}.doctor-list-next{grid-column:1/-1;padding-left:56px}.doctor-list-next:before{content:'Ближайший приём: ';font-size:11px;color:#8a9992}}
.staff-list-contacts{font-size:12px;color:#50675d;min-width:0;overflow-wrap:anywhere}.staff-list-contacts span,.staff-list-contacts small{display:block}.staff-list-contacts small{font-size:11px;color:#8a9992;margin-top:5px}.staff-count-badge,.admin-access-badge{display:inline-block;width:fit-content;padding:5px 10px;background:#edf6f0;color:#38745a;border-radius:7px;font-size:11px}.staff-initials{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center;background:#e8f2ed;color:#43836d;border-radius:50%;font-size:14px;font-weight:600}.admin-list-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.admin-capacity,.staff-access-note{font-size:12px;color:#82948b}.staff-access-note{margin:16px 2px}.administrators-list .doctors-list-head,.administrators-list .doctor-list-row{grid-template-columns:minmax(200px,1.2fr) minmax(220px,1.6fr) minmax(130px,.8fr)}#administrators-root .admin-invitation{margin:0 0 20px}#administrators-root .admin-invitation[hidden]{display:none}.managers-list .doctor-list-room span{min-width:30px;text-align:center}@media(max-width:760px){.managers-list .staff-list-contacts{grid-column:1/-1;padding-left:56px}.managers-list .staff-patient-count{grid-column:1;grid-row:auto;padding-left:56px}.managers-list .staff-patient-count span:before{content:'Пациентов: '}.managers-list .staff-task-count{grid-column:1/-1;padding-left:56px}.managers-list .staff-task-count:before{content:'Задачи: '}.administrators-list .doctor-list-row{grid-template-columns:minmax(0,1fr) auto}.administrators-list .staff-list-contacts{grid-column:1/-1;padding-left:56px}.administrators-list .admin-access-badge{grid-column:2;grid-row:1;font-size:10px;padding:5px 7px}.staff-initials{width:44px;height:44px;flex-basis:44px}.admin-list-actions{gap:10px}.admin-capacity{font-size:11px}}
.team-row-actions{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.team-row-actions button{padding:5px 7px;border:0;background:#eef6f1;color:#347660;font-size:10px;cursor:pointer;border-radius:6px}.team-editor{width:min(620px,calc(100vw - 28px));max-height:90dvh;overflow:auto;padding:26px;border:1px solid #dbe7e0;border-radius:20px;box-shadow:0 20px 90px #102e3b30;color:#263f35}.team-editor::backdrop{background:#172c3b66}.team-editor header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px}.team-editor h2{font-size:20px;margin:0}.team-editor header p{font-size:12px;color:#7b8f84;margin:6px 0}.team-editor .team-close{background:none;border:0;font-size:25px;padding:0 6px}.team-photo-edit{display:flex;align-items:center;gap:18px;margin-bottom:20px}.team-photo-edit img{width:76px;height:76px;object-fit:cover;border-radius:14px}.team-photo-edit label{flex:1;min-width:0}.team-photo-edit input{width:100%;box-sizing:border-box}.team-photo-edit small{display:block;font-size:11px;color:#7f9186;margin-top:6px}.team-editor footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.team-editor .form-grid input{width:100%;box-sizing:border-box}.administrators-list .doctors-list-head,.administrators-list .doctor-list-row{grid-template-columns:minmax(190px,1.2fr) minmax(190px,1.4fr) minmax(110px,.7fr) 95px}@media(max-width:760px){.team-row-actions{grid-column:2;grid-row:1}.administrators-list .doctor-list-row{grid-template-columns:minmax(0,1fr) 95px}.administrators-list .admin-access-badge{grid-column:1;grid-row:3;margin-left:56px}.team-editor{padding:20px}.team-photo-edit{align-items:flex-start;gap:12px}.team-editor .form-grid{grid-template-columns:1fr}}
