/* ===========================================================
   Yarışma Dosya Toplama — arayüz
   Sıcak kâğıt teması · mercan vurgu · editoryal tipografi
   =========================================================== */

:root {
  /* Tema her zaman açık: sistem karanlık moddayken de tarayıcı
     form öğelerini/kaydırma çubuklarını koyulaştırmasın */
  color-scheme: light;

  /* Yüzeyler (sıcak, nötr değil) */
  --paper:    oklch(0.985 0.006 85);
  --paper-2:  oklch(0.965 0.008 80);
  --paper-3:  oklch(0.945 0.010 80);
  --ink:      oklch(0.245 0.028 285);
  --ink-soft: oklch(0.485 0.020 285);
  --ink-faint:oklch(0.62 0.015 285);
  --line:     oklch(0.905 0.010 285);
  --line-2:   oklch(0.855 0.012 285);

  /* Marka — Turkish Airlines kırmızısı (≈ PANTONE 7620) + havacılık laciverti */
  --accent:       oklch(0.545 0.212 27);
  --accent-press: oklch(0.470 0.205 27);
  --accent-tint:  oklch(0.955 0.032 27);
  --brand-bg:     oklch(0.205 0.038 264);
  --brand-bg-2:   oklch(0.145 0.032 264);

  --ok:  oklch(0.560 0.130 155);
  --ok-tint: oklch(0.955 0.040 155);
  --err: oklch(0.560 0.205 27);
  --err-tint: oklch(0.955 0.040 27);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px oklch(0.24 0.03 285 / 0.06);
  --shadow-md: 0 6px 24px -8px oklch(0.24 0.03 285 / 0.18);
  --shadow-lg: 0 24px 60px -20px oklch(0.24 0.05 322 / 0.45);

  /* turkishtechnology.com ile aynı: Poppins */
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }

/* ---------- Toast bildirim ---------- */
.msg {
  position: fixed;
  top: 20px; left: 50%;
  transform: translate(-50%, -24px);
  z-index: 100;
  max-width: min(520px, 92vw);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
.msg.show { opacity: 1; transform: translate(-50%, 0); }
.msg.ok  { background: var(--ok-tint);  color: oklch(0.4 0.13 155); border: 1px solid oklch(0.85 0.08 155); }
.msg.err { background: var(--err-tint); color: oklch(0.45 0.2 27);  border: 1px solid oklch(0.85 0.1 27); }

/* ===========================================================
   GİRİŞ EKRANI — bölünmüş yerleşim
   =========================================================== */
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* Sol marka paneli (color-drenched) */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--brand-bg), var(--brand-bg-2));
  color: oklch(0.97 0.01 85);
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 340px at 82% 8%, oklch(0.635 0.196 33 / 0.45), transparent 60%),
    radial-gradient(520px 380px at 8% 100%, oklch(0.5 0.14 322 / 0.55), transparent 62%);
  pointer-events: none;
}
.auth-brand > * { position: relative; }

.mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  letter-spacing: .01em;
}
.mark .glyph {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: white;
  box-shadow: 0 6px 20px -6px var(--accent);
}

.auth-brand .lede { max-width: 30ch; }
.auth-brand .lede .eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-tint);
  opacity: .9; margin-bottom: 18px;
}
.auth-brand .lede h2 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.04; font-weight: 600;
  margin-bottom: 20px;
}
.auth-brand .lede p {
  font-size: 16px; line-height: 1.6;
  color: oklch(0.9 0.02 322 / 0.85); margin: 0;
}

.auth-steps { display: grid; gap: 14px; }
.auth-steps li {
  list-style: none; display: flex; gap: 13px; align-items: flex-start;
  font-size: 14.5px; color: oklch(0.92 0.015 322 / 0.9);
}
.auth-steps .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid oklch(0.8 0.05 45 / 0.5);
  color: var(--accent-tint);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-family: var(--font-display);
}

/* Sağ form paneli */
.auth-form {
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px clamp(28px, 6vw, 88px);
  background: var(--paper);
}
.auth-form .switch {
  position: absolute; top: 28px; right: clamp(28px, 6vw, 64px);
  font-size: 14px; color: var(--ink-soft); text-decoration: none; font-weight: 500;
}
.auth-form .switch:hover { color: var(--accent); }
.auth-form .form-head { margin-bottom: 30px; }
.auth-form .form-head h1 { font-size: 27px; margin-bottom: 8px; }
.auth-form .form-head p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin: 0; max-width: 40ch; }
.auth-form form { width: 100%; }

/* ===========================================================
   UYGULAMA (giriş sonrası)
   =========================================================== */
.appbar {
  position: sticky; top: 0; z-index: 10;
  background: oklch(0.985 0.006 85 / 0.85);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.appbar .mark { color: var(--ink); font-size: 15px; }
.appbar .mark .glyph { width: 34px; height: 34px; border-radius: 9px; font-size: 17px; box-shadow: none; }
.appbar .who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }
.appbar .who strong { color: var(--ink); font-weight: 600; }

.container { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }

.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 30px; margin-bottom: 8px; }
.page-head p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }

/* Bölümler — kart yığını yerine hava boşluklu bloklar */
.section { margin-bottom: 40px; }
.section > header { margin-bottom: 16px; }
.section > header h2 { font-size: 19px; margin-bottom: 5px; }
.section > header p { color: var(--ink-soft); font-size: 14px; margin: 0; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel.tinted { background: var(--paper-2); }

/* ---------- Form öğeleri ---------- */
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink); margin: 0 0 7px;
}
input[type=text], input[type=password], input[type=email], textarea {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px; font-family: inherit;
  margin-bottom: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea {
  min-height: 150px; resize: vertical; line-height: 1.6;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px oklch(0.635 0.196 33 / 0.12);
}

button {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 22px; cursor: pointer;
  background: var(--accent); color: white;
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, transform .05s ease;
}
button:hover { background: var(--accent-press); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.block { width: 100%; }
button.secondary {
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line-2); box-shadow: none;
}
button.secondary:hover { background: var(--paper-3); border-color: var(--ink-faint); }
button.small { padding: 8px 15px; font-size: 13.5px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* ---------- Tablo ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; }
thead th {
  color: var(--ink-soft); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1.5px solid var(--line-2);
}
tbody td { border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s ease; }
tbody tr:hover { background: var(--paper-2); }
td.pw {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 1.5px; font-weight: 600; color: var(--accent-press);
}

a.dl {
  color: var(--accent); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
a.dl:hover { text-decoration: underline; }

/* ---------- Dosya bırakma alanı ---------- */
.file-drop {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 34px 24px; text-align: center;
  color: var(--ink-soft); cursor: pointer;
  background: var(--paper-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  margin-bottom: 16px;
}
.file-drop:hover { border-color: var(--ink-faint); }
.file-drop.drag { border-color: var(--accent); background: var(--accent-tint); color: var(--ink); }
.file-drop .big { font-size: 15px; }
.file-drop strong { color: var(--accent-press); }

/* ---------- Rozet & üretilen şifre kutusu ---------- */
.badge {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--paper-3); border: 1px solid var(--line-2); color: var(--ink-soft);
}
.badge.accent { background: var(--accent-tint); border-color: transparent; color: var(--accent-press); }

.callout {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-tint);
  border: 1px solid oklch(0.85 0.07 27);
  border-radius: var(--radius-sm);
  padding: 12px 15px; font-size: 13.5px; line-height: 1.5;
  color: oklch(0.45 0.16 27); margin-bottom: 18px;
}

/* Takım kartı (admin listesi) */
.team-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.team-block > .row { margin-bottom: 2px; }
.team-block strong { font-size: 15.5px; }

.muted { color: var(--ink-soft); font-size: 13.5px; }
.hidden { display: none !important; }

/* ===========================================================
   ORTAK MARKA KİLİDİ (partner lockup)
   Tipografik yer tutucular — resmî logolarla değiştirilebilir
   =========================================================== */
.partners { display: flex; flex-direction: column; gap: 10px; }
.partners .plabel {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; opacity: .55;
}
.partner-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: .02em;
  line-height: 1; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
}
.wordmark .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.wordmark.lg { font-size: 20px; }
.wordmark.sm { font-size: 15px; font-weight: 600; }
.partner-sep { width: 1px; height: 20px; background: currentColor; opacity: .22; }

/* Resmî logo görselleri */
.logo-img { display: block; width: auto; object-fit: contain; }
/* Yatay logolar (Turkish Airlines, Turkish Technology) */
.logo-img.ta, .logo-img.tt { height: 27px; }
.appbar .logo-img.ta, .appbar .logo-img.tt { height: 16px; }
/* TEKNOFEST kare logo — biraz daha büyük */
.logo-img.tf { height: 54px; }
.appbar .logo-img.tf { height: 30px; }

/* Koyu / açık zemin: her marka için doğru logo dosyası HTML'de seçilir.
   TEKNOFEST'in yalnızca beyaz sürümü olduğundan açık çubukta koyu silüete çevrilir. */
.appbar .logo-img.tf { filter: brightness(0); opacity: .82; }

/* Uygulama başlığındaki kompakt logo şeridi */
.cobrand { display: flex; align-items: center; gap: 14px; }
.cobrand .wordmark { color: var(--ink); }
.cobrand .partner-sep { height: 16px; }
.cobrand .sub { color: var(--ink-soft); }

/* ===========================================================
   YARIŞMA BİLGİ KARTLARI + GERİ SAYIM
   =========================================================== */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--paper); padding: 16px 18px; }
.fact .k { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.fact .v { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.fact .v small { font-size: 13px; font-weight: 500; color: var(--ink-soft); }

/* Son teslim şeridi */
.deadline {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  background: var(--brand-bg); color: oklch(0.96 0.01 85);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.deadline::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 90% -30%, var(--accent), transparent 60%);
  opacity: .5;
}
.deadline > * { position: relative; }
.deadline .dl-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.deadline .dl-date { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.countdown { display: flex; gap: 10px; }
.cd-cell { text-align: center; background: oklch(1 0 0 / 0.08); border: 1px solid oklch(1 0 0 / 0.14); border-radius: 10px; padding: 8px 12px; min-width: 58px; }
.cd-cell .num { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; }
.cd-cell .lab { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.deadline.over { background: oklch(0.35 0.02 264); }
.deadline.over .accent-txt { color: oklch(0.8 0.14 27); }

/* Giriş panelindeki bilgi listesi (ödül/tarih) */
.brand-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 4px; }
.brand-facts .bf .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; margin-bottom: 3px; }
.brand-facts .bf .v { font-family: var(--font-display); font-weight: 600; font-size: 16px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 40px 32px; gap: 32px; min-height: auto; }
  .auth-brand .lede h2 { font-size: 30px; }
  .auth-form { padding: 44px 32px 56px; }
  .auth-form .switch { position: static; display: inline-block; margin-bottom: 24px; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cobrand .partner-sep, .cobrand .wordmark.sm:not(:first-child) { display: none; }
  .appbar .who span:not(.badge) { display: none; }
}
