/* ===== Mentorix — веб в стиле десктоп-GUI (графит · платина · один акцент) ===== */
:root {
    --bg: #0a0b0d;
    --bg-soft: #0e0f13;
    --panel: rgba(255, 255, 255, 0.024);
    --panel-2: rgba(255, 255, 255, 0.04);
    --panel-brd: rgba(255, 255, 255, 0.06);
    --panel-brd-strong: rgba(255, 255, 255, 0.12);
    --txt: #e9eaee;
    --txt-dim: #9498a3;
    --txt-mute: #565a66;
    --accent: #7b8cff;
    --accent-soft: rgba(123, 140, 255, 0.14);
    --accent-line: rgba(123, 140, 255, 0.55);
    --ok: #6cd39a;
    --warn: #e6c07b;
    --err: #e07a8b;
    --radius: 15px;
    --radius-sm: 11px;
    --sidebar-w: 258px;
    --shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display", Roboto, sans-serif;
    color: var(--txt);
    background:
        radial-gradient(1100px 600px at 80% -20%, rgba(255, 255, 255, 0.035), transparent 60%),
        radial-gradient(900px 700px at -10% 120%, rgba(123, 140, 255, 0.05), transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.13); }

/* ===== Каркас админки ===== */
.app { display: flex; min-height: 100vh; }

/* ===== Сайдбар ===== */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    display: flex; flex-direction: column; padding: 18px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0));
    border-right: 1px solid var(--panel-brd);
    position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(155deg, #1c1d23, #101116);
    border: 1px solid var(--panel-brd-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.brand-mark svg { filter: saturate(0.6) brightness(1.05); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 17px; font-weight: 750; letter-spacing: 0.3px; color: #f3f4f7; }
.brand-tag { font-size: 10px; color: var(--txt-mute); letter-spacing: 2px; text-transform: uppercase; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px;
    color: var(--txt-mute); padding: 8px 12px 7px; font-weight: 600; }
.nav-item {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--txt-dim); cursor: pointer; font-size: 13.5px; font-weight: 500;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-item:hover { background: var(--panel-2); color: var(--txt); }
.nav-item .nav-ico { width: 19px; height: 19px; display: grid; place-items: center; color: inherit; transition: transform 0.25s var(--ease); }
.nav-item:hover .nav-ico { transform: scale(1.08); }
.nav-item .nav-ico svg { width: 19px; height: 19px; }
.nav-name { flex: 1; }
.nav-item.is-active { color: #fff; background: var(--accent-soft); }
.nav-item.is-active::before {
    content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent-line);
}
.nav-item.is-active .nav-ico { color: var(--accent); }
.nav-badge {
    min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px;
    background: var(--panel-2); border: 1px solid var(--panel-brd);
    color: var(--txt-dim); font-size: 11px; font-weight: 600; display: grid; place-items: center;
}

.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--panel-brd); }
.user-card {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px;
    border-radius: var(--radius-sm); background: var(--panel);
    border: 1px solid var(--panel-brd); transition: background 0.2s;
}
.user-card:hover { background: var(--panel-2); }
.user-ava {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(150deg, #23252c, #14151a);
    border: 1px solid var(--panel-brd-strong);
    display: grid; place-items: center; font-weight: 700; color: var(--txt); font-size: 14px;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 11px; color: var(--txt-dim); display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #4ea87a; box-shadow: 0 0 7px rgba(78,168,122,0.8); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100%{ opacity: 1 } 50%{ opacity: 0.35 } }

/* ===== Контент ===== */
.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 30px; gap: 20px; border-bottom: 1px solid var(--panel-brd);
    position: sticky; top: 0; z-index: 5;
    background: rgba(10,11,13,0.72); backdrop-filter: blur(14px);
}
.topbar-title h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.topbar-title p { font-size: 13px; color: var(--txt-dim); margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.page-scroll { flex: 1; padding: 26px 30px 42px; animation: pageIn 0.38s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: translateY(0) } }

/* ===== Карточки-статистика ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--panel-brd); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; transition: transform 0.22s var(--ease), border-color 0.22s, background 0.22s; border-radius: var(--radius); }
.stat:hover { transform: translateY(-3px); background: var(--panel-2); }
.stat-ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(155deg, #1b1c22, #111217);
    border: 1px solid var(--panel-brd-strong); color: var(--txt-dim);
}
.stat-ico svg { width: 21px; height: 21px; }
.stat-body { display: flex; flex-direction: column; }
.stat-num { font-size: 23px; font-weight: 750; line-height: 1; letter-spacing: -0.5px; }
.stat-cap { font-size: 12px; color: var(--txt-dim); margin-top: 6px; }
.stat-ico.ok { color: #7fc4a0; } .stat-ico.err { color: #d98a9a; } .stat-ico.accent { color: #9aa6ff; }

/* ===== Секции / панели ===== */
.section {
    background: var(--panel); border: 1px solid var(--panel-brd);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 20px 22px; margin-bottom: 16px;
}
.section.tight { padding: 8px 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.section-sub { font-size: 12.5px; color: var(--txt-dim); }
.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 14px; }

/* ===== Таблицы ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--panel-brd); vertical-align: middle; }
th { color: var(--txt-mute); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
tbody tr { transition: background 0.15s; }
tbody tr:hover td { background: rgba(255,255,255,0.015); }
tbody tr:last-child td { border-bottom: none; }
.mono { font-family: "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 12px; color: var(--txt-dim); }
.u-name { font-weight: 600; }
.u-sub { font-size: 11.5px; color: var(--txt-mute); }

/* ===== Бейджи ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge.ok { background: rgba(108,211,154,0.15); color: var(--ok); }
.badge.err { background: rgba(224,122,139,0.15); color: var(--err); }
.badge.warn { background: rgba(230,192,123,0.15); color: var(--warn); }
.badge.mute { background: var(--panel-2); color: var(--txt-dim); border: 1px solid var(--panel-brd); }
.badge.sec { background: rgba(224,122,139,0.15); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: #b9c1ff; }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 10px 16px; border-radius: 10px; border: 1px solid var(--panel-brd);
    background: var(--panel); color: var(--txt); font-size: 13px; font-weight: 600;
    transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--panel-2); border-color: var(--panel-brd-strong); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: #f2f3f6; color: #14151a; border-color: transparent; box-shadow: 0 6px 18px -10px rgba(0,0,0,0.9); }
.btn-primary:hover { background: #fff; }
.btn-accent { background: var(--accent-soft); color: #cfd5ff; border-color: transparent; }
.btn-accent:hover { background: rgba(123,140,255,0.22); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn-danger { color: var(--err); border-color: rgba(224,122,139,0.35); }
.btn-danger:hover { background: rgba(224,122,139,0.14); }

/* ===== Поля ===== */
.inp, select.inp {
    height: 38px; padding: 0 12px; border-radius: 10px;
    background: var(--bg-soft); border: 1px solid var(--panel-brd); outline: none;
    color: var(--txt); font-size: 13px; transition: border-color 0.18s, background 0.18s;
}
.inp:focus { border-color: var(--accent-line); background: var(--panel); }
.inp::placeholder { color: var(--txt-mute); }
select.inp { cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.inline { display: inline-flex; gap: 6px; align-items: center; }

/* ===== Лендинг ===== */
.public-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 40px; border-bottom: 1px solid var(--panel-brd);
    position: sticky; top: 0; z-index: 10;
    background: rgba(10,11,13,0.72); backdrop-filter: blur(14px);
}
.public-top .brand { padding: 0; }
.pub-nav { display: flex; gap: 10px; align-items: center; }
.hero { max-width: 1000px; margin: 0 auto; padding: 90px 40px 40px; text-align: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px;
    background: var(--accent-soft); color: #b9c1ff; font-size: 12px; font-weight: 600; margin-bottom: 22px; }
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.05;
    background: linear-gradient(180deg, #ffffff, #b7bcc8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--txt-dim); font-size: 17px; margin: 20px auto 30px; max-width: 560px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }
.features { max-width: 1000px; margin: 30px auto; padding: 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
@media (max-width: 800px) { .features { grid-template-columns: 1fr; } .hero h1 { font-size: 36px; } }
.feature { background: var(--panel); border: 1px solid var(--panel-brd); border-radius: var(--radius); padding: 22px; }
.feature .f-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(155deg, #1b1c22, #111217); border: 1px solid var(--panel-brd-strong); color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 7px; }
.feature p { color: var(--txt-dim); font-size: 13px; line-height: 1.55; }

/* ===== Логин ===== */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { background: var(--panel); border: 1px solid var(--panel-brd); border-radius: var(--radius);
    padding: 38px 34px; width: 400px; text-align: center; box-shadow: var(--shadow); }
.auth-card .brand-mark { margin: 0 auto 20px; width: 52px; height: 52px; }
.auth-card h1 { font-size: 22px; font-weight: 750; }
.hint { color: var(--txt-dim); font-size: 13px; margin-top: 12px; line-height: 1.55; }
.status-line { margin-top: 20px; font-size: 13px; color: var(--txt-dim); min-height: 20px;
    display: flex; align-items: center; justify-content: center; gap: 8px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--panel-brd-strong); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-row { text-align: center; color: var(--txt-mute); padding: 26px; font-size: 13px; }
