@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --purple: #5d5a72;
    --purple2: #a7a2bd;
    --accent: #4a4860;
    --bg: #0d0d10;
    --panel: #15151a;
    --card: #141419;
    --line: rgba(255, 255, 255, 0.07);
    --txt: #e4e3e9;
    --muted: #8b8a96;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
    overflow-x: hidden;
}

/* flat, calm background — no neon glow */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
    background: linear-gradient(180deg, #111116 0%, var(--bg) 60%); }
.orb { display: none; }
.grid { display: none; }

/* nav */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 16px 40px;
    backdrop-filter: blur(10px);
    background: rgba(12, 11, 16, 0.8);
    border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 22px; letter-spacing: 0.3px; cursor: pointer; color: #fff; }
.logo::after { content: ''; }
.nav-links { display: flex; gap: 26px; justify-self: center; }
.nav-links a { color: var(--muted); cursor: pointer; font-weight: 500; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--txt); }
.nav-auth { display: flex; gap: 10px; align-items: center; justify-self: end; }

/* buttons */
.btn {
    border: none; cursor: pointer; border-radius: 10px;
    padding: 10px 18px; font-size: 14px; font-weight: 600; color: #fff;
    background: var(--purple);
    transition: background .15s, transform .1s;
}
.btn:hover { background: #6b6884; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt); }
.btn.ghost:hover { background: rgba(255,255,255,0.05); }
.btn.big { padding: 13px 26px; font-size: 15px; }
.btn.full { width: 100%; padding: 13px; }

/* pages */
.page { position: relative; z-index: 2; display: none; max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.page.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-title { font-size: 30px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.page-sub { text-align: center; color: var(--muted); margin-bottom: 34px; }

/* hero */
.hero { text-align: center; padding: 48px 0 36px; }
.badge {
    display: inline-block; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
    background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted); margin-bottom: 20px;
}
.hero-title { font-size: 46px; font-weight: 800; line-height: 1.1; margin-bottom: 16px; color: #fff; }
.grad { color: var(--purple2); }
.hero-sub { max-width: 560px; margin: 0 auto 26px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.feature {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px;
    transition: border-color .15s;
}
.feature:hover { border-color: rgba(255,255,255,0.16); }
.f-ic { width: 26px; height: 26px; color: var(--purple2); margin-bottom: 14px; display: block; }
.feature h3 { font-size: 16px; margin-bottom: 8px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* shop */
.shop { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 720px; margin: 0 auto; }
.product {
    position: relative; background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; padding: 28px 26px; transition: border-color .15s;
}
.product:hover { border-color: rgba(255,255,255,0.16); }
.product.best { border-color: rgba(167,162,189,0.32); }
.p-tag {
    position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600;
    padding: 4px 10px; border-radius: 5px; background: rgba(255,255,255,0.06); color: var(--muted);
}
.p-tag.gold { color: #c9a86a; }
.p-name { font-size: 14px; color: var(--muted); }
.p-period { font-size: 24px; font-weight: 700; margin: 4px 0 14px; color: #fff; }
.p-price { font-size: 34px; font-weight: 800; margin-bottom: 20px; color: #fff; }
.p-list { list-style: none; margin-bottom: 24px; }
.p-list li { padding: 8px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.p-list li::before { content: '— '; color: var(--purple2); }

/* cabinet */
.cab { display: flex; flex-direction: column; gap: 9px; max-width: 940px; margin: 0 auto; }
.cab-row { display: flex; align-items: center; gap: 9px; }
.cab-key {
    display: flex; align-items: center; gap: 8px; width: 220px; flex-shrink: 0;
    background: var(--accent);
    color: #fff; font-weight: 600; font-size: 14px; padding: 12px 15px; border-radius: 8px;
}
.cab-val {
    flex: 1; background: var(--card); border: 1px solid var(--line);
    padding: 12px 15px; border-radius: 8px; color: var(--txt); font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cab-val input { width: 100%; background: none; border: none; outline: none; color: #fff; font-size: 14px; }
.cab-act { width: 150px; flex-shrink: 0; }
.cab-bottom { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cab-bottom .btn { flex: 0 0 auto; }
.cab-bottom .spacer { flex: 1; }

/* auth modal */
.overlay {
    position: fixed; inset: 0; z-index: 100; display: none;
    align-items: center; justify-content: center;
    background: rgba(6,5,10,0.7); backdrop-filter: blur(6px);
}
.overlay.show { display: flex; animation: fade .2s ease; }
.modal {
    position: relative; width: 380px; max-width: 92%;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.modal-close { position: absolute; top: 16px; right: 18px; cursor: pointer; color: var(--muted); font-size: 16px; }
.modal-close:hover { color: #fff; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: 9px; }
.tab { flex: 1; text-align: center; padding: 9px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; transition: all .15s; }
.tab.active { background: var(--purple); color: #fff; }
.form { display: flex; flex-direction: column; gap: 11px; }
.row { display: flex; gap: 8px; }
.row .inp { flex: 1; }
.row .btn { flex: 0 0 auto; }
.inp {
    background: rgba(255,255,255,0.04); border: 1px solid var(--line);
    border-radius: 9px; padding: 12px 14px; color: #fff; font-size: 14px; outline: none; transition: border-color .15s;
}
.inp:focus { border-color: var(--purple2); }
.msg { min-height: 18px; text-align: center; font-size: 13px; margin-top: 14px; }
.msg.err { color: #e06a6a; }
.msg.ok { color: #6bbf86; }

/* toast */
.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120px);
    display: flex; align-items: center; gap: 11px;
    background: var(--panel); border: 1px solid var(--line); color: #fff;
    padding: 14px 20px; border-radius: 11px; z-index: 200; font-weight: 500; font-size: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55); transition: transform .3s cubic-bezier(.2,.9,.3,1); max-width: 90%;
}
.toast::before {
    content: ''; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    background: var(--muted);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(95,184,122,0.35); }
.toast.ok::before { background: #5fb87a; box-shadow: 0 0 8px rgba(95,184,122,0.5); }
.toast.err { border-color: rgba(217,106,106,0.35); }
.toast.err::before { background: #d96a6a; box-shadow: 0 0 8px rgba(217,106,106,0.5); }

/* dialog */
.modal.dlg { width: 400px; }
.dlg-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.dlg-body { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; }
.dlg-actions .btn { padding: 10px 20px; }
.dlg-product {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.04); border: 1px solid var(--line);
    border-radius: 10px; padding: 16px 18px;
}
.dlg-product span { color: var(--txt); font-weight: 600; font-size: 15px; }
.dlg-product b { color: #fff; font-size: 20px; font-weight: 800; }
.dlg-li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.dlg-li:last-child { border-bottom: none; }
.dlg-li span { color: var(--txt); }
.dlg-li b { color: var(--muted); font-weight: 500; }
.dlg-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.dlg-form label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 7px; }
.btn.danger { background: #9c4a4a; }
.btn.danger:hover { background: #b15656; }

@media (max-width: 800px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .shop { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
    .nav { padding: 14px 18px; }
    .nav-links { display: none; }
    .cab-key { width: 150px; font-size: 12px; }
    .cab-act { width: auto; }
}


/* footer */
.footer {
    position: relative; z-index: 2;
    border-top: 1px solid var(--line);
    background: rgba(12, 11, 16, 0.6);
    padding: 22px 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 13px; cursor: pointer; transition: color .15s; }
.footer-links a:hover { color: var(--txt); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials .soc {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid var(--line);
    color: var(--muted); transition: all .15s; cursor: pointer;
}
.footer-socials .soc:hover { color: var(--txt); border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* cabinet admin */
.cab-admin { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.cab-admin-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.cab-admin input { width: 100%; background: none; border: none; outline: none; color: #fff; font-size: 14px; }

/* support */
.support-box {
    width: 760px; max-width: 94%; height: 560px; max-height: 88vh;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.support-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.support-title { font-size: 17px; font-weight: 700; color: #fff; }
.support-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.sup-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sup-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; padding: 20px; }
.sup-msg { display: flex; }
.sup-msg.usr { justify-content: flex-start; }
.sup-msg.adm { justify-content: flex-end; }
.sup-bubble {
    max-width: 75%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4;
    background: rgba(255,255,255,0.06); color: var(--txt); word-break: break-word;
}
.sup-msg.adm .sup-bubble { background: var(--purple); color: #fff; }
.sup-ts { display: block; font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.sup-input { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.sup-input .inp { flex: 1; }
.sup-input .btn { flex: 0 0 auto; }
.sup-cd { color: var(--muted); font-size: 12px; text-align: center; padding: 0 16px 12px; }

.sup-admin { flex: 1; display: flex; min-height: 0; }
.sup-list { width: 230px; flex-shrink: 0; border-right: 1px solid var(--line); overflow-y: auto; }
.sup-chat { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: background .15s; }
.sup-chat:hover { background: rgba(255,255,255,0.04); }
.sup-chat.active { background: rgba(255,255,255,0.08); }
.sup-chat-name { color: #fff; font-size: 14px; font-weight: 600; }
.sup-chat-last { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-chatview { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sup-chat-title { padding: 12px 16px; border-bottom: 1px solid var(--line); color: #fff; font-weight: 600; }

@media (max-width: 800px) {
    .footer { flex-direction: column; text-align: center; }
    .sup-list { width: 140px; }
    .support-box { height: 80vh; }
}


/* background notifications (bottom-right) */
.notify-stack {
    position: fixed; right: 20px; bottom: 20px; z-index: 300;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
    pointer-events: none;
}
.note {
    pointer-events: auto; cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    width: 320px; max-width: 86vw;
    background: var(--panel); border: 1px solid var(--line);
    border-left: 3px solid var(--purple2);
    border-radius: 12px; padding: 13px 15px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    transform: translateX(140%); opacity: 0;
    transition: transform .35s cubic-bezier(.2,.9,.3,1), opacity .35s;
}
.note.show { transform: translateX(0); opacity: 1; }
.note:hover { border-color: rgba(255,255,255,0.2); }
.note-ic {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(167,162,189,0.15); color: var(--purple2);
}
.note-body { min-width: 0; }
.note-title { color: #fff; font-size: 13.5px; font-weight: 700; }
.note-text { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ===== home extras ===== */
.section-title {
    text-align: center; font-size: 24px; font-weight: 800; color: #fff;
    margin: 48px 0 22px;
}
.stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px;
}
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 22px 16px; text-align: center; transition: border-color .15s;
}
.stat:hover { border-color: rgba(255,255,255,0.16); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--purple2); }
.stat-lbl { font-size: 13px; color: var(--muted); margin-top: 6px; }

.cta {
    margin-top: 50px; text-align: center;
    background: linear-gradient(135deg, rgba(93,90,114,0.20), rgba(167,162,189,0.10));
    border: 1px solid var(--line); border-radius: 16px; padding: 44px 24px;
}
.cta-title { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cta-sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }

/* shop services */
.shop.services { grid-template-columns: 1fr; max-width: 360px; margin-top: 4px; }
.product.service { border-color: rgba(167,162,189,0.22); }
.product.service .p-period { font-size: 21px; }

@media (max-width: 800px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 21px; }
    .cta { padding: 34px 18px; }
}


/* ===== visuals ===== */
/* мягкие движущиеся пятна на фоне (спокойные, без неона) */
.orb { display: block; position: absolute; border-radius: 50%; filter: blur(90px); }
.orb1 { width: 380px; height: 380px; background: #5d5a72; opacity: 0.20; top: -90px; left: -70px; animation: drift1 20s ease-in-out infinite; }
.orb2 { width: 320px; height: 320px; background: #45415c; opacity: 0.18; bottom: -70px; right: -50px; animation: drift2 24s ease-in-out infinite; }
.orb3 { width: 260px; height: 260px; background: #6b6884; opacity: 0.12; top: 42%; left: 56%; animation: drift1 28s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(42px,30px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-38px,-26px); } }

/* превью-окно клиента в hero */
.hero-preview { display: flex; justify-content: center; margin-top: 40px; }
.win {
    width: 360px; max-width: 92%;
    background: rgba(20,20,26,0.92); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--line); }
.win-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3a44; }
.win-title { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.win-body { padding: 14px; text-align: left; }
.win-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--purple2); margin: 12px 0 7px; }
.win-cat:first-child { margin-top: 0; }
.mod {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border-radius: 8px; background: rgba(255,255,255,0.03);
    margin-bottom: 6px; font-size: 13px; color: var(--muted);
}
.mod .sw { width: 30px; height: 16px; border-radius: 10px; background: rgba(255,255,255,0.1); position: relative; transition: background .2s; flex-shrink: 0; }
.mod .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #777; transition: all .2s; }
.mod.on { color: #fff; background: rgba(93,90,114,0.18); }
.mod.on .sw { background: var(--purple); }
.mod.on .sw::after { left: 16px; background: #fff; }

/* лёгкое поднятие карточек при наведении */
.feature, .product, .stat { transition: border-color .15s, transform .15s; }
.feature:hover, .product:hover, .stat:hover { transform: translateY(-3px); }


/* ===== global chat (cabinet) ===== */
.cab-layout { display: flex; gap: 16px; align-items: flex-start; max-width: 1260px; margin: 0 auto; }
.cab-layout .cab { flex: 1; max-width: none; margin: 0; }
.gchat {
    width: 300px; flex-shrink: 0;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    display: flex; flex-direction: column; height: 560px; overflow: hidden;
}
.gchat-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 15px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.gchat-title { font-weight: 700; color: #fff; font-size: 14px; }
.gchat-online { font-size: 12px; color: #5fb87a; display: flex; align-items: center; gap: 6px; }
.gchat-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #5fb87a; box-shadow: 0 0 6px rgba(95,184,122,0.6); }
.gchat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.gc-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
.gc-msg { display: flex; flex-direction: column; gap: 2px; }
.gc-name { font-size: 11px; font-weight: 700; color: var(--purple2); }
.gc-msg.mine .gc-name { color: #5fb87a; }
.gc-mod { margin-left: 8px; display: inline-flex; gap: 6px; }
.gc-mod a { cursor: pointer; font-size: 11px; opacity: 0.55; transition: opacity .15s; }
.gc-mod a:hover { opacity: 1; }
.gc-text { font-size: 13.5px; color: var(--txt); word-break: break-word; line-height: 1.4; }
.gchat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.gchat-input .inp { flex: 1; padding: 10px 12px; }
.gchat-input .btn { flex: 0 0 auto; padding: 10px 16px; }

@media (max-width: 900px) {
    .cab-layout { flex-direction: column; }
    .gchat { width: 100%; height: 360px; }
}
