/* Общий каркас модуля: отдельная страница со своим адресом, без карты.
   Слева -- та же панель разделов, что и на карте, справа -- рабочая область
   только этого модуля. Палитра и размеры повторяют index.html, чтобы модули
   и карта читались как одно приложение. */
:root{color-scheme:dark}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:#050d13;color:#e8f8fa;font:13px/1.45 Inter,ui-sans-serif,system-ui,sans-serif}

/* Панель разделов -- копия поведения html[data-layout="rail"] с карты. */
.app-nav{position:fixed;z-index:6;left:0;top:0;bottom:0;width:56px;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0;background:rgba(5,15,24,.93);border-right:1px solid rgba(102,214,232,.3)}
.app-nav a{position:relative;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid #3f8e9e;background:#0d2631;color:#d9f6fa;border-radius:10px;text-decoration:none;font-size:19px;line-height:1}
.app-nav a:hover{background:#123642}
.app-nav a[aria-current="page"]{background:#1b6170;border-color:#63d5e4}
.app-nav .messenger-badge{position:absolute;top:1px;right:1px;min-width:15px;padding:0 3px;border-radius:8px;background:#d8574f;color:#fff;font:700 10px Inter,system-ui;text-align:center}
.app-nav .messenger-badge[hidden]{display:none}

.module{margin-left:56px;padding:18px 22px;max-width:1100px}
.module-head{display:flex;align-items:baseline;gap:12px;margin-bottom:16px}
.module-head h1{margin:0;font-size:19px;letter-spacing:.01em}
.module-head .module-brand{margin-left:auto;color:#8ba9b4;font-size:12px;white-space:nowrap}
.module-head .module-brand a{color:#8ba9b4;text-decoration:none}
.module-head .module-brand a:hover{color:#d9f6fa}

.module-empty{color:#8faeb6}
.module-card{padding:14px 16px;background:#0b1823;border:1px solid #3f8e9e;border-radius:14px}

@media(max-width:700px){
  .app-nav{width:48px}
  .module{margin-left:48px;padding:14px}
}

/* Уведомления: колокольчик в рельсе и лента событий. */
#notifications-button[data-unread]::after{content:attr(data-unread);margin-left:4px;padding:0 5px;border-radius:8px;background:#ff6f61;color:#0b1823;font-size:10px;font-weight:700}
.notifications-panel{position:fixed;z-index:14;left:72px;bottom:16px;width:min(360px,calc(100vw - 96px));max-height:min(70vh,520px);overflow:auto;padding:10px;background:rgba(5,15,24,.97);border:1px solid rgba(102,214,232,.45);border-radius:12px;box-shadow:0 16px 42px rgba(0,0,0,.5)}
.notifications-panel[hidden]{display:none}
.notifications-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.notifications-head b{color:#aee9f1;font-size:13px}
.notifications-head button{border:1px solid #3f8e9e;background:#0d2631;color:#d9f6fa;border-radius:7px;padding:4px 8px;font-size:11.5px;cursor:pointer}
.notification{display:flex;gap:8px;padding:8px 6px;border-top:1px solid rgba(102,214,232,.14);color:#c4dce1;text-decoration:none;font-size:12.5px}
.notification:first-child{border-top:0}
.notification.unread{background:rgba(102,214,232,.08)}
a.notification:hover{background:rgba(102,214,232,.14)}
.notification-icon{flex:0 0 auto}
.notification-text{min-width:0}
.notification-text b{display:block;color:#eaf6f8}
.notification-text small{display:block;color:#9fbcc3;line-height:1.35}
.notification-time{color:#7fa4ad!important;margin-top:2px}
html[data-layout="topbar"] .notifications-panel{left:auto;right:16px;top:64px;bottom:auto}
/* Кнопка уведомлений в рельсе выглядит так же, как остальные её пункты. */
.app-nav button#notifications-button{position:relative;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid #3f8e9e;background:#0d2631;color:#d9f6fa;border-radius:10px;font-size:0;line-height:1;cursor:pointer;overflow:hidden;white-space:nowrap}
.app-nav button#notifications-button:hover{background:#123642}
/* Рельса модулей всегда узкая: у кнопки видна только иконка, как у ссылок. */
.app-nav #notifications-button::before{content:attr(data-icon);font-size:19px}
.app-nav #notifications-button[data-unread]::after{position:absolute;top:2px;right:2px;margin:0;font-size:9px;padding:0 4px}
