* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --bg-2: #e5e7eb;
  --card: #ffffff;
  --card-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --red: #dc2626;
  --red-dark: #991b1b;
  --white: #ffffff;
  --danger: #b91c1c;
  --success: #166534;
  --warning: #92400e;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, .14), transparent 34%),
    radial-gradient(circle at top right, rgba(220, 38, 38, .14), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  padding: 34px 16px;
  border-bottom: 5px solid var(--red);
  background:
    linear-gradient(135deg, var(--blue-dark), var(--blue) 55%, var(--red));
  color: var(--white);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
}

.site-header > div,
.container {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.flag-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 190px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.55);
}

.flag-bar span:nth-child(1) {
  background: var(--red);
}

.flag-bar span:nth-child(2) {
  background: var(--white);
}

.flag-bar span:nth-child(3) {
  background: var(--blue);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -.03em;
}

.site-header p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.88);
}

.container {
  padding: 24px 0 48px;
}

.card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .10);
}

.hero-card {
  border-top-color: var(--red);
}

.card h2,
.card h3 {
  margin-top: 0;
  color: var(--blue-dark);
}

.card p {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin: 14px 0;
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
}

textarea {
  min-height: 90px;
}

button,
.button {
  display: inline-block;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  color: var(--white);
  padding: 12px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button.danger,
.button.danger {
  background: var(--danger);
  color: var(--white);
}

button.secondary,
.button.secondary {
  background: var(--white);
  color: var(--blue-dark);
  border: 1px solid var(--blue);
}

.choices {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  background: var(--card-2);
  font-weight: 700;
}

.choice input {
  width: auto;
  margin: 0;
}

.disabled-choice {
  opacity: .72;
}

.role-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22, 101, 52, .10);
  color: var(--success);
  border: 1px solid rgba(22, 101, 52, .25);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.preview-pill {
  background: rgba(29, 78, 216, .10);
  color: var(--blue-dark);
  border-color: rgba(29, 78, 216, .28);
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}

.alert-success {
  color: var(--success);
  background: rgba(22, 101, 52, .08);
  border-color: rgba(22, 101, 52, .22);
}

.alert-error {
  color: var(--danger);
  background: rgba(185, 28, 28, .08);
  border-color: rgba(185, 28, 28, .22);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

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

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

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

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

th {
  color: var(--blue-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(29, 78, 216, .06);
}

.inline-form {
  display: inline;
}

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

.check-row input {
  width: auto;
  margin: 0;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 24px 16px 40px;
}

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

  .role-header {
    display: block;
  }
}
