/* Портал проектов — та же тёмная тема, что у приложений. */
:root {
  --bg: #0d1017; --bg-2: #121620; --surface: #161b26; --surface-2: #1c2230; --surface-3: #232a3a;
  --border: #262e3f; --border-2: #323b50; --text: #e9edf5; --text-2: #b4bccb; --muted: #8b94a7;
  --accent: #7c6cff; --accent-2: #a193ff; --red: #ff6b7a; --green: #3ddc97;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.glow { position: fixed; inset: -20vh -10vw auto auto; width: 70vw; height: 70vh; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124,108,255,.18), transparent 70%); z-index: 0; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 48px 20px 32px; flex: 1; }
.head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.head img { border-radius: 12px; }
.head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.head p { margin: 2px 0 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.28); transition: transform .12s, border-color .12s, box-shadow .12s; }
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--c, var(--accent)); box-shadow: 0 0 0 1px var(--c, var(--accent)) inset, 0 14px 36px rgba(0,0,0,.35); outline: none; }
.card-top { display: flex; align-items: center; gap: 14px; }
.card-top img { width: 56px; height: 56px; border-radius: 14px; }
.card h2 { margin: 0; font-size: 19px; }
.card .site { display: inline-block; margin-top: 2px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--c, var(--accent)); }
.card .desc { margin: 0; color: var(--text-2); font-size: 14px; }
.card .state { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.card .state b { color: var(--green); font-weight: 600; }
.card .go { font-weight: 700; color: var(--text); white-space: nowrap; }
.card .out { all: unset; cursor: pointer; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.card .out:hover { color: var(--red); }
.foot { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px; }

/* ---- вход ---- */
.login { flex: 1; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 400px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.brand img { border-radius: 12px; }
.brand h1 { margin: 0; font-size: 21px; }
.brand p { margin: 0; color: var(--muted); font-size: 13.5px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.field input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text); font: inherit; font-weight: 500; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,108,255,.45); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover, .pw-eye.on { color: var(--text); background: var(--surface-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--c, var(--accent)), #9a6cff); box-shadow: 0 8px 20px rgba(124,108,255,.25); }
.btn:disabled { opacity: .6; cursor: default; }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; display: none; }
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.alert:empty { display: none; }
.alert-error { background: rgba(255,107,122,.13); color: #ffb3bb; border: 1px solid rgba(255,107,122,.35); }
.alert-info { background: rgba(124,108,255,.13); color: var(--accent-2); border: 1px solid rgba(124,108,255,.35); }
.back { font-size: 13.5px; color: var(--muted); text-decoration: none; text-align: center; }
.back:hover { color: var(--text); }
@media (max-width: 520px) { .wrap { padding-top: 28px; } .head h1 { font-size: 20px; } }
