:root {
  --bg: #0b1020;
  --bg-2: #121a31;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #b91c1c;
  --primary-dark: #991b1b;
  --primary-light: #ef4444;
  --border: rgba(226, 232, 240, 0.8);
  --success: #065f46;
  --success-bg: #d1fae5;
  --error: #991b1b;
  --error-bg: #fee2e2;
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.18), transparent 25%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  position: relative;
  overflow-x: hidden;
}

.form-page {
  padding: 30px 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.2));
  pointer-events: none;
}

.bg-blur {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
  pointer-events: none;
  animation: floatBlob 8s ease-in-out infinite;
}

.bg-blur-1 {
  top: 40px;
  left: -80px;
  background: rgba(239, 68, 68, 0.4);
}

.bg-blur-2 {
  right: -100px;
  bottom: 30px;
  background: rgba(59, 130, 246, 0.35);
  animation-delay: 1.5s;
}

@keyframes floatBlob {
  0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
  50% { transform: translateY(-20px) translateX(10px) scale(1.05); }
}

.container {
  width: min(1040px, calc(100% - 32px));
  margin: 40px auto;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.form-card {
  position: relative;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #ef4444, #fb7185, #60a5fa);
}

.card-header {
  padding: 32px 32px 10px;
}

.card-body {
  padding: 28px 32px 34px;
}

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

.logo-wrap {
  margin-bottom: 16px;
}

.site-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 18px;
  background: rgb(255 255 255);
  padding: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  transition: transform .35s ease, box-shadow .35s ease;
}

.site-logo:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
}

h1, h2, h3 {
  margin: 0 0 10px;
  line-height: 1.15;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

p.lead {
  color: var(--muted);
  margin-top: 0;
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid-full {
  grid-column: 1 / -1;
}

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

  .card-header,
  .card-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .container {
    width: min(100% - 18px, 1040px);
    margin: 20px auto;
  }
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0f172a;
}

input, select, textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  font-size: 15px;
  background: rgba(255,255,255,0.88);
  color: #111827;
  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    transform .2s ease,
    background .25s ease;
}

input:hover, select:hover, textarea:hover {
  border-color: #cbd5e1;
  background: rgba(255,255,255,0.98);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248,113,113,.14);
  transform: translateY(-1px);
  background: #fff;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group {
  margin-bottom: 18px;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform .2s ease,
    box-shadow .25s ease,
    background .25s ease,
    opacity .25s ease;
}

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

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

.btn-primary-glow {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 14px 28px rgba(185, 28, 28, 0.28);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 18px 35px rgba(185, 28, 28, 0.34);
}

.btn-secondary {
  background: #111827;
  color: #fff;
}

.modern-admin-btn:hover {
  background: #1f2937;
}

.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  animation: fadeUp .45s ease;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border-color: #fecaca;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: #a7f3d0;
}

.error-text {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
}

.topbar {
  background: #111827;
  color: white;
  padding: 14px 0;
}

.topbar .inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar a {
  color: white;
  text-decoration: none;
  margin-left: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-failed {
  background: #fee2e2;
  color: #991b1b;
}

.inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.modern-check {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  transition: all .25s ease;
}

.modern-check:hover {
  background: #fff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

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

.price-box {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  padding: 14px 16px;
}

.modern-price-box {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.price-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}

.price-value {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.price-accent {
  color: var(--primary);
}

@media (max-width: 640px) {
  .modern-price-box {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    width: 100%;
  }
}

.animate-in {
  animation: fadeUp .7s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 2px;
  transition: transform .2s ease;
}

.btn-with-icon:hover .btn-icon {
  transform: scale(1.1);
}