/* mmzh.ru — портал. Тёмная минималистичная тема (отдельно от site.css, которым пользуется /dnd). */
:root {
  --bg: #0F1112;
  --surface: #15181A;
  --surface-2: #22272A;
  --border: #24292C;
  --border-2: #2C3135;
  --border-hover: #3A4045;
  --text: #E8E6E3;
  --text-2: #C9CDD1;
  --muted: #A3AAB0;
  --faint: #8A9197;
  --accent: #E8728E;
  --accent-hover: #F2A0B3;
  --ok: #6FCF97;
  --any: #7FD1A8;
  --vpn: #E8B86B;
  --sans: 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* .wrap/.login set their own display; this must win when hidden */
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Шапка */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand span { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.net { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-size: 13px; }
.net i { width: 8px; height: 8px; border-radius: 4px; background: var(--vpn); }
.net[data-net="internal"] i { background: var(--ok); }
.user { display: flex; align-items: center; gap: 10px; padding-left: 6px; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: #2A2F33; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.logout { display: inline; }
.logout button { font: inherit; font-size: 13px; color: #9AA1A7; text-decoration: none; padding: 8px 4px; background: none; border: 0; cursor: pointer; }
.logout button:hover { color: var(--text-2); }

/* Заголовок, поиск, чипы */
.head { padding: 48px 0 20px; }
.head h1 { margin: 0 0 20px; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 15px; }
.search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-size: 15px; }
.search input::placeholder { color: #7D848A; }
.search input:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--border-hover); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip small { opacity: .6; margin-left: 4px; font-size: inherit; }

/* Плашка «не подключены к mzh-gate» */
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-bottom: 8px; border-radius: 12px; border: 1px solid #4A3B22; background: #1C1813; }
.banner div { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #E8D9C0; }
.banner a { font-size: 14px; font-weight: 500; color: var(--vpn); text-decoration: none; padding: 6px 0; }
.banner[hidden] { display: none; }

/* Группы и плитки */
.group { padding: 24px 0 8px; }
.group h2 { margin: 0 0 12px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }

.tile { display: flex; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background-color: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, filter .15s; background-repeat: no-repeat; background-position: center, right center; background-size: auto, cover; }
.tile:hover { color: var(--text); border-color: var(--border-hover); filter: brightness(1.12); }
.tile:hover .go { color: var(--accent); }
.tile.blocked { opacity: .5; }
.tile[data-bg] { background-color: #121517; }
.mono { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 8px; }
.name { font-size: 16px; font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 3px; background: var(--ok); }
.dot[data-state="down"] { background: #E5534B; }
.dot[data-state="unknown"] { background: #5E656B; }
.go { margin-left: auto; color: #5E656B; font-size: 16px; }
.desc { font-size: 13px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.badge { font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 6px; }
.badge.any { color: var(--any); background: rgba(127,209,168,.12); }
.badge.vpn { color: var(--vpn); background: rgba(232,184,107,.12); }
.note { font-size: 12px; color: var(--faint); }

/* Фоны плиток: затемнение слева + иллюстрация справа */
.tile[data-bg] { --scrim: linear-gradient(90deg, rgba(18,21,23,.92) 0%, rgba(18,21,23,.55) 55%, rgba(18,21,23,0) 100%); }
.tile[data-bg="dnd"]     { background-image: linear-gradient(90deg, rgba(15,17,18,.94) 0%, rgba(15,17,18,.72) 55%, rgba(15,17,18,.25) 100%), url(/static/scene.webp); background-position: center, center 60%; border-color: #3A3326; }
.tile[data-bg="photo"]   { background-image: var(--scrim), url(/static/img/tiles/photo.svg); }
.tile[data-bg="files"]   { background-image: var(--scrim), url(/static/img/tiles/files.svg); }
.tile[data-bg="admin"]   { background-image: var(--scrim), url(/static/img/tiles/admin.svg); }
.tile[data-bg="proxmox"] { background-image: var(--scrim), url(/static/img/tiles/proxmox.svg); }
.tile[data-bg="vpn"]     { background-image: var(--scrim), url(/static/img/tiles/vpn.svg); }
.tile[data-bg="router"]  { background-image: var(--scrim), url(/static/img/tiles/router.svg); }
.tile[data-bg="domain"]  { background-image: var(--scrim), url(/static/img/tiles/domain.svg); }
.tile[data-bg="mail"]    { background-image: var(--scrim), url(/static/img/tiles/mail.svg); }
.tile[data-bg="sobery-slovo"] { background-image: var(--scrim), url(/static/img/tiles/sobery-slovo.svg); }

.empty { padding: 48px 0; text-align: center; color: var(--faint); }
.empty button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 8px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding: 20px 0 32px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
.foot .legend { display: flex; gap: 16px; }

/* Вход */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.login form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 20px; }
.login .intro { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.login h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.login p { margin: 0; font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); }
.field input { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); }
.field input:focus { outline: none; border-color: var(--accent); }
.btn { height: 48px; border: 0; border-radius: 10px; background: var(--accent); color: #1A0E12; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.error { padding: 12px 14px; border-radius: 10px; border: 1px solid #5A2A30; background: #1E1214; color: #F2B8C2; font-size: 14px; }
.login .hint { margin-top: 8px; font-size: 12px; color: var(--faint); line-height: 1.5; }
.login .site { margin-top: 64px; font-family: var(--mono); font-size: 12px; color: #6B7278; }
