@font-face { font-family: 'Amiri'; src: url('fonts/Amiri-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Amiri'; src: url('fonts/Amiri-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/Newsreader.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Bitter'; src: url('fonts/Bitter.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url('fonts/Raleway.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Urbanist'; src: url('fonts/Urbanist.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'KoHo'; src: url('fonts/KoHo-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'KoHo'; src: url('fonts/KoHo-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'KoHo'; src: url('fonts/KoHo-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'KoHo'; src: url('fonts/KoHo-Bold.ttf') format('truetype'); font-weight: 700 900; font-display: swap; }

/* Renkler yönetici ayarlarından JS ile atanır; bunlar ilk boyama için varsayılanlar. */
:root {
  --bg: #0C263B; --surface: #123250; --surface-2: #1B3A57; --surface-3: #25445F;
  --ink: #FFFFFF; --ink-2: #BDC8D3; --ink-3: #8A9CAE; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --accent: #F5C06A; --accent-2: #BF9653; --accent-soft: rgba(245,192,106,.15); --accent-ink: #0B1C2B;
  --ar: #FFFFFF; --primary: #F5C06A; --primary-2: #C99D57; --primary-soft: rgba(245,192,106,.14); --on-primary: #0B1C2B;
  --ring-track: rgba(255,255,255,.1);
  --amber: #F3B562; --amber-soft: rgba(243,181,98,.13); --amber-line: rgba(243,181,98,.38);
  --danger: #F28B7D; --danger-soft: rgba(242,139,125,.13);
  --success: #7ED6A8; --success-soft: rgba(126,214,168,.14);
  --shadow-1: 0 1px 2px rgba(0,0,0,.25), 0 10px 26px rgba(0,0,0,.22);
  --pattern: none; --pattern-size: auto; --pattern-pos: center top; --pattern-repeat: repeat; --pattern-mask: none; --pattern-op: .8; --glow: none;
  --logo-img: none; --logo-pos: 0 0; --logo-size: auto; --logo-rep: no-repeat; --logo-op: 0;
  --radius: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ar-size: 27px;
  --f-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-ar: 'Amiri', 'Noto Naskh Arabic', 'Scheherazade New', serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-ui); font-size: 15px; line-height: 1.45; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; min-height: 100vh;
  user-select: none; -webkit-user-select: none;
}
/* Arka plan: ince desen (üstten aşağı solar) + köşelerde yumuşak ışıltı */
body::before, .overlay::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--pattern); background-size: var(--pattern-size); background-position: var(--pattern-pos); background-repeat: var(--pattern-repeat);
  opacity: var(--pattern-op);
  -webkit-mask-image: var(--pattern-mask); mask-image: var(--pattern-mask);
}
body::after, .overlay::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: var(--glow); }
.overlay::before, .overlay::after { position: absolute; }
input, textarea { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.ar { font-family: var(--f-ar); direction: rtl; unicode-bidi: plaintext; }
.hidden { display: none !important; }
#app { position: relative; z-index: 1; min-height: 100vh; }

.view { min-height: 100vh; padding-bottom: calc(110px + var(--safe-bottom)); animation: viewIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.no-anim .view, .no-anim .card { animation: none !important; }

/* ---------- üst kısım ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-top) + 18px) 20px 6px; }
.top.page { padding-bottom: 14px; align-items: flex-start; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-logo { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-soft); box-shadow: var(--shadow-1); }
.brand-name, .page-title { font-family: var(--f-display); font-weight: 600; color: var(--accent); letter-spacing: -.3px; line-height: 1.02; font-variant-numeric: lining-nums; }
.brand-name { font-size: 27px; }
.page-title { font-size: 36px; }
.brand-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; font-weight: 500; }
.top-actions { display: flex; gap: 8px; }

.summary { margin: 14px 16px 0; padding: 16px 16px 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.summary.slim { padding: 16px 18px; }
.sum-dates { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hijri { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.sum-row { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.big-ring { width: 92px; height: 92px; flex: none; position: relative; }
.big-ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 21px; letter-spacing: -.5px; }
.big-ring .pct small { font-size: 12px; font-weight: 600; opacity: .7; margin-right: 1px; }
.hp-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-3); font-weight: 700; }
.hp-big { font-size: 33px; line-height: 1.1; font-weight: 700; letter-spacing: -1px; margin-top: 3px; }
.hp-big span { font-size: 14.5px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.hp-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.hp-sub b { color: var(--ink); }
.streak { color: var(--accent) !important; display: inline-flex; align-items: center; gap: 4px; }
.week { margin-top: 16px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 10px 4px 9px; border-radius: 16px; background: var(--surface-2); }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.wd.today { color: var(--ink); }
.wd .dot { width: 26px; height: 26px; position: relative; }
.wd.today .dot::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }

.content { position: relative; padding: 18px 16px 0; }
.content.flush { padding-left: 0; padding-right: 0; padding-top: 0; }

.seg { display: flex; padding: 4px; gap: 2px; background: var(--surface); border-radius: 15px; border: 1px solid var(--line); }
.seg button { flex: 1; height: 40px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; white-space: nowrap; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--primary); color: var(--on-primary); }
.seg button .cnt { font-size: 11px; font-weight: 700; opacity: .65; }
.seg.sm button { height: 32px; font-size: 12.5px; border-radius: 9px; }

.toolbar { display: flex; gap: 10px; margin-top: 14px; }
.btn { height: 48px; padding: 0 18px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-weight: 600; font-size: 15px; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn-gold { background: var(--accent); color: var(--accent-ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; }

.debt-banner { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 15px; background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber); font-weight: 600; font-size: 14px; text-align: left; }
.debt-banner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.debt-banner.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }

.list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.section-label { font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 22px 4px 10px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- kart ---------- */
.card {
  position: relative; display: grid; grid-template-columns: 50px 1fr auto; align-items: center; column-gap: 14px;
  padding: 16px 16px 16px 14px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .15s ease; animation: cardIn .45s cubic-bezier(.2, .8, .2, 1) backwards; cursor: pointer;
}
.card:active { transform: scale(.985); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.card .ring-btn { width: 50px; height: 50px; position: relative; display: grid; place-items: center; border-radius: 50%; }
.card .ring-btn .ring-txt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent); }
.card-main { min-width: 0; }
.card-title { margin: 0; font-family: var(--f-display); font-size: 20px; font-weight: 600; line-height: 1.18; color: var(--accent); letter-spacing: -.2px; font-variant-numeric: lining-nums; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title-sub { font-family: var(--f-ui); font-size: 12.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.goal { background: var(--accent-soft); color: var(--accent); }
.tag.soft { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.muted { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-3); }
.ar-preview { margin: 9px 0 0; font-family: var(--f-ar); direction: rtl; text-align: right; font-size: 18px; line-height: 1.55; color: var(--ar); opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count-pill { min-width: 64px; height: 34px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.count-pill span { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.card.done .count-pill { background: var(--accent-soft); color: var(--accent); }
.card.done .count-pill span { color: var(--accent); opacity: .8; }
.card.done .ar-preview { opacity: .45; }
.card.debt { border-color: var(--amber-line); }
.card.debt .count-pill { background: var(--amber-soft); color: var(--amber); }
.card.debt .count-pill span { color: var(--amber); opacity: .8; }
.pages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin-top: 11px; }
.pages i { height: 6px; border-radius: 3px; background: var(--surface-3); }
.pages i.on { background: var(--accent); }

.empty { text-align: center; padding: 46px 24px 30px; color: var(--ink-2); }
.empty .em-ico { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .em-ico.spin svg { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty h3 { font-family: var(--f-display); font-size: 26px; font-weight: 600; margin: 0 0 6px; color: var(--accent); }
.empty p { margin: 0; font-size: 14px; }
.note { margin: 18px 4px 0; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; line-height: 1.5; align-items: flex-start; }
.note svg { flex: none; margin-top: 1px; }
.note.tight { margin-top: 12px; align-items: center; }
.note.tight span { flex: 1; }

/* ---------- alt menü ---------- */
.nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 14px);
  display: flex; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}
.nav button { position: relative; height: 50px; min-width: 56px; padding: 0 16px; border-radius: 19px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: 14px; transition: background .25s, color .25s; }
.nav button span { display: none; }
.nav button.on { background: var(--primary); color: var(--on-primary); padding: 0 18px; }
.nav button.on span { display: inline; }
.nav .badge { position: absolute; top: 7px; right: 10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--amber); color: #1D1203; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.nav button.on .badge { display: none; }

/* ---------- ayarlar ---------- */
.group { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; margin: 0 16px 14px; }
.content:not(.flush) .group { margin-left: 0; margin-right: 0; }
.group.pad { padding: 14px 16px; }
.group-title { font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 22px 22px 8px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 60px; border-top: 1px solid var(--line); width: 100%; text-align: left; color: inherit; text-decoration: none; }
.row:first-child { border-top: 0; }
.row .ico { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.row .ico.gold { background: var(--accent-soft); color: var(--accent); }
.row .ico.amber { background: var(--amber-soft); color: var(--amber); }
.row .ico.red { background: var(--danger-soft); color: var(--danger); }
.row .txt { flex: 1; min-width: 0; }
.row .t1 { font-weight: 600; font-size: 15px; }
.row .t2 { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.row .t2.warn { color: var(--amber); font-weight: 500; }
.row.click:active { background: var(--surface-2); }
.time-in { height: 38px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); padding: 0 10px; font: inherit; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color-scheme: inherit; }
.time-in:disabled { opacity: .4; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-3); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .22s cubic-bezier(.3, .7, .3, 1.2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); font-weight: 700; font-size: 17px; display: grid; place-items: center; }
.stepper b { min-width: 34px; text-align: center; font-size: 15px; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.avatar.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }

/* ---------- sayaç ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; animation: ovIn .32s cubic-bezier(.2, .8, .2, 1); }
.overlay > * { position: relative; z-index: 1; }
@keyframes ovIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.ct-bar { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 10px) 14px 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); flex: none; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 11px; }
.icon-btn:active { background: var(--surface-2); }
.ct-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ct-nav .icon-btn { width: 40px; height: 40px; border-radius: 13px; }
.ct-idx { min-width: 62px; height: 32px; padding: 0 10px; border-radius: 11px; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; }
.ct-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 16px calc(var(--safe-bottom) + 18px); display: flex; flex-direction: column; }
.ct-head { text-align: center; margin-top: 4px; }
.ct-title { font-family: var(--f-display); font-size: 30px; line-height: 1.1; font-weight: 600; margin: 8px 0 4px; color: var(--accent); letter-spacing: -.3px; font-variant-numeric: lining-nums; }
.ct-sub { color: var(--ink-2); font-size: 14px; }
.ct-sub b { color: var(--ink); }
.ct-note { margin: 6px auto 0; max-width: 420px; font-size: 13px; color: var(--ink-2); font-style: italic; }
.text-card { margin-top: 14px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 10px 12px 12px; }
.tc-top { display: flex; align-items: center; gap: 8px; }
.tc-top .seg { flex: 1; background: var(--surface-2); }
.tc-label { flex: 1; font-weight: 600; font-size: 13px; color: var(--ink-2); padding-left: 6px; }
.font-ctl { display: flex; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; flex: none; }
.font-ctl button { width: 38px; height: 34px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.font-ctl button + button { border-left: 1px solid var(--line-2); }
.tc-body { position: relative; margin-top: 10px; max-height: 26vh; overflow-y: auto; padding: 2px 6px 4px; }
.tc-body.open { max-height: 60vh; }
.tc-body .ar-text { font-family: var(--f-ar); direction: rtl; text-align: center; font-size: var(--ar-size); line-height: 2.05; color: var(--ar); white-space: pre-line; }
.tc-body .lt-text { font-size: calc(var(--ar-size) * .62); line-height: 1.65; color: var(--ink); white-space: pre-line; text-align: center; }
.tc-more { display: block; margin: 6px auto 0; font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 4px 10px; }

.tap-zone {
  position: relative; flex: 1; min-height: 290px; margin-top: 14px; width: 100%; border-radius: 30px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--surface); border: 1.5px solid var(--accent-soft); color: var(--ink);
  box-shadow: var(--shadow-1); transition: transform .08s ease, background .35s, color .35s; touch-action: manipulation;
}
.tap-zone::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: var(--pattern); background-size: var(--pattern-size); background-position: var(--pattern-pos); background-repeat: var(--pattern-repeat); opacity: calc(var(--pattern-op) * .8); -webkit-mask-image: radial-gradient(75% 75% at 50% 50%, #000 20%, transparent 100%); mask-image: radial-gradient(75% 75% at 50% 50%, #000 20%, transparent 100%); }
.tap-zone::after { content: ''; position: absolute; inset: 9px; border-radius: 23px; border: 1px solid var(--line); pointer-events: none; }
.tap-zone.press { transform: scale(.985); }
.tap-zone > span { position: relative; }
.tz-num { font-size: clamp(84px, 30vw, 140px); font-weight: 700; letter-spacing: -4px; line-height: .95; }
.tz-num.long { font-size: clamp(64px, 22vw, 108px); letter-spacing: -3px; }
.tz-num.bump { animation: bump .2s ease-out; }
@keyframes bump { 0% { transform: scale(1.07); } 100% { transform: scale(1); } }
.tz-goal { font-size: 20px; font-weight: 600; color: var(--ink-2); }
.tz-bar { width: 62%; height: 6px; border-radius: 3px; background: var(--ring-track); overflow: hidden; margin-top: 20px; }
.tz-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .3s cubic-bezier(.2, .8, .2, 1); }
.tz-meta { display: flex; gap: 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.tz-tur { color: var(--accent); }
.tz-hint { position: absolute !important; bottom: 18px; left: 18px; right: 18px; text-align: center; line-height: 1.35; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ar-more { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-align: right; }
.tap-zone .burst { position: absolute; inset: 0; pointer-events: none; }
.tap-zone.done { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.tap-zone.done .tz-goal, .tap-zone.done .tz-meta, .tap-zone.done .tz-hint, .tap-zone.done .tz-tur { color: var(--on-primary); opacity: .75; }
.tap-zone.done .tz-bar { background: rgba(0, 0, 0, .14); }
.tap-zone.done .tz-bar i { background: var(--on-primary); }
.ripple { position: absolute; border-radius: 50%; background: var(--accent-soft); transform: scale(0); animation: rip .55s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--accent); animation: burst .9s cubic-bezier(.15, .7, .3, 1) forwards; }
.tap-zone.done .burst i { background: var(--on-primary); }
@keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; } }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.qbtn { height: 50px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 700; font-size: 16px; color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .1s; }
.qbtn:active { transform: scale(.95); background: var(--surface-2); }
.qbtn.alt { color: var(--ink); }
.quick2 { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; margin-top: 8px; }
.quick2 .btn { height: 50px; border-radius: 16px; font-size: 14px; padding: 0 10px; }

/* ---------- karanlık sayım ---------- */
.darkmode { position: fixed; inset: 0; z-index: 70; background: #000; color: #8E8E8E; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; animation: fadeIn .4s; }
@keyframes fadeIn { from { opacity: 0; } }
.dm-x { position: absolute; top: calc(var(--safe-top) + 14px); right: 16px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid #222; background: #0A0A0A; color: #666; display: grid; place-items: center; }
.dm-name { font-size: 22px; font-weight: 600; color: #6E6E6E; text-align: center; padding: 0 24px; }
.dm-idx { font-size: 13px; color: #4A4A4A; margin-top: 4px; font-weight: 600; }
.dm-num { font-size: 92px; font-weight: 700; letter-spacing: -3px; color: #5C5C5C; margin-top: 18px; line-height: 1; transition: color .25s; }
.dm-num.flash { color: #A8A8A8; transition: none; }
.dm-num.done { color: #8C7440; }
.dm-goal { font-size: 22px; color: #444; font-weight: 600; margin-top: 8px; }
.dm-hint { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 26px); text-align: center; font-size: 12.5px; color: #4A4A4A; line-height: 1.9; padding: 0 20px; transition: opacity 1s; }
.dm-hint.fade { opacity: .35; }
.dm-msg { position: absolute; top: 30%; left: 0; right: 0; text-align: center; color: #8C7440; font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .3s; padding: 0 20px; }
.dm-msg.show { opacity: 1; }

/* ---------- alt sayfalar ---------- */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); animation: fadeIn .2s; display: flex; align-items: flex-end; justify-content: center; }
.backdrop.closing { animation: fadeOut .22s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: calc(100vh - var(--safe-top) - 24px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px 18px calc(var(--safe-bottom) + 20px); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); animation: sheetIn .34s cubic-bezier(.2, .9, .25, 1); }
.backdrop.closing .sheet { animation: sheetOut .22s forwards; }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h3 { font-family: var(--f-display); font-size: 27px; margin: 0 0 4px; font-weight: 600; line-height: 1.12; color: var(--accent); font-variant-numeric: lining-nums; }
.h3-sub { font-family: var(--f-ui); font-size: 14px; font-weight: 500; color: var(--ink-3); }
.sheet .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.sub.small { font-size: 12.5px; color: var(--ink-3); margin: 8px 2px 0; }
.field { margin-top: 14px; }
.field > label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 4px 7px; letter-spacing: .2px; }
.input, .textarea { width: 100%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 15px; padding: 0 14px; height: 50px; font: inherit; font-size: 16px; font-weight: 500; outline: none; transition: border-color .2s, box-shadow .2s; }
.textarea { height: auto; min-height: 90px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.textarea.ar { font-family: var(--f-ar); font-size: 21px; line-height: 1.9; text-align: right; color: var(--ar); }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.big-input { height: 74px; font-size: 38px; font-weight: 700; text-align: center; border-radius: 20px; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cuz-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cuz-chip { padding: 0; height: 46px; font-size: 16px; font-weight: 700; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .btn { flex: 1; height: 52px; }
.menu { display: flex; flex-direction: column; margin-top: 4px; }
.menu button { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 8px; border-radius: 14px; font-weight: 600; font-size: 15px; text-align: left; }
.menu.info button { height: auto; padding: 11px 6px; align-items: flex-start; font-weight: 500; font-size: 14px; line-height: 1.45; pointer-events: none; color: var(--ink); }
.menu.info button svg { color: var(--accent); margin-top: 1px; flex: none; }
.welcome-logo { margin: 0 auto 14px; width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-soft); }
.debt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.debt-row:first-child { border-top: 0; }
.debt-row .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.debt-row .nm small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; }
.debt-row .input { width: 110px; height: 44px; text-align: center; font-weight: 700; }
.steps { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 11px 0 11px 46px; font-size: 14.5px; line-height: 1.5; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 10px; width: 32px; height: 32px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.check-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14.5px; font-weight: 500; }
.check-row input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }

/* ---------- kısa bildirim ---------- */
.toast { position: fixed; z-index: 95; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 90px); margin: 0 auto; max-width: 480px; display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 18px; border-radius: 18px; background: var(--toast-bg, #F4EFE4); color: var(--toast-ink, #13202B); font-weight: 600; font-size: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); animation: toastIn .3s cubic-bezier(.2, .9, .25, 1.2); }
.toast.in-counter { bottom: calc(var(--safe-bottom) + 24px); }
.toast span { flex: 1; }
.toast button { color: var(--toast-act, #8A5A10); font-weight: 700; padding: 6px 8px; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- giriş ---------- */
.login { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 32px) 20px calc(var(--safe-bottom) + 22px); }
.login-hero { text-align: center; margin: 6vh 0 26px; }
.login-logo { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 34px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-soft); box-shadow: var(--shadow-1); }
.login-title { font-family: var(--f-display); font-size: 40px; font-weight: 600; margin: 0; line-height: 1.02; color: var(--accent); letter-spacing: -.5px; }
.login-sub { color: var(--ink-2); margin: 10px 0 0; font-size: 15px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 22px 18px 18px; box-shadow: var(--shadow-1); max-width: 420px; width: 100%; margin: 0 auto; }
.login-label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: block; margin: 0 4px 8px; }
.code-input { height: 68px; font-size: 30px; font-weight: 700; text-align: center; letter-spacing: 6px; text-transform: uppercase; border-radius: 18px; background: var(--surface-2); }
.code-input::placeholder { color: var(--ink-3); opacity: .55; }
.login-err { color: var(--danger); font-size: 13.5px; font-weight: 600; margin: 10px 4px 0; text-align: center; }
.login-card .btn-block { margin-top: 14px; height: 54px; font-size: 16px; border-radius: 17px; }
.login-users { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-users > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 0 2px 8px; }
.login-users .chip { font-weight: 700; letter-spacing: 1px; }
.login-hint { display: flex; align-items: center; gap: 12px; max-width: 420px; width: 100%; margin: 14px auto 0; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: left; }
.login-hint > svg { flex: none; color: var(--accent); }
.login-hint > div { flex: 1; min-width: 0; }
.login-hint b { display: block; font-size: 14.5px; font-weight: 600; }
.login-hint span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.login-hint .btn { height: 38px; padding: 0 14px; font-size: 13px; flex: none; }
.login-foot { max-width: 420px; width: 100%; margin: auto auto 0; padding-top: 24px; display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.login-foot svg { flex: none; margin-top: 2px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- yönetim ---------- */
.admin { padding-bottom: calc(120px + var(--safe-bottom)); }
.admin-tabs { display: flex; gap: 6px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: none; height: 42px; padding: 0 14px; border-radius: 14px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.admin-tabs button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.admin-body { padding-top: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { border-radius: 18px; padding: 14px 12px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.stat span { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stat.ok b { color: var(--success); }
.stat.warn b { color: var(--amber); }
.stat.off b { color: var(--ink-3); }
.ad-item { padding: 10px 0; border-top: 1px solid var(--line); }
.ad-item:first-child { border-top: 0; padding-top: 2px; }
.ad-item-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ad-item-top b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item-top span { color: var(--ink-2); font-size: 13px; flex: none; }
.ad-item-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.ad-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0 8px; }
.ad-total b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; color: var(--accent); }
.ad-total span { font-size: 12.5px; color: var(--ink-2); }
.bar { height: 7px; border-radius: 4px; background: var(--ring-track); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; margin-top: 12px; }
.pchip { height: 40px; border-radius: 12px; font-weight: 700; font-size: 14px; letter-spacing: .5px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.pchip.tamam { background: var(--success-soft); border-color: transparent; color: var(--success); }
.pchip.eksik { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.pchip.plain { color: var(--ink-2); font-weight: 600; }
.pgrid.codes { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.pgrid.codes .pchip { height: 34px; font-size: 13px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 4px 0; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--surface-3); }
.legend i.tamam { background: var(--success); }
.legend i.eksik { background: var(--amber); }
.prow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.prow b { flex: none; }
.prow b.ok { color: var(--success); }
.prow b.warn, .prow b.amber { color: var(--amber); }
.ad-list .ad-row { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-top: 1px solid var(--line); }
.ad-list .ad-row:first-child { border-top: 0; }
.ad-row.off { opacity: .55; }
.ad-main { flex: 1; min-width: 0; text-align: left; }
.ad-main b { display: block; font-family: var(--f-display); font-size: 18px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.ad-main .meta { margin-top: 6px; }
.ad-move { display: flex; flex-direction: column; gap: 4px; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.color-row:first-child { border-top: 0; }
.color-row b { display: block; font-weight: 600; font-size: 15px; }
.color-row small { display: block; font-size: 12px; color: var(--ink-3); }
.color-row input[type=color] { width: 52px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: none; padding: 3px; flex: none; }
.range-row { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 500; margin-bottom: 10px; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.preview { margin: 0; cursor: default; }
.publish-bar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--accent-soft); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.publish-bar > span { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.publish-bar .btn { height: 44px; padding: 0 14px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (min-width: 640px) { .view > *, .admin-tabs { max-width: 640px; margin-left: auto; margin-right: auto; } .summary { margin-left: auto; margin-right: auto; } }
.admin-tabs button { flex: 1 1 auto; justify-content: center; padding: 0 9px; }
@media (max-width: 440px) { .admin-tabs button svg { display: none; } .admin-tabs { gap: 5px; } .admin-tabs button { font-size: 13.5px; } }

.pstyles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pstyle { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 4px 10px; border-radius: 14px; border: 1.5px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pstyle .sw { position: relative; overflow: hidden; container-type: inline-size; width: 100%; aspect-ratio: 1 / .8; border-radius: 10px; border: 1px solid var(--line); }
.pstyle .sw i { position: absolute; inset: 0; background: var(--accent); opacity: .5; }
.pstyle.on { border-color: var(--accent); color: var(--accent); }

/* Logo filigranı: içerik katmanının arkasında, sabit */
#app::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--accent); opacity: var(--logo-op);
  -webkit-mask-image: var(--logo-img); mask-image: var(--logo-img);
  -webkit-mask-position: var(--logo-pos); mask-position: var(--logo-pos);
  -webkit-mask-size: var(--logo-size); mask-size: var(--logo-size);
  -webkit-mask-repeat: var(--logo-rep); mask-repeat: var(--logo-rep);
}

/* Yazı tipi seçimi, küçük düğme */
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fontopt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); }
.fontopt b { font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.fontopt span { font-size: 12px; font-weight: 500; }
.fontopt.on { border-color: var(--accent); }
.fontopt.on b, .fontopt.on span { color: var(--accent); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; flex: none; }
