/* ==========================================================================
   Borsan Akademi - tasarim tokenlari ve temel bilesenler
   Marka rengi: #E30613 (Borsan Red)

   NOT: Kaynak surumde iki farkli tasarim dili vardi - dashboard Tailwind ile
   acik tema, admin tarafi ise inline CSS degiskenleriyle koyu "glassmorphism".
   Burada tek bir token seti kullaniliyor; her iki taraf ayni dili konusur.
   ========================================================================== */

:root {
  --primary: #E30613;
  --primary-dark: #BA050F;
  --primary-soft: rgba(227, 6, 19, 0.08);

  --bg: #f6f7f9;
  --bg-card: #ffffff;
  --border: #e3e6ea;
  --text: #14171a;
  --text-muted: #5b6570;

  --ok: #0f7b3f;
  --warn: #9a6200;
  --err: #b3261e;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .16);

  --step: 300ms cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --bg-card: #16191e;
    --border: #262b33;
    --text: #eef1f5;
    --text-muted: #9aa4b2;
    --primary-soft: rgba(227, 6, 19, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Klavye ile gezinen kullanici icin her zaman gorunur odak halkasi.
   Fare tiklamasinda gosterilmez (:focus-visible). */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ekran okuyucu icin gorunmez, klavyeyle odaklanınca gorunur atlama baglantisi. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-card);
  color: var(--text);
  padding: .75rem 1rem;
  z-index: 100;
  box-shadow: var(--shadow);
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* --- Duzen --- */

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  display: inline-block;
  flex: none;
}

.spacer { margin-left: auto; }

.who { color: var(--text-muted); font-size: .875rem; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* --- Kartlar --- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

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

.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; }
.stat-label { color: var(--text-muted); font-size: .85rem; }

.badge {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
}

/* --- Formlar --- */

.auth-wrap {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card { width: 100%; max-width: 400px; }

.field { margin-bottom: 1rem; }

label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }

input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%;
  padding: .62rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color var(--step), box-shadow var(--step);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .62rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--step), transform var(--step);
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-block { width: 100%; }

.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

/* --- Bildirimler --- */

.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
}
.notice-error { border-left-color: var(--err); }
.notice-ok { border-left-color: var(--ok); }

.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.field-validation-error { color: var(--err); font-size: .84rem; display: block; margin-top: .3rem; }
.input-validation-error { border-color: var(--err) !important; }

/* --- Hareket duyarliligi --- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
