:root {
  --app-sidebar: 264px;
  --app-bg: #f4f7fb;
  --app-surface: #ffffff;
  --app-text: #172033;
  --app-muted: #6f7a8e;
  --app-line: #e6eaf0;
  --app-primary: #3d65dc;
  --app-primary-dark: #2f52ba;
  --app-primary-soft: #edf2ff;
  --app-danger-soft: #fff0f1;
  --app-radius: 16px;
  --app-shadow: 0 10px 28px rgba(29, 42, 78, .06);
}

* { box-sizing: border-box; }
body { color: var(--app-text); font-size: .94rem; }
.app-body { min-height: 100vh; background: var(--app-bg); }
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar { width: var(--app-sidebar); flex: 0 0 var(--app-sidebar); min-height: 100vh; position: sticky; top: 0; flex-direction: column; background: #19243d; color: #fff; padding: 20px 14px 14px; }
.app-sidebar__brand, .app-mobile-header__brand, .auth-page__brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; letter-spacing: -.01em; }
.app-sidebar__brand { padding: 0 10px 24px; font-size: 1.08rem; }
.app-brand-mark { width: 34px; height: 34px; display: block; flex: 0 0 34px; object-fit: contain; }
.app-nav { display: flex; flex-direction: column; gap: 3px; }
.app-nav__caption { padding: 8px 11px 6px; color: #8f9bb7; font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.app-nav__company { margin: 0 8px 13px; padding: 9px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #bfcae5; background: rgba(255,255,255,.055); border-radius: 9px; font-size: .78rem; }
.app-nav__link { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 10px; color: #c8d1e3; text-decoration: none; transition: .18s ease; }
.app-nav__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-nav__link.is-active { color: #fff; background: rgba(103, 137, 255, .26); box-shadow: inset 3px 0 0 #9bb1ff; }
.app-nav__icon { width: 18px; text-align: center; font-weight: 700; line-height: 1; }
.app-nav__label { white-space: nowrap; }
.app-nav__divider { height: 1px; background: rgba(255,255,255,.11); margin: 11px 9px; }
.app-sidebar__footer { margin-top: auto; padding-top: 12px; }
.app-logout { width: 100%; border: 0; border-radius: 10px; padding: 10px 11px; background: transparent; color: #c8d1e3; text-align: left; display: flex; gap: 10px; align-items: center; }
.app-logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-main { width: min(100%, calc(100vw - var(--app-sidebar))); padding: 24px 32px 42px; overflow: hidden; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 34px; margin-bottom: 22px; }
.app-topbar__context { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-topbar__name { font-weight: 650; }
.app-company-pill { max-width: 250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid #dfe6f4; border-radius: 999px; background: #fff; padding: 4px 9px; color: #587; font-size: .78rem; }
.app-mobile-header { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--app-line); }
.app-mobile-header__brand { color: var(--app-text); font-size: 1rem; }
.offcanvas .app-nav__link { color: #4b5870; }
.offcanvas .app-nav__link:hover, .offcanvas .app-nav__link.is-active { color: var(--app-primary); background: var(--app-primary-soft); box-shadow: inset 3px 0 0 var(--app-primary); }
.offcanvas .app-nav__caption { color: #8791a3; }
.offcanvas .app-nav__company { color: #344363; background: #f4f7fb; }

h1, .h1, h2, .h2, h3, .h3 { letter-spacing: -.025em; font-weight: 720; color: var(--app-text); }
.card { border: 1px solid var(--app-line); border-radius: var(--app-radius); box-shadow: var(--app-shadow); background: var(--app-surface); overflow: hidden; }
.card-header { background: transparent; border-bottom: 1px solid var(--app-line); padding: 15px 18px; font-weight: 680; }
.card-body { padding: 18px; }
.card-footer { background: #fbfcff; border-top: 1px solid var(--app-line); padding: 12px 18px; }
.card-stat { border: 0; min-height: 118px; background: linear-gradient(145deg, #fff, #f6f8ff); }
.card-stat .display-6 { font-size: 1.72rem; font-weight: 740; margin-top: 6px; }
.metric-card__label { color: var(--app-muted); font-size: .8rem; font-weight: 650; }
.metric-card__value { font-size: 1.7rem; font-weight: 760; letter-spacing: -.035em; }
.btn { border-radius: 10px; font-weight: 620; padding: .5rem .82rem; }
.btn-sm { border-radius: 8px; }
.btn-primary { background: var(--app-primary); border-color: var(--app-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--app-primary-dark); border-color: var(--app-primary-dark); }
.btn-outline-primary { color: var(--app-primary); border-color: #b7c5fa; }
.btn-outline-primary:hover { background: var(--app-primary); border-color: var(--app-primary); }
.form-control, .form-select { border-color: #dbe1ea; min-height: 40px; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #9aaff7; box-shadow: 0 0 0 .2rem rgba(61, 101, 220, .12); }
.form-label { margin-bottom: 6px; color: #4c5870; font-size: .85rem; font-weight: 630; }
.table-responsive { border: 1px solid var(--app-line); border-radius: var(--app-radius); box-shadow: var(--app-shadow); background: #fff; }
.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .83rem .9rem; border-bottom-color: var(--app-line); }
.table thead th { color: #6c7891; font-size: .74rem; font-weight: 720; text-transform: uppercase; letter-spacing: .04em; background: #fafbfe; }
.table-hover > tbody > tr:hover > * { background: #f8faff; }
.badge { border-radius: 999px; padding: .37rem .58rem; font-weight: 650; }
.nav-tabs { gap: 5px; border-bottom: 0; overflow-x: auto; flex-wrap: nowrap; }
.nav-tabs .nav-link { border: 0; border-radius: 9px; color: #5d6980; white-space: nowrap; padding: .52rem .72rem; }
.nav-tabs .nav-link:hover { background: #eef2fb; }
.nav-tabs .nav-link.active { background: var(--app-primary-soft); color: var(--app-primary); font-weight: 680; }
.empty-state { border: 1px dashed #cfd8e8; border-radius: var(--app-radius); padding: 3.2rem 1rem; text-align:center; color: var(--app-muted); background: #fbfcff; }
.app-flash { border-radius: 14px; border: 0; box-shadow: var(--app-shadow); }
.text-muted { color: var(--app-muted) !important; }

.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 14px; }
.kanban-column { min-width: 292px; max-width: 320px; background: #eef2f7; border: 1px solid #e1e7f0; border-radius: 15px; padding: 12px; }
.kanban-card { cursor: grab; background: white; border: 1px solid #e3e8f1; border-radius: 12px; padding: 13px; margin-bottom: 9px; box-shadow: 0 4px 11px rgba(28, 41, 76, .05); transition: transform .18s ease, box-shadow .18s ease; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(28,41,76,.09); }
.kanban-card:active { cursor: grabbing; }

/* Календарь */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calendar-range-title { font-size: .95rem; font-weight: 700; color: #46516a; }
.calendar-shell { overflow-x: auto; border: 1px solid var(--app-line); border-radius: var(--app-radius); background: #fff; box-shadow: var(--app-shadow); }
.calendar-time-layout { min-width: 900px; display: flex; }
.calendar-time-axis { width: 66px; flex: 0 0 66px; padding-top: 52px; background: #fbfcff; border-right: 1px solid var(--app-line); }
.calendar-time-axis__hour { height: 60px; padding: 0 10px; transform: translateY(-8px); text-align: right; color: #8994a9; font-size: .73rem; }
.calendar-days { display: grid; grid-template-columns: repeat(var(--calendar-columns), minmax(130px, 1fr)); flex: 1; }
.calendar-day { min-width: 0; border-right: 1px solid var(--app-line); }
.calendar-day:last-child { border-right: 0; }
.calendar-day__header { min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--app-line); background: #fbfcff; }
.calendar-day__header small { color: #8791a6; text-transform: uppercase; font-size: .67rem; letter-spacing: .06em; }
.calendar-day__header strong { font-size: .94rem; }
.calendar-day__header.is-today strong { width: 26px; height: 26px; line-height: 26px; margin: 0 auto; border-radius: 50%; background: var(--app-primary); color: #fff; }
.calendar-day__body { min-height: 900px; position: relative; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, #edf0f5 59px, #edf0f5 60px); }
.calendar-event { position: absolute; z-index: 2; left: 5px; right: 5px; overflow: hidden; border-radius: 9px; border-left: 3px solid currentColor; padding: 5px 7px; color: #3252bd; background: #eaf0ff; box-shadow: 0 2px 5px rgba(35,54,112,.08); font-size: .74rem; line-height: 1.2; }
.calendar-event--call { color: #8a5b12; background: #fff4df; }
.calendar-event--meeting { color: #3f7654; background: #e8f7ee; }
.calendar-event--reminder { color: #7a4b9e; background: #f3ebfb; }
.calendar-event__time { display: block; margin-bottom: 2px; font-size: .67rem; font-weight: 700; opacity: .78; }
.calendar-event__title { font-weight: 710; }
.calendar-month { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 850px; }
.calendar-month__weekday { padding: 10px; border-right: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line); background: #fbfcff; color: #778299; font-size: .72rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-month__day { min-height: 132px; padding: 8px; border-right: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line); background: #fff; }
.calendar-month__day:nth-child(7n) { border-right: 0; }
.calendar-month__day.is-outside { background: #fafbfe; color: #9ca6b7; }
.calendar-month__number { display: inline-flex; justify-content: center; align-items: center; width: 26px; height: 26px; margin-bottom: 6px; border-radius: 50%; font-size: .78rem; font-weight: 700; }
.calendar-month__day.is-today .calendar-month__number { background: var(--app-primary); color: #fff; }
.calendar-month-event { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 3px 0; padding: 3px 5px; border-radius: 6px; color: #3153bf; background: #edf2ff; font-size: .69rem; text-decoration: none; }
.calendar-month-event--call { color: #8a5b12; background: #fff4df; }
.calendar-month-event--meeting { color: #3f7654; background: #e8f7ee; }
.calendar-month-event--reminder { color: #7a4b9e; background: #f3ebfb; }
.calendar-events-summary .list-group-item { padding: 14px 18px; }

.settings-tabs { margin-bottom: 18px; }
.settings-section-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 16px; }
.settings-section-heading p { margin: 3px 0 0; color: var(--app-muted); }
.role-permission-card details > summary { cursor: pointer; list-style: none; }
.role-permission-card details > summary::-webkit-details-marker { display: none; }
.permission-group { padding: 10px; border: 1px solid var(--app-line); border-radius: 11px; background: #fbfcff; }
.permission-group__title { margin-bottom: 7px; color: #4b5870; font-size: .82rem; font-weight: 700; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--app-line); }
.member-row:last-child { border-bottom: 0; }
.member-avatar { width: 34px; height: 34px; display: inline-flex; flex: 0 0 34px; justify-content: center; align-items: center; border-radius: 50%; background: var(--app-primary-soft); color: var(--app-primary); font-size: .82rem; font-weight: 800; }

.settings-profile-aside { align-self: flex-start; display: flex; flex-direction: column; gap: 1rem; }
.settings-profile-aside > .card { width: 100%; margin: 0; }
.settings-profile-plan-card .card-body { min-height: 0; }

.task-card { border-left: 4px solid #aebce7; }
.task-card--high, .task-card--urgent { border-left-color: #db5967; }
.task-card--low { border-left-color: #98a2b3; }
.task-card__meta { color: var(--app-muted); font-size: .82rem; }
.task-check { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 2px 3px 2px 0; white-space: normal; text-align: left; }

.auth-page { min-height: 100vh; background: radial-gradient(circle at top left, #eaf0ff 0, transparent 35%), var(--app-bg); }
.auth-page__brand { width: min(100% - 48px, 1080px); margin: 0 auto; padding: 26px 0 4px; color: var(--app-text); }
.auth-page .card { box-shadow: 0 18px 44px rgba(31,48,97,.1); }

@media (max-width: 1199.98px) { .app-main { padding: 22px 24px 36px; } }
@media (max-width: 991.98px) { .app-main { width: 100%; padding: 18px 16px 30px; } .app-topbar { margin-bottom: 18px; } }
@media (max-width: 575.98px) { .app-main { padding: 16px 12px 28px; } .app-topbar__name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .app-company-pill { display: none; } .card-body, .card-header, .card-footer { padding-left: 14px; padding-right: 14px; } .calendar-toolbar form { width: 100%; } .calendar-toolbar .form-select, .calendar-toolbar .form-control { min-width: 0; } }

/* Адаптивная оболочка, логотип компании и интерфейс поддержки */
.company-identity { display: inline-flex; min-width: 0; align-items: center; gap: 8px; }
.company-identity__logo { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; object-fit: cover; background: #fff; border: 1px solid rgba(73, 91, 130, .16); }
.company-identity__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-identity--sidebar { width: 100%; color: inherit; }
.company-identity--sidebar .company-identity__logo { width: 27px; height: 27px; flex-basis: 27px; border-color: rgba(255, 255, 255, .18); }
.company-identity--topbar .company-identity__logo { width: 20px; height: 20px; flex-basis: 20px; border-radius: 6px; }
.company-identity--mobile-nav .company-identity__logo { width: 27px; height: 27px; flex-basis: 27px; }
.app-company-pill { display: inline-flex; min-width: 0; align-items: center; }
.app-company-pill .company-identity { max-width: 100%; }
.app-list-meta { float: right; color: var(--app-muted); font-size: .81rem; text-align: right; }
.error-card { border: 0; box-shadow: 0 18px 44px rgba(31, 48, 97, .10); }
.error-card__code { margin-bottom: 8px; color: var(--app-primary); font-size: clamp(3.8rem, 14vw, 6rem); line-height: .95; font-weight: 800; letter-spacing: -.08em; }
.support-ticket__body { white-space: pre-line; color: #4d5970; }

@media (max-width: 991.98px) {
  .app-shell { display: block; }
  .app-mobile-header { position: sticky; z-index: 1020; top: 0; width: 100%; height: 64px; flex: 0 0 64px; padding: 0 14px; box-shadow: 0 2px 12px rgba(29, 42, 78, .04); }
  .app-mobile-header__brand { min-width: 0; font-size: 1rem; }
  .app-mobile-header__brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-mobile-header__menu { width: 44px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; font-size: 1.15rem; }
  .app-main { width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
}

@media (max-width: 575.98px) {
  .app-main { padding: 14px 12px 28px; }
  .app-topbar { align-items: flex-start; gap: 8px; min-height: auto; margin-bottom: 16px; }
  .app-topbar__context { align-items: flex-start; flex-direction: column; gap: 4px; }
  .app-topbar__name { max-width: calc(100vw - 24px); font-size: .92rem; }
  .app-company-pill { max-width: calc(100vw - 24px); padding: 4px 8px; }
  .app-company-pill .company-identity { display: flex; }
  .app-page-header { gap: 12px !important; margin-bottom: 18px !important; }
  .app-page-header h1 { font-size: 1.55rem; }
  .app-page-header .btn { width: 100%; }
  .card-stat { min-height: auto; }
  .card-stat .card-body { min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; }
  .metric-card__label { max-width: 18rem; font-size: .84rem; }
  .metric-card__value { font-size: 1.85rem; }
  .app-list-meta { float: none; display: block; margin-top: 4px; text-align: left; }
  .list-group-item > .badge { margin-top: 4px; }
  .kanban-column { min-width: min(86vw, 320px); }
  .calendar-shell { margin-left: -12px; margin-right: -12px; border-radius: 0; border-left: 0; border-right: 0; }
  .settings-section-heading { align-items: stretch; flex-direction: column; }
  .member-row { align-items: flex-start; flex-direction: column; }
  .member-row > .btn, .member-row form { width: 100%; }
  .member-row form .btn { width: 100%; }
  .support-ticket .badge { font-size: .71rem; }
}
.kanban-column.is-drop-target { outline: 2px solid rgba(61, 101, 220, .35); outline-offset: 2px; background: #e8efff; }
.app-toast-container { position: fixed; z-index: 1080; top: 16px; right: 16px; width: min(360px, calc(100vw - 32px)); }
.app-toast { margin-bottom: 8px; border: 0; border-radius: 12px; }

/* Адаптивные диалоги, переписка по тикетам и подгрузка длинных списков */
.modal-dialog { max-width: min(96vw, var(--bs-modal-width)); }
.modal-content { max-height: calc(100dvh - 1.5rem); }
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-footer { gap: .5rem; flex-wrap: wrap; }
.modal-footer .btn { min-width: 128px; }
.support-layout { align-items: stretch; }
.support-chat-card { min-height: min(720px, calc(100dvh - 160px)); }
.support-chat { display: flex; flex-direction: column; gap: 12px; max-height: min(58dvh, 560px); overflow-y: auto; background: #f7f9fd; }
.support-message { max-width: min(86%, 620px); }
.support-message--support { align-self: flex-end; }
.support-message--client { align-self: flex-start; }
.support-message__meta { margin: 0 8px 4px; color: var(--app-muted); font-size: .74rem; }
.support-message__bubble { padding: 11px 13px; border-radius: 16px; white-space: pre-line; background: #fff; border: 1px solid var(--app-line); box-shadow: 0 3px 10px rgba(31,48,97,.04); }
.support-message--support .support-message__bubble { color: #fff; background: var(--app-primary); border-color: var(--app-primary); }
.support-ticket-row.active .badge { border: 1px solid rgba(255,255,255,.35); }
.lazy-load-more { margin: 12px auto 0; display: flex; }
[data-lazy-hidden="true"] { display: none !important; }

@media (max-width: 575.98px) {
  .modal { --bs-modal-margin: .5rem; }
  .modal-dialog { width: calc(100vw - 1rem); max-width: calc(100vw - 1rem); margin: .5rem auto; }
  .modal-content { max-height: calc(100dvh - 1rem); border-radius: 18px; }
  .modal-header { align-items: flex-start; padding: 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px 16px; flex-direction: column-reverse; align-items: stretch; }
  .modal-footer .btn { width: 100%; min-width: 0; }
  .support-chat-card { min-height: auto; }
  .support-chat { max-height: 56dvh; }
  .support-message { max-width: 96%; }
  .support-layout .list-group-item { padding-left: 12px; padding-right: 12px; }
}

/* Центр уведомлений */
.app-topbar__actions, .app-mobile-header__actions { display: inline-flex; align-items: center; gap: 10px; }
.notification-bell { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--app-line); border-radius: 11px; color: var(--app-text); background: #fff; font-size: 1.25rem; line-height: 1; text-decoration: none; transition: .18s ease; }
.notification-bell:hover { color: var(--app-primary); border-color: #aebcf0; background: var(--app-primary-soft); transform: translateY(-1px); }
.notification-bell__count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid var(--app-bg); border-radius: 10px; color: #fff; background: #dc3545; font-size: .62rem; font-weight: 800; }
.notification-bell--mobile { width: 42px; height: 42px; flex: 0 0 42px; }
.notification-list-card { overflow: hidden; }
.notification-item { padding: 17px 20px; border-left: 3px solid transparent; }
.notification-item--unread { border-left-color: var(--app-primary); background: #f7f9ff; }
.notification-kind { width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--app-primary); background: var(--app-primary-soft); font-size: .78rem; font-weight: 800; }
.notification-kind--task { color: #206c4c; background: #e8f7ee; }
.notification-kind--calendar { color: #7a4b9e; background: #f3ebfb; }
.notification-kind--support { color: #2e61b8; background: #eaf0ff; }
.notification-kind--mention { color: #925b12; background: #fff3df; }
.notification-kind--admin, .notification-kind--warning { color: #a04f20; background: #fff0e5; }

/* Рабочая область лидов */
.leads-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.leads-pipeline-card { border-radius: 16px; }
.lead-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pipeline-stage-row { display: grid; grid-template-columns: minmax(160px, 1.6fr) 100px 90px auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--app-line); }
.pipeline-stage-row:last-child { border-bottom: 0; }
.lead-modal__meta { color: var(--app-muted); font-size: .78rem; }

@media (max-width: 575.98px) {
  .app-topbar__actions { width: 100%; justify-content: flex-end; }
  .app-mobile-header__actions { gap: 8px; }
  .notification-item { padding: 14px; }
  .pipeline-stage-row { grid-template-columns: 1fr auto; }
  .pipeline-stage-row > :nth-child(2), .pipeline-stage-row > :nth-child(3) { grid-column: span 1; }
  .pipeline-stage-row > :last-child { grid-column: 1 / -1; width: 100%; }
  .lead-card-actions .btn { flex: 1 1 auto; }
}
.pipeline-stage-row { display: flex; flex-wrap: wrap; }
.pipeline-stage-row > form:first-child { min-width: min(100%, 660px); flex: 1 1 660px; }
.pipeline-stage-row > form:last-child { flex: 1 1 280px; align-self: center; }
@media (max-width: 575.98px) { .pipeline-stage-row > form:first-child, .pipeline-stage-row > form:last-child { flex-basis: 100%; min-width: 0; } }

/* Колокольчик уведомлений и компактный счётчик непрочитанного */
.notification-bell { box-shadow: 0 5px 16px rgba(39, 60, 118, .08); }
.notification-bell__icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.notification-bell:hover .notification-bell__icon { transform: rotate(8deg) scale(1.06); }
.notification-bell__count { min-width: 21px; height: 21px; padding: 0 6px; top: -8px; right: -8px; border-radius: 999px; border-color: #fff; box-shadow: 0 4px 10px rgba(185, 38, 51, .32); letter-spacing: -.02em; }
@media (max-width: 575.98px) { .notification-bell__count { top: -6px; right: -5px; } }

/* Роли, рабочие разделы и наглядные отчёты */
.role-summary-card { transition: transform .18s ease, box-shadow .18s ease; }
.role-summary-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(29, 42, 78, .09); }
.role-permissions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.permission-group { min-width: 0; padding: 13px; border: 1px solid var(--app-line); border-radius: 13px; background: #fbfcff; }
.permission-group__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.permission-group__title { float: none; width: auto; margin: 0; color: #33415d; font-size: .87rem; font-weight: 730; }
.permission-group__checks { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.permission-group__checks .form-check { margin-right: 0; }
.permission-group__checks .form-check-label { color: #536077; }

.pipeline-tabs { margin: 0 0 14px; }
.pipeline-tabs__scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-color: #bcc9e4 transparent; }
.pipeline-tab { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #c8d4f7; border-radius: 11px; color: var(--app-primary); background: #f7f9ff; font-weight: 670; text-decoration: none; white-space: nowrap; }
.pipeline-tab:hover { color: var(--app-primary-dark); background: #edf2ff; }
.pipeline-tab.is-active { border-color: var(--app-primary); color: #fff; background: var(--app-primary); box-shadow: 0 5px 14px rgba(61, 101, 220, .20); }
.lead-filter-bar, .task-filter-bar { display: grid; grid-template-columns: minmax(240px, 1.35fr) minmax(190px, .95fr) auto auto; align-items: center; gap: 9px; }
.task-filter-bar { grid-template-columns: minmax(240px, 1.2fr) minmax(180px, .8fr) minmax(180px, .8fr) auto auto; }
.lead-filter-bar__search, .lead-filter-bar__select { min-width: 0; }
.leads-workspace-header { overflow: visible; }
.leads-workspace-header .card-body { min-height: 78px; }
.view-toggle { display: inline-flex; overflow: hidden; border: 1px solid #c5d0e8; border-radius: 10px; background: #fff; }
.view-toggle__button { width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: #62708a; text-decoration: none; }
.view-toggle__button + .view-toggle__button { border-left: 1px solid #c5d0e8; }
.view-toggle__button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view-toggle__button:hover { color: var(--app-primary); background: #f4f7ff; }
.view-toggle__button.is-active { color: #fff; background: var(--app-primary); }
.icon-button { width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #c5d0e8; border-radius: 10px; color: #4e5d77; background: #fff; }
.icon-button:hover, .icon-button:focus { color: var(--app-primary); border-color: #aebcf0; background: var(--app-primary-soft); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button--small { width: 30px; height: 30px; border-radius: 8px; }
.icon-button--small svg { width: 17px; height: 17px; }
.kanban-scroll { position: relative; overflow-x: auto; overflow-y: visible; padding: 2px 2px 12px; scrollbar-color: #91a9df #e8eef9; scrollbar-width: auto; }
.kanban-scroll::-webkit-scrollbar { height: 12px; }
.kanban-scroll::-webkit-scrollbar-track { border-radius: 999px; background: #e8eef9; }
.kanban-scroll::-webkit-scrollbar-thumb { border: 3px solid #e8eef9; border-radius: 999px; background: #7f99d4; }
.kanban-scroll .kanban { overflow: visible; padding-bottom: 2px; }
.kanban-column { display: flex; flex-direction: column; min-height: 370px; background: #eef3fa; }
.kanban-column__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: #263651; }
.kanban-column__header b { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stage-color { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: var(--stage-color, var(--app-primary)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stage-color, var(--app-primary)) 15%, transparent); }
.kanban-card { cursor: grab; padding: 12px; }
.kanban-card.is-dragging { opacity: .54; transform: rotate(1deg) scale(.98); }
.kanban-card__header { display: flex; align-items: center; gap: 7px; min-width: 0; margin-bottom: 6px; }
.kanban-drag-handle { width: 26px; height: 30px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; border-radius: 8px; color: #7583a0; background: #f0f3f9; cursor: grab; }
.kanban-drag-handle:hover { color: var(--app-primary); background: #e5ebfc; }
.kanban-drag-handle svg { width: 18px; height: 18px; fill: currentColor; }
.kanban-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.kanban-column__drop-help { min-height: 38px; display: flex; align-items: center; justify-content: center; margin-top: auto; border: 1px dashed #c1cce0; border-radius: 10px; color: #8490a7; font-size: .76rem; }
.kanban-scroll-hint { display: none; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; color: #697893; font-size: .79rem; }
.kanban-scroll-hint span { color: var(--app-primary); font-size: 1.2rem; font-weight: 800; }
.task-templates-panel { overflow: visible; }
.task-templates-panel__summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; user-select: none; }
.task-templates-panel__summary::-webkit-details-marker { display: none; }
.task-templates-panel__summary::after { content: '⌄'; color: var(--app-primary); font-size: 1.2rem; transition: transform .18s ease; }
.task-templates-panel[open] .task-templates-panel__summary::after { transform: rotate(180deg); }
.task-templates-panel__hint { color: var(--app-primary); font-size: .79rem; font-weight: 650; }
.task-templates-panel[open] .task-templates-panel__hint { display: none; }

.segmented-control { display: inline-flex; padding: 3px; border: 1px solid #cfd9ed; border-radius: 11px; background: #fff; }
.segmented-control__item { padding: 7px 11px; border-radius: 8px; color: #64718a; font-size: .83rem; font-weight: 680; text-decoration: none; }
.segmented-control__item:hover { color: var(--app-primary); background: #f1f4fb; }
.segmented-control__item.is-active { color: #fff; background: var(--app-primary); box-shadow: 0 3px 10px rgba(61,101,220,.18); }
.analytics-kpi { overflow: visible; }
.analytics-kpi__value { color: #172033; font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 770; letter-spacing: -.04em; }
.analytics-kpi__change { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 999px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.analytics-kpi__change--up { color: #17643f; background: #e5f6ec; }
.analytics-kpi__change--down { color: #a64049; background: #fdebee; }
.analytics-kpi__change--flat { color: #637189; background: #edf1f8; }
.analytics-card { overflow: hidden; }
.revenue-chart { height: 248px; padding-top: 13px; }
.revenue-chart__bars { height: 100%; display: flex; align-items: flex-end; gap: clamp(5px, 1vw, 13px); padding: 0 5px 22px; border-bottom: 1px solid #dce4f1; }
.revenue-chart__slot { min-width: 0; height: 100%; flex: 1 1 0; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.revenue-chart__bar { width: min(100%, 34px); min-height: 4px; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, #7596ff, #3d65dc); box-shadow: 0 6px 13px rgba(61,101,220,.18); transition: opacity .18s ease, transform .18s ease; }
.revenue-chart__slot:hover .revenue-chart__bar { opacity: .85; transform: translateY(-2px); }
.revenue-chart__value { position: absolute; bottom: calc(var(--bar-height, 0%) + 5px); display: none; max-width: 86px; overflow: hidden; color: #52617d; font-size: .66rem; line-height: 1.1; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.revenue-chart__slot:hover .revenue-chart__value { display: block; bottom: calc(var(--bar-height, 0%) + 6px); }
.revenue-chart__label { position: absolute; bottom: -20px; max-width: 100%; overflow: hidden; color: #7a879e; font-size: .67rem; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.analytics-bars { display: grid; gap: 13px; }
.analytics-bars__track { height: 9px; overflow: hidden; border-radius: 999px; background: #edf1f7; }
.analytics-bars__fill { height: 100%; min-width: 4px; border-radius: inherit; background: var(--app-primary); transition: width .3s ease; }
.analytics-bars__fill--workload { background: linear-gradient(90deg, #42b879, #1f8e57); }
.problem-zone-list { display: grid; }
.problem-zone { display: flex; align-items: flex-start; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--app-line); color: inherit; text-decoration: none; transition: background .18s ease; }
.problem-zone:last-child { border-bottom: 0; }
.problem-zone:hover { color: inherit; background: #f8faff; }
.problem-zone__count { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; border-radius: 10px; color: #9d3541; background: #feecee; font-weight: 760; }
.problem-zone__count--service { color: #9a6415; background: #fff3df; }
.problem-zone__count--contact { color: #3b65b6; background: #eaf0ff; }
.problem-zone__items { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
.problem-zone__items span { color: #75829a; font-size: .72rem; }
.problem-zone__arrow { margin-left: auto; color: #8b98ae; font-size: 1.35rem; line-height: 1; }

@media (max-width: 991.98px) {
  .role-permissions-grid { grid-template-columns: 1fr; }
  .lead-filter-bar, .task-filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .task-filter-bar > :nth-last-child(2) { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .lead-filter-bar, .task-filter-bar { grid-template-columns: 1fr; }
  .lead-filter-bar .btn, .task-filter-bar .btn { width: 100%; }
  .leads-toolbar { align-items: flex-start; }
  .view-toggle__button, .icon-button { width: 42px; height: 40px; }
  .kanban-scroll { margin-right: -12px; padding-right: 12px; }
  .kanban-scroll-hint { display: flex; }
  .kanban-column { min-width: min(84vw, 318px); }
  .revenue-chart { height: 220px; }
  .revenue-chart__bars { gap: 4px; }
  .revenue-chart__label { font-size: .60rem; }
  .segmented-control { width: 100%; }
  .segmented-control__item { flex: 1; text-align: center; }
}

/* Прокрутка редактора роли и меню действий в таблицах */
.role-editor-dialog {
  height: calc(100dvh - 2rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.role-editor-dialog__content {
  display: flex;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
.role-editor-dialog .modal-header,
.role-editor-dialog .modal-footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: #fff;
}
.role-editor-dialog form {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}
.role-editor-dialog .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.role-editor-dialog .modal-footer {
  border-top: 1px solid var(--app-line);
  box-shadow: 0 -8px 18px rgba(31, 48, 97, .05);
}

.lead-table-actions { display: inline-flex; }
.lead-table-actions__menu {
  position: fixed;
  z-index: 1090;
  min-width: 184px;
  margin: 0;
}

@media (max-width: 575.98px) {
  .role-editor-dialog {
    height: calc(100dvh - 1rem);
    margin-top: .5rem;
    margin-bottom: .5rem;
  }
  .role-editor-dialog .modal-body { padding-bottom: 24px; }
}


/* Нулевое значение не рисуем как условный прогресс. */
.revenue-chart__bar.is-empty {
  min-height: 0;
  box-shadow: none;
  opacity: 0;
}
.analytics-bars__fill[style*="width: 0%"] { min-width: 0; }

/* Подсказки для упоминаний сотрудников в комментариях. */
.mention-host { position: relative; }
.mention-suggestions {
  position: absolute;
  z-index: 1080;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  max-height: 248px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d7e0f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 44, 82, .18);
}
.mention-suggestions__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #263854;
  background: transparent;
  text-align: left;
}
.mention-suggestions__item:hover,
.mention-suggestions__item:focus { background: #eef3ff; outline: none; }
.mention-suggestions__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #7295ff, #3d65dc);
  font-size: .72rem;
  font-weight: 750;
}
.mention-suggestions__text { display: grid; gap: 1px; min-width: 0; }
.mention-suggestions__text strong { font-size: .87rem; }
.mention-suggestions__text small { color: #74839c; font-size: .72rem; }

/* Рабочее пространство администратора платформы */
.app-eyebrow { color: var(--app-primary); font-size: .75rem; font-weight: 790; letter-spacing: .09em; text-transform: uppercase; }
.admin-period-switcher { max-width: 100%; }
.admin-attention { padding: 17px; border: 1px solid #dce5f4; border-radius: 18px; background: linear-gradient(135deg, #f8faff 0%, #ffffff 58%); box-shadow: 0 10px 28px rgba(29, 53, 96, .045); }
.attention-card { min-height: 94px; display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e1e8f5; border-radius: 14px; color: #25344f; background: #fff; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.attention-card:hover { color: #25344f; transform: translateY(-2px); border-color: #b9c9ec; box-shadow: 0 12px 26px rgba(35, 58, 105, .09); }
.attention-card__count { width: 37px; height: 37px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 37px; border-radius: 12px; color: #3155b8; background: #eaf0ff; font-size: 1.04rem; font-weight: 790; }
.attention-card--danger .attention-card__count { color: #a83d49; background: #fdebed; }
.attention-card--warning .attention-card__count { color: #a16c16; background: #fff3de; }
.attention-card--info .attention-card__count { color: #236aa2; background: #e8f4fd; }
.attention-card__body { display: grid; gap: 3px; min-width: 0; }
.attention-card__body strong { font-size: .86rem; }
.attention-card__body small { color: #73819a; font-size: .73rem; line-height: 1.25; }
.attention-card__arrow { margin-left: auto; color: #94a0b7; font-size: 1.35rem; }
.admin-all-clear { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #cdebd9; border-radius: 14px; background: #f4fcf7; color: #1d6745; }
.admin-all-clear__icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #2da269; font-weight: 800; }
.admin-all-clear span:last-child { display: grid; gap: 1px; }
.admin-all-clear small { color: #5f8d75; }
.admin-dynamic-card { color: inherit; border-color: #e1e8f5; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.admin-dynamic-card:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(31, 54, 102, .09); }
.admin-dynamic-card__value { color: #17233d; font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 780; letter-spacing: -.035em; white-space: nowrap; }
.admin-company-table-card { overflow: visible; }
.admin-company-link { display: inline-grid; gap: 2px; color: #1f2d48; text-decoration: none; }
.admin-company-link:hover strong { color: var(--app-primary); }
.admin-company-link span { color: #6b7d9d; font-size: .72rem; }
.admin-usage-progress { width: 148px; height: 6px; margin-top: 6px; border-radius: 99px; background: #e9eef6; }
.admin-more-button { min-width: 34px; font-size: 1.18rem; font-weight: 760; line-height: 1; }
.admin-action-menu { min-width: 214px; padding: 6px; border-color: #dbe3f0; border-radius: 12px; box-shadow: 0 13px 32px rgba(29, 47, 86, .14); }
.admin-action-menu .dropdown-item { border-radius: 8px; padding: 8px 10px; font-size: .88rem; }
.admin-action-menu form { margin: 0; }

@media (max-width: 767.98px) {
  .admin-period-switcher { width: 100%; }
  .admin-period-switcher .segmented-control__item { padding-inline: 8px; font-size: .76rem; }
  .attention-card { min-height: 78px; }
  .admin-usage-progress { width: 110px; }
}

/* Меню действий администратора, тарифы и платежи CRM */
.admin-table-action { display: inline-flex; position: relative; }
.floating-action-menu {
  position: fixed;
  z-index: 1085;
  max-width: min(290px, calc(100vw - 16px));
  max-height: min(420px, calc(100vh - 16px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.floating-action-menu.show { display: block; }
.admin-action-menu { min-width: 224px; }
.admin-action-menu .dropdown-item { width: 100%; text-align: left; }
.admin-action-menu .dropdown-item:focus-visible { outline: 3px solid rgba(61, 101, 220, .28); outline-offset: -2px; }
.admin-page-head { min-height: 44px; }
.admin-summary-card {
  height: 100%;
  padding: 17px 18px;
  border: 1px solid #e2e8f3;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8faff);
  box-shadow: 0 10px 25px rgba(37, 53, 86, .055);
}
.admin-summary-card > span { display: block; color: #697891; font-size: .79rem; font-weight: 650; }
.admin-summary-card > strong { display: block; margin-top: 5px; color: #1d2940; font-size: clamp(1.28rem, 2vw, 1.68rem); letter-spacing: -.035em; }
.admin-summary-card--success { border-color: #d8f0e2; background: linear-gradient(145deg, #fff, #f5fcf8); }
.admin-summary-card--success > strong { color: #17643f; }
.admin-summary-card--warning { border-color: #f6e2c1; background: linear-gradient(145deg, #fff, #fffaf1); }
.admin-summary-card--warning > strong { color: #956014; }
.admin-summary-card--danger { border-color: #f6dce0; background: linear-gradient(145deg, #fff, #fff7f8); }
.admin-summary-card--danger > strong { color: #a33e4b; }
.plan-card { overflow: visible; border-color: #e1e8f4; box-shadow: 0 10px 24px rgba(36, 53, 84, .055); transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 16px 29px rgba(36, 53, 84, .10); }
.plan-card__eyebrow { color: #71819b; font-size: .72rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.plan-card__price { color: #17233b; font-size: clamp(1.78rem, 3vw, 2.35rem); font-weight: 760; letter-spacing: -.05em; line-height: 1.1; }
.plan-card__price small { margin-left: 6px; color: #708099; font-size: .8rem; font-weight: 650; letter-spacing: 0; }
.plan-card__limit { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; color: #445573; background: #eef3fb; font-size: .75rem; font-weight: 670; }
.plan-card__description { min-height: 44px; color: #596983; font-size: .88rem; line-height: 1.48; }
.plan-card__usage { display: flex; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid #e7edf6; color: #697891; font-size: .78rem; }
.plan-card__usage strong { color: #283750; }
.admin-filter-card { border-color: #e0e7f1; box-shadow: 0 8px 20px rgba(40, 55, 87, .045); }
.admin-payments-table-card { overflow: visible; }
.admin-payments-table-card .table-responsive { border: 0; border-radius: inherit; box-shadow: none; }

@media (max-width: 575.98px) {
  .admin-page-head .btn { width: 100%; }
  .plan-card__usage { align-items: flex-start; flex-direction: column; gap: 3px; }
  .floating-action-menu { min-width: min(250px, calc(100vw - 16px)); }
}


/* Тарифы: диалог должен помещаться на небольших ноутбуках и телефонах. */
.plan-modal-dialog {
  width: min(920px, calc(100vw - 24px));
  max-width: 920px;
  max-height: calc(100dvh - 24px);
  margin: 12px auto;
}
.plan-modal-content {
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.plan-modal-form {
  display: flex;
  min-height: 0;
  max-height: calc(100dvh - 24px);
  flex-direction: column;
}
.plan-modal-form .modal-header,
.plan-modal-form .modal-footer {
  flex: 0 0 auto;
  background: #fff;
}
.plan-modal-form .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.plan-modal-form .modal-footer {
  border-top: 1px solid var(--app-line);
  box-shadow: 0 -8px 20px rgba(31, 48, 97, .055);
}
.plan-option-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  background: #fff;
}
.plan-option-card .form-check-input {
  width: 2.15em;
  height: 1.16em;
  float: none;
  margin: .16rem 0 0;
  cursor: pointer;
}
.plan-option-card__title {
  display: block;
  margin: 0;
  color: #243553;
  font-size: .9rem;
  font-weight: 730;
  cursor: pointer;
}
.plan-option-card__hint {
  margin: 5px 0 0;
  color: #6d7c94;
  font-size: .78rem;
  line-height: 1.45;
}

/* Экран приостановленного доступа: пользователь видит причину, а не пустую ошибку. */
.subscription-lock {
  max-width: 760px;
  margin: clamp(22px, 7vh, 88px) auto;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid #dce5f5;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 0%, #f7f9fe 100%);
  box-shadow: 0 18px 48px rgba(31, 50, 91, .11);
  text-align: center;
}
.subscription-lock__icon {
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 22px;
  color: #9c6511;
  background: #fff1d8;
  font-size: 2rem;
  font-weight: 800;
}
.subscription-lock__eyebrow {
  display: block;
  margin-bottom: 9px;
  color: #936116;
  font-size: .76rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.subscription-lock h1 {
  max-width: 620px;
  margin: 0 auto 12px;
  color: #18263e;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 790;
  letter-spacing: -.035em;
}
.subscription-lock > p {
  max-width: 610px;
  margin: 0 auto;
  color: #667791;
  line-height: 1.6;
}
.subscription-lock__overdue {
  margin-top: 13px !important;
  color: #a46b16 !important;
  font-weight: 700;
}
.subscription-lock__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}
.subscription-lock__note {
  margin-top: 21px !important;
  font-size: .82rem;
}

@media (max-width: 767.98px) {
  .plan-modal-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    margin: 6px auto;
  }
  .plan-modal-content,
  .plan-modal-form { max-height: calc(100dvh - 12px); }
  .plan-modal-form .modal-header { padding: 16px; }
  .plan-modal-form .modal-body { padding: 16px; }
  .plan-modal-form .modal-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .plan-modal-form .modal-footer .btn { width: 100%; }
  .plan-option-card { min-height: auto; }
  .subscription-lock { margin: 20px auto; border-radius: 18px; }
  .subscription-lock__actions .btn { width: 100%; }
}

/* Диалоговые уведомления */
.notification-item { padding: 0; border-left: 3px solid transparent; }
.notification-item__open { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 20px; border: 0; color: inherit; background: transparent; text-align: left; transition: background .18s ease; }
.notification-item__open:hover, .notification-item__open:focus-visible { background: #f4f7ff; outline: 0; }
.notification-item__open:focus-visible { box-shadow: inset 0 0 0 2px var(--app-primary); }
.notification-item__content { min-width: 0; }
.notification-item__preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-item__chevron { flex: 0 0 auto; margin-top: 1px; color: #8995ad; font-size: 1.8rem; line-height: 1; }
.notification-details__body { color: var(--app-text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 575.98px) { .notification-item__open { padding: 14px; gap: 10px; } }
