/* =================================================================
   Re:Suite dash — оформление панели
   =================================================================
   Палитра нейтральная: тёмный сланец + один приглушённый акцент.
   Бирюза и золото сознательно не используются — они закреплены
   за монетизацией в Афише (teal = бесплатно, gold = платно),
   и повторять их в панели над всеми продуктами значило бы
   привязать общий инструмент к одному из них.

   Перекрасить всю панель = поменять переменные в :root.
   ================================================================= */

:root {
    --bg:          #14171c;   /* фон страницы */
    --surface:     #1b1f26;   /* карточки, шапка */
    --surface-2:   #222831;   /* наведение, полосатые строки таблиц */
    --border:      #2c333d;
    --text:        #e6e9ee;
    --text-muted:  #8b94a3;
    --accent:      #7aa2c8;   /* ссылки, активная вкладка, кнопки */
    --accent-dark: #5d84a8;
    --danger:      #d1636b;
    --ok:          #6fbf8b;
    --warn:        #d9a441;
    --radius:      8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Шапка ---------- */

.dash-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.dash-header__top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
}

.dash-logo {
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--text);
    white-space: nowrap;
}
.dash-logo:hover { text-decoration: none; }
.dash-logo span { color: var(--text-muted); font-weight: 400; }

/* Распорка: всё, что после неё, уезжает вправо. */
.dash-spacer { flex: 1 1 auto; }

.dash-user {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}
.dash-user b { color: var(--text); font-weight: 500; }

select.dash-select {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 10px;
    font-size: 14px;
    cursor: pointer;
}
select.dash-select:focus { outline: 2px solid var(--accent-dark); outline-offset: 1px; }

/* ---------- Вкладки ---------- */

.dash-tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    overflow-x: auto;              /* на узком экране вкладки прокручиваются, а не ломают шапку */
    scrollbar-width: thin;
}

.dash-tab {
    padding: 10px 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: 14px;
}
.dash-tab:hover { color: var(--text); text-decoration: none; }
.dash-tab--active {
    color: var(--text);
    border-bottom-color: var(--accent);
}
/* «Доступ» стоит особняком: это настройки самой панели, не продукта. */
.dash-tab--aside { margin-left: auto; }

/* ---------- Контент ---------- */

.dash-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 600; margin: 28px 0 10px; }
.dash-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.muted { color: var(--text-muted); }

/* ---------- Таблицы ---------- */

table.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.dash-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.dash-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.dash-table tr:hover td { background: var(--surface-2); }

/* ---------- Формы и кнопки ---------- */

.field { margin-bottom: 14px; }
.field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field select {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 15px;
}
.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--accent-dark);
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #10141a;
    border: 0;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--wide { width: 100%; }

/* ---------- Сообщения ---------- */

.msg {
    border-radius: var(--radius);
    padding: 11px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
}
.msg--error { background: rgba(209,99,107,.10); border-color: rgba(209,99,107,.45); color: #f0b6ba; }
.msg--ok    { background: rgba(111,191,139,.10); border-color: rgba(111,191,139,.45); color: #a9e0bf; }
.msg--info  { background: rgba(122,162,200,.10); border-color: rgba(122,162,200,.40); color: #b9d2e8; }

/* ---------- Экран входа ---------- */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-box { width: 100%; max-width: 380px; }
.auth-box .dash-logo {
    display: block;
    text-align: center;
    font-size: 19px;
    margin-bottom: 20px;
}

/* ---------- Заглушка раздела ---------- */

.stub {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.stub__title { font-size: 17px; color: var(--text); margin-bottom: 6px; }

/* ---------- Мобильное ---------- */

@media (max-width: 640px) {
    .dash-header__top { flex-wrap: wrap; gap: 10px; }
    .dash-user { order: 3; width: 100%; }
    .dash-main { padding: 18px 14px 50px; }
    .card { padding: 16px; }
}
