/* ===========================================================
   Yenikent – Yönetim paneli stilleri
   =========================================================== */
:root {
  --navy-900: #060d24;
  --navy-800: #0a1633;
  --navy-700: #0f1f47;
  --blue: #1f3fa8;
  --blue-bright: #3b63e6;
  --red: #d62828;
  --green: #2fd07a;
  --amber: #f5b53d;
  --text: #e8ecf8;
  --muted: #9aa6c7;
  --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.045);
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { font-family: var(--body); background: var(--navy-900); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: .92rem; transition: background .2s, transform .2s, border-color .2s; white-space: nowrap; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #e53535; }
.btn--ghost { border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: rgba(255,255,255,.35); }
.btn--sm { padding: 8px 14px; font-size: .84rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; pointer-events: none; }
.danger { color: #ff8080; border-color: rgba(214,40,40,.4); }
.danger:hover { background: rgba(214,40,40,.15); }
.link { color: var(--muted); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #fff; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 0%, #16338a, var(--navy-900) 65%); }
.auth__card { width: min(400px, 100%); display: grid; gap: 14px; padding: 34px 28px; border-radius: 24px; background: rgba(10,22,51,.9); border: 1px solid var(--line); text-align: center; box-shadow: 0 30px 80px -30px #000; }
.auth__logo { width: 84px; height: 84px; border-radius: 50%; background: #fff; margin: 0 auto 4px; }
.auth h1 { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.auth__msg { color: #ff8a8a; font-size: .88rem; min-height: 1.2em; }
.auth__msg.ok { color: var(--green); }

/* ---------- Form alanları ---------- */
.fld { display: grid; gap: 6px; text-align: left; }
.fld > span { font-size: .82rem; font-weight: 600; color: #c8d0ea; }
.fld small { color: var(--muted); font-size: .76rem; }
.fld input, .fld select, .fld textarea {
  width: 100%; font: inherit; font-size: 16px; color: #fff; background: rgba(6,13,36,.7);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.fld textarea { resize: vertical; min-height: 90px; }
.fld select option { background: var(--navy-800); }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 4px rgba(59,99,230,.2); }
.fld .is-invalid { border-color: var(--red); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 70px; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 11px 8px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; font-size: .88rem; cursor: pointer; transition: all .2s; }
.seg input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }

.img-field { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.img-field__prev { width: 96px; height: 96px; border-radius: 12px; background: rgba(255,255,255,.06) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 1.6rem; border: 1px dashed var(--line); }
.img-field__prev.has { border-style: solid; font-size: 0; }
.img-field__btns { display: grid; gap: 8px; }
.img-field input[type=file] { display: none; }

.score-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.score-pair .fld input { text-align: center; font-family: var(--display); font-size: 2rem; padding: 6px; }
.score-pair > b { padding-bottom: 14px; color: var(--muted); }

/* ---------- Uygulama iskeleti ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 22px 16px; background: #040918; border-right: 1px solid var(--line); }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.side__brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.side__brand strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: .05em; line-height: 1; }
.side__brand small { color: var(--muted); font-size: .74rem; }
.side__nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: background .2s, color .2s; text-align: left; width: 100%; }
.nav-item i { font-style: normal; width: 22px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.is-active { background: rgba(214,40,40,.15); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.nav-item .badge { margin-left: auto; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; }
.side__foot { margin-top: auto; display: grid; gap: 10px; }
.side__user { font-size: .78rem; color: var(--muted); word-break: break-all; padding: 0 6px; }

.main { padding: 26px 32px 60px; min-width: 0; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border-radius: 12px; background: rgba(245,181,61,.12); border: 1px solid rgba(245,181,61,.35); font-size: .86rem; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.top h2 { font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.top__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Kartlar / listeler ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, transform .2s; }
.stat:hover { border-color: rgba(255,255,255,.25); transform: translateY(-2px); }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.stat span { font-size: .82rem; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.quick button { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; text-align: left; background: linear-gradient(135deg, rgba(214,40,40,.25), rgba(31,63,168,.25)); border: 1px solid var(--line); font-weight: 700; transition: transform .2s, border-color .2s; }
.quick button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.quick i { font-style: normal; font-size: 1.6rem; width: 46px; height: 46px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; flex: none; }
.quick small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
h4.sec { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 12px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: .84rem; color: var(--muted); }
.chip.is-active { background: #fff; color: var(--navy-900); border-color: #fff; }
.search { flex: 1; min-width: 180px; font: inherit; font-size: 16px; color: #fff; background: rgba(6,13,36,.7); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; outline: none; }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.item:hover { border-color: rgba(255,255,255,.22); }
.item__thumb { width: 56px; height: 56px; border-radius: 10px; background: rgba(255,255,255,.06) center/cover no-repeat; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.item__main { min-width: 0; }
.item__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__sub { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item__actions { display: flex; gap: 6px; align-items: center; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); text-transform: uppercase; letter-spacing: .04em; }
.tag--red { background: var(--red); color: #fff; }
.tag--blue { background: var(--blue); color: #fff; }
.tag--green { background: var(--green); color: #04301a; }
.tag--amber { background: var(--amber); color: #3a2600; }
.empty { padding: 36px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

/* Maç satırı + hızlı skor */
.match-date { text-align: center; width: 52px; line-height: 1; }
.match-date b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.9rem; }
.match-date small { font-size: .68rem; font-weight: 800; color: var(--red); letter-spacing: .1em; }
.qscore { display: flex; align-items: center; gap: 6px; }
.qscore input { width: 58px; text-align: center; font-family: var(--display); font-size: 1.5rem; padding: 4px; color: #fff; background: rgba(6,13,36,.8); border: 1.5px solid var(--line); border-radius: 10px; outline: none; }
.qscore input:focus { border-color: var(--blue-bright); }
.final { font-family: var(--display); font-size: 1.7rem; letter-spacing: .03em; }

/* Galeri ızgarası */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gal-card { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: rgba(255,255,255,.06) center/cover no-repeat; border: 1px solid var(--line); cursor: pointer; }
.gal-card span { position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px; font-size: .8rem; font-weight: 600; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); }
.gal-card .tag { position: absolute; top: 8px; left: 8px; }
.dropzone { display: grid; place-items: center; gap: 6px; padding: 26px; margin-bottom: 16px; border-radius: 16px; border: 2px dashed rgba(255,255,255,.2); text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--red); background: rgba(214,40,40,.07); color: #fff; }
.dropzone b { color: #fff; font-size: 1rem; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 16px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-bright), var(--red)); transition: width .3s; }

/* Ön kayıtlar */
.reg { display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.reg__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.reg__head b { font-size: 1.05rem; }
.reg__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; font-size: .86rem; }
.reg__grid span { color: var(--muted); }
.reg__acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ayarlar formu */
.settings { display: grid; gap: 22px; max-width: 820px; }
.card { padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 14px; }
.card h3 { font-size: 1rem; }
.sticky-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; }
.sticky-save .btn { box-shadow: 0 10px 30px -8px rgba(214,40,40,.7); }

/* ---------- Taslak / yayın ---------- */
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border-radius: 12px; background: rgba(245,181,61,.12); border: 1px solid rgba(245,181,61,.45); font-size: .88rem; }
.draft-bar__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.badge--amber { background: var(--amber) !important; color: #3a2600 !important; }
.nav-item .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(245,181,61,.2); }
.pub-card { gap: 12px; }
.pub-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.diff { list-style: none; display: grid; gap: 8px; }
.diff li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.18); }
.diff li > div { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diff s { opacity: .6; }
.diff-vals { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); width: 100%; }
.chg { flex: none; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; min-width: 62px; text-align: center; }
.chg--add { background: var(--green); color: #04301a; }
.chg--edit { background: var(--amber); color: #3a2600; }
.chg--del { background: var(--red); color: #fff; }
.thumb-sm { display: inline-block; width: 34px; height: 34px; border-radius: 6px; background: rgba(255,255,255,.08) center/cover no-repeat; vertical-align: middle; flex: none; }

/* ---------- Çekmece ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(3,7,20,.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); display: flex; flex-direction: column; background: var(--navy-800); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 1.15rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px; display: grid; gap: 16px; align-content: start; }
.drawer__foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer__foot .btn--red { flex: 1; max-width: 260px; margin-left: auto; }

/* ---------- Toast / yükleniyor ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 140%); padding: 12px 20px; border-radius: 12px; background: #fff; color: var(--navy-900); font-weight: 700; font-size: .9rem; box-shadow: 0 20px 40px -10px #000; transition: transform .35s cubic-bezier(.3,1.4,.5,1); max-width: calc(100% - 32px); }
.toast.is-show { transform: translate(-50%, 0); }
.toast.is-error { background: var(--red); color: #fff; }
.loading { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(6,13,36,.6); opacity: 0; pointer-events: none; transition: opacity .2s; }
.loading.is-on { opacity: 1; pointer-events: auto; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.15); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mobil ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .top h2 { font-size: 2.1rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .quick { grid-template-columns: 1fr; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; overflow-x: auto; scrollbar-width: none;
    background: rgba(4,9,24,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar::-webkit-scrollbar { display: none; }
  .tabbar .nav-item { flex: 1 0 68px; flex-direction: column; gap: 2px; padding: 8px 4px; font-size: .68rem; text-align: center; border-radius: 10px; position: relative; }
  .tabbar .nav-item i { font-size: 1.2rem; width: auto; }
  .tabbar .nav-item.is-active { box-shadow: none; }
  .tabbar .nav-item .badge { position: absolute; top: 2px; right: 8px; margin: 0; padding: 0 6px; }
  .item { grid-template-columns: auto 1fr; }
  .item__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .fld-row { grid-template-columns: 1fr; }
  .fld-row.keep { grid-template-columns: 1fr 1fr; }
}
