:root {
  --bg: #05080f;
  --panel: #0b1220;
  --panel-soft: #0e1627;
  --border: rgba(255,255,255,0.08);

  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --green: #22c55e;
  --danger: #ef4444;

  --text: #e5e7eb;
  --muted: #9ca3af;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(1200px 600px at top, #0b1220, #05080f);
  color: var(--text);
}

/* ---------- PAGE WRAPPER ---------- */
.app-bg {
  min-height: 100vh;
  padding-top: 40px;
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- NAVBAR ---------- */
.header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Title */
.header h2 {
  margin: 0;
  font-size: 20px;
}

.header p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

/* Actions */
.header-actions {
  display: flex;
  gap: 10px;
}

/* ---------- CARDS ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

/* ---------- TEXT ---------- */
.title {
  color: var(--green);
  font-weight: 700;
  font-size: 15px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

code {
  color: var(--green);
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
}

/* ---------- ROWS ---------- */
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

/* ---------- URL BOX ---------- */
.codebox {
  margin-top: 12px;
  background: #050a14;
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.codebox code {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow-x: auto;
}

/* ---------- INPUTS ---------- */
.label {
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
}

.input,
.textarea {
  width: 100%;
  background: #020617;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
}

.input:focus,
.textarea:focus {
  border-color: var(--blue);
  outline: none;
}

/* ---------- BUTTONS ---------- */
.button {
  background: linear-gradient(180deg, #2f6df6, #1f4fd8);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .2px;
}

.button:hover {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.button:active {
  transform: translateY(1px);
}

/* Secondary */
.button.gray {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
}

/* Danger */
.button.red {
  background: #dc2626;
  border: 1px solid #ef4444;
}

/* Small */
.button.small {
  padding: 6px 12px;
  font-size: 13px;
}

/* ---------- COPY ---------- */
.copy {
  background: #022c22;
  border: 1px solid #22c55e;
  color: #22c55e;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.copy:hover {
  background: #033b2c;
}

/* ---------- TOAST ---------- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: rgba(15,20,30,0.96);
  border-left: 4px solid var(--green);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 8px;

  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================= */
/* 📱 MOBILE + STICKY NAVBAR */
/* ============================= */
@media (max-width: 768px) {

  .app-bg {
    padding-top: 90px;
  }

  /* Sticky header */
  .header {
    position: sticky;
    top: 10px;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .header h2 {
    font-size: 17px;
  }

  .header p {
    font-size: 12px;
  }

  /* Buttons grid */
  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Logout full width */
  .header-actions .button.red {
    grid-column: span 2;
  }

  /* Cards */
  .card {
    padding: 14px;
  }

  .row {
    flex-direction: column;
    gap: 8px;
  }

  .row-actions {
    gap: 8px;
  }

  /* URL box stack */
  .codebox {
    flex-direction: column;
    align-items: stretch;
  }

  .copy {
    width: 100%;
    text-align: center;
  }
}

