/* =====================================================================
   Atatürk Üniversitesi Özel Vakıf Okulları — Kurumsal tasarım sistemi
   ===================================================================== */
:root {
  /* Kurumsal lacivert */
  --navy-950: #030c30;
  --navy-900: #05154d;
  --navy-800: #081f6b;
  --navy-700: #0b2b8c;
  --navy-600: #143ca8;
  --navy-500: #2554c7;
  --navy-200: #c9d5f3;
  --navy-100: #e5ebf9;
  --navy-50:  #f3f6fd;
  /* Kurumsal altın */
  --gold-100: #fdf3dc;
  --gold-200: #fae6b8;
  --gold-300: #f4d18c;
  --gold-400: #e9b670;
  --gold-500: #d69b52;
  --gold-600: #b37b36;
  --gold-700: #8a5c22;
  --gold-grad: linear-gradient(135deg, #f8e0a2 0%, #e9b670 48%, #c98b43 100%);
  /* Nötrler */
  --ink: #0e1730;
  --ink-2: #33405c;
  --muted: #66718a;
  --line: #e1e6f0;
  --line-2: #eef1f7;
  --bg: #f4f6fb;
  --white: #fff;
  /* Durum */
  --ok: #17905a;
  --ok-bg: #e5f6ed;
  --bad: #c3283a;
  --bad-bg: #fbe9eb;
  --warn: #b86e00;
  --warn-bg: #fff4dc;
  /* Şık renkleri (kurumsal paletle uyumlu) */
  --a0: #c3283a;
  --a1: #2459d1;
  --a2: #c18d2a;
  --a3: #188552;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(5, 21, 77, .06), 0 1px 3px rgba(5, 21, 77, .08);
  --shadow: 0 4px 14px rgba(5, 21, 77, .08), 0 1px 3px rgba(5, 21, 77, .06);
  --shadow-lg: 0 18px 50px rgba(3, 12, 48, .25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "DM Serif Display", "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--navy-600); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Butonlar ---------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  font: 600 .93rem/1 var(--font);
  padding: .72em 1.15em;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
  background: var(--white); color: var(--ink); border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--navy-200); background: var(--navy-50); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 2px; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.btn-primary:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-gold { background: var(--gold-grad); color: var(--navy-950); border-color: var(--gold-500); }
.btn-gold:hover { filter: brightness(1.05); background: var(--gold-grad); border-color: var(--gold-600); }
.btn-danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-danger:hover { background: #a71f30; border-color: #a71f30; color: #fff; }
.btn-danger-outline { color: var(--bad); border-color: #f0c3c9; }
.btn-danger-outline:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--navy-50); border-color: transparent; }
.btn-lg { font-size: 1.05rem; padding: .85em 1.5em; }
.btn-xl { font-size: 1.2rem; padding: 1em 1.8em; border-radius: 10px; }
.btn-sm { font-size: .82rem; padding: .5em .8em; }
.btn-icon { padding: .5em; width: 2.2rem; height: 2.2rem; }

/* ---------- Form ---------- */
.field { display: grid; gap: .4rem; }
.field > label, .label { font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.help { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search], textarea, select {
  width: 100%;
  font: 500 .95rem var(--font);
  padding: .68em .8em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white); color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(37, 84, 199, .15); }
textarea { resize: vertical; line-height: 1.45; }

.switch { display: flex; align-items: center; gap: .7rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: #cbd3e3; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked { background: var(--navy-600); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Kart, rozet, uyarı ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 1.25rem 1.4rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .75rem; font-weight: 700; padding: .3em .65em; border-radius: 99px;
  background: var(--navy-50); color: var(--navy-700); border: 1px solid var(--navy-100);
  white-space: nowrap;
}
.badge-gold { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe7d2; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #f2c7cd; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #f3dca6; }
.badge-live::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.alert { border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .9rem; font-weight: 500; display: flex; gap: .6rem; align-items: flex-start; }
.alert-warn { background: var(--warn-bg); color: #7a4a00; border: 1px solid #f1d79c; }
.alert-bad { background: var(--bad-bg); color: #8d1626; border: 1px solid #f2c7cd; }
.alert-info { background: var(--navy-50); color: var(--navy-800); border: 1px solid var(--navy-100); }

/* ---------- Şekiller ---------- */
.shape { width: 1.4em; height: 1.4em; flex: none; fill: currentColor; }
.a0 { --c: var(--a0); } .a1 { --c: var(--a1); } .a2 { --c: var(--a2); } .a3 { --c: var(--a3); }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(3, 12, 48, .55); z-index: 40;
  display: grid; place-items: center; padding: 1rem; overflow-y: auto;
  backdrop-filter: blur(3px);
  animation: fade .15s ease;
}
.modal {
  width: min(780px, 100%); background: var(--white); border-radius: 14px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  max-height: calc(100vh - 2rem); animation: rise .2s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.15rem; }
.modal-body { padding: 1.3rem 1.4rem; overflow-y: auto; display: grid; gap: 1.1rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--line-2); border-radius: 0 0 14px 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  background: var(--navy-950); color: #fff; padding: .75em 1.2em; border-radius: 10px;
  font-weight: 600; font-size: .92rem; z-index: 100; box-shadow: var(--shadow-lg);
  max-width: 90vw; text-align: center; border-left: 4px solid var(--gold-400);
}

/* ---------- Konfeti ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- Animasyonlar ---------- */
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0 } 70% { transform: scale(1.04); opacity: 1 } 100% { transform: scale(1) } }
@keyframes rise { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.05) } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
@keyframes shimmer { from { background-position: -200% 0 } to { background-position: 200% 0 } }
.pop { animation: pop .45s cubic-bezier(.2,.9,.3,1.2) both; }
.rise { animation: rise .4s ease both; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.18); border-top-color: var(--gold-400);
  animation: spin 1s linear infinite; margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Koyu (lacivert) zemin — sunum & öğretmen ekranı ---------- */
.theme-dark {
  color: #fff;
  background-color: var(--navy-900);
  background-image:
    radial-gradient(1000px 600px at 50% -10%, rgba(37, 84, 199, .55), transparent 65%),
    radial-gradient(700px 500px at 100% 100%, rgba(214, 155, 82, .12), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='72' viewBox='0 0 120 72'%3E%3Cpath d='M0 54 30 24 60 54 90 24 120 54' fill='none' stroke='%23ffffff' stroke-opacity='.035' stroke-width='6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-950) 100%);
  background-attachment: fixed;
}
.gold-rule { height: 4px; background: var(--gold-grad); }
.brand-lockup { display: flex; align-items: center; gap: .8rem; }
.brand-lockup img { height: 52px; width: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.brand-lockup .l1 { font-family: var(--font-serif); font-size: .95rem; opacity: .85; line-height: 1.1; }
.brand-lockup .l2 { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.05; }
