:root {
  --bg-from: #020617;
  --bg-to: #020617;
  --primary: #facc15;
  --primary-strong: #eab308;
  --primary-soft: rgba(250, 204, 21, 0.22);
  --text-on-dark: #e5e7eb;
  --text-muted: #9ca3af;
  --card-bg: #020617;
  --card-border: rgba(148, 163, 184, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, #1f2937 0, transparent 55%),
    radial-gradient(circle at top right, #111827 0, transparent 55%),
    radial-gradient(circle at bottom, #020617 0, #020617 60%);
  color: var(--text-on-dark);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

.header {
  max-width: 800px;
  text-align: center;
  color: var(--text-on-dark);
  margin-bottom: 24px;
}

.header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-soft);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.7);
  background: radial-gradient(circle at 30% 20%, #fed7aa, #f97316 55%, #92400e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0f172a;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.brand-avatar:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(250, 204, 21, 0.7);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 18px 40px rgba(248, 250, 252, 0.2);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.card {
  width: 100%;
  max-width: 960px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98)),
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.08), transparent 60%),
    radial-gradient(circle at bottom right, rgba(234, 179, 8, 0.16), transparent 65%);
  border-radius: 24px;
  padding: 24px 20px 28px;
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.95),
    0 0 0 1px var(--card-border),
    0 0 40px 0 rgba(250, 204, 21, 0.08);
  backdrop-filter: blur(16px);
  color: #e5e7eb;
  animation: card-enter 0.5s ease-out;
}

section + section {
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.card--narrow {
  max-width: 480px;
}

section h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: #f9fafb;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
}

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

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

.field--small {
  max-width: 260px;
}

label {
  font-size: 0.85rem;
  color: #cbd5f5;
  font-weight: 500;
  transition: color 0.15s ease;
}

input,
select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--text-on-dark);
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-soft);
  background-color: rgba(15, 23, 42, 0.7);
}

.field:focus-within label {
  color: var(--primary);
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

input.error,
select.error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

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

button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: radial-gradient(circle at 30% 0, #fef9c3, var(--primary) 40%, var(--primary-strong) 100%);
  color: white;
  box-shadow:
    0 10px 25px rgba(250, 204, 21, 0.45),
    0 0 0 1px rgba(234, 179, 8, 0.55);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    filter 0.1s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 16px 32px rgba(250, 204, 21, 0.6),
    0 0 0 1px rgba(234, 179, 8, 0.7);
}

button:active {
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(250, 204, 21, 0.4),
    0 0 0 1px rgba(234, 179, 8, 0.85);
}

button.secondary {
  background: rgba(15, 23, 42, 0.95);
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.6),
    0 0 0 1px rgba(15, 23, 42, 0.2);
}

.helper-text {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.message--success {
  background-color: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.message--error {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.table-wrapper {
  margin-top: 20px;
  max-height: 60vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background-color: #f3f4f6;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

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

.top-toolbar span {
  font-size: 0.8rem;
  color: #9ca3af;
}

@media (max-width: 900px) {
  .page {
    padding: 24px 14px;
  }

  .brand-row {
    flex-direction: column;
  }

  .card {
    padding: 22px 16px 24px;
    border-radius: 20px;
  }

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

  .field--small {
    max-width: 100%;
  }

  .header h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 10px;
  }

  .card {
    padding: 18px 14px 20px;
  }

  .header h1 {
    font-size: 1.35rem;
  }

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

  button {
    width: 100%;
  }

  table {
    font-size: 0.75rem;
  }
}

