/* app.css — общее для страниц входа, профиля и админки.
   Подключать ПОСЛЕ theme.css: здесь тёмные значения по умолчанию,
   светлая тема (html[data-theme="light"]) из theme.css перебивает их сама. */

:root { --accent: #3FB950; --bg: #0A0A0E; --panel: rgba(17,17,24,0.92); --line: #1B1B23; --border: #26262F;
        --text: #ECECF1; --muted: #9A9AA8; --dim: #7E7E8C; --green: #3FB950;
        --red: #F85149; --yellow: #D4A72C; --sel: rgba(63,185,80,0.12); }
html[data-theme="light"] { --sel: rgba(46,139,61,0.1); --red: #CF222E; --yellow: #9A6700; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: Manrope, Helvetica, sans-serif; min-height: 100vh;
  display: flex; flex-direction: column; overflow-x: hidden;
  background-image:
    repeating-linear-gradient(0deg, var(--grid) 0px, var(--grid) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(90deg, var(--grid) 0px, var(--grid) 1px, transparent 1px, transparent 72px);
}
::selection { background: rgba(63,185,80,0.4); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: 'JetBrains Mono', monospace; }
.disp { font-family: Unbounded, sans-serif; }
.wrap { max-width: 1360px; margin: 0 auto; width: 100%; }
[hidden] { display: none !important; }

/* ---------- шапка (как на главной) ---------- */
nav { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line); background: var(--nav-bg);
      backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15); }
nav.ppnav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent;
            transition: transform .5s cubic-bezier(.22,.61,.36,1), background-color .35s ease, border-color .35s ease, box-shadow .35s ease; }
nav.ppnav.stuck { background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
                  border-bottom-color: var(--border); box-shadow: 0 18px 40px -30px #000; }
nav.ppnav.hide { transform: translateY(-101%); }
@media (prefers-reduced-motion: reduce) {
  nav.ppnav { transition: none; }
  nav.ppnav.hide { transform: none; }
}
.nav-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 56px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand span { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 600; letter-spacing: 0.14em; }
.brand em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--soft); letter-spacing: .1em; }
.nav-links { display: flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.08em; }
.nav-links a { color: var(--nav-link); padding: 8px 14px; white-space: nowrap; transition: background .15s, color .15s; }
.nav-links a:hover { color: var(--ink); background: var(--hover); text-decoration: none; }
.nav-links a.cta { color: #fff; background: var(--accent); }
.nav-links a.cta.ghost { color: var(--accent); background: none; box-shadow: inset 0 0 0 1px var(--accent); }
.nav-links a.cta.ghost:hover { color: #fff; background: var(--accent); }
/* кнопка профиля в шапке: голова скина + ник (site.js) */

main { flex: 1; width: 100%; }
footer { padding: 26px 56px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
         font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--soft); }

/* ---------- общие детали ---------- */
.lbl { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .1em; color: var(--soft); text-transform: uppercase; }
.lbl b, .lbl em { font-style: normal; font-weight: inherit; color: var(--accent); }
h1, h2, h3 { font-family: Unbounded, sans-serif; color: var(--ink); margin: 0; font-weight: 700; }
h1 { font-size: 44px; line-height: 1.1; }
h2 { font-size: 21px; line-height: 1.25; }
p { margin: 0; line-height: 1.6; }

.panel { position: relative; background: var(--panel); border: 1px solid var(--border); }
.panel.cb > i { position: absolute; width: 16px; height: 16px; pointer-events: none; }
.panel.cb > i:nth-child(1) { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.panel.cb > i:nth-child(2) { top: -1px; right: -1px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.panel.cb > i:nth-child(3) { bottom: -1px; left: -1px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.panel.cb > i:nth-child(4) { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

.btn { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
       min-height: 44px; padding: 0 18px; border: 1px solid var(--border2); background: transparent; color: var(--nav-link);
       display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border-radius: 0;
       transition: background .15s, color .15s, border-color .15s; text-decoration: none; }
.btn:hover { color: var(--ink); border-color: var(--faint); text-decoration: none; }
.btn.green { color: var(--accent); border-color: var(--accent); }
.btn.green:hover { background: var(--accent); color: #fff; }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.solid:hover { filter: brightness(1.12); color: #fff; }
.btn.red { color: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--hover) !important; border-color: var(--border) !important; color: var(--faint) !important; cursor: not-allowed; filter: none !important; }
.btn.on { color: var(--accent); border-color: var(--accent); background: var(--sel); }
.btn svg, .ico svg { width: 18px; height: 18px; flex: none; }

.ico { width: 44px; height: 44px; padding: 0; border: 1px solid var(--border2); background: transparent; color: var(--nav-link);
       display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.ico:hover { color: var(--ink); border-color: var(--faint); }
.ico.del:hover { color: var(--red); border-color: var(--red); }
.grip { flex: none; width: 34px; min-height: 44px; align-self: stretch; border: 1px dashed var(--border2); background: transparent;
        color: var(--soft); cursor: grab; display: flex; align-items: center; justify-content: center; padding: 0; }
.grip:hover, .grip:focus-visible { color: var(--accent); border-color: var(--accent); }
.grip:active { cursor: grabbing; }
.drag-over { border-color: var(--accent) !important; border-style: dashed !important; }
.dragging { opacity: .4; }

.inp { width: 100%; min-height: 44px; background: var(--input); border: 1px solid var(--border2); color: var(--text);
       font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 0; }
textarea.inp { resize: vertical; line-height: 1.5; }
.inp:focus, .btn:focus-visible, .ico:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.msg { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: .04em; padding: 12px 14px; border: 1px solid; line-height: 1.5; }
.msg.err { color: var(--red); border-color: var(--red); background: rgba(248,81,73,0.06); }
.msg.ok { color: var(--accent); border-color: var(--accent); background: var(--sel); }

.head { width: 28px; height: 28px; flex: none; image-rendering: pixelated; display: block; background: var(--hover); }
.head.l { width: 48px; height: 48px; }

.tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; padding: 4px 8px; border: 1px solid; white-space: nowrap; }
.tag.pending { color: var(--yellow); }
.tag.accepted { color: var(--accent); }
.tag.rejected { color: var(--soft); }
.tag.revoked { color: var(--red); }

.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--hover), var(--line), var(--hover)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .nav-in { padding: 12px 20px; }
  footer { padding: 22px 20px; }
  h1 { font-size: 34px; }
}
@media (max-width: 560px) {
  .nav-in { padding: 8px 10px; gap: 6px; }
  .brand img { height: 22px; }
  .brand span, .brand em { display: none; }
  .nav-links { font-size: 10px; gap: 0; letter-spacing: 0; }
  .nav-links a { padding: 7px 5px; }
  footer { padding: 20px 16px; }
  h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* вход через Discord */
.btn.discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #5865F2; border-color: #5865F2; color: #fff; }
.btn.discord:hover { background: #4752C4; border-color: #4752C4; color: #fff; }
.btn.discord svg { width: 18px; height: 18px; flex: none; }
.or-line { display: flex; align-items: center; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .14em; color: var(--soft); }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn[hidden] { display: none !important; }
