:root {
  --bg: #07111f;
  --surface: rgba(10, 22, 39, 0.88);
  --surface-strong: rgba(13, 27, 46, 0.96);
  --text: #e8f1ff;
  --muted: #93a9c7;
  --accent: #3aa0ff;
  --accent-2: #66d4ff;
  --danger: #ff5f7d;
  --border: rgba(141, 180, 230, 0.18);
  --shadow: 0 28px 80px rgba(0, 7, 18, 0.42);
  font-family: "Segoe UI", "Inter", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(58, 160, 255, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(102, 212, 255, 0.16), transparent 20%),
    linear-gradient(160deg, #040b15, #081423 42%, #0c1b30 72%, #0f2440);
}

.shell {
  width: min(1240px, calc(100vw - 24px));
  margin: 14px auto;
  padding: 22px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero, .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: grid; gap: 12px; }
.card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 32, 54, 0.96), rgba(10, 21, 38, 0.96));
}

h1, h2, h3, p { margin: 0; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, select, textarea, button {
  width: 100%;
  border: 1px solid rgba(137, 176, 227, 0.16);
  border-radius: 14px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: rgba(7, 16, 29, 0.92);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(58, 160, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(58, 160, 255, 0.14);
}

button { width: auto; cursor: pointer; transition: transform 140ms ease, filter 140ms ease; }
button:hover { transform: translateY(-1px); filter: brightness(1.06); }
button.primary {
  color: #f4fbff;
  border-color: transparent;
  background: linear-gradient(135deg, #1d7be7, #4ec2ff);
  box-shadow: 0 14px 30px rgba(29, 123, 231, 0.28);
}
button.secondary {
  background: rgba(12, 25, 43, 0.82);
}
button.danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #d8416d, #ff6b7d);
}

.badge, .notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(12, 24, 42, 0.72);
}

.notice.error {
  background: rgba(98, 24, 45, 0.44);
  border-color: rgba(255, 95, 125, 0.22);
}

.small { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.plans, .user-table { display: grid; gap: 12px; }
.plans { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.plan, .user-row, .message {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 25, 44, 0.94), rgba(8, 17, 31, 0.96));
}

.messages {
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(6, 15, 28, 0.74);
}

.message + .message { margin-top: 8px; }
.meta, .mono { font-size: 12px; color: var(--muted); }
.mono { font-family: Consolas, "Courier New", monospace; word-break: break-all; }

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 8px, 100%);
    margin: 4px auto;
    padding: 14px;
    border-radius: 18px;
  }
}
