/* ===== Granderi: структура главной (боковое меню) ===== */
:root{ --g-ink:#150d29; --g-violet:#7c4dff; --g-soft:#f4f1fb; --g-line:#e9e4f5; --g-mute:#766f8a; --g-side:248px; --bg:#f4f1fb; }
body{ background:var(--g-soft); }

/* боковая панель */
#app{ padding-left:var(--g-side); }
#app > header{ background:var(--g-soft); color:var(--g-ink); border:0; padding:16px 32px; position:sticky; top:0; z-index:70; min-height:76px; }
#app > header .logo-link{ position:fixed; left:0; top:0; width:var(--g-side); height:132px; justify-content:center; z-index:62; }
#app > header .logo-link .divider, #app > header .logo-link h1{ display:none; }
#app > header .logo{ height:78px; filter:brightness(0) invert(1); }
#app > nav.tabs #auditLink::before{ content:""; }
#app > nav.tabs{ position:fixed; left:0; top:0; bottom:0; width:var(--g-side); z-index:60; background:linear-gradient(180deg,#1c1238 0%,#0f0922 100%);
  display:flex; flex-direction:column; align-items:stretch; gap:4px; padding:148px 14px 20px; margin:0; border:0; overflow-y:auto; }
#app > nav.tabs button, #app > nav.tabs a{ display:flex; align-items:center; gap:12px; text-align:left; padding:13px 16px; margin:0; border:0 !important; border-radius:14px; background:none; color:#b9b0d4; font-size:14.5px; font-weight:500; text-decoration:none; box-shadow:none; }
#app > nav.tabs button:hover, #app > nav.tabs a:hover{ background:rgba(255,255,255,.07); color:#fff; }
#app > nav.tabs button.active{ background:var(--g-violet); color:#fff; box-shadow:0 10px 24px rgba(124,77,255,.38); }
#app > nav.tabs > *::before{ content:""; width:7px; height:7px; border-radius:50%; background:currentColor; opacity:.5; flex:none; }
#app > nav.tabs button.active::before{ opacity:1; }

/* верхняя строка */
#app > header .conn-dot{ order:-2; }
#app > header .gsearch-wrap{ margin:0 auto 0 0; order:-1; flex:1; max-width:520px; }
#app > header .gsearch-wrap input{ background:#fff; color:var(--g-ink); border:1px solid var(--g-line); border-radius:999px; padding:12px 20px; width:100%; }
#app > header .gsearch-wrap input::placeholder{ color:#9a93ad; }
#app > header .bell svg{ stroke:var(--g-ink); }
#app > header .userchip .name{ color:var(--g-ink); }
#app > header .userchip .role{ color:var(--g-mute); }
#app > header .userchip .av{ border-radius:50%; background:var(--g-violet); color:#fff; }
#app > header > button{ color:var(--g-ink) !important; background:#fff !important; border:1px solid var(--g-line) !important; border-radius:999px !important; padding:8px 16px !important; }
#app main{ max-width:1320px; width:100%; margin:0 auto; padding:8px 32px 60px; }

/* карточки на остальных вкладках */
#app .stat-card, #app .stat, #app .card, #app table{ border-radius:18px; }
#app .btn-primary, #app .subtabs button{ border-radius:999px; }

/* ===== новая главная ===== */
#view-home > :not(#gHome){ display:none !important; }
.gh-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; margin:8px 0 22px; }
.gh-top h2{ margin:0; font-size:30px; font-weight:600; color:var(--g-ink); }
.gh-top p{ margin:8px 0 0; color:var(--g-mute); font-size:14px; }
.gh-cta{ background:var(--g-ink); color:#fff; text-decoration:none; padding:13px 22px; border-radius:999px; font-weight:600; font-size:14px; }
.gh-cta:hover{ background:var(--g-violet); }
.gh-bento{ display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:16px; }
.gh-tile{ background:#fff; border:1px solid var(--g-line); border-radius:24px; padding:24px; text-decoration:none; color:var(--g-ink); display:block; min-width:0; }
.gh-hero{ grid-row:span 2; background:radial-gradient(120% 120% at 100% 0%,#9a78ff 0%,#5a2fd0 42%,#1c1238 100%); color:#fff; border:0; display:flex; flex-direction:column; justify-content:space-between; min-height:292px; }
.gh-num{ font-family:"Unbounded",sans-serif; font-size:42px; font-weight:600; line-height:1.1; }
.gh-hero .gh-num{ font-size:92px; }
.gh-label{ font-size:13.5px; color:var(--g-mute); margin-top:8px; }
.gh-hero .gh-label{ color:#ddd3ff; font-size:15px; }
.gh-bar{ height:8px; border-radius:99px; background:rgba(255,255,255,.18); display:flex; overflow:hidden; margin-top:20px; }
.gh-bar i{ display:block; height:100%; }
.gh-legend{ display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:12px; font-size:12.5px; color:#ddd3ff; }
.gh-legend b{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.gh-bad .gh-num{ color:#c93d57; } .gh-warn .gh-num{ color:#b87514; }
.gh-row{ display:grid; grid-template-columns:1.6fr 1fr; gap:16px; margin-top:16px; align-items:start; }
.gh-tile h3{ margin:0 0 14px; font-size:16px; font-weight:600; }
.gh-item{ display:grid; grid-template-columns:112px 1fr auto; gap:14px; align-items:center; padding:13px 0; border-top:1px solid var(--g-line); text-decoration:none; color:inherit; font-size:13.5px; }
.gh-item:hover .gh-code{ color:var(--g-violet); }
.gh-code{ font-weight:700; }
.gh-desc{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gh-desc small{ display:block; color:var(--g-mute); font-size:12px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; }
.gh-pill{ border-radius:999px; padding:5px 11px; font-size:12px; font-weight:600; background:var(--g-soft); color:#4a3a7a; white-space:nowrap; }
.gh-pill.bad{ background:#fbe8ec; color:#b32f4a; } .gh-pill.warn{ background:#fcf0da; color:#94590a; }
.gh-cust{ margin-bottom:14px; font-size:13.5px; }
.gh-cust div{ display:flex; justify-content:space-between; gap:10px; margin-bottom:6px; }
.gh-cust s{ display:block; height:7px; border-radius:99px; background:var(--g-soft); overflow:hidden; text-decoration:none; }
.gh-cust s i{ display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#51358a,#9a78ff); }
.gh-empty{ color:var(--g-mute); font-size:13.5px; padding:12px 0; }

/* ===== экран входа: две колонки ===== */
#authScreen{ justify-content:flex-end; padding:0; background:url(/hero-bg.jpg) center/cover no-repeat #0e0820; position:relative; }
#authScreen::before{ content:""; position:absolute; inset:0; background:linear-gradient(100deg,rgba(24,10,56,.55),rgba(14,8,32,.88)); }
#authScreen::after{ content:"GRANDERI\A PORTAL"; white-space:pre; position:absolute; left:7vw; bottom:11vh; color:#fff; font:600 clamp(28px,4.2vw,60px)/1.2 "Unbounded",sans-serif; }
#authScreen .auth-box{ position:relative; z-index:1; max-width:460px; min-height:100vh; border:0; border-radius:36px 0 0 36px; padding:48px 52px; display:flex; flex-direction:column; justify-content:center; }
#authScreen .field input{ border-radius:14px; padding:13px 16px; }
#authScreen .btn-primary{ border-radius:999px; padding:14px 0; background:var(--g-violet); }

@media (max-width:1100px){ .gh-bento{ grid-template-columns:1fr 1fr; } .gh-hero{ grid-column:1/-1; grid-row:auto; } .gh-row{ grid-template-columns:1fr; } }
@media (max-width:860px){
  #app{ padding-left:0; }
  #app > header{ flex-wrap:wrap; padding:12px 16px; position:static; }
  #app > header .logo-link{ display:none; }
  #app > nav.tabs{ position:sticky; width:auto; bottom:auto; flex-direction:row; overflow-x:auto; padding:8px 10px; }
  #app > nav.tabs button, #app > nav.tabs a{ white-space:nowrap; padding:9px 14px; }
  #app main{ padding:12px 14px 60px; }
  .gh-item{ grid-template-columns:1fr auto; } .gh-item .gh-desc{ grid-column:1/-1; grid-row:2; }
  #authScreen::after{ display:none; } #authScreen{ justify-content:center; } #authScreen .auth-box{ border-radius:24px; min-height:0; margin:16px; padding:32px 24px; }
}
#view-home.active{ animation:none !important; opacity:1 !important; }
#app > nav.tabs #auditLink{ gap:12px; }
