/* ===============
   БАЗОВЫЕ СТИЛИ
   =============== */
:root{
  --sb-collapsed-w: 64px;   /* ширина боковой панели в сложенном виде */
  --sb-expanded-w: 240px;   /* ширина боковой панели в развернутом виде */
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e6e7ea;
  --text: #1f2328;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
}

*{ box-sizing: border-box; }
button, input, textarea, select { font: inherit; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* ===============
   КАРКАС СТРАНИЦЫ
   =============== */
.layout{
  display: grid;
  grid-template-columns: var(--sb-w, var(--sb-collapsed-w)) minmax(0, 1fr);
  height: 100vh;
}
.brand-row{ display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; flex: 0 0 auto; height: 58px; }
body.sidebar-expanded .brand-row{ grid-template-columns: minmax(0, 1fr) 34px; gap: 4px; }
.brand{
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  min-width: 0; width: 100%; height: 58px;
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 700;
  padding: 0; overflow: hidden; border-radius: 12px;
}
body.sidebar-expanded .brand{ justify-content: flex-start; gap: 10px; padding: 0 8px 0 10px; }
.brand:hover .brand-mark{ transform: scale(1.04); }
.brand:focus-visible, .menu-item:focus-visible, .sidebar-collapse:focus-visible{
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.brand-mark-wrap{ position: relative; display: block; flex: 0 0 auto; width: 38px; height: 38px; }
.brand-mark{ flex: 0 0 auto; width: 36px; height: 36px; display: block; transition: transform .15s ease; }
.brand-name{ display: none; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
body.sidebar-expanded .brand-name{ display: inline; }
.connection-dot{
  position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border: 2px solid #fff;
  border-radius: 50%; background: #ef4444; box-shadow: 0 1px 2px rgba(15,23,42,.18);
}
.connection-dot.is-online{ background: #22c55e; }
.icon{
  width: 20px; height: 20px; color: currentColor;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ===== Боковая панель ===== */
.sidebar{
  grid-column: 1;
  grid-row: 1;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 6px 8px 10px;
  gap: 6px;
  /* ширина управляется через --sb-w на body (см. .sidebar-expanded) */
  transition: width .18s ease, box-shadow .18s ease;
  width: var(--sb-w, var(--sb-collapsed-w));
  overflow: hidden;
}

.sidebar-collapse{
  display: none; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 9px; background: transparent; color: #64748b; cursor: pointer;
}
body.sidebar-expanded .sidebar-collapse{ display: grid; }
.sidebar-collapse:hover{ background: #f3f4f6; color: var(--text); }
.sidebar-collapse .icon{ width: 19px; height: 19px; }

/* список пунктов меню */
.menu{ display: flex; flex-direction: column; gap: 3px; }
.menu-item{
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 44px; width: 100%; padding: 10px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 10px; text-align: left; color: #475569; font-size: 14px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.menu-item:hover{ background: #f3f4f6; color: var(--text); }
.menu-item.is-active{
  background: var(--accent-soft); color: #1d4ed8; font-weight: 650;
}
.menu-item.is-active::before{
  content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}

/* подписи пунктов — скрываем в свернутом состоянии */
.label{ white-space: nowrap; }
body:not(.sidebar-expanded) .sidebar .label{ display: none; }
body:not(.sidebar-expanded) .menu-item{ justify-content: center; padding-inline: 10px; }

/* ширина панели в разных состояниях */
body.sidebar-expanded{ --sb-w: var(--sb-expanded-w); }
body:not(.sidebar-expanded){ --sb-w: var(--sb-collapsed-w); }

/* тень при развернутой панели, чтобы визуально "нависала" над контентом */
body.sidebar-expanded .sidebar{ box-shadow: 6px 0 16px rgba(0,0,0,0.06); }
.sidebar-footer{ display: grid; gap: 4px; margin-top: auto; }
.account{ margin-top: 0; }
.notification-button__icon{ position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.notification-count{
  position: absolute; top: -8px; right: -10px; display: grid; place-items: center;
  min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #fff; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 9px; font-weight: 800; line-height: 1;
}
.notification-count[hidden]{ display: none; }
body.sidebar-expanded .notification-count{ top: -9px; right: -9px; }

.notification-center{
  width: min(520px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 32px)); padding: 0;
  border: 0; border-radius: 18px; background: #fff; color: var(--text);
  box-shadow: 0 24px 70px rgba(15,23,42,.25);
}
.notification-center::backdrop{ background: rgba(15,23,42,.4); backdrop-filter: blur(2px); }
.notification-center [hidden]{ display: none !important; }
.notification-center__shell{ display: flex; flex-direction: column; max-height: inherit; }
.notification-center__header{
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 20px 22px 15px; border-bottom: 1px solid var(--border);
}
.notification-center__heading{ min-width: 0; }
.notification-center__title-row{ display: flex; align-items: center; gap: 12px; }
.notification-center__header h2{ margin: 0; font-size: 19px; letter-spacing: -.02em; }
.notification-center__header p{ margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.notification-center__header-actions{ display: flex; align-items: center; gap: 6px; }
.notification-center__icon-btn, .notification-center__close{
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0;
  border-radius: 9px; background: #f3f4f6; color: #475569; cursor: pointer;
}
.notification-center__icon-btn:hover, .notification-center__close:hover{ background: #e5e7eb; color: var(--text); }
.notification-center__icon-btn .icon{ width: 17px; height: 17px; }
.notification-center__close{ font-size: 22px; line-height: 1; }
.notification-filters{
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--border); border-radius: 8px; background: #f6f7f9;
}
.notification-filters button{
  min-height: 24px; padding: 3px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; cursor: pointer;
}
.notification-filters button:hover{ background: #f3f4f6; color: var(--text); }
.notification-filters button.is-active{ background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.notification-center__content{ display: grid; gap: 9px; padding: 14px; overflow-y: auto; }
.notification-empty{ display: grid; justify-items: center; gap: 10px; padding: 44px 20px; color: var(--muted); text-align: center; }
.notification-empty__icon{ display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #f0fdf4; color: #16a34a; }
.notification-empty__icon .icon{ width: 23px; height: 23px; }
.notification-empty strong{ color: var(--text); font-size: 14px; }
.notification-empty span{ max-width: 300px; font-size: 11px; line-height: 1.5; }
.notification-card{
  position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: start; gap: 11px;
  padding: 12px; border: 1px solid var(--border); border-radius: 13px; color: var(--text);
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.notification-card:hover{ border-color: var(--accent-border); background: #fafcff; }
.notification-card.is-unread::before{
  content: ''; position: absolute; top: 10px; left: 10px; width: 6px; height: 6px;
  border: 2px solid #fff; border-radius: 50%; background: var(--accent);
}
.notification-card.is-read{ background: #fafafa; }
.notification-card.is-read .notification-card__icon, .notification-card.is-read .notification-card__body{ opacity: .66; }
.notification-card__icon{ display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.notification-card__icon .icon{ width: 18px; height: 18px; }
.notification-card.is-warning .notification-card__icon{ background: #fff7ed; color: #c2410c; }
.notification-card.is-danger .notification-card__icon{ background: #fef2f2; color: #dc2626; }
.notification-card.is-success .notification-card__icon{ background: #f0fdf4; color: #16a34a; }
.notification-card.is-purple{ border-color: #d8c7ff; background: #fdfbff; }
.notification-card.is-purple .notification-card__icon{ background: #f3e8ff; color: #7c3aed; }
.notification-card.is-purple.is-unread::before{ background: #7c3aed; }
.notification-card__body{ display: grid; min-width: 0; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.notification-card__body:focus-visible{ border-radius: 5px; outline: 3px solid rgba(37,99,235,.16); outline-offset: 3px; }
.notification-card__body strong{ font-size: 12px; }
.notification-card__body span{ color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-card__meta{ display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: 9px; }
.notification-card__actions{ display: flex; align-self: center; align-items: center; gap: 3px; }
.notification-card__actions button, .notification-card__actions a{
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0;
  border-radius: 8px; background: transparent; color: #64748b; cursor: pointer;
}
.notification-card__actions button:hover, .notification-card__actions a:hover{ background: #e8eef8; color: var(--accent); }
.notification-card__actions .icon{ width: 16px; height: 16px; }
.notification-settings{ display: grid; gap: 14px; padding: 18px 20px; overflow-y: auto; }
.notification-settings[hidden]{ display: none; }
.notification-settings__intro{ display: grid; gap: 4px; }
.notification-settings__intro strong{ font-size: 14px; }
.notification-settings__intro span{ color: var(--muted); font-size: 11px; }
.notification-settings__list{ display: grid; gap: 8px; }
.notification-setting{
  display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: stretch; gap: 6px;
  padding: 5px; border: 1px solid var(--border); border-radius: 11px;
}
.notification-setting label{ position: relative; display: grid; grid-template-columns: minmax(0,1fr) 36px; align-items: center; gap: 12px; padding: 6px 7px; cursor: pointer; }
.notification-setting input{ position: absolute; width: 1px; height: 1px; opacity: 0; }
.notification-setting__copy{ display: grid; gap: 3px; }
.notification-setting__copy strong{ font-size: 12px; }
.notification-setting__copy small{ color: var(--muted); font-size: 10px; line-height: 1.35; }
.notification-setting__switch{ position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; }
.notification-setting__switch::after{ content:''; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.18); transition:transform .15s ease; }
.notification-setting:has(input:checked){ border-color: var(--accent-border); background: var(--accent-soft); }
.notification-setting:has(input:checked) .notification-setting__switch{ background: var(--accent); }
.notification-setting:has(input:checked) .notification-setting__switch::after{ transform: translateX(14px); }
.notification-setting label:focus-within{ outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 8px; }
.notification-setting__clear{
  align-self: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px;
  display: grid; place-items: center; background: transparent; color: #94a3b8; cursor: pointer;
}
.notification-setting__clear .icon{ width: 16px; height: 16px; }
.notification-setting__clear:hover{ background: #fee2e2; color: #dc2626; }
.notification-settings__footer{ display: flex; justify-content: flex-end; gap: 8px; padding-top: 3px; }
.notification-secondary, .notification-primary{ min-height: 36px; padding: 8px 13px; border-radius: 9px; font-size: 12px; font-weight: 650; cursor: pointer; }
.notification-secondary{ border: 1px solid var(--border); background: #fff; color: #475569; }
.notification-primary{ border: 1px solid var(--accent); background: var(--accent); color: #fff; }

/* ===== Рабочая область ===== */
.workspace{
  grid-column: 2;
  grid-row: 1;
  display: block;
  padding: 12px;
  overflow: auto;
}
/* ============================================================================
   Full-bleed режим: убираем внешние отступы у рабочей области.
   Используется для "Рабочего расписания", у которого собственный layout.
   ========================================================================== */
.workspace.workspace--fullbleed{
  padding: 0 !important;

  /* Чтобы не было двойного скролла:
     пусть скроллит сама фича (внутри ws-shell), а не общий контейнер */
  overflow: hidden !important;
}

.placeholder{
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
}
.placeholder h1{ margin: 0 0 8px; font-size: 20px; }
.placeholder p{ margin: 0; color: var(--muted); }

/* ===== Главная ===== */
.home-page{ max-width: 1180px; margin: 0 auto; padding: 14px 4px 32px; }
.home-page [hidden]{ display: none !important; }
.home-header{
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 20px;
}
.home-header__actions{ display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.secondary-action{
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #475569;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.secondary-action:hover{ border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.secondary-action .icon{ width: 17px; height: 17px; }
.home-eyebrow{ margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
.home-title{ margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.primary-action{
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 10px 16px; border: 0; border-radius: 10px;
  background: var(--accent); color: white; text-decoration: none; font-size: 14px; font-weight: 650;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .2);
}
.primary-action:hover{ background: #1d4ed8; }
.primary-action .icon{ width: 18px; height: 18px; }
.home-stats{
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}
.home-stat{
  position: relative; display: flex; align-items: center; gap: 12px;
  min-width: 0; min-height: 88px; padding: 16px 18px;
}
.home-stat + .home-stat{ border-left: 1px solid var(--border); }
.home-stat > div{ min-width: 0; display: grid; gap: 3px; }
.home-stat strong{ font-size: 24px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.home-stat div > span{ overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-stat__marker{ flex: 0 0 auto; width: 10px; height: 34px; border-radius: 999px; }
.home-stat__marker--blue{ background: #3b82f6; }
.home-stat__marker--violet{ background: #8b5cf6; }
.home-stat__marker--amber{ background: #f59e0b; }
.home-stat__marker--cyan{ background: #06b6d4; }
.home-grid{ display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); gap: 16px; }
.home-card{
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}
.home-card--wide{ grid-row: span 2; min-height: 300px; }
.home-card__head{ display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.home-card__title{ margin: 0; font-size: 16px; }
.home-link{ display: inline-flex; align-items: center; gap: 3px; color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.home-link .icon{ width: 16px; height: 16px; }
.home-empty{ min-height: 210px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.home-empty__icon{ display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.home-empty__icon .icon{ width: 24px; height: 24px; }
.home-empty p{ max-width: 360px; margin: 0; line-height: 1.5; }
.home-retry{
  margin-top: 14px; padding: 8px 13px; border: 1px solid var(--accent-border); border-radius: 9px;
  background: white; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 650;
}
.home-retry:hover{ background: var(--accent-soft); }
.home-today{ min-height: 210px; }
.today-lessons{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.today-lesson{
  display: grid; grid-template-columns: 118px minmax(0, 1fr) 34px; align-items: center; gap: 14px;
  min-height: 68px; padding: 10px 10px 10px 14px; border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s ease, background .15s ease;
}
.today-lesson:hover{ border-color: var(--accent-border); background: #fafcff; }
.today-lesson__time{ color: #1d4ed8; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 700; }
.today-lesson__body{ min-width: 0; display: grid; gap: 4px; }
.today-lesson__body strong{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.today-lesson__body span{ color: var(--muted); font-size: 12px; }
.today-lesson__open{
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  color: #64748b; text-decoration: none;
}
.today-lesson__open:hover{ color: var(--accent); background: var(--accent-soft); }
.today-lesson__open .icon{ width: 17px; height: 17px; }
.quick-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action{
  display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 11px;
  border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 600; transition: border-color .15s ease, background .15s ease;
}
.quick-action:hover{ border-color: var(--accent-border); background: var(--accent-soft); }
.quick-action__icon{ display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #f3f4f6; color: #475569; }
.quick-action:hover .quick-action__icon{ background: white; color: var(--accent); }
.quick-action .icon{ width: 18px; height: 18px; }
.attention-empty{ display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.attention-dot{ flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.attention-list{ display: grid; gap: 8px; }
.attention-see-all{
  position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #475569;
  font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.attention-see-all:hover{ border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.attention-see-all:focus-visible{ outline: 3px solid rgba(37,99,235,.16); outline-offset: 2px; }
.attention-see-all > span{
  position: absolute; top: -8px; right: -8px; display: grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: #7c3aed; color: #fff; font-size: 9px; line-height: 1;
}
.attention-list a, .attention-list button{
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 10px; border: 1px solid #fed7aa; border-radius: 10px; background: #fffaf5;
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.attention-item-copy{ display: grid; min-width: 0; gap: 2px; }
.attention-item-copy strong{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.attention-item-copy small{ overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.attention-list a:hover, .attention-list button:hover{ border-color: #fb923c; }
.attention-list a:focus-visible, .attention-list button:focus-visible{ outline: 3px solid rgba(249,115,22,.18); }
.attention-list .icon{ width: 16px; height: 16px; color: #9a3412; }
.attention-alert{ display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #ffedd5; color: #c2410c; font-weight: 800; }
.attention-list .is-purple{ border-color: #ddd6fe; background: #faf7ff; }
.attention-list .is-purple:hover{ border-color: #a78bfa; background: #f5f3ff; }
.attention-list .is-purple:focus-visible{ outline-color: rgba(124,58,237,.2); }
.attention-list .is-purple .attention-alert{ background: #ede9fe; color: #7c3aed; }
.attention-list .is-purple .icon{ color: #7c3aed; }
.home-attention-dialog{
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0;
  overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: #fff;
  color: var(--text); box-shadow: 0 26px 80px rgba(15,23,42,.28);
}
.home-attention-dialog::backdrop{ background: rgba(15,23,42,.48); backdrop-filter: blur(2px); }
.home-attention-dialog__head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.home-attention-dialog__head h2{ margin: 4px 0 0; font-size: 23px; letter-spacing: -.025em; }
.home-attention-dialog__head p:last-child{ margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.home-attention-dialog__list{ display: grid; gap: 8px; max-height: calc(100vh - 220px); overflow: auto; padding: 18px 22px; background: #f7f9fc; }
.home-attention-row{ display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.home-attention-row:hover{ border-color: var(--accent-border); background: #fafcff; }
.home-attention-row:focus-visible{ outline: 3px solid rgba(37,99,235,.16); }
.home-attention-row > span{ display: grid; min-width: 0; gap: 4px; }
.home-attention-row strong{ overflow-wrap: anywhere; font-size: 13px; }
.home-attention-row small{ color: var(--muted); font-size: 11px; }
.home-attention-row b{ font-size: 11px; white-space: nowrap; }
.home-attention-row.is-purple{ border-color: #ddd6fe; background: #faf7ff; }
.home-attention-row.is-purple:hover{ border-color: #a78bfa; background: #f5f3ff; }
.home-attention-dialog__empty{ padding: 30px 16px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); text-align: center; }
.home-attention-dialog__footer{ display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.home-attention-dialog .secondary-button{
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #475569;
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.home-attention-dialog .secondary-button:hover{ border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.home-attention-dialog .secondary-button:focus-visible,
.home-attention-dialog .primary-action:focus-visible{ outline: 3px solid rgba(37,99,235,.18); outline-offset: 2px; }
.home-extra-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.home-extra-grid[hidden]{ display: none; }
.home-insight{ min-width: 0; min-height: 188px; }
.insight-loading, .insight-empty{ color: var(--muted); font-size: 13px; line-height: 1.5; }
.insight-empty{ display: flex; align-items: center; gap: 12px; min-height: 78px; }
.next-lesson{
  position: relative; display: grid; gap: 5px; padding: 16px 48px 16px 16px; border: 1px solid var(--accent-border);
  border-radius: 13px; background: var(--accent-soft); color: var(--text); text-decoration: none;
}
.next-lesson:hover{ border-color: var(--accent); }
.next-lesson__when{ color: var(--accent); font-size: 12px; font-weight: 700; }
.next-lesson strong{ overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.next-lesson > span:not(.next-lesson__when){ color: var(--muted); font-size: 13px; }
.next-lesson .icon{ position: absolute; top: 50%; right: 16px; width: 20px; height: 20px; color: var(--accent); transform: translateY(-50%); }
.week-load{ display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 6px; min-height: 106px; }
.week-load__day{ display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.week-load__day > div{ display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 62px; }
.week-load__day i{ display: block; width: min(22px, 70%); min-height: 4px; border-radius: 6px 6px 3px 3px; background: #cbd5e1; }
.week-load__day strong{ color: #475569; font-size: 12px; }
.week-load__day.is-today{ color: var(--accent); font-weight: 700; }
.week-load__day.is-today i{ background: var(--accent); }
.week-load__day.is-today strong{ color: var(--accent); }
.insight-list{ display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.insight-list li{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.insight-list li > span:last-child{ display: grid; min-width: 0; gap: 2px; }
.insight-list strong{ overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.insight-list small{ overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.insight-list__badge{ flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.insight-list__badge.is-blue{ background: #dbeafe; color: #1d4ed8; }
.insight-list__badge.is-red{ background: #fee2e2; color: #b91c1c; }
.insight-list__badge.is-amber{ background: #fef3c7; color: #92400e; }
.workload-summary{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.workload-summary > div{ display: grid; gap: 3px; padding: 13px; border-radius: 11px; background: #f8fafc; }
.workload-summary strong{ font-size: 22px; }
.workload-summary span, .workload-summary p{ color: var(--muted); font-size: 11px; }
.workload-summary p{ grid-column: 1 / -1; margin: 0; line-height: 1.5; }
.finance-dynamics{ display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 20px; }
.finance-dynamics__ring{
  display: grid; place-content: center; width: 104px; height: 104px; border-radius: 50%; text-align: center;
  background: radial-gradient(circle closest-side, white 73%, transparent 74% 99%), conic-gradient(var(--accent) calc(var(--progress) * 1%), #e5e7eb 0);
}
.finance-dynamics__ring strong{ font-size: 20px; }
.finance-dynamics__ring span{ color: var(--muted); font-size: 10px; }
.finance-dynamics__details{ display: grid; gap: 8px; }
.finance-dynamics__details > div{ display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border); font-size: 11px; }
.finance-dynamics__details span{ color: var(--muted); }
.finance-dynamics__details .is-positive{ color: #15803d; }
.finance-dynamics__details .is-negative{ color: #b42318; }
.note-save-state{ color: #15803d; font-size: 10px; }
.quick-note-input{
  box-sizing: border-box; width: 100%; min-height: 112px; padding: 12px 13px; resize: vertical;
  border: 1px solid var(--border); border-radius: 11px; background: #fafbfc; color: var(--text);
  font: inherit; font-size: 13px; line-height: 1.5;
}
.quick-note-input:focus{ border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.widget-picker{
  width: min(700px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 36px)); padding: 0;
  border: 0; border-radius: 18px; background: #fff; color: var(--text); box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.widget-picker::backdrop{ background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.widget-picker form{ display: flex; flex-direction: column; max-height: inherit; }
.widget-picker__head{ display: flex; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.widget-picker__head h2{ margin: 0; font-size: 20px; }
.widget-picker__head p{ margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.icon-button{ flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f3f4f6; color: #475569; font-size: 23px; line-height: 1; cursor: pointer; }
.icon-button:hover{ background: #e5e7eb; }
.widget-picker__list{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 24px; overflow-y: auto; }
.widget-picker__item{
  position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 34px; align-items: center; gap: 10px;
  min-height: 66px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.widget-picker__item:has(input:checked){ border-color: var(--accent-border); background: var(--accent-soft); }
.widget-picker__item input{ position: absolute; width: 1px; height: 1px; opacity: 0; }
.widget-picker__item:focus-within{ outline: 2px solid var(--accent); outline-offset: 2px; }
.widget-picker__icon{ display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #f3f4f6; color: #64748b; }
.widget-picker__item:has(input:checked) .widget-picker__icon{ background: #fff; color: var(--accent); }
.widget-picker__icon .icon{ width: 19px; height: 19px; }
.widget-picker__copy{ display: grid; min-width: 0; gap: 3px; }
.widget-picker__copy strong{ font-size: 12px; }
.widget-picker__copy small{ color: var(--muted); font-size: 10px; line-height: 1.35; }
.widget-picker__switch{ position: relative; width: 32px; height: 19px; border-radius: 999px; background: #cbd5e1; transition: background .15s ease; }
.widget-picker__switch::after{ content: ''; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform .15s ease; }
.widget-picker__item:has(input:checked) .widget-picker__switch{ background: var(--accent); }
.widget-picker__item:has(input:checked) .widget-picker__switch::after{ transform: translateX(13px); }
.widget-picker__footer{ display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-top: 1px solid var(--border); }
.widget-picker__footer > div{ display: flex; gap: 8px; }
.widget-picker button{ font-family: inherit; }
.widget-picker .text-button{ padding: 7px 0; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 650; cursor: pointer; }
.widget-picker .secondary-button, .widget-picker .primary-button{ min-height: 36px; padding: 8px 13px; border-radius: 9px; font-size: 12px; font-weight: 650; cursor: pointer; }
.widget-picker .secondary-button{ border: 1px solid var(--border); background: #fff; color: #475569; }
.widget-picker .primary-button{ border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.home-finance{
  margin-top: 16px; padding: 20px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}
.home-finance[hidden]{ display: none; }
.home-finance__head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.home-finance__head h2{ margin: 0; font-size: 18px; letter-spacing: -.02em; }
.home-finance__head p:last-child{ margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.home-finance__actions{ display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.finance-privacy-toggle{
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #475569;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.finance-privacy-toggle[hidden]{ display: none; }
.finance-privacy-toggle:hover{ border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.finance-privacy-toggle .icon{ width: 16px; height: 16px; }
.finance-privacy-toggle .icon-eye-off{ display: none; }
.home-finance.is-finance-revealed .finance-privacy-toggle .icon-eye{ display: none; }
.home-finance.is-finance-revealed .finance-privacy-toggle .icon-eye-off{ display: block; }
.home-finance__metrics{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-finance__metric{
  min-width: 0; min-height: 82px; padding: 15px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: #fafbfc;
}
.home-finance__metric span{ display: block; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-finance__metric strong, .home-finance__value{ display: block; margin-top: 8px; overflow: hidden; font-size: 20px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.home-finance__value{
  position: relative; width: 100%; padding: 0 27px 0 0; border: 0; background: transparent;
  color: var(--text); font-family: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.home-finance__value > span{ color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
.home-finance__value .home-finance__actual{ display: none; }
.home-finance__value.is-revealed .home-finance__masked{ display: none; }
.home-finance__value.is-revealed .home-finance__actual{ display: block; }
.home-finance__value .icon{
  position: absolute; top: 50%; right: 0; width: 18px; height: 18px; color: #64748b; transform: translateY(-50%);
}
.home-finance__value .icon-eye-off{ display: none; }
.home-finance__value.is-revealed .icon-eye{ display: none; }
.home-finance__value.is-revealed .icon-eye-off{ display: block; }
.home-finance__value:hover .icon{ color: var(--accent); }
.finance-privacy-toggle:focus-visible, .home-finance__value:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }
.home-finance__metric.is-success strong, .home-finance__metric.is-success .home-finance__value{ color: #15803d; }
.home-finance__metric.is-debt{ border-color: #fecaca; background: #fff7f7; }
.home-finance__metric.is-debt strong, .home-finance__metric.is-debt .home-finance__value{ color: #b42318; }
.home-finance__metric.is-forecast{ border-color: var(--accent-border); background: var(--accent-soft); }
.home-finance__metric.is-forecast strong, .home-finance__metric.is-forecast .home-finance__value{ color: #1d4ed8; }
.home-finance__metric.is-warning strong, .home-finance__metric.is-warning .home-finance__value{ color: #b45309; }
.home-finance__metric.is-loading{
  color: transparent; background: linear-gradient(100deg, #f8fafc 20%, #eef2f7 40%, #f8fafc 60%);
  background-size: 220% 100%; animation: home-finance-loading 1.2s ease-in-out infinite;
}
.home-finance__error{
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 74px; padding: 13px 15px; border: 1px solid #fecaca; border-radius: 12px;
  background: #fff7f7; color: #991b1b; font-size: 12px;
}
.home-finance__error .home-retry{ margin-top: 0; }
@keyframes home-finance-loading{ to{ background-position-x: -220%; } }

/* ===== Адаптивность ===== */
@media (max-width: 720px){
  :root{ --sb-expanded-w: 220px; }
  .home-header{ align-items: flex-start; flex-direction: column; }
  .home-header__actions{ justify-content: space-between; width: 100%; }
  .home-stats{ grid-template-columns: 1fr 1fr; }
  .home-stat + .home-stat{ border-left: 0; }
  .home-stat:nth-child(even){ border-left: 1px solid var(--border); }
  .home-stat:nth-child(n + 3){ border-top: 1px solid var(--border); }
  .home-grid{ grid-template-columns: 1fr; }
  .home-extra-grid{ grid-template-columns: 1fr; }
  .home-card--wide{ grid-row: auto; }
  .today-lesson{ grid-template-columns: 92px minmax(0, 1fr) 34px; gap: 10px; }
  .home-finance__head{ flex-direction: column; }
  .home-finance__actions{ justify-content: space-between; width: 100%; }
  .home-finance__metrics{ grid-template-columns: 1fr 1fr; }
  .widget-picker__list{ grid-template-columns: 1fr; }
}

@media (max-width: 460px){
  .notification-center__header{ gap: 8px; padding-inline: 14px; }
  .notification-center__title-row{ align-items: flex-start; flex-direction: column; gap: 7px; }
  .notification-filters button{ padding-inline: 7px; }
  .home-stats{ grid-template-columns: 1fr; }
  .home-stat:nth-child(even){ border-left: 0; }
  .home-stat + .home-stat{ border-top: 1px solid var(--border); }
  .home-finance__metrics{ grid-template-columns: 1fr; }
  .home-finance__error{ align-items: flex-start; flex-direction: column; }
  .home-header__actions{ align-items: stretch; flex-direction: column-reverse; }
  .home-header__actions > *{ justify-content: center; width: 100%; box-sizing: border-box; }
  .widget-picker__footer{ align-items: stretch; flex-direction: column; }
  .widget-picker__footer > div{ justify-content: flex-end; }
}

/* Independent of role-based visibility: these classes only hide navigation. */
.menu-item.is-hidden-by-settings,
.mobile-nav__item.is-hidden-by-settings { display: none !important; }
