/* =========================================================
   DESIGN TOKENS
========================================================= */
:root {
  --bg: #0f172a;
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --accent: #f59e0b;

  --panel-bg: rgba(17, 24, 39, 0.85);
  --field-bg: #0b1020;
  --flag-bg: #0b1224;

  --border-soft: rgba(229, 231, 235, 0.12);
  --border-faint: rgba(229, 231, 235, 0.08);
}

/* =========================================================
   BASE / LAYOUT
========================================================= */
html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
  background: linear-gradient(135deg, #0b1024, #1f2937 60%, #0b1024);
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px;
}

.wrap {
  width: 100%;
  max-width: 980px;
}

.card {
  background: var(--panel-bg);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
header {
  padding: 28px 28px 0;
}

header h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

header p {
  margin: 0 0 18px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.required {
  color: var(--accent);
}

/* =========================================================
   NOTICE
========================================================= */
.notice {
  background: var(--flag-bg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
  padding: 14px 16px;
  border-radius: 12px;
}

/* =========================================================
   FORM
========================================================= */
form {
  padding: 24px 28px 28px;
}

fieldset {
  border: 1px solid var(--border-faint);
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
}

legend {
  padding: 0 8px;
  color: var(--accent);
  font-weight: 600;
}

label {
  display: block;
  margin: 10px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--field-bg);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* =========================================================
   OPTIONS / CHECKBOX GROUPS
========================================================= */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--field-bg);
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  padding: 10px 12px;
}

/* =========================================================
   ACTIONS / BUTTONS
========================================================= */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

button {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--ink);
}

/* =========================================================
   LANGUAGE GRID (INDEX + FORM PAGES)
========================================================= */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 24px 28px 12px;
}

.flag {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--flag-bg);
  border: 1px solid var(--border-soft);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.flag:hover {
  transform: translateY(-4px) scale(1.03);
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.18),
    rgba(245, 158, 11, 0.05)
  );
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.flag.active,
.flag[aria-current="page"] {
  cursor: default;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.35),
    rgba(245, 158, 11, 0.15)
  );
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.flag.active:hover,
.flag[aria-current="page"]:hover {
  transform: none;
}

/* =========================================================
   ERRORS / VALIDATION
========================================================= */
.error-message {
  color: #f87171;
  font-size: 14px;
  margin-top: 4px;
}

input.error,
textarea.error {
  border-color: #f87171;
}
