/* Палитра админки «Шепот карт» */
:root {
  --bg: #0b0f1e;
  --bg-soft: #12162a;
  --surface: #282a32;
  --surface-2: #32353f;
  --ink: #f2f2f5;
  --muted: #7f7f7f;
  --line: rgba(242, 242, 245, 0.08);
  --teal: #0485a6;
  --teal-deep: #066c5e;
  --green: #039178;
  --green-bright: #21a038;
  --danger: #c44b4b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --grad: linear-gradient(120deg, var(--teal), var(--teal-deep));
  --font: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(4, 133, 166, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 45% at 95% 90%, rgba(6, 108, 94, 0.16), transparent 50%),
    linear-gradient(165deg, var(--bg), var(--bg-soft));
  color: var(--ink);
  font-family: var(--font);
}

button, input {
  font: inherit;
}

a { color: inherit; }

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand .mark {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.brand h1 {
  font-size: 1.45rem;
  font-weight: 700;
}

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 28px rgba(4, 133, 166, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  background: rgba(40, 42, 50, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.login-card {
  width: min(100%, 420px);
  padding: 2rem 1.75rem;
}

.login-card h2 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.55rem;
}

.login-card p {
  margin-bottom: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.field input {
  background: #1b1d26;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  outline: none;
}

.field input:focus {
  border-color: rgba(4, 133, 166, 0.65);
  box-shadow: 0 0 0 3px rgba(4, 133, 166, 0.15);
}

.error {
  color: #ff9b9b;
  background: rgba(196, 75, 75, 0.12);
  border: 1px solid rgba(196, 75, 75, 0.25);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat {
  padding: 1.1rem 1rem;
  background: rgba(40, 42, 50, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat .label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.stat .value {
  font-size: 1.55rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.toolbar input {
  flex: 1;
  min-width: 220px;
  background: rgba(40, 42, 50, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  padding: 0.75rem 1rem;
  outline: none;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(40, 42, 50, 0.75);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.18);
}

tr:hover td {
  background: rgba(4, 133, 166, 0.06);
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pro {
  background: rgba(3, 145, 120, 0.18);
  color: #5de0c3;
}

.badge-free {
  background: rgba(127, 127, 127, 0.18);
  color: #c4c4c4;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.9rem;
  gap: 0.75rem;
}

.detail {
  display: grid;
  gap: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.panel {
  padding: 1.2rem;
}

.panel h3 {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.kv {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.45rem 0.75rem;
  font-size: 0.92rem;
}

.kv dt { color: var(--muted); }
.kv dd { word-break: break-word; }

.list {
  display: grid;
  gap: 0.65rem;
}

.list-item {
  background: #1b1d26;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.list-item .title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}
