:root {
  --bg: #09090f;
  --bg-2: #10111a;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.11);
  --text: #f5f7ff;
  --muted: #b7bfd8;
  --primary: #7c5cff;
  --primary-2: #a855f7;
  --danger: #ff5d73;
  --success: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.15), transparent 35%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.15), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -80px;
  left: -80px;
  background: #7c5cff;
}

.bg-glow-2 {
  bottom: -80px;
  right: -80px;
  background: #a855f7;
}

.container {
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 60px;
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.top-bar {
  align-items: center;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 10px;
  color: #9ca3af;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.subtitle {
  margin-top: 12px;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.6;
}

.user-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.user-email {
  margin: 0;
  color: #d4daf0;
  font-size: 14px;
  word-break: break-word;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  margin-bottom: 18px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 22px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}

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

label {
  color: #cdd4eb;
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
  transition: 0.2s ease;
  font-size: 15px;
}

input:focus {
  border-color: rgba(124, 92, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.actions.wrap {
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  color: white;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.btn.danger {
  background: var(--danger);
}

.message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.message.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.message.error {
  background: rgba(255, 93, 115, 0.12);
  border: 1px solid rgba(255, 93, 115, 0.3);
  color: #ffd0d6;
}

.result-box {
  display: grid;
  gap: 12px;
}

.qr-area {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

#qrcode {
  background: #fff;
  padding: 12px;
  border-radius: 16px;
  min-width: 220px;
  min-height: 220px;
  display: grid;
  place-items: center;
}

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

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

thead th {
  text-align: left;
  font-size: 13px;
  color: #c8d0e8;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  font-size: 14px;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.link-destination {
  max-width: 360px;
  word-break: break-word;
  color: #d7def7;
}

.slug-badge {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 999px;
  font-weight: 700;
}

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

.small-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.small-btn.delete {
  background: rgba(255, 93, 115, 0.2);
}

.empty-state {
  text-align: center;
  color: #aeb7d3;
  padding: 30px 14px;
}

.hidden {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 10px;
}

.auth-subtitle {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-switch {
  margin-top: 16px;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: #c4b5fd;
  text-decoration: none;
}

@media (max-width: 780px) {
  .container {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-panel {
    width: 100%;
    align-items: stretch;
  }
}