/* Form ve admin paneli için ortak tasarım dili: düz beyaz zemin, tek vurgu rengi olarak kırmızı. */

:root {
  --bg: #ffffff;
  --surface: #f6f6f6;
  --ink: #2b2b2b;
  --ink-soft: #555555;
  --muted: #737373;
  --line: #e4e4e4;
  --line-strong: #c9c9c9;
  --placeholder: #9b9b9b;

  --red: #c40000;
  --red-hover: #9f0000;
  --red-tint: #fdeeee;

  --danger: #b30000;
  --danger-tint: #fff5f5;
  --danger-line: #f0c2c2;

  --ring: 0 0 0 3px rgb(43 43 43 / 0.14);
  --ring-danger: 0 0 0 3px rgb(179 0 0 / 0.16);
  --radius: 3px;

  --font-sans: "Open Sans", Arial, Helvetica, sans-serif;
  --font-display: "Montserrat", "Open Sans", Arial, sans-serif;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- marka alanı (form ve admin önizlemesi aynı kuralları kullanır) ---------- */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 48px;
  text-align: center;
}

.brand:empty {
  display: none;
}

/* Logo yüklendiği gibi gösterilir; arka plan, çerçeve veya gölge eklenmez. */
.brand-logo {
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 120px;
  object-fit: contain;
}

.brand-slogan {
  max-width: 34ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* Ortalanmış başlık + altında kısa kırmızı çizgi */
.section-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--red);
}

/* ---------- alanlar ---------- */

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input::placeholder {
  color: var(--placeholder);
}

.input:hover {
  border-color: #a8a8a8;
}

.input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--ring);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.input[aria-invalid="true"]:focus {
  box-shadow: var(--ring-danger);
}

.input-affix {
  position: relative;
}

.input-affix .input {
  padding-right: 56px;
}

.affix {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  pointer-events: none;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.field-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field-error .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* ---------- butonlar ---------- */

.btn {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  background: none;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-primary[aria-busy="true"] {
  background: var(--red-hover);
  cursor: progress;
}

/* Pasif buton soluk görünmekle kalmasın; rengi ve imleci de durumu anlatsın. */
.btn-primary:disabled:not([aria-busy="true"]) {
  background: #ececec;
  color: #8c8c8c;
  cursor: not-allowed;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-secondary:disabled {
  border-style: dashed;
  color: var(--muted);
  cursor: not-allowed;
}

.btn-secondary:disabled:hover {
  border-color: var(--line-strong);
}

.btn-text {
  height: auto;
  padding: 4px 2px;
  border: 0;
  color: var(--red);
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.btn-text:hover {
  color: var(--red-hover);
  text-decoration-thickness: 2px;
}

.btn .icon-arrow {
  transition: transform 0.18s ease;
}

.btn:hover .icon-arrow {
  transform: translateX(3px);
}

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- uyarı kutusu ---------- */

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: 0.9375rem;
  font-weight: 600;
}

.alert .icon {
  margin-top: 1px;
}

@media (max-width: 640px) {
  .brand {
    gap: 16px;
    padding-top: 32px;
  }

  .brand-logo {
    max-width: 200px;
    max-height: 88px;
  }

  .brand-slogan {
    font-size: 1.125rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
