:root {
  --black: #000; --raise: #141414; --raise2: #1d1d1d; --line: #2c2c2c;
  --red: #ff1a1a; --gray: #a8a8a8; --bone: #eeeae3; --green: #3ddc6a; --orange: #ffab2e;
  --display: "Anton", Impact, sans-serif; --body: "Barlow", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--black); color: var(--bone); font: 400 17px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; margin: 0; line-height: 1; letter-spacing: .01em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.loading { text-align: center; padding: 40vh 0; color: var(--gray); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid transparent; border-radius: 4px;
  padding: 11px 18px; font: 600 16px/1 var(--body); cursor: pointer; text-decoration: none; background: var(--raise2); color: var(--bone); }
.btn:hover { border-color: #444; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #fff; color: #000; }
.btn-ghost { background: none; border-color: #444; }
.btn-small { padding: 7px 11px; font-size: 14px; }
.btn-danger { color: #ff6b5e; }
.btn:disabled { opacity: .5; cursor: default; }

/* Giriş ekranı */
.auth { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.auth-box { width: min(400px, 100%); }
.auth-box img { width: 180px; margin: 0 auto 26px; display: block; }
.auth-box h1 { font-size: 34px; margin-bottom: 8px; }
.auth-box p { color: var(--gray); margin: 0 0 22px; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--gray); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; background: #0b0b0b; color: #fff; border: 1px solid #383838;
  border-radius: 4px; padding: 11px 12px; font: 400 16px var(--body);
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: none; }
input[type=checkbox] { display: inline-block; width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; accent-color: var(--red); }
.err { color: #ff6b5e; font-weight: 600; min-height: 1.4em; margin: 8px 0 0; }
.full { width: 100%; }

/* Üst çubuk */
.top { position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-row { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 18px; }
.top-row img { width: 64px; }
.top-row .grow { flex: 1; }
.tabs { max-width: 1100px; margin: 0 auto; display: flex; gap: 4px; padding: 0 12px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--gray); font: 600 16px var(--body); padding: 12px 10px; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: #fff; border-color: var(--red); }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; margin-left: 4px; }

main { max-width: 1100px; margin: 0 auto; padding: 26px 18px 120px; }
main h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 18px; }
.muted { color: var(--gray); }

/* Kutular */
.card { background: var(--raise); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--raise); border-left: 4px solid var(--c, var(--red)); padding: 14px 16px; border-radius: 4px; }
.stat b { display: block; font: 400 38px/1 var(--display); }
.stat span { color: var(--gray); font-size: 14px; }
.hero-card { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.hero-card h2 { font-size: 30px; margin-bottom: 6px; }

/* İçerik düzenleyici */
details.sec { background: var(--raise); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; }
details.sec > summary { cursor: pointer; padding: 16px 18px; font: 400 24px/1 var(--display); text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: "+"; color: var(--red); font-size: 28px; }
details.sec[open] > summary::after { content: "–"; }
details.sec > summary small { font: 500 14px var(--body); text-transform: none; color: var(--gray); margin-left: 10px; }
.sec-body { padding: 0 18px 18px; }
.sec-help { color: var(--gray); font-size: 15px; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.item { border: 1px solid var(--line); border-radius: 6px; padding: 14px 14px 4px; margin-bottom: 12px; background: #0e0e0e; }
.item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.item-head b { flex: 1; font-weight: 600; }
.img-field { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.img-field img { width: 74px; height: 74px; object-fit: cover; border-radius: 4px; background: #222; }
.img-field .ph { width: 74px; height: 74px; border-radius: 4px; background: #222; display: grid; place-items: center; color: #555; font-size: 12px; }
.words { display: flex; flex-wrap: wrap; gap: 8px; }
.words span { background: var(--raise2); border-radius: 4px; padding: 6px 6px 6px 12px; display: inline-flex; gap: 6px; align-items: center; }
.words button { background: none; border: 0; color: var(--gray); cursor: pointer; font-size: 18px; line-height: 1; }
.add-word { display: flex; gap: 8px; margin-top: 10px; }
.add-word input { margin: 0; }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(10,10,10,.96); border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 12px; align-items: center; }
.savebar span { color: var(--orange); font-weight: 600; }

/* Başvurular */
.msg { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; }
.msg.unread { border-left: 4px solid var(--red); }
.msg h3 { font: 600 19px var(--body); text-transform: none; }
.msg .meta { color: var(--gray); font-size: 14px; }
.msg .note { grid-column: 1 / -1; white-space: pre-wrap; }
.msg .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.empty { text-align: center; color: var(--gray); padding: 40px 10px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #fff; color: #000; font-weight: 600;
  padding: 11px 18px; border-radius: 6px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.6); max-width: 90vw; text-align: center; }
.toast.bad { background: #ff6b5e; color: #000; }
