:root {
  --bg: #10131a; --bg-elevated: #171b24; --bg-card: #1b2029;
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.14);
  --text: #edeff3; --text-muted: #8b93a7; --text-faint: #565e70;
  --accent: #00d9b5; --accent-soft: rgba(0,217,181,0.12); --accent-2: #ff8a5c;
  --radius: 14px; --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace;
  --container: 1180px; --transition: 0.3s ease;
}
* { box-sizing: border-box; margin:0; padding:0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-body);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
body::before {
  content:""; position: fixed; inset:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black, transparent 70%);
  z-index:0;
}
img { max-width:100%; display:block; }
a { color:inherit; text-decoration:none; }
ul { list-style:none; }
button { font-family: inherit; cursor:pointer; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 32px; position:relative; z-index:1; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 22px; border-radius: 10px; font-size:14.5px; font-weight:600;
  border:1px solid transparent; transition: transform .15s ease, opacity .15s ease; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #06110d; }
.btn-primary:hover { opacity:.88; }
.btn-outline { border-color: var(--border-strong); color: var(--text); background:transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { border-color: var(--accent-2); color: var(--accent-2); background:transparent; }
.btn-danger:hover { background: rgba(255,138,92,0.14); }
.btn-sm { padding:6px 14px; font-size:12.5px; border-radius:6px; }
.btn-block { width:100%; }
.form-group { margin-bottom: 20px; }
label { display:block; font-size:13px; color:var(--text-muted); margin-bottom:6px; }
input, select, textarea {
  width:100%; padding:12px 14px; background:var(--bg-elevated);
  border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:14px; outline:none;
}
input:focus, select:focus, textarea:focus { border-color:var(--accent); }
.card {
  background: var(--bg-card); border:1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 32px;
}
.card h2 { font-family: var(--font-display); margin-bottom: 20px; font-size: 20px; }
.table-wrap { overflow-x:auto; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:8px; position:relative; margin-bottom:20px; }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th, td { padding:12px 16px; text-align:left; border-bottom:1px solid var(--border); white-space:nowrap; }
th { font-family:var(--font-mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--text-faint); }
tbody tr:hover { background:rgba(255,255,255,0.02); }
.status-badge { display:inline-block; padding:4px 10px; border-radius:20px; font-size:12px; font-weight:500; }
.status-pending { background: #f0ad4e33; color: #f0ad4e; }
.status-paid { background: #4a8bb71a; color: #4a8bb7; }
.status-active { background: #00d9b51a; color: #00d9b5; }
.status-completed { background: #4caf501a; color: #4caf50; }
.status-failed { background: #ff8a5c1a; color: #ff8a5c; }
.hidden { display:none; }



/* ===== Утилитарные классы (для CSP без unsafe-inline) ===== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.label-strong { font-weight: 600; font-size: 15px; }
.select-styled {
  width: 100%;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-link {
  color: var(--text-muted);
}
.loading-text {
  text-align: center;
  color: var(--text-muted);
}
.status-badge-dynamic[data-status="pending"] { background: #f0ad4e33; color: #f0ad4e; }
.status-badge-dynamic[data-status="paid"] { background: #4a8bb71a; color: #4a8bb7; }
.status-badge-dynamic[data-status="active"] { background: #00d9b51a; color: #00d9b5; }
.status-badge-dynamic[data-status="completed"] { background: #4caf501a; color: #4caf50; }
.status-badge-dynamic[data-status="failed"] { background: #ff8a5c1a; color: #ff8a5c; }


/* ===== Cookie-баннер ===== */
.cookie-banner {
  position: fixed; bottom: 20px; left: 20px; right: 20px;
  background: #1b2029; color: #edeff3;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 16px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  z-index: 1001; font-size: 14px; flex-wrap: wrap;
}
.cookie-banner a { color: var(--accent); }
.cookie-accept {
  background: var(--accent); color: #06110d; border: none;
  padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer;
}

/* ===== Кнопка «вверх» ===== */
.scroll-top {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #06110d; border: none;
  cursor: pointer; font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: none; align-items: center; justify-content: center;
}
.scroll-top.visible { display: flex; }

/* ===== Toast ===== */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 500;
  max-width: 300px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.3s;
}
.toast-success { background: #1a2e2b; color: #00d9b5; border: 1px solid #00d9b5; }
.toast-error { background: #2e1a1a; color: #ff8a5c; border: 1px solid #ff8a5c; }
.toast-info { background: #1a2634; color: #7bb8e0; border: 1px solid #4a8bb7; }
.toast-hidden { opacity: 0; }
