/* ============================================================
   ArmyRP Dev Portal — neutral graphite + white
   (owner decision 2026-11-30: no olive/green, minimal)
   ============================================================ */

:root {
    --bg: #0e0f11;
    --bg-2: #121316;
    --panel: #141518;
    --panel-2: #1a1c1f;
    --hover: #232529;
    --active: #2b2e33;
    --line: rgba(255, 255, 255, 0.10);
    --line-2: rgba(255, 255, 255, 0.22);
    --text: #f2f3f5;
    --text-2: rgba(242, 243, 245, 0.62);
    --text-3: rgba(242, 243, 245, 0.36);
    --accent: #e9ebef;
    --accent-hover: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --success: #b9bec7;
    --warning: #e0c48a;
    --danger: #d0655a;
    --info: #a9b0bc;
    --font-display: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: "Cascadia Mono", "Consolas", monospace;
    --radius: 6px;
    --radius-sm: 4px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 520px at 16% -14%, rgba(255, 255, 255, 0.035), transparent 62%),
        linear-gradient(180deg, #101114 0%, #0b0c0e 72%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 255, 255, 0.20); color: #ffffff; }

a { color: inherit; }

.is-hidden { display: none !important; }

/* ============================================================
   Вход
   ============================================================ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}

.auth-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: rise 0.3s ease-out both;
}

.auth-card {
    position: relative;
    padding: 34px 32px 26px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: linear-gradient(180deg, #17181b 0%, #111214 100%);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-brand { text-align: center; margin-bottom: 22px; }

.brand-mark { color: var(--accent); display: inline-flex; }

.auth-brand .brand-mark { margin-bottom: 12px; }

.auth-eyebrow {
    margin: 0 0 8px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-3);
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.auth-subtitle {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.auth-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(208, 101, 90, 0.38);
    border-radius: var(--radius-sm);
    background: rgba(208, 101, 90, 0.09);
    color: #e8a79f;
    font-size: 12px;
    line-height: 1.45;
}

.auth-form { display: grid; gap: 14px; }

.auth-field { display: grid; gap: 6px; }

.auth-field span {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
}

.auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.auth-field input:focus {
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.035);
}

.auth-submit {
    height: 46px;
    margin-top: 4px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #0e0f11;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease;
}

.auth-submit:hover { background: var(--accent-hover); }

.auth-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--text-3);
}

.auth-footer {
    margin: 0;
    text-align: center;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

/* ============================================================
   Портал
   ============================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(14, 15, 17, 0.92);
    backdrop-filter: blur(10px);
}

.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topbar__title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }

.topbar__brand {
    font-family: var(--font-display);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.topbar__crumb {
    font-size: 11.5px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__right { display: flex; align-items: center; gap: 12px; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.user-chip__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.user-chip__name { font-size: 12px; color: var(--text); }

.logout-form { margin: 0; }

.logout-btn {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-family: var(--font);
    font-size: 11px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.logout-btn:hover {
    border-color: var(--line-2);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 22px;
}

.sidebar {
    align-self: start;
    position: sticky;
    top: 82px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.sidebar__label {
    margin: 0;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sidebar__nav { display: grid; gap: 4px; }

.sidebar__item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.sidebar__item:hover { background: var(--hover); color: var(--text); }

.sidebar__item.is-active {
    background: var(--accent-soft);
    border-color: var(--line);
    color: var(--text);
    font-weight: 600;
}

.sidebar__dot {
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--text);
}

.sidebar__foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 10px;
    color: var(--text-3);
}

.content { min-width: 0; }

.eyebrow {
    margin: 0;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-3);
}

.page-title {
    margin: 7px 0 8px;
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.page-sub {
    max-width: 760px;
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-2);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.search {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 300px;
    min-width: 250px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.12s ease, background 0.12s ease;
}

.search:focus-within {
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.035);
}

.search__icon { color: var(--text-3); flex: 0 0 auto; }

.search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
}

.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

.toolbar__meta { display: flex; flex-wrap: wrap; gap: 6px; }

.meta-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 10.5px;
    color: var(--text-2);
    white-space: nowrap;
}

.meta-pill b { color: var(--text); font-weight: 600; }

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

.sites-group { margin-top: 26px; }

.sites-group__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
}

.sites-group__title {
    margin: 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
}

.sites-group__line {
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.sites-group__count {
    font-size: 10.5px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.site-card {
    display: block;
    padding: 15px 15px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.site-card:hover {
    border-color: var(--line-2);
    background: var(--hover);
}

.site-card--muted { opacity: 0.65; cursor: default; }
.site-card--muted:hover { border-color: var(--line); background: var(--panel-2); }

.site-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.site-card__name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-card__arrow { color: var(--text-2); font-size: 12px; line-height: 1; }
.site-card__arrow--off { color: var(--text-3); }

.site-card__host {
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--info);
    word-break: break-all;
}

.site-card__desc {
    margin: 9px 0 11px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-2);
}

.site-card__tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: transparent;
    color: var(--text-3);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tag--panel {
    color: var(--text);
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.05);
}

.tag--api {
    color: var(--info);
    border-color: rgba(169, 176, 188, 0.30);
}

.tag--client {
    color: var(--text-2);
    border-color: var(--line);
}

.tag--dev {
    color: #0e0f11;
    border-color: var(--accent);
    background: var(--accent);
}

.tag--internal {
    color: var(--danger);
    border-color: rgba(208, 101, 90, 0.32);
}

.tag--redirect {
    color: var(--text-3);
    border-style: dashed;
}

.tag--forum {
    color: var(--text-2);
    border-color: var(--line);
}

.sites-empty {
    margin-top: 26px;
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    text-align: center;
    font-size: 12.5px;
    color: var(--text-3);
}

.page-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 10.5px;
    color: var(--text-3);
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1080px) {
    .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
    .sidebar { position: static; flex-direction: row; align-items: center; padding: 9px 12px; }
    .sidebar__label { display: none; }
    .sidebar__nav { display: flex; }
    .sidebar__foot { margin: 0 0 0 auto; padding: 0; border: 0; }
}

@media (max-width: 860px) {
    .sites-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .topbar { padding: 0 14px; height: 56px; }
    .topbar__crumb { display: none; }
    .user-chip__name { display: none; }
    .user-chip { padding: 4px; }
    .layout { padding: 13px; }
    .page-title { font-size: 26px; }
    .toolbar { align-items: stretch; }
    .search { flex-basis: 100%; }
    .toolbar__meta { width: 100%; }
    .page-foot { flex-direction: column; gap: 4px; }
    .sidebar__foot { display: none; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
