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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1b2e;
  color: #e4e6f1;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.5;
}

/* ===== Brand ribbon ===== */
.brand-ribbon {
  position: fixed;
  top: 12px;
  right: 16px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
  z-index: 50;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.beta-tag {
  background: rgba(255,255,255,0.25);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
}

/* ===== Header ===== */
header {
  max-width: 900px;
  margin: 0 auto 32px;
  text-align: center;
  padding: 24px 0;
}

.user-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.user-info {
  color: #a8acc8;
  background: #232540;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #2f3253;
}

.logout-link {
  color: #ff8b8b;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(216, 60, 62, 0.12);
  border: 1px solid rgba(216, 60, 62, 0.3);
  transition: background 0.15s;
}

.logout-link:hover { background: rgba(216, 60, 62, 0.22); }

/* ===== Plan chip in user-bar ===== */
.plan-chip {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  border: 1px solid;
  transition: opacity 0.15s;
}
.plan-chip:hover { opacity: 0.8; }

.plan-chip-free {
  background: rgba(127,132,163,0.15);
  color: #a8acc8;
  border-color: rgba(127,132,163,0.3);
}
.plan-chip-premium {
  background: rgba(88,101,242,0.2);
  color: #8b9cff;
  border-color: rgba(88,101,242,0.5);
}
.plan-chip-dev {
  background: rgba(241,196,15,0.15);
  color: #f1c40f;
  border-color: rgba(241,196,15,0.4);
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #a8acc8;
  font-size: 0.95rem;
}

.subtitle code, .flash code {
  background: #2a2c44;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

main {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Flash messages ===== */
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  border-left: 4px solid;
}

.flash.success { background: rgba(59,165,92,0.12); border-color: #3ba55c; color: #57f287; }
.flash.error   { background: rgba(216,60,62,0.12); border-color: #d83c3e; color: #ff8b8b; }
.flash.info    { background: rgba(88,101,242,0.12); border-color: #5865f2; color: #8b9cff; }

/* ===== Card ===== */
.card {
  background: #232540;
  border: 1px solid #2f3253;
  border-radius: 12px;
  padding: 24px;
}

.card h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #fff;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #c0c4dc;
}

label small {
  color: #7f84a3;
  font-size: 0.78rem;
  font-weight: normal;
}

label small code {
  background: #2a2c44;
  padding: 1px 4px;
  border-radius: 3px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  background: #1a1b2e;
  border: 1px solid #3a3d5f;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e4e6f1;
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

input[type="file"] { padding: 8px; cursor: pointer; }
input:focus { outline: none; border-color: #5865f2; }

button {
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

button:hover:not(:disabled) { background: #4752c4; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

button.secondary { background: #3a3d5f; }
button.secondary:hover:not(:disabled) { background: #4a4d72; }
button.danger { background: #d83c3e; }
button.danger:hover:not(:disabled) { background: #b32f31; }
button.success { background: #3ba55c; }
button.success:hover:not(:disabled) { background: #2d8048; }
button.danger-text { color: #ff8b8b; }

.status-msg { font-size: 0.88rem; min-height: 1.2em; margin-top: 4px; }
.status-msg.success { color: #57f287; }
.status-msg.error   { color: #ff8b8b; }
.status-msg.info    { color: #8b9cff; }

.empty {
  color: #7f84a3;
  text-align: center;
  padding: 32px;
  font-style: italic;
  background: #232540;
  border: 1px dashed #3a3d5f;
  border-radius: 12px;
}

/* ===== Bots section ===== */
.bots-section { display: flex; flex-direction: column; gap: 14px; }
.bots-title { font-size: 1.4rem; color: #fff; padding-left: 4px; }
#bots-list { display: flex; flex-direction: column; gap: 14px; }

.bot-card {
  background: linear-gradient(180deg, #2a2c4a 0%, #232540 100%);
  border: 1px solid #2f3253;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.bot-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: #7f84a3;
  transition: background 0.2s;
}

.bot-card.running::before { background: #3ba55c; box-shadow: 0 0 14px #3ba55c; }
.bot-card.error::before   { background: #d83c3e; }
.bot-card.running { border-color: rgba(59,165,92,0.4); }

.bot-card-top { display: flex; align-items: center; gap: 14px; }

.bot-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
}

.bot-card-title { flex: 1; min-width: 0; }
.bot-card-title h3 { font-size: 1.15rem; margin-bottom: 6px; color: #fff; word-break: break-word; }

.bot-status-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: #a8acc8; flex-wrap: wrap;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7f84a3; }
.status-dot.running { background: #3ba55c; box-shadow: 0 0 8px #3ba55c; animation: pulse 2s infinite; }
.status-dot.error   { background: #d83c3e; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.status-text { font-weight: 600; color: #e4e6f1; }
.separator   { color: #4a4d72; }
.status-meta { color: #7f84a3; }

.bot-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: #7f84a3;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.bot-card-meta code {
  background: rgba(255,184,108,0.12);
  color: #ffb86c;
  padding: 2px 6px;
  border-radius: 3px;
}

.bot-id { font-family: monospace; }

.bot-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bot-card-actions button {
  flex: 1; min-width: 110px;
  padding: 9px 14px; font-size: 0.88rem;
}

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; justify-content: center; align-items: center;
  z-index: 100; padding: 20px;
}

.modal.hidden { display: none; }

.modal-content {
  background: #232540;
  border: 1px solid #3a3d5f;
  border-radius: 12px;
  width: 100%; max-width: 800px; max-height: 80vh;
  display: flex; flex-direction: column;
}

.modal-buy {
  max-width: 480px;
  max-height: none;
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #3a3d5f;
}

.modal-header h3 { font-size: 1.1rem; }
.modal-header button {
  background: transparent; color: #a8acc8;
  font-size: 1.2rem; padding: 4px 10px;
}
.modal-header button:hover { background: #3a3d5f; color: #fff; }

#logs-content {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  font-size: 0.82rem; line-height: 1.5;
  color: #c0c4dc; background: #1a1b2e;
  white-space: pre-wrap; word-break: break-word;
}

/* ===== Buy modal body ===== */
.modal-buy-body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }

.buy-error-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(216,60,62,0.1);
  border: 1px solid rgba(216,60,62,0.3);
  border-radius: 10px; padding: 14px 16px;
}

.buy-error-icon { font-size: 1.6rem; flex-shrink: 0; }

.buy-error-box strong { color: #ff8b8b; display: block; margin-bottom: 4px; }
.buy-error-box p { font-size: 0.88rem; color: #c0c4dc; }

.buy-code-label { font-size: 0.9rem; color: #c0c4dc; }

.buy-soon { text-align: center; font-size: 0.82rem; color: #7f84a3; }
.buy-soon strong { color: #a8acc8; }

.plan-expires { text-align: center; font-size: 0.82rem; color: #7f84a3; margin-top: 8px; }
.plan-expires strong { color: #e4e6f1; }

/* ===== Plans grid ===== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.plan-card {
  background: #232540;
  border: 2px solid #2f3253;
  border-radius: 16px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}

.plan-card:hover { transform: translateY(-3px); }

.plan-card.plan-current {
  border-color: #5865f2;
  box-shadow: 0 0 28px rgba(88,101,242,0.25);
}

.plan-card.plan-premium { border-color: rgba(88,101,242,0.5); }
.plan-card.plan-dev     { border-color: rgba(241,196,15,0.4); }

.plan-badge-current {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: #5865f2;
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 14px; border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px; white-space: nowrap;
}

.plan-badge-popular {
  position: absolute; top: -1px; right: 16px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  color: #fff;
  font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px; white-space: nowrap;
}

.plan-header { text-align: center; }

.plan-icon { font-size: 2.4rem; margin-bottom: 8px; }

.plan-name {
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 10px; color: #fff;
}

.plan-price {
  font-size: 2rem; font-weight: 800;
  line-height: 1;
}

.plan-free    .plan-price { color: #a8acc8; }
.plan-premium .plan-price {
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.plan-dev .plan-price { color: #f1c40f; }

.plan-price-sub {
  font-size: 0.82rem; color: #7f84a3; margin-top: 4px;
}

.plan-features {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}

.plan-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: #c0c4dc;
}

.feat-icon { font-size: 1rem; flex-shrink: 0; }

.plan-features strong { color: #fff; }

.plan-action { margin-top: auto; }

.plan-btn {
  width: 100%; padding: 12px;
  border-radius: 10px; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; border: none;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}

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

.plan-btn-current {
  background: #2f3253; color: #8b9cff;
  border: 2px solid #5865f2;
}

.plan-btn-free { background: #2a2c44; color: #7f84a3; }

.plan-btn-buy {
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(88,101,242,0.4);
}

.plan-dev .plan-btn-buy {
  background: linear-gradient(90deg, #b8860b, #f1c40f);
  color: #1a1b2e;
  box-shadow: 0 4px 16px rgba(241,196,15,0.3);
}

.plans-note {
  text-align: center;
  color: #a8acc8;
  font-size: 0.88rem;
  padding: 16px 24px;
}

/* ===== Info card / steps / FAQ ===== */
.info-card { background: linear-gradient(180deg, #232540 0%, #262849 100%); }

.steps {
  list-style: none; counter-reset: step;
  display: flex; flex-direction: column; gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative; padding-left: 44px;
  color: #c0c4dc; font-size: 0.92rem; line-height: 1.6;
}

.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px;
  background: #5865f2; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

.steps code { background: #1a1b2e; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; color: #ffb86c; }
.steps strong { color: #fff; }
.steps a { color: #8b9cff; }

.steps pre {
  margin-top: 8px; background: #0f1020;
  border: 1px solid #2f3253; border-radius: 6px;
  padding: 10px 12px; overflow-x: auto;
  font-size: 0.82rem; line-height: 1.5;
}

.steps pre code { background: transparent; padding: 0; color: #c0c4dc; }

.faq details { border-bottom: 1px solid #2f3253; padding: 12px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; font-weight: 600; color: #e4e6f1;
  padding: 4px 0; font-size: 0.95rem;
}
.faq summary:hover { color: #8b9cff; }
.faq details p { margin-top: 8px; color: #a8acc8; font-size: 0.88rem; padding-left: 12px; }
.faq code { background: #1a1b2e; padding: 2px 5px; border-radius: 3px; font-size: 0.85em; color: #ffb86c; }
.faq a { color: #8b9cff; }

.env-badge {
  display: inline-block;
  background: rgba(139,156,255,0.18); color: #8b9cff;
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600; margin-left: 4px;
  letter-spacing: 0.3px; vertical-align: middle;
}

/* ===== Auth pages ===== */
.auth-wrap {
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #232540; border: 1px solid #2f3253;
  border-radius: 14px; padding: 32px 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.auth-card h1 {
  font-size: 1.6rem; text-align: center; margin-bottom: 8px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle { text-align: center; color: #a8acc8; font-size: 0.9rem; margin-bottom: 22px; }

.auth-card form { margin-bottom: 16px; }
.auth-card button[type="submit"] { width: 100%; margin-top: 4px; padding: 12px; }

.auth-switch { text-align: center; margin-top: 16px; font-size: 0.88rem; color: #a8acc8; }
.auth-switch a { color: #8b9cff; text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: #7f84a3; font-size: 0.8rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #2f3253; }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px;
  background: #fff; color: #1a1b2e;
  border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 0.92rem;
  transition: background 0.15s;
}
.google-btn:hover { background: #f0f0f0; }

.discord-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px; margin-top: 8px;
  background: #5865f2; color: #fff;
  border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 0.92rem;
  transition: background 0.15s;
}
.discord-btn:hover { background: #4752c4; }

.code-input {
  text-align: center;
  font-size: 1.6rem !important;
  letter-spacing: 10px;
  font-family: monospace;
  padding: 14px !important;
}

.resend-form { margin-top: 8px; }
.link-btn { background: transparent; color: #8b9cff; padding: 6px; width: 100%; font-size: 0.85rem; }
.link-btn:hover { background: rgba(139,156,255,0.08); }

/* ===== Admin quick actions ===== */
.admin-quick-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #232540, #2a2c4a);
  border: 1px solid #3a3d5f;
  border-radius: 12px;
  padding: 16px 22px;
  text-decoration: none;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.15s, transform 0.15s;
}

.admin-action-card:hover { border-color: #5865f2; transform: translateY(-2px); }

.admin-action-icon { font-size: 1.8rem; }
.admin-action-label { color: #fff; font-weight: 700; font-size: 0.96rem; display: block; }
.admin-action-sub   { color: #7f84a3; font-size: 0.78rem; display: block; }

/* ===== Mass email composer ===== */
.email-recipients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.recip-group { display: flex; flex-direction: column; gap: 10px; }
.recip-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: #7f84a3; font-weight: 600; margin: 0; }

.recip-checks { display: flex; flex-direction: column; gap: 8px; }

.recip-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #c0c4dc;
  user-select: none;
}

.recip-check input[type="checkbox"] { display: none; }

.check-box {
  width: 18px; height: 18px;
  border: 2px solid #3a3d5f;
  border-radius: 5px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.recip-check input:checked + .check-box {
  background: #5865f2;
  border-color: #5865f2;
}

.recip-check input:checked + .check-box::after {
  content: "✓";
  position: absolute;
  top: -2px; left: 2px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.recip-counter-group { align-items: flex-start; }
.recip-count-big {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.send-summary-box {
  color: #a8acc8;
  font-size: 0.88rem;
  padding: 12px 16px;
  background: rgba(88,101,242,0.08);
  border: 1px solid rgba(88,101,242,0.2);
  border-radius: 8px;
}

/* ===== Progress bar ===== */
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #c0c4dc;
  margin-bottom: 8px;
}

.progress-bar-wrap {
  background: #1a1b2e;
  border: 1px solid #2f3253;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  border-radius: 999px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(88,101,242,0.5);
}

/* ===== Done box ===== */
.send-done-box {
  text-align: center;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.send-done-title { font-size: 1.2rem; font-weight: 700; color: #fff; }

.send-done-stats {
  display: flex;
  gap: 20px;
  font-size: 0.92rem;
  font-weight: 600;
}

.done-ok   { color: #57f287; }
.done-fail { color: #ff8b8b; }

/* ===== Contact email button ===== */
.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 18px rgba(88,101,242,0.4);
  transition: opacity 0.15s, transform 0.15s;
}
.contact-email-btn:hover { opacity: 0.88; transform: translateY(-2px); }

/* ===== Bot type badge ===== */
.bot-type-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.3px;
}
.bot-type-badge.python { background: rgba(59,130,246,0.18); color: #7cb9ff; }
.bot-type-badge.node   { background: rgba(59,165,92,0.18);  color: #57f287; }

/* ===== Lang tabs ===== */
.lang-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.lang-tab {
  background: #2a2c44;
  color: #a8acc8;
  border: 1px solid #3a3d5f;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.lang-tab:hover { background: #323558; color: #e4e6f1; }

.lang-tab.active {
  background: #5865f2;
  color: #fff;
  border-color: #5865f2;
}

/* ===== Admin panel ===== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  background: #232540;
  border: 1px solid #2f3253;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}

.admin-stat-card:hover { border-color: #5865f2; }
.admin-stat-green { border-color: rgba(59,165,92,0.4); }

.admin-stat-icon { font-size: 1.6rem; }
.admin-stat-value { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.admin-stat-label { font-size: 0.78rem; color: #7f84a3; }

.admin-plans-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-plan-stat {
  flex: 1;
  min-width: 120px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.plan-free-stat    { background: rgba(127,132,163,0.12); border: 1px solid rgba(127,132,163,0.3); }
.plan-premium-stat { background: rgba(88,101,242,0.12);  border: 1px solid rgba(88,101,242,0.4); }
.plan-dev-stat     { background: rgba(241,196,15,0.10);  border: 1px solid rgba(241,196,15,0.3); }

.admin-plan-count { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.admin-plan-name  { font-size: 0.88rem; color: #a8acc8; font-weight: 600; }

.admin-table-wrap { overflow-x: auto; margin-top: 4px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  color: #7f84a3;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2f3253;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e2035;
  color: #c0c4dc;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(88,101,242,0.05); }

.admin-td-id   { color: #4a4d72; font-family: monospace; font-size: 0.78rem; }
.admin-td-center { text-align: center; }
.admin-td-date { color: #7f84a3; font-size: 0.8rem; white-space: nowrap; }

.admin-user-email { color: #e4e6f1; font-weight: 500; }
.admin-user-name  { color: #7f84a3; font-size: 0.78rem; margin-top: 2px; }

.admin-plan-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-plan-free    { background: rgba(127,132,163,0.2); color: #a8acc8; }
.admin-plan-premium { background: rgba(88,101,242,0.2);  color: #8b9cff; }
.admin-plan-dev     { background: rgba(241,196,15,0.15); color: #f1c40f; }

.admin-running-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #3ba55c;
  border-radius: 50%;
  box-shadow: 0 0 6px #3ba55c;
  animation: pulse 2s infinite;
  vertical-align: middle;
}

/* ===== Responsive ===== */
@media (max-width: 750px) {
  .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { padding: 12px; }
  header h1 { font-size: 1.6rem; }
  .card { padding: 16px; }
  .bot-card { padding: 16px; }
  .bot-card-actions button { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .brand-ribbon { font-size: 0.7rem; padding: 5px 10px; }
  .auth-card { padding: 24px 20px; }
  .user-bar { justify-content: center; }
}

/* ===== Współpraca / Referral ===== */
.collab-hero-card { background: linear-gradient(135deg, rgba(88,101,242,.08), rgba(87,242,135,.06)); }
.collab-rewards-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.collab-reward-box {
  flex: 1; min-width: 140px; padding: 18px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03);
  text-align: center; transition: .2s;
}
.collab-reward-box.reward-done { border-color: rgba(87,242,135,.4); background: rgba(87,242,135,.06); }
.reward-icon { font-size: 1.8rem; margin-bottom: 6px; }
.reward-title { font-size: 0.9rem; font-weight: 700; color: #fff; }
.reward-req { font-size: 0.78rem; color: #7f84a3; margin-top: 2px; }
.reward-badge { margin-top: 8px; color: #57f287; font-size: 0.82rem; font-weight: 600; }
.reward-progress-label { margin-top: 8px; font-size: 0.9rem; font-weight: 700; color: #c0c4dc; }
.collab-reward-sep { font-size: 1.4rem; color: #4a4d72; }
.collab-prog-wrap { margin-top: 12px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #7f84a3; margin-bottom: 5px; }
.progress-bar-wrap { height: 8px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5865f2, #57f287); transition: width .6s ease; }

/* ===== Ref link row ===== */
.ref-link-row { display: flex; gap: 10px; align-items: center; }
.ref-link-row input {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05);
  color: #fff; font-size: 0.9rem; font-family: 'Courier New', monospace;
}
.ref-link-row input:focus { outline: none; border-color: #5865f2; }

/* ===== Promo code big display ===== */
.promo-code-big {
  display: inline-block; padding: 14px 28px; font-size: 1.4rem; font-weight: 700;
  font-family: 'Courier New', monospace; letter-spacing: 3px; color: #8b9cff;
  background: rgba(88,101,242,.1); border: 2px dashed rgba(88,101,242,.4);
  border-radius: 10px; cursor: pointer; transition: .2s; user-select: all;
}
.promo-code-big:hover { background: rgba(88,101,242,.18); }

/* ===== Promo card on plans ===== */
.promo-card { border-color: rgba(88,101,242,.25); }
.promo-card h2 { font-size: 1rem; margin-bottom: 6px; }

/* ===== Admin codes form ===== */
.codes-form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; align-items: start;
}
.codes-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: #7f84a3; font-weight: 500; }
.codes-label input, .codes-select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #fff; font-size: 0.9rem;
}
.codes-label input:focus, .codes-select:focus { outline: none; border-color: #5865f2; }
.codes-select option { background: #1e2035; }

/* ===== Admin plan badges ===== */
.admin-plan-badge { font-size: 0.78rem; padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.admin-plan-premium { background: rgba(88,101,242,.2); color: #8b9cff; border: 1px solid rgba(88,101,242,.4); }
.admin-plan-dev { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.35); }
.admin-td-center { text-align: center; }
.danger-text { color: #ff8b8b; }

/* ===== Admin action card — 2 columns ===== */
.admin-quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }

/* ===== Info card ===== */
.info-card { background: rgba(88,101,242,.05); border-color: rgba(88,101,242,.2); }

/* ===== Payment modal ===== */
.pay-secure-bar {
  font-size: 0.78rem; color: #57f287; background: rgba(87,242,135,.08);
  border: 1px solid rgba(87,242,135,.2); border-radius: 8px;
  padding: 7px 12px; margin-bottom: 4px;
}
.pay-card-input { font-family: 'Courier New', monospace; letter-spacing: 2px; }

.tos-consent-box {
  background: rgba(139,156,255,.07); border: 1px solid rgba(139,156,255,.2);
  border-radius: 10px; padding: 12px 14px;
}
.tos-consent-label {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.8rem; color: #c0c4dc; line-height: 1.5; cursor: pointer;
}
.tos-consent-label input[type=checkbox] { margin-top: 2px; flex-shrink: 0; accent-color: #5865f2; }

.pay-spinner {
  width: 48px; height: 48px; border: 4px solid rgba(255,255,255,.1);
  border-top-color: #5865f2; border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Regulamin ===== */
.tos-list { padding-left: 20px; line-height: 2.1; color: #c0c4dc; font-size: 0.9rem; }
.tos-list li { margin-bottom: 2px; }
.tos-legal-box {
  margin: 16px 0; padding: 16px 20px; background: rgba(245,158,11,.07);
  border-left: 4px solid #f59e0b; border-radius: 0 10px 10px 0;
}
.tos-quote {
  font-size: 0.88rem; color: #e0c97f; line-height: 1.8;
  font-style: italic; margin: 0; padding: 0;
}
.tos-quote cite {
  display: block; margin-top: 10px; font-size: 0.78rem;
  color: #7f84a3; font-style: normal;
}

/* ===== Suspension alerts (admin panel) ===== */
.suspension-alert {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.susp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #ff8b8b;
}
.susp-actions {
  display: flex;
  gap: 8px;
}
.susp-reason {
  font-size: 0.8rem;
  color: #c0c4dc;
  margin-bottom: 8px;
  word-break: break-word;
}
.susp-ips {
  font-size: 0.78rem;
  color: #7f84a3;
}
.susp-ip-chip {
  display: inline-block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 0.78rem;
  margin: 2px;
  cursor: help;
}
.susp-badge {
  display: inline-block;
  background: rgba(255,80,80,.18);
  color: #ff8b8b;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}
.susp-row {
  background: rgba(255, 80, 80, 0.04) !important;
}

/* ===== Modal overlay (admin IP logs modal) ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #232540;
  border: 1px solid #3a3d5f;
  border-radius: 14px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

