/* NUR KARDEŞİM — beyaz, sade, mobil öncelikli arayüz */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --glass: rgb(255 255 255 / .82);
  --text: #11132a;
  --muted: #6c7084;
  --border: #e9eaf0;
  --accent: #2d2b74;
  --accent-2: #4a47b0;
  --accent-ink: #ffffff;
  --accent-soft: #eeeefa;
  --gold: #b8945a;
  --gold-soft: #f7f1e6;
  --flame: #e5731f;
  --flame-soft: #fdf0e4;
  --ok: #1f8a57;
  --warn: #b5651d;
  --danger: #d13a2f;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(17 19 42 / .04);
  --shadow-lg: 0 10px 40px rgb(17 19 42 / .08);
  --mark-opacity: .045;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d16;
    --surface: #151724;
    --surface-2: #1d2030;
    --glass: rgb(21 23 36 / .82);
    --text: #eceef7;
    --muted: #9296ab;
    --border: #252839;
    --accent: #9d9bf5;
    --accent-2: #b9b7ff;
    --accent-ink: #11123a;
    --accent-soft: #23244a;
    --gold: #d6b77f;
    --gold-soft: #2c2619;
    --flame: #f39a52;
    --flame-soft: #33241a;
    --ok: #5fcf95;
    --warn: #e2a059;
    --danger: #f08a82;
    --shadow: none;
    --shadow-lg: 0 10px 40px rgb(0 0 0 / .4);
    --mark-opacity: .06;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Arka plandaki şeffaf logo */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("logo.png") center 50% / min(110vw, 90vh) no-repeat;
  opacity: var(--mark-opacity);
}
body { overflow-x: clip; }
body.has-tabbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 1rem; margin: 0 0 .85rem; letter-spacing: -.01em; font-weight: 650; }
p { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ok { color: var(--ok); }

/* ---------- Yerleşim ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--glass); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.top-inner, main { max-width: 640px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
body.wide .top-inner, body.wide main { max-width: 1120px; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand img { display: block; }
.brand:hover { text-decoration: none; }
.top-links { display: flex; gap: .25rem; }
.top-links a { padding: .45rem .85rem; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 550; }
.top-links a.on, .top-links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
main { padding-top: 24px; padding-bottom: 40px; }
main > * + * { margin-top: 14px; }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: .75rem; }
.row.wrap { flex-wrap: wrap; }
.row.end { align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1.4fr 1fr; } .grid2 > .card { margin: 0; } }
.grid2 > * + * { margin-top: 0; }

/* ---------- Kartlar ---------- */
.card { background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card.soft > * + * { margin-top: .5rem; }
.pad { padding: 20px 20px 0; }
.hello { padding: 6px 2px 2px; }
.hello p { margin: 0; }

/* ---------- Form öğeleri ---------- */
label { display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; font-weight: 550; }
label small { font-weight: 400; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: .7rem .85rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 46px; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.check-label { flex-direction: row; align-items: center; gap: .5rem; padding-bottom: .6rem; }
.check-label input { width: auto; }

/* Yan yana form alanları: girişler ve düğme aynı hizada, ipuçları etiketin yanında */
.fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fields > label.grow { flex: 1 1 220px; }
.fields > label.num { flex: 0 1 170px; }
.fields input, .fields .btn { height: 46px; }
.fields .btn { padding-top: 0; padding-bottom: 0; }
.fields .check-label { height: 46px; padding: 0 4px; }
.lbl { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; white-space: nowrap; }
.report-form .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-form { flex-wrap: nowrap; }
.report-form > label.num { flex: 0 1 160px; }
@media (max-width: 560px) { .report-form { flex-wrap: wrap; } }
.lbl small { color: var(--muted); font-size: .75rem; font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: .65rem 1.05rem; border-radius: 12px; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: .42rem .8rem; font-size: .85rem; border-radius: 10px; }
.btn.big { padding: 1rem 1rem; font-size: 1.08rem; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link.danger { color: var(--danger); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
form { margin: 0; }

.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .18rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.pill.wait { background: var(--flame-soft); color: var(--flame); }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.tag { font-size: .82rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: .3rem .75rem; border-radius: 999px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--flame); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; position: absolute; top: 4px; left: calc(50% + 6px); }

.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.3rem; }

progress.bar { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: block; }
progress.bar::-webkit-progress-bar { background: var(--surface-2); }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 3px; }

/* ---------- Giriş ---------- */
.auth { max-width: 380px; margin: 7vh auto 0; text-align: center; }
.auth .card { text-align: left; margin: 24px 0 14px; padding: 24px; box-shadow: var(--shadow-lg); }
.auth-mark { margin-bottom: 14px; }
.auth-mark img { display: inline-block; }

/* ---------- Ana sayfa ---------- */
.read-card { display: flex; flex-direction: column; gap: 14px; }
.read-card.done { background: linear-gradient(160deg, var(--accent-soft), var(--glass) 70%); }
.label-up { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; margin: 0; }
.pages { font-size: 2.1rem; font-weight: 750; letter-spacing: -.035em; margin: -6px 0 0; }
.finished { background: var(--gold-soft); border-radius: 14px; padding: .8rem 1rem; margin: 0; }
.done-state { display: flex; align-items: center; gap: 14px; }
.done-state p { margin: 0; }
.check { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; flex: none; }
.marked-by { margin-top: 4px !important; color: var(--accent); font-weight: 550; }
.group-hint { margin: -4px 0 0; }
.adjust summary { cursor: pointer; color: var(--muted); font-size: .875rem; }
.adjust .row { margin-top: .75rem; }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 16px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 1.4rem; font-weight: 750; letter-spacing: -.02em; }
.stat .n small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat .l { font-size: .75rem; color: var(--muted); }
.stat.flame .n { filter: grayscale(1); opacity: .55; }
.stat.flame.lit { background: var(--flame-soft); border-color: transparent; }
.stat.flame.lit .n { filter: none; opacity: 1; color: var(--flame); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; background: none; border: 0; padding: 0; color: inherit; width: 100%; }
.day .wd { font-size: .7rem; color: var(--muted); font-weight: 550; }
.day .dot { width: 100%; max-width: 36px; aspect-ratio: 1; height: auto; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.day.read .dot { background: var(--accent); color: var(--accent-ink); }
.day.today .dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.day.open { cursor: pointer; }
.day.open .dot { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--muted) 60%, transparent); }
.day.open:hover .dot { border-color: var(--accent); color: var(--accent); }

.partner .actions { margin-top: 14px; flex-wrap: wrap; }
.partner p { margin: 0; }
.pair-streak { margin: 12px 0 0 !important; padding: .65rem .85rem; background: var(--gold-soft); border-radius: 12px; font-size: .9rem; }

.announcements { list-style: none; padding: 0; margin: 0; }
.announcements li { padding: 12px 0; border-top: 1px solid var(--border); }
.announcements li:first-child { border-top: 0; padding-top: 0; }
.announcements li:last-child { padding-bottom: 0; }
.announcements p { margin: 0 0 2px; white-space: pre-line; overflow-wrap: anywhere; }
.announcements li.new p { font-weight: 600; }
.announcements li.new p::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--gold); vertical-align: middle; }

/* Duyuru kartı: ana sayfanın en üstünde, altın vurgulu */
.announce-card { background: linear-gradient(150deg, var(--gold-soft), var(--glass) 75%); border-color: color-mix(in srgb, var(--gold) 35%, var(--border)); }
.announce-card.fresh { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent), var(--shadow); }
.announce-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.announce-head h2 { margin: 0; flex: 1; }
.announce-ico, .announce-badge { display: grid; place-items: center; border-radius: 12px; background: var(--gold); color: #fff; flex: none; }
.announce-ico { width: 34px; height: 34px; }
.announce-ico svg, .announce-badge svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Girişte açılan duyuru penceresi */
.modal.announce-modal { width: min(460px, calc(100% - 32px)); padding-top: 30px; }
.announce-badge { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; box-shadow: 0 10px 26px color-mix(in srgb, var(--gold) 40%, transparent); animation: ring 1.2s ease .3s 1; }
.announce-modal h2 { font-size: 1.25rem; margin-bottom: 16px; }
.announce-list { text-align: left; max-height: 50vh; overflow-y: auto; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.announce-list article { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; border-left: 3px solid var(--gold); }
.announce-list p { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }

/* ---------- Listeler ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.item:first-child { border-top: 0; }
.card.flush .item { padding: 13px 18px; }
.item p { margin: 0; }
.item .pill { margin-left: .35rem; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); padding: 4px; border-radius: 14px; }
.seg a { text-align: center; padding: .55rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(17 19 42 / .08); }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--border); }
.rank li:first-child { border-top: 0; }
.rank li.me { background: var(--accent-soft); }
.rank .pos { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.rank .pos1 { background: #f3dfa6; color: #5b4300; }
.rank .pos2 { background: #e2e4ea; color: #3b4148; }
.rank .pos3 { background: #ecccb0; color: #5a3312; }
.rank .val { font-weight: 700; }
.rank .val small { color: var(--muted); font-weight: 500; }

/* ---------- Mesajlar ---------- */
.chat-head p { margin: 0; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 330px); max-height: calc(100dvh - 330px); min-height: 200px; overflow-y: auto; }
.bubble { max-width: 82%; align-self: flex-start; background: var(--surface-2); padding: .6rem .85rem; border-radius: 18px 18px 18px 6px; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; }

/* ---------- Alt menü ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; color: var(--muted); font-size: .7rem; font-weight: 600; border-radius: 14px; }
.tabbar a:hover { text-decoration: none; color: var(--text); }
.tabbar a.on { color: var(--accent); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 720px) {
  .tabbar { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); width: 420px; border: 1px solid var(--border); border-radius: 22px; padding: 6px 8px; box-shadow: var(--shadow-lg); }
  body.has-tabbar { padding-bottom: 110px; }
}

/* ---------- Profil ---------- */
.profile-hero { text-align: center; padding: 30px 20px 22px; position: relative; overflow: hidden; }
.profile-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 88px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: .09; }
.profile-hero > * { position: relative; }
.avatar.xl { display: block; width: 88px; height: 88px; margin: 0 auto 14px; object-fit: cover; background: #0b0a08; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--gold), 0 12px 30px color-mix(in srgb, var(--accent) 25%, transparent); }
.profile-hero h1 { margin-bottom: 8px; }
.handle { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--surface-2); font: 500 .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); max-width: 100%; }
.handle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle button { flex: none; border: 0; background: var(--surface); color: var(--text); font: 600 .75rem/1 ui-sans-serif, system-ui, sans-serif; padding: .4rem .65rem; border-radius: 999px; cursor: pointer; }
.handle button:hover { color: var(--accent); }
.hero-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-pills .pill { font-size: .78rem; padding: .3rem .7rem; }

.stats4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .stats4 { grid-template-columns: repeat(4, 1fr); } }
.stats4 .stat { padding: 16px 12px; text-align: left; }
.stats4 .stat .n { font-size: 1.55rem; }

.partner-mini { display: flex; align-items: center; gap: 12px; }
.partner-mini p { margin: 0; }

.section-title { font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 8px; }
main > .section-title + * { margin-top: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .mark { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.timeline p { margin: 0; }

.settings { padding: 0; overflow: hidden; }
.setting + .setting { border-top: 1px solid var(--border); }
.setting > summary, .setting-row { list-style: none; display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; }
.setting > summary::-webkit-details-marker { display: none; }
.setting > summary:hover, .setting-row:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.setting .ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.setting svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.setting .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setting .txt strong { font-weight: 600; font-size: .95rem; }
.setting .txt small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting .chev { color: var(--muted); transition: transform .2s; }
.setting[open] .chev { transform: rotate(90deg); }
.setting-body { padding: 2px 18px 18px 68px; }
@media (max-width: 480px) { .setting-body { padding-left: 18px; } }
a.setting-row:hover { text-decoration: none; }
.setting.logout .ico { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.setting.logout .txt strong { color: var(--danger); }

/* ---------- Okuma sürem ---------- */
.speed-card { display: flex; flex-direction: column; gap: 16px; }
.speed-welcome { margin: 0; padding: .75rem 1rem; border-radius: 14px; background: var(--gold-soft); font-weight: 550; }
.speed-target { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.speed-target p { margin: 0; }
.speed-target .announce-ico { font-size: 1.1rem; background: var(--accent-soft); }
.steps { margin: 0; padding-left: 1.3rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.steps strong { color: var(--text); }
.stopwatch { text-align: center; font-variant-numeric: tabular-nums; font-weight: 750; letter-spacing: -.03em; line-height: 1; padding: 22px 0 18px; border-radius: 20px; background: var(--surface-2); color: var(--muted); transition: background .2s, color .2s; }
.stopwatch .sw-main { font-size: clamp(3.4rem, 18vw, 5rem); }
.stopwatch .sw-tenth { font-size: clamp(1.6rem, 8vw, 2.2rem); opacity: .6; }
.stopwatch.running { background: var(--accent-soft); color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.speed-later { display: flex; align-items: center; gap: 14px; border: 1px dashed color-mix(in srgb, var(--gold) 55%, var(--border)); background: var(--gold-soft); }
.speed-later[hidden] { display: none; }
.speed-later p { margin: 2px 0 0; }
.speed-later-ico { font-size: 1.6rem; flex: none; }
@media (max-width: 520px) { .speed-later { flex-wrap: wrap; } .speed-later form, .speed-later .btn { width: 100%; } }
.speed-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 26px; }
.speed-result .check { margin-bottom: 6px; }
.speed-result .label-up { margin-top: 4px; }
.speed-big { font-size: 2.6rem; font-weight: 750; letter-spacing: -.03em; margin: 0; color: var(--accent); }
.speed-facts { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.speed-facts > div { background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.speed-facts .l { font-size: .78rem; color: var(--muted); }
.speed-facts .n { font-size: 1.2rem; font-weight: 700; }
.speed-result .pill { margin: 4px 0 0; }
.speed-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ---------- Yönetim ---------- */
.speed-admin-last { font-size: 1.4rem; margin: 0; }
.speed-admin-last strong { color: var(--accent); }
.speed-history { margin-top: 10px; }
.speed-history .item { padding: 8px 0; }
.subnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin: -4px -16px 0; padding: 0 16px; }
.subnav a { padding: .65rem .85rem; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { color: var(--text); border-bottom-color: var(--accent); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpis.kpis3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .kpis.kpis3 { grid-template-columns: 1fr 1fr; } }
.grid2.even { align-items: start; }
@media (min-width: 860px) { .grid2.even { grid-template-columns: 1fr 1fr; } }
.grid2.even .section-title { margin-top: 26px; }
.pair-form select { height: 46px; }
.pair-amp { align-self: flex-end; height: 46px; display: grid; place-items: center; color: var(--gold); font-weight: 700; font-size: 1.2rem; }
.pair-note { margin: 10px 0 0; }
@media (max-width: 640px) { .pair-amp { display: none; } }
.pair-names { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pair-names .amp { color: var(--gold); font-weight: 700; }
.kpi { background: var(--glass); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l { font-size: .8rem; color: var(--muted); }
.kpi .n { font-size: 1.65rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
.kpi .sub { font-size: .75rem; color: var(--muted); }
.kpi.good .n { color: var(--ok); }
.kpi.warn .n { color: var(--warn); }
.kpi progress { margin-top: 4px; }

.toolbar { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips a { font-size: .825rem; font-weight: 600; padding: .32rem .75rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chips a:hover { text-decoration: none; color: var(--text); }
.chips a.on { background: var(--accent); color: var(--accent-ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 11px 18px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 18px; border-top: 1px solid var(--border); white-space: nowrap; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table a { color: var(--text); }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--danger); font-weight: 700; opacity: .7; }
.copy input { min-width: 220px; font-size: .8rem; padding: .4rem .6rem; }

.active-book { border-color: var(--accent); }

.cal-wrap { display: flex; gap: 6px; overflow-x: auto; }
.cal-days { display: grid; grid-template-rows: repeat(7, 14px); gap: 3px; font-size: .65rem; line-height: 14px; }
.cal { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; }
.cal span, .legend span { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.c-read { background: var(--accent); }
.c-miss { background: var(--surface-2); outline: 1px solid var(--border); outline-offset: -1px; }
.c-before, .c-future { background: transparent; }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.legend span { vertical-align: middle; }
.legend span + span { margin-left: 8px; }

/* ---------- Bildirim (toast) ---------- */
.toast {
  position: fixed; z-index: 50; top: 72px; left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px; padding: 14px 12px 14px 14px;
  box-shadow: 0 16px 48px rgb(17 19 42 / .14), 0 2px 6px rgb(17 19 42 / .05);
  animation: toast-in .32s cubic-bezier(.2, .9, .3, 1.2);
}
.toast p { margin: 2px 0 0; flex: 1; font-size: .95rem; overflow-wrap: anywhere; }
.toast-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--accent); color: var(--accent-ink); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.toast.err .toast-icon { background: var(--danger); color: #fff; }
.toast-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.toast-close:hover { background: var(--surface-2); color: var(--text); }
.toast.ok::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); opacity: .35; transform-origin: left; animation: toast-timer 5s linear forwards; }
.toast.ok:hover::after { animation-play-state: paused; }
.toast.leaving { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -14px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -10px) scale(.97); } }
@keyframes toast-timer { to { transform: scaleX(0); } }

/* ---------- Pencere (modal) ---------- */
.modal {
  width: min(400px, calc(100% - 32px)); padding: 28px 24px 20px; margin: auto;
  border: 1px solid var(--border); border-radius: 24px;
  background: var(--surface); color: var(--text); text-align: center;
  box-shadow: 0 24px 70px rgb(17 19 42 / .25);
}
.modal:not([open]) { display: none; }
.modal[open] { animation: modal-in .28s cubic-bezier(.2, .9, .3, 1.15); }
.modal::backdrop { background: rgb(17 19 42 / .4); backdrop-filter: blur(4px); animation: fade-in .2s ease; }
.modal-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.modal.danger .modal-icon { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.modal-icon.info { background: var(--gold-soft); }
.modal-msg { font-size: 1.02rem; line-height: 1.5; margin: 0 0 20px; overflow-wrap: anywhere; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; padding: .75rem 1rem; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.code-box { display: flex; align-items: center; gap: 8px; margin: -6px 0 20px; padding: 8px 8px 8px 14px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; }
.code-box code { flex: 1; text-align: left; font: 600 1rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.leaving, .modal[open], .modal::backdrop, .announce-badge { animation: none; }
}

/* ---------- Şifre alanı ---------- */
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-off, .pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }

/* ---------- Yönetim alt menüsü (yalnızca telefonda) ---------- */
.admin-tabbar { display: none; grid-template-columns: repeat(6, 1fr); padding-left: 4px; padding-right: 4px; }
@media (max-width: 720px) {
  .admin-tabbar { display: grid; }
  body.admin { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.admin .subnav { display: none; }
  .admin-tabbar a { font-size: .62rem; }
  .admin-tabbar svg { width: 22px; height: 22px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  main { padding-top: 18px; }
  .card { padding: 16px; border-radius: 18px; }
  .pad { padding: 16px 16px 0; }
  .card.flush .item, .rank li { padding: 12px 14px; }
  .kpi { padding: 12px; }
  .kpi .n { font-size: 1.35rem; }
  .seg a { font-size: .82rem; padding: .5rem .25rem; }
  .toolbar { padding: 12px 14px; }
  .toolbar .chips { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .toolbar .chips::-webkit-scrollbar, .subnav::-webkit-scrollbar { display: none; }
  .chips a { white-space: nowrap; }

  /* Yan yana form alanları alt alta/ikişer dizilir, düğme tam genişlik */
  .fields > label.grow { flex-basis: 100%; }
  .fields > label.num, .report-form > label.num { flex: 1 1 130px; }
  .fields > .btn { flex: 1 1 100%; }
  .report-form { flex-wrap: wrap; width: 100%; }

  /* Tablolar karta dönüşür: her satır bir kart, her hücre etiketli */
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody { display: block; }
  .table.responsive tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; border-top: 1px solid var(--border); }
  .table.responsive tr:first-child { border-top: 0; }
  .table.responsive tbody tr:hover { background: none; }
  .table.responsive td { display: block; padding: 0; border: 0; white-space: normal; text-align: left; min-width: 0; overflow-wrap: anywhere; }
  .table.responsive td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .table.responsive td.lead, .table.responsive td[colspan] { grid-column: 1 / -1; font-size: 1rem; }
  .table.responsive td.span2 { grid-column: span 2; }
  .table.responsive td.actions { grid-column: 1 / -1; text-align: right; }
  .table.responsive td.actions:empty { display: none; }
  .copy { flex-wrap: nowrap; }
  .copy input { min-width: 0; flex: 1; }

  .subnav a { padding: .6rem .7rem; }
  .modal { padding: 24px 18px 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .setting > summary, .setting-row { padding: 14px 16px; }
  .setting-body { padding: 2px 16px 16px; }
  .profile-hero { padding: 26px 16px 20px; }

  /* Yönetim: kişi sayfası ve listeler */
  .account-actions { flex-direction: column; align-items: stretch; }
  .account-actions form, .account-actions .btn { width: 100%; }
  .assign { flex-wrap: wrap; }
  .assign select { flex-basis: 100%; }
  .assign .btn { width: 100%; }
  .admin-head { flex-direction: column; align-items: stretch; }
  .announcements li.row { align-items: flex-start; }
  .cal-wrap { padding-bottom: 4px; }
}
@media (max-width: 360px) {
  .stats3 { gap: 6px; }
  .stat { padding: 12px 6px; }
  .stat .n { font-size: 1.2rem; }
  .table.responsive tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table.responsive td.span2 { grid-column: 1 / -1; }
  .brand span { font-size: .95rem; }
}
