/* ═══ СБРОС И ПЕРЕМЕННЫЕ ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent:   #e94560;
  --accent2:  #c73652;
  --dark:     #1a1a2e;
  --dark2:    #16213e;
  --dark3:    #0f3460;
  --bg:       #f4f6f9;
  --white:    #ffffff;
  --border:   #e2e8f0;
  --text:     #2d3748;
  --text2:    #718096;
  --sidebar-w: 260px;
  --header-h:  56px;
  --bottom-h:  60px;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ═══ AUTH GATE — split layout ══════════════════════════════════════════ */
#auth-gate {
  position: fixed; inset: 0; z-index: 1000;
  display: grid;
  grid-template-columns: 1fr 460px;
}
#auth-gate.hidden { display: none; }

/* Левая тёмная панель */
.gate-brand {
  background: linear-gradient(160deg, #22272E 0%, #1C2128 60%, #111 100%);
  display: flex; flex-direction: column;
  padding: 40px 48px;
  position: relative; overflow: hidden;
}
.gate-brand::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px; pointer-events: none;
}
.gate-brand::after {
  content: ''; position: absolute; left: -100px; bottom: -100px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233,69,96,0.18), transparent 70%);
  pointer-events: none;
}
.gate-brand-logo {
  display: flex; align-items: center; gap: 10px;
  position: relative; z-index: 1; margin-bottom: auto;
}
.gate-brand-logo img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.gate-brand-logo-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.gate-brand-logo-text { font-size: 17px; font-weight: 700; color: #fff; }
.gate-brand-content {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px 0 40px;
}
.gate-brand-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.gate-brand-title {
  font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.15;
  color: #fff; letter-spacing: -0.02em; margin-bottom: 20px;
}
.gate-brand-title em { color: var(--accent); font-style: normal; }
.gate-brand-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; max-width: 380px; }
.gate-brand-footer { position: relative; z-index: 1; font-size: 11.5px; color: rgba(255,255,255,0.28); }

/* Правая белая панель с формой */
.gate-wrap {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; overflow-y: auto;
}
.gate-card {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column;
}
.gate-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #718096; margin-bottom: 8px;
}
.gate-card h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; color: #2d3748; }
.gate-card .gate-sub { color: #718096; font-size: 13.5px; margin-bottom: 24px; }
.gate-tabs {
  display: flex; background: #F0F2F5; border-radius: 10px;
  padding: 4px; margin-bottom: 22px; gap: 4px;
}
.gate-tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: transparent; color: #718096; transition: all .15s;
}
.gate-tab.active {
  background: #fff; color: #2d3748;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
.gate-form { display: none !important; }
.gate-form.active { display: flex !important; flex-direction: column; gap: 14px; }
.gate-footer {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex; justify-content: space-between;
  font-size: 12px; color: #718096;
}
.gate-footer a { color: #3B6FA0; }

/* Мобильный: скрыть левую панель */
@media (max-width: 860px) {
  #auth-gate { grid-template-columns: 1fr; }
  .gate-brand { display: none; }
  .gate-wrap { min-height: 100vh; padding: 40px 20px; background: linear-gradient(135deg, var(--dark) 0%, var(--dark3) 100%); }
  .gate-card { max-width: 420px; }
  .gate-eyebrow, .gate-card h1, .gate-card .gate-sub { color: #fff; }
  .gate-card .gate-sub { color: rgba(255,255,255,0.6); }
}

/* ═══ LAYOUT ════════════════════════════════════════════════════════════ */
#app { display: none; flex-direction: column; height: 100dvh; }
#app.visible { display: flex; }

/* Шапка — только мобильная */
#topbar {
  display: none;
  background: var(--dark); color: #fff;
  height: var(--header-h);
  align-items: center; padding: 0 16px; gap: 12px;
  flex-shrink: 0; z-index: 50;
}
.topbar-logo {
  width: 34px; height: 34px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0;
}
#topbar h1 { font-size: 16px; font-weight: 600; flex: 1; }
#menu-btn {
  background: none; border: none; color: #fff;
  cursor: pointer; padding: 6px; border-radius: 6px;
  display: flex; align-items: center;
}
#menu-btn:hover { background: rgba(255,255,255,.1); }

/* Основная область */
#main { display: flex; flex: 1; overflow: hidden; }

/* ═══ САЙДБАР ═══════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w); background: var(--dark);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden;
  transition: transform .25s ease;
}
.sidebar-logo {
  padding: 18px 16px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px; background: var(--accent); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #fff; flex-shrink: 0;
}
.sidebar-logo .logo-text { color: #fff; }
.sidebar-logo .logo-text h2 { font-size: 16px; font-weight: 700; }
.sidebar-logo .logo-text p  { font-size: 11px; color: #888; margin-top: 1px; }

/* Навигация */
#nav {
  flex: 1; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
#nav::-webkit-scrollbar { width: 4px; }
#nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.nav-section { margin-bottom: 4px; }
.nav-doc-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: none; border: none;
  color: #bbb; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: left; transition: all .15s;
  border-left: 3px solid transparent;
}
.nav-doc-btn .doc-icon { font-size: 16px; flex-shrink: 0; }
.nav-doc-btn .chevron { margin-left: auto; font-size: 11px; transition: transform .2s; }
.nav-doc-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-doc-btn.active { color: #fff; border-left-color: var(--accent); background: rgba(233,69,96,.1); }
.nav-doc-btn.open .chevron { transform: rotate(90deg); }

.nav-submenu { display: none; padding: 0 0 4px 0; }
.nav-submenu.open { display: block; }
.nav-sub-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 42px; background: none; border: none;
  color: #888; font-size: 13px; cursor: pointer; text-align: left;
  transition: all .15s; border-left: 3px solid transparent;
}
.nav-sub-btn:hover { color: #ccc; background: rgba(255,255,255,.04); }
.nav-sub-btn.active { color: var(--accent); background: rgba(233,69,96,.08); }

/* Группы навигации */
.nav-group { margin-bottom: 2px; }
.nav-group-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 16px; background: none; border: none;
  color: #666; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.9px; cursor: pointer; text-align: left;
  border-left: 3px solid transparent; transition: all .15s; margin-top: 10px;
}
.nav-group-btn .chevron { margin-left: auto; font-size: 10px; transition: transform .2s; }
.nav-group-btn:hover { color: #999; }
.nav-group-btn.open .chevron { transform: rotate(90deg); }
.nav-group-body { display: none; padding-left: 6px; border-left: 1px solid rgba(255,255,255,.06); margin-left: 16px; }
.nav-group-body.open { display: block; }

/* Профиль в сайдбаре */
#sidebar-auth { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.auth-user-block {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06);
}
.auth-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0;
}
.auth-info { flex: 1; min-width: 0; }
.auth-info .auth-name { font-size: 13px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-info .auth-role { font-size: 11px; color: #888; margin-top: 1px; }
.auth-logout { background: none; border: none; color: #666; cursor: pointer; padding: 4px; border-radius: 4px; font-size: 16px; }
.auth-logout:hover { color: var(--accent); }
.auth-btn-row { display: flex; gap: 8px; }
.btn-login, .btn-register {
  flex: 1; padding: 9px 8px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-login    { background: rgba(255,255,255,.08); color: #ccc; }
.btn-login:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-register { background: var(--accent); color: #fff; }
.btn-register:hover { background: var(--accent2); }

/* ═══ КОНТЕНТ ══════════════════════════════════════════════════════════ */
#content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
#content-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 14px 20px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
#content-header .ch-icon  { font-size: 20px; }
#content-header .ch-title { font-size: 16px; font-weight: 700; color: var(--dark); }
#content-header .ch-sub   { font-size: 12px; color: var(--text2); margin-top: 1px; }
#content-body { flex: 1; overflow-y: auto; padding: 20px; }

/* ═══ ДОБРО ПОЖАЛОВАТЬ ═════════════════════════════════════════════════ */
#welcome-screen { max-width: 600px; margin: 0 auto; }
.welcome-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark3) 100%);
  border-radius: 16px; padding: 30px 24px; color: #fff;
  margin-bottom: 20px; text-align: center;
}
.welcome-hero .hero-icon { font-size: 48px; margin-bottom: 12px; }
.welcome-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.welcome-hero p  { font-size: 14px; color: #aaa; line-height: 1.6; }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
/* Карточка с фото */
.doc-card-photo {
  width: 100%; height: 110px; object-fit: cover;
  border-radius: 10px 10px 0 0;
  display: block;
}
.doc-card.has-photo { padding-top: 0; overflow: hidden; }
.doc-card.has-photo .card-icon { display: none; }
.doc-card.has-photo .card-body { padding: 10px 12px 12px; }
.welcome-section { padding: 0 20px 4px; }
.welcome-section-title {
  font-size: 13px; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 18px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.doc-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 16px; cursor: pointer;
  transition: all .2s; text-align: center;
}
.doc-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(233,69,96,.15); transform: translateY(-2px); }
.doc-card .card-icon  { font-size: 28px; margin-bottom: 8px; }
.doc-card .card-title { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.doc-card .card-sub   { font-size: 12px; color: var(--text2); }

/* ═══ КРАТКОЕ ИЗЛОЖЕНИЕ ════════════════════════════════════════════════ */
#section-screen { max-width: 760px; margin: 0 auto; }
.section-block {
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 12px; overflow: hidden;
}
.section-block-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer; user-select: none; transition: background .15s;
}
.section-block-header:hover { background: var(--bg); }
.section-block-header .sb-icon    { font-size: 18px; }
.section-block-header .sb-title   { font-size: 14px; font-weight: 600; flex: 1; }
.section-block-header .sb-chevron { color: var(--text2); font-size: 13px; transition: transform .2s; }
.section-block.open .sb-chevron { transform: rotate(180deg); }
.section-block-body {
  display: none; padding: 0 16px 16px;
  font-size: 13.5px; line-height: 1.75; color: var(--text);
  border-top: 1px solid var(--border); white-space: pre-wrap;
}
.section-block.open .section-block-body { display: block; }
.section-block-body table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.section-block-body th, .section-block-body td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; vertical-align: middle; }
.section-block-body th { background: var(--bg); font-weight: 600; }
.section-block-body td:first-child { text-align: center; }
.section-block-body td:last-child { text-align: left; font-size: 11px; }

/* ═══ AI-ЧАТ ════════════════════════════════════════════════════════════ */
#chat-screen {
  display: flex; flex-direction: column; height: 100%;
  max-width: 820px; margin: 0 auto; width: 100%;
}
.qq-wrap { margin-bottom: 8px; }
.qq-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--accent); background: none; border: none;
  cursor: pointer; padding: 2px 0 6px; opacity: 0.8;
}
.qq-toggle:hover { opacity: 1; }
.quick-questions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.quick-questions.qq-hidden { display: none; }
.qq-btn {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 14px;
  font-size: 13px; color: var(--text); cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.qq-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(233,69,96,.05); }
#messages {
  flex: 1; overflow-y: auto; display: flex;
  flex-direction: column; gap: 14px; padding-bottom: 4px;
}
.msg { display: flex; gap: 8px; max-width: 100%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.bot  { align-self: flex-start; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; margin-top: 3px;
}
.msg.user .avatar { background: var(--accent); color: #fff; }
.msg.bot  .avatar { background: var(--dark3);  color: #fff; }
.bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.65; max-width: calc(100% - 44px);
}
.msg.user .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot  .bubble { background: var(--white); color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.07); white-space: pre-wrap; }
.dots { display: flex; gap: 4px; }
.dots span { width: 7px; height: 7px; background: #bbb; border-radius: 50%; animation: bounce 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
.chat-input-area { padding-top: 12px; flex-shrink: 0; }
.chat-input-wrap { display: flex; gap: 10px; align-items: flex-end; }
#question {
  flex: 1; padding: 11px 15px; border: 2px solid var(--border); border-radius: 24px;
  font-size: 14px; font-family: inherit; outline: none; resize: none;
  min-height: 46px; max-height: 120px; overflow-y: auto;
  transition: border-color .2s; line-height: 1.4; background: var(--white);
}
#question:focus { border-color: var(--accent); }
#send-btn {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--accent); border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#send-btn:hover    { background: var(--accent2); }
#send-btn:disabled { background: #ccc; cursor: default; }
#send-btn svg { width: 20px; height: 20px; fill: #fff; }

/* ═══ PAYWALL MODAL ══════════════════════════════════════════════════════ */
#paywall-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 300;
  align-items: center; justify-content: center; padding: 16px;
}
#paywall-modal.open { display: flex; }
.paywall-box {
  background: #fff; border-radius: 20px; padding: 32px 24px;
  width: 100%; max-width: 360px; text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}
.paywall-box .pw-icon { font-size: 48px; margin-bottom: 12px; }
.paywall-box h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.paywall-box p  { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 20px; }
.paywall-box .pw-reg {
  width: 100%; padding: 13px; background: var(--accent); color: #fff;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px;
}
.paywall-box .pw-reg:hover { background: var(--accent2); }
.paywall-box .pw-skip { font-size: 13px; color: #aaa; cursor: pointer; }
.paywall-box .pw-skip:hover { color: #666; }

/* ═══ НИЖНЯЯ НАВИГАЦИЯ (мобильная) ════════════════════════════════════ */
#bottom-nav { display: none; }

/* ═══ OVERLAY (сайдбар мобильный) ═════════════════════════════════════ */
#sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 90;
}

/* ═══ МОДАЛКИ ══════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 200;
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 16px;
  padding: 24px; width: 100%; max-width: 380px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h3 { font-size: 18px; font-weight: 700; color: var(--dark); }
.modal-close { background: none; border: none; font-size: 20px; color: #aaa; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #333; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 5px; }
.field-input {
  width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; margin-bottom: 12px;
  transition: border-color .2s;
}
.field-input:focus { border-color: var(--accent); }
.btn-submit {
  width: 100%; padding: 12px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s; margin-top: 4px;
}
.btn-submit:hover { background: var(--accent2); }
.btn-submit:disabled { background: #ccc; cursor: default; }
.modal-err { color: var(--accent); font-size: 13px; margin-top: 8px; min-height: 18px; }
.modal-switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text2); }
.modal-switch a { color: var(--accent); cursor: pointer; font-weight: 600; }

/* ═══ МОБИЛЬНАЯ АДАПТАЦИЯ ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #topbar { display: flex; }
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 100; transform: translateX(-100%); width: 280px;
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #sidebar-overlay.open { display: block; }
  #bottom-nav {
    display: flex; background: var(--white);
    border-top: 1px solid var(--border); height: var(--bottom-h); flex-shrink: 0;
  }
  .bnav-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    background: none; border: none; cursor: pointer;
    color: var(--text2); font-size: 10px; transition: color .15s; padding: 0;
  }
  .bnav-btn .bnav-icon { font-size: 18px; }
  .bnav-btn.active { color: var(--accent); }
  #content-body { padding: 12px; }
  .welcome-hero { padding: 8px 14px 6px; margin-bottom: 10px; }
  .welcome-hero .hero-icon { display: none; }
  .welcome-hero h2 { font-size: 14px; margin-bottom: 2px; }
  .welcome-hero p { font-size: 11px; margin: 0; }
  .gate-card { padding: 22px 20px 20px; }
}
@media (min-width: 769px) {
  #content-body { display: flex; flex-direction: column; }
  #chat-screen { height: 100%; }
}

/* Хаб локомотива */
.lok-hub { padding: 24px; max-width: 900px; }
.lok-hub-header { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.lok-hub-icon { font-size:36px; }
.lok-hub-title { font-size:26px; font-weight:700; color:var(--accent); }
.lok-hub-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; }
.lok-doc-card {
  background:#1a1d27; border:1px solid rgba(255,255,255,.08);
  border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:12px;
  transition: border-color .2s;
}
.lok-doc-card:hover { border-color: rgba(233,69,96,.4); }
.lok-doc-card-title { font-size:15px; font-weight:600; color:#e0e0e0; }
.lok-doc-card-desc  { font-size:12px; color:#888; margin-top:-6px; }
.lok-doc-card-btns  { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.lok-doc-card-btns button {
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  color:#ccc; border-radius:8px; padding:9px 14px; font-size:13px;
  cursor:pointer; text-align:left; transition:background .15s, color .15s;
}
.lok-doc-card-btns button:hover { background:var(--accent); color:#fff; border-color:var(--accent); }

    .isi-img-block { text-align: center; margin: 8px 0 4px; }
    .isi-img-block img { max-width: 220px; max-height: 220px; border-radius: 6px; border: 1px solid #e0e0e0; background: #fff; }
    .isi-img-caption { text-align: center; font-size: 0.82em; color: #888; margin-bottom: 8px; font-style: italic; }

/* ─── Приложения в сайдбаре ─────────────────────────────────────────── */
.nav-apps-section { margin-top: 8px; }
.nav-apps-section .nav-group-btn {
  width: 100%; text-align: left; background: none; border: none;
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary, #666); cursor: pointer; border-radius: 8px;
  display: flex; justify-content: space-between;
}
.nav-apps-section .nav-group-btn:hover { background: var(--hover-bg, #f0f0f0); }
.nav-apps-section .nav-group-body { display: none; }
.nav-apps-section .nav-group-body.open { display: block; }
.nav-apps-section .nav-sub-btn {
  width: 100%; text-align: left; background: none; border: none;
  padding: 8px 16px 8px 28px; font-size: 13px; color: var(--text-primary, #333);
  cursor: pointer; border-radius: 6px;
}
.nav-apps-section .nav-sub-btn:hover { background: var(--hover-bg, #f0f0f0); }

/* ─── PWA install banner ─────────────────────────────────────────────────── */
.pwa-banner {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 20px 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #1a2e4a 100%);
  border: 1px solid #2563eb44;
  border-radius: 12px;
  color: #e2e8f0;
}
.pwa-banner-icon { font-size: 28px; flex-shrink: 0; }
.pwa-banner-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pwa-banner-text strong { font-size: 14px; color: #93c5fd; }
.pwa-banner-text span { font-size: 13px; color: #94a3b8; line-height: 1.4; }
.pwa-hint { font-size: 12px; color: #64748b; margin-top: 3px; display: block; }
.pwa-banner-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  background: #2563eb;
  color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.pwa-banner-btn:hover { background: #1d4ed8; }
@media (max-width: 480px) {
  .pwa-banner { flex-wrap: wrap; }
  .pwa-banner-btn { width: 100%; text-align: center; padding: 10px; }
}
