.crm-profile-notifications {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border: 1px solid var(--crm-auth-panel-border);
  border-radius: 12px;
  background: var(--crm-auth-panel-background);
}

.crm-profile-notifications > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.crm-profile-notifications strong {
  color: var(--crm-auth-label);
  font-size: 12px;
}

.crm-profile-notifications span {
  color: var(--crm-auth-muted);
  font-size: 10px;
  line-height: 1.4;
}

.crm-profile-notifications button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #43b7a8;
  border-radius: 8px;
  background: transparent;
  color: var(--crm-auth-accent-color);
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.crm-profile-notifications button:hover { background: rgba(67,183,168,.1); }

.crm-notification-settings-card {
  width: min(1120px,calc(100vw - 40px));
  min-height: min(720px,calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--crm-auth-card-border);
  border-radius: 20px;
  background: var(--crm-auth-card-background);
  color: var(--crm-auth-card-color);
  box-shadow: var(--crm-auth-card-shadow);
}

.crm-notification-settings-card[hidden] { display: none; }

.crm-notification-settings-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--crm-auth-panel-border);
}

.crm-notification-settings-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.crm-notification-settings-head h1 { font-size: 22px; font-weight: 780; }
.crm-notification-settings-head p { margin-top: 4px; color: var(--crm-auth-muted); font-size: 12px; }

.crm-notification-settings-back,
.crm-notification-settings-close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-auth-field-border);
  border-radius: 10px;
  background: transparent;
  color: var(--crm-auth-secondary-color);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.crm-notification-settings-close { border-radius: 50%; font-size: 23px; }
.crm-notification-settings-back:hover,
.crm-notification-settings-close:hover { border-color: #55c4b5; color: var(--crm-auth-accent-color); }

.crm-notification-settings-telegram {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border-bottom: 1px solid var(--crm-auth-panel-border);
  background: rgba(67,183,168,.07);
  color: var(--crm-auth-info-color);
  font-size: 11px;
  font-weight: 650;
}

.crm-notification-settings-telegram::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #43b7a8;
}

.crm-notification-settings-telegram.is-unlinked { color: var(--crm-auth-muted); }
.crm-notification-settings-telegram.is-unlinked::before { background: #9ca3af; }

.crm-notification-settings-layout {
  display: grid;
  height: calc(min(720px,100dvh - 48px) - 125px);
  min-height: 500px;
  grid-template-columns: 260px minmax(0,1fr);
}

.crm-notification-settings-nav {
  overflow-y: auto;
  padding: 15px 11px;
  border-right: 1px solid var(--crm-auth-panel-border);
  background: var(--crm-auth-panel-background);
}

.crm-notification-nav-button {
  display: grid;
  width: 100%;
  gap: 4px;
  margin-bottom: 5px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--crm-auth-label);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crm-notification-nav-button strong { font-size: 12px; font-weight: 740; }
.crm-notification-nav-button span { color: var(--crm-auth-muted); font-size: 9px; line-height: 1.35; }
.crm-notification-nav-button:hover { background: rgba(67,183,168,.08); }
.crm-notification-nav-button.is-active { border-color: rgba(67,183,168,.3); background: rgba(67,183,168,.12); color: var(--crm-auth-accent-color); }

.crm-notification-settings-content { min-width: 0; overflow-y: auto; padding: 22px 24px 28px; }
.crm-notification-settings-state { display: grid; min-height: 320px; place-items: center; color: var(--crm-auth-muted); font-size: 13px; text-align: center; }
.crm-notification-settings-state.is-error { color: var(--crm-auth-error-color); }

.crm-scheduled-list { display: grid; gap: 10px; margin-top: 22px; }
.crm-scheduled-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px; border: 1px solid var(--crm-auth-panel-border); border-radius: 12px; background: var(--crm-auth-panel-background); }
.crm-scheduled-row strong { color: var(--crm-auth-label); font-size: 12px; }
.crm-scheduled-row p { margin-top: 5px; color: var(--crm-auth-muted); font-size: 11px; line-height: 1.4; }
.crm-scheduled-row button { flex: 0 0 auto; min-width: 174px; }
.crm-scheduled-row button[aria-pressed="true"] { background: transparent; color: var(--crm-auth-secondary-color); border-color: var(--crm-auth-field-border); }
.crm-scheduled-status { min-height: 18px; margin-top: 14px; color: var(--crm-auth-muted); font-size: 11px; }

.crm-notification-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.crm-notification-group-head h2 { font-size: 20px; font-weight: 770; }
.crm-notification-group-head p { max-width: 620px; margin-top: 6px; color: var(--crm-auth-muted); font-size: 12px; line-height: 1.5; }

.crm-notification-channel-head,
.crm-notification-event-row {
  display: grid;
  grid-template-columns: minmax(180px,1fr) 70px 220px 90px;
  align-items: center;
  gap: 12px;
}
.crm-notification-settings-content.has-attention-column .crm-notification-channel-head,
.crm-notification-settings-content.has-attention-column .crm-notification-event-row {
  grid-template-columns:minmax(160px,1fr) 104px 64px minmax(150px,210px) 82px;
  gap:10px;
}

.crm-notification-channel-head { margin-top: 20px; padding: 0 12px 8px; color: var(--crm-auth-muted); font-size: 9px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.crm-notification-channel-head span:not(:first-child) { text-align: center; }

.crm-notification-event-list { border: 1px solid var(--crm-auth-panel-border); border-radius: 13px; }
.crm-notification-section-label { padding: 8px 12px; border-top: 1px solid var(--crm-auth-panel-border); background: var(--crm-auth-panel-background); color: var(--crm-auth-muted); font-size: 9px; font-weight: 780; text-transform: uppercase; letter-spacing: .07em; }
.crm-notification-section-label:first-child { border-top: 0; }
.crm-notification-event-row { min-height: 48px; padding: 8px 12px; border-top: 1px solid var(--crm-auth-panel-border); }
.crm-notification-event-row:first-child { border-top: 0; }
.crm-notification-event-label { color: var(--crm-auth-label); font-size: 12px; font-weight: 620; line-height: 1.35; }

.crm-notification-check { display: inline-flex; justify-content: center; cursor: pointer; }
.crm-notification-check input { position: absolute; opacity: 0; pointer-events: none; }
.crm-notification-check span {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 20px;
  padding: 2px;
  border: 1px solid var(--crm-auth-field-border);
  border-radius: 999px;
  background: var(--crm-auth-field-background);
  transition: .16s ease;
}
.crm-notification-check span::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #9ba1ad; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .16s ease; }
.crm-notification-check input:checked + span { border-color: #43b7a8; background: rgba(67,183,168,.22); }
.crm-notification-check input:checked + span::after { transform: translateX(16px); background: #43b7a8; }
.crm-notification-check input:focus-visible + span { outline: 2px solid #55c4b5; outline-offset: 2px; }
.crm-notification-check input:disabled + span { opacity: .45; cursor: not-allowed; }
.crm-notification-disabled-reason { color: #c8525c !important; font-weight: 650; }

.crm-notification-group-channels,
.crm-notification-options,
.crm-notification-schedule {
  display: grid;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--crm-auth-panel-border);
  border-radius: 13px;
  background: var(--crm-auth-panel-background);
}

.crm-notification-group-channels { grid-template-columns: minmax(180px,1fr) 70px 220px 90px; align-items: center; gap: 12px; }
.crm-notification-settings-content.has-attention-column .crm-notification-group-channels { grid-template-columns:minmax(160px,1fr) 104px 64px minmax(150px,210px) 82px; gap:10px; }
.crm-notification-group-channels strong { color: var(--crm-auth-label); font-size: 12px; }
.crm-notification-group-channel { display: grid; justify-items: center; gap: 6px; color: var(--crm-auth-muted); font-size: 9px; font-weight: 760; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.crm-notification-group-channels .crm-notification-check { justify-self: center; }
.crm-notification-event-row .crm-notification-check input:disabled + span { border-color: var(--crm-auth-field-border); background: var(--crm-auth-field-background); cursor: not-allowed; opacity: .5; }
.crm-notification-event-row .crm-notification-check input:disabled + span::after { background: #9ba1ad; }

.crm-notification-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.crm-notification-field { display: grid; gap: 6px; color: var(--crm-auth-label); font-size: 10px; font-weight: 720; }
.crm-notification-field select,
.crm-notification-field input[type="time"] { min-height: 40px; padding: 9px 11px; border: 1px solid var(--crm-auth-field-border); border-radius: 9px; outline: none; background: var(--crm-auth-field-background); color: var(--crm-auth-field-color); font: inherit; font-size: 12px; }
.crm-notification-field select:focus,
.crm-notification-field input[type="time"]:focus { border-color: #55c4b5; box-shadow: 0 0 0 3px rgba(85,196,181,.12); }
.crm-notification-field.is-wide { grid-column: 1/-1; }

.crm-notification-inline-toggle { display: flex; min-height: 40px; align-items: center; gap: 10px; color: var(--crm-auth-label); font-size: 11px; font-weight: 650; cursor: pointer; }
.crm-notification-inline-toggle input { width: 16px; height: 16px; accent-color: #43b7a8; }
.crm-notification-team-call-setting { display:flex; min-height:76px; align-items:center; gap:12px; padding:14px; border:1px solid rgba(67,183,168,.38); border-radius:12px; background:rgba(67,183,168,.09); color:var(--crm-auth-label); cursor:pointer; }
.crm-notification-team-call-setting input { width:18px; height:18px; flex:0 0 auto; accent-color:#43b7a8; }
.crm-notification-team-call-setting > span { display:grid; gap:4px; }
.crm-notification-team-call-setting strong { font-size:12px; font-weight:760; }
.crm-notification-team-call-setting small { color:var(--crm-auth-muted); font-size:10px; line-height:1.45; }
.crm-notification-team-call-setting:focus-within { outline:2px solid #55c4b5; outline-offset:2px; }
.crm-notification-weekdays { display: flex; flex-wrap: wrap; gap: 7px; }
.crm-notification-weekday input { position: absolute; opacity: 0; }
.crm-notification-weekday span { display: inline-flex; min-width: 38px; min-height: 34px; align-items: center; justify-content: center; border: 1px solid var(--crm-auth-field-border); border-radius: 8px; color: var(--crm-auth-muted); font-size: 10px; font-weight: 760; cursor: pointer; }
.crm-notification-weekday input:checked + span { border-color: #43b7a8; background: rgba(67,183,168,.14); color: var(--crm-auth-accent-color); }

.crm-notification-event-list.is-simple .crm-notification-event-row { grid-template-columns: minmax(180px,1fr) 90px; }
.crm-notification-channel-note { color: var(--crm-auth-muted); font-size: 9px; line-height: 1.25; text-align: center; }

.crm-notification-sound { position: relative; display: grid; min-width: 0; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 7px; }
.crm-notification-sound-picker { position: relative; min-width: 0; }
.crm-notification-sound-button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--crm-auth-field-border);
  border-radius: 8px;
  background: var(--crm-auth-field-background);
  color: var(--crm-auth-field-color);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.crm-notification-sound-button:hover,
.crm-notification-sound-button[aria-expanded="true"] { border-color: #55c4b5; }
.crm-notification-sound-button[hidden] { display: none; }
.crm-notification-sound-button:focus-visible { outline: 2px solid #55c4b5; outline-offset: 2px; }
.crm-notification-sound-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-notification-sound-button b { color: var(--crm-auth-muted); font-size: 13px; }
.crm-notification-sound-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  width: 238px;
  max-height: 286px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--crm-auth-card-border);
  border-radius: 11px;
  background: var(--crm-auth-card-background);
  box-shadow: 0 16px 38px rgba(0,0,0,.26);
}
.crm-notification-sound-list[hidden] { display: none; }
.crm-notification-sound-category { display: block; padding: 7px 8px 4px; color: var(--crm-auth-muted); font-size: 8px; font-weight: 780; text-transform: uppercase; letter-spacing: .08em; }
.crm-notification-sound-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: var(--crm-auth-label); font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.crm-notification-sound-list button span { color: var(--crm-auth-muted); font-size: 8px; }
.crm-notification-sound-list button:hover,
.crm-notification-sound-list button:focus-visible { outline: none; background: rgba(67,183,168,.1); }
.crm-notification-sound-list button[aria-selected="true"] { background: rgba(67,183,168,.16); color: var(--crm-auth-accent-color); font-weight: 730; }

.crm-notification-app-options { display: grid; gap: 11px; margin-top: 20px; }
.crm-attention-previews { display:grid; gap:13px; margin-top:20px; padding:16px; border:1px solid var(--crm-auth-panel-border); border-radius:13px; background:var(--crm-auth-panel-background); }
.crm-attention-previews>div:first-child { display:grid; gap:5px; }
.crm-attention-previews>div:first-child strong { color:var(--crm-auth-label); font-size:12px; }
.crm-attention-previews>div:first-child small { color:var(--crm-auth-muted); font-size:10px; line-height:1.45; }
.crm-attention-preview-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.crm-attention-preview { position:relative; display:grid; min-width:0; min-height:154px; place-items:center; align-content:center; gap:7px; padding:13px 8px 10px; overflow:hidden; border:1px solid var(--crm-auth-field-border); border-radius:11px; background:var(--crm-auth-field-background); color:var(--crm-auth-label); font:inherit; cursor:pointer; }
.crm-attention-preview:hover,.crm-attention-preview:focus-visible,.crm-attention-preview.is-playing,.crm-attention-preview.is-selected { border-color:#43b7a8; outline:none; background:rgba(67,183,168,.1); box-shadow:0 0 0 3px rgba(67,183,168,.1); }
.crm-attention-preview-number { position:absolute; top:7px; left:8px; display:grid; width:19px; height:19px; place-items:center; border-radius:50%; background:rgba(67,183,168,.16); color:var(--crm-auth-accent-color); font-size:9px; font-weight:820; }
.crm-attention-preview-selected { position:absolute; top:8px; right:8px; color:var(--crm-auth-accent-color); font-size:7px; font-weight:760; letter-spacing:.03em; text-transform:uppercase; }
.crm-attention-preview-bell { position:relative; display:grid; width:46px; height:46px; place-items:center; color:var(--crm-auth-accent-color); }
.crm-attention-preview-bell svg { position:relative; z-index:1; width:28px; height:28px; }
.crm-attention-preview strong { font-size:10px; line-height:1.25; text-align:center; }
.crm-attention-preview small { color:var(--crm-auth-muted); font-size:8px; line-height:1.35; text-align:center; }
.crm-notification-app-options > label { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; padding: 16px; border: 1px solid var(--crm-auth-panel-border); border-radius: 13px; background: var(--crm-auth-panel-background); }
.crm-notification-app-options > label > span { display: grid; gap: 5px; }
.crm-notification-app-options strong { color: var(--crm-auth-label); font-size: 12px; }
.crm-notification-app-options small { max-width: 560px; color: var(--crm-auth-muted); font-size: 10px; line-height: 1.45; }
.crm-notification-savebar { position: sticky; z-index: 2; bottom: -28px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; padding: 14px 0 4px; background: linear-gradient(180deg,transparent 0,var(--crm-auth-card-background) 24%); }
.crm-notification-save-status { margin-right: auto; color: var(--crm-auth-muted); font-size: 11px; }
.crm-notification-save-status.is-error { color: var(--crm-auth-error-color); }
.crm-notification-save-status.is-success { color: var(--crm-auth-accent-color); }
.crm-notification-save-status.is-saving { color: var(--crm-auth-info-color); }
.crm-notification-save-button { min-height: 40px; padding: 9px 18px; border: 0; border-radius: 10px; background: #43b7a8; color: #071411; font: inherit; font-size: 12px; font-weight: 780; cursor: pointer; }
.crm-notification-save-button:hover { background: #55c4b5; }
.crm-notification-save-button:disabled { cursor: wait; opacity: .62; }
.crm-notification-save-button:disabled:not([data-saving="true"]) { cursor: not-allowed; }

@media (max-height: 820px) and (min-width: 900px) {
  .crm-notification-settings-card { min-height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
  .crm-notification-settings-layout { height: calc(100dvh - 157px); min-height: 0; }
}
