/* DD SMS — DD Teknoloji kurumsal dili (ddteknoloji.com ve DD panelleriyle aynı): Manrope, mor marka, beyaz kartlar, koyu mor başlık bandı */
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --page: #f4f6fa; --card: #ffffff; --card2: #f7f8fc;
  --text: #0c0f18; --label: #0c0f18; --label2: #5d6478; --label3: #9aa1b4;
  --line: #e7e9f1; --sep: #eceef5; --fill: #f1f2f8; --fill2: #e9ebf4;
  --brand: #6d4fe8; --brand-soft: #efebfd;
  --deep-1: #1b1446; --deep-2: #3a2aa0;
  --band: linear-gradient(150deg, #1b1446 0%, #2c1f7a 55%, #3a2aa0 100%);
  --grad: linear-gradient(135deg, #7758ed 0%, #5b3fd6 100%);
  --green: #0e9f6e; --red: #e5484d; --orange: #d97706; --blue: #6d4fe8; --cyan: #0ea5c6; --brand2: #6d4fe8;
  --g0:#6d4fe8; --g1:#0e9f6e; --g2:#e8833a; --g3:#e5484d; --g4:#9b5de5; --g5:#0ea5c6; --g6:#c99a06; --g7:#64748b;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 24px 60px rgba(27,20,70,.18);
  --r: 16px;
  --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--deep-1); }   /* durum çubuğu / esneme alanı beyaz kalmasın */
html, body { margin: 0; min-height: 100%; color: var(--text); }
body { font: 500 15.5px/1.45 Manrope, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; overflow-x: hidden; background: var(--page); letter-spacing: -.005em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.hidden { display: none !important; }
.glass { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r); }

/* açılış */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: var(--band); }
.boot-logo { width: 96px; height: auto; object-fit: contain; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sayfa: üstte koyu mor marka bandı, içerik beyaz kartlarla bandın üstüne biner */
.screen { min-height: 100vh; padding: 0 0 calc(var(--safe-b) + 96px); max-width: 640px; margin: 0 auto; position: relative; isolation: isolate; animation: enter .28s cubic-bezier(.2,.7,.2,1); }
.screen::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: calc(var(--safe-t) + 214px); background: var(--band); border-radius: 0 0 28px 28px; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nav { position: sticky; top: 0; z-index: 5; padding: calc(var(--safe-t) + 12px) 18px 12px; display: flex; align-items: center; justify-content: space-between; min-height: 60px; color: #fff; transition: background .2s, box-shadow .2s; }
.nav.scrolled { background: var(--deep-1); box-shadow: 0 6px 20px rgba(27,20,70,.25); }
.nav .small-title { font-weight: 700; opacity: 0; transition: opacity .15s; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.nav.scrolled .small-title { opacity: 1; }
.nav-btn { color: #fff; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; min-height: 38px; padding: 0 12px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.nav-btn:disabled { opacity: .45; }
.nav-btn.bold { font-weight: 800; }
.sheet .nav-btn { background: none; border: 0; padding: 0; color: var(--brand); }
.large-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 2px 18px 16px; line-height: 1.15; color: #fff; }
.sub { color: rgba(255,255,255,.72); font-size: 14.5px; margin: -10px 18px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: #fff; }
.brand img { width: 40px; height: 30px; object-fit: contain; display: block; }
.brand span { color: #fff; }
/* marka başlığın ortasında; sol köşe boş kalır */
.nav:has(> .brand) { justify-content: center; min-height: 64px; }
.nav:has(> .brand) > :not(.brand) { position: absolute; right: 18px; }
.nav:has(> .brand) > span:empty { display: none; }
.nav:has(> .brand) .small-title { display: none; }

/* özet kartları */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 16px 14px; }
.stat { padding: 13px 13px 12px; border-radius: 14px; min-width: 0; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .k { font-size: 11.5px; color: var(--label2); font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat .k i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .v small { font-size: 12.5px; color: var(--label2); font-weight: 700; }

/* listeler */
.section { margin: 0 16px 22px; }
.section-h { color: var(--label2); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; margin: 6px 20px 9px; display: flex; justify-content: space-between; align-items: center; }
.section-h a, .section-h button { color: var(--brand); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 13.5px; }
.section-f { color: var(--label2); font-size: 12.5px; margin: 8px 6px 0; line-height: 1.45; }
.list { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; position: relative; width: 100%; text-align: left; transition: background .15s; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: 1px; background: var(--sep); }
.row.icon-row { --inset: 60px; }
.row.tap:active { background: var(--fill); }
.row .main { flex: 1; min-width: 0; padding: 12px 0; }
.row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.row .detail { color: var(--label2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.row .value { color: var(--label2); white-space: nowrap; font-size: 14px; }
.row .chev { color: var(--label3); flex: none; }
.row.danger { color: var(--red); justify-content: center; font-weight: 700; }
.row.action { color: var(--brand); font-weight: 700; }
.row input, .row select { flex: 1; border: 0; background: none; outline: none; min-height: 52px; padding: 0; min-width: 0; font-weight: 600; }
.row input:disabled { color: var(--label2); }
.row input::placeholder, textarea::placeholder { color: var(--label3); font-weight: 500; }
.row label.lbl { width: 108px; flex: none; color: var(--label2); font-size: 14px; font-weight: 700; }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; font-weight: 800; }
.ico svg { width: 18px; height: 18px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14.5px; flex: none; background: #64748b; }
.avatar.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }

/* anahtar */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 28px; background: var(--fill2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }

/* düğmeler */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 800; letter-spacing: .005em; box-shadow: 0 10px 24px rgba(109,79,232,.32); transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; box-shadow: none; }
.btn-wrap { margin: 0 16px 18px; }
.pressable:active, .tab:active, .qcard:active, .pill:active { transform: scale(.97); }

/* arama */
.search { margin: 0 16px 14px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 12px; height: 44px; padding: 0 12px; color: var(--label3); }
.search input { flex: 1; border: 0; background: none; outline: none; height: 42px; font-weight: 600; }

/* alt menü */
.tabbar { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 12px 10px calc(var(--safe-b) * .5 + 10px); min-height: calc(var(--safe-b) * .5 + 74px); align-items: center; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid var(--line); }
.tabbar > * { max-width: 160px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--label3); padding: 6px 0 4px; border-radius: 12px; transition: color .2s, background .2s, transform .12s; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--brand); }
.tab.on svg { filter: drop-shadow(0 4px 10px rgba(109,79,232,.35)); }

/* mesaj oluşturma */
.compose { margin: 0 16px 10px; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.compose-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.compose-h span { font-size: 12px; color: var(--brand); font-weight: 800; background: var(--brand-soft); padding: 4px 9px; border-radius: 8px; }
.compose-h span:empty { display: none; }
.compose-h .orig { font-size: 12px; color: var(--brand); font-weight: 800; background: var(--brand-soft); padding: 5px 10px; border-radius: 8px; border: 0; }
.compose-h .orig:disabled { opacity: 1; }
.to { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 10px 54px 12px 16px; min-height: 56px; position: relative; border-bottom: 1px solid var(--sep); }
.to .lbl { color: var(--label2); font-weight: 700; margin-right: 2px; }
.to input { flex: 1; min-width: 120px; border: 0; outline: none; background: none; height: 32px; font-weight: 600; }
.to .add { position: absolute; right: 10px; top: 11px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--brand); border-radius: 11px; background: var(--brand-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--fill); border: 1px solid var(--line); font-size: 14px; font-weight: 700; max-width: 100%; }
.chip.group { padding-left: 3px; background: color-mix(in srgb, var(--gc, var(--brand)) 10%, var(--card)); border-color: color-mix(in srgb, var(--gc, var(--brand)) 30%, transparent); }
.chip .cav { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--gc); color: #fff; flex: none; }
.chip.bad { background: color-mix(in srgb, var(--red) 10%, var(--card)); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { width: 24px; height: 24px; display: grid; place-items: center; color: var(--label3); border-radius: 7px; }
.compose .msg { display: flex; align-items: flex-end; gap: 10px; padding: 12px 12px 12px 16px; }
.compose textarea { flex: 1; border: 0; outline: none; background: none; resize: none; min-height: 150px; max-height: 50vh; line-height: 1.5; font-size: 16px; font-weight: 500; }
.send { width: 50px; height: 50px; border-radius: 15px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s, opacity .2s; box-shadow: 0 10px 22px rgba(109,79,232,.38); }
.send svg { width: 22px; height: 22px; }
.send:disabled { background: var(--fill2); color: var(--label3); box-shadow: none; }
.send:not(:disabled):active { transform: scale(.93); }
.meter { display: flex; justify-content: space-between; gap: 10px; color: var(--label2); font-size: 12.5px; font-weight: 600; margin: 0 18px 22px; }
.meter b { color: var(--text); font-weight: 800; }
.meter .warn { color: var(--orange); }

/* hızlı gruplar */
.quick { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 22px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.qcard { flex: none; width: 136px; scroll-snap-align: start; text-align: left; padding: 13px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .12s, border-color .2s, box-shadow .2s; }
.qcard .qi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gc); color: #fff; font-weight: 800; font-size: 14px; }
.qcard .qn { margin-top: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard .qc { color: var(--label2); font-size: 12.5px; font-weight: 600; margin-top: 1px; }
.qcard.on { border-color: var(--gc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 16%, transparent), var(--shadow); }
.qcard.new { border-style: dashed; box-shadow: none; background: transparent; }
.qcard.new .qi { background: var(--brand-soft); color: var(--brand); }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; font-weight: 700; }
.credit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.8); height: 34px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.credit svg { color: #7ef0c2; }
.credit b { color: #fff; font-weight: 800; }

/* son gönderimler / geçmiş */
.rbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.rbadge.ok { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.rbadge.err { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.hist .row { align-items: flex-start; }
.hist .row .main { padding: 13px 0; }
.hist .when { color: var(--label2); font-size: 12.5px; font-weight: 600; white-space: nowrap; padding-top: 14px; }
.hist .text { color: var(--label2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 3px 0 7px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; margin-top: 4px; }
.badge.ok { color: var(--green); } .badge.err { color: var(--red); }
.recent .row .main { padding: 11px 0; }
.bubble-wrap { padding: 8px 16px 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { max-width: 82%; background: var(--grad); color: #fff; padding: 11px 15px; border-radius: 16px; border-bottom-right-radius: 5px; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 10px 24px rgba(109,79,232,.25); font-weight: 600; }
.bubble-meta { color: var(--label2); font-size: 12px; font-weight: 600; }

/* boş durum */
.empty { text-align: center; color: var(--label2); margin: 0 16px 18px; padding: 30px 24px; border-radius: 16px; background: var(--card); border: 1px dashed var(--line); font-weight: 600; font-size: 14px; }
.empty .big { width: 54px; height: 54px; margin: 0 auto 12px; color: var(--brand); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.empty p { margin: 0; }

/* katmanlar */
#layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.dim { position: absolute; inset: 0; background: rgba(12,10,40,.45); opacity: 0; transition: opacity .3s; pointer-events: auto; }
.dim.show { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--safe-t) + 14px); background: var(--page); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .38s cubic-bezier(.32,.72,0,1); pointer-events: auto; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -20px 60px rgba(12,10,40,.3); }
.sheet.show { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 7px auto 0; flex: none; }
.sheet .s-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 18px; min-height: 54px; flex: none; position: relative; }
.sheet .s-nav h2 { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16.5px; font-weight: 800; margin: 0; white-space: nowrap; }
.sheet .s-body { flex: 1; overflow-y: auto; padding: 8px 0 calc(var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; }
.sheet textarea.paste { width: 100%; min-height: 180px; border: 0; outline: none; background: none; resize: vertical; padding: 14px 16px; line-height: 1.5; font-weight: 500; }
.asheet { position: absolute; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 10px); transform: translateY(120%); transition: transform .32s cubic-bezier(.32,.72,0,1); pointer-events: auto; }
.asheet.show { transform: none; }
.asheet .grp { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 8px; box-shadow: var(--shadow-lg); }
.asheet .head { padding: 16px; text-align: center; color: var(--label2); font-size: 13px; font-weight: 600; }
.asheet .head b { display: block; font-size: 15px; color: var(--text); font-weight: 800; margin-bottom: 3px; }
.asheet button { display: block; width: 100%; min-height: 54px; font-size: 16.5px; font-weight: 700; color: var(--brand); border-top: 1px solid var(--sep); }
.asheet button.destructive { color: var(--red); }
.asheet .cancel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-weight: 800; color: var(--text); box-shadow: var(--shadow-lg); }

/* bildirim */
#toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); z-index: 40; transform: translate(-50%, -160%); background: var(--deep-1); color: #fff; box-shadow: var(--shadow-lg); border-radius: 14px; padding: 11px 16px; font-size: 14.5px; font-weight: 700; transition: transform .35s cubic-bezier(.32,.72,0,1); max-width: calc(100% - 32px); width: max-content; display: flex; align-items: center; gap: 8px; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
#toast.ok svg { color: #7ef0c2; } #toast.err svg { color: #ff9a9e; }

/* giriş & kurulum: koyu mor zemin, ortada beyaz kart */
.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 28px) 16px calc(var(--safe-b) + 28px); max-width: 460px; margin: 0 auto; animation: enter .3s ease; }
body:has(.auth) { background: var(--band); }
.auth-card { padding: 28px 0 10px; border-radius: 22px; background: var(--card); box-shadow: 0 30px 80px rgba(8,6,30,.35); }
.auth-card .section { margin: 0 18px 18px; }
.auth-card .section-h { margin: 0 22px 8px; }
.auth-card .list { background: var(--card2); box-shadow: none; }
.logo-tile { margin: 0 auto 14px; display: grid; place-items: center; }
.logo-tile img { width: 72px; height: auto; display: block; }
.auth h1 { text-align: center; font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.auth p.lead { text-align: center; color: var(--label2); margin: 0 26px 22px; font-size: 14.5px; font-weight: 600; }
.err-box { margin: -8px 18px 16px; color: var(--red); font-size: 13.5px; font-weight: 700; text-align: center; background: color-mix(in srgb, var(--red) 9%, transparent); border-radius: 12px; padding: 10px; }
.auth-foot { text-align: center; color: rgba(255,255,255,.6); font-size: 12px; font-weight: 600; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 600px; transform: translate(-50%, 100%); top: 40px; bottom: 40px; border-radius: 22px; }
  .sheet.show { transform: translate(-50%, 0); }
  .asheet { left: 50%; right: auto; width: 420px; transform: translate(-50%, 120%); }
  .asheet.show { transform: translate(-50%, 0); }
}

/* kontör yenile, teslim durumu */
.stat .k .refresh { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: var(--label3); background: var(--fill); }
.stat .k .refresh.spin svg { animation: spin .8s linear infinite; }
.rbadge.wait { color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); }

/* yerel uygulama hissi: seçim/baloncuk yok, lastik esneme yok, dokunma tepkisi */
html, body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .bubble, .hist .text { -webkit-user-select: text; user-select: text; }
button, .row.tap, .qcard, .tab, a { touch-action: manipulation; }
.row.tap, .qcard, .tab, .btn, .send, .nav-btn, .stat { transition: transform .12s ease, background .15s; }
.row.tap:active { transform: scale(.985); }
img { -webkit-user-drag: none; }

/* PIN ekranı (telefonda hızlı giriş) */
.pin-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 20px) 24px calc(var(--safe-b) + 20px); background: var(--band); color: #fff; }
.pin-logo { width: 74px; height: auto; }
.pin-brand { font-weight: 800; font-size: 20px; margin-top: 12px; }
.pin-hint { color: rgba(255,255,255,.75); margin: 22px 0 18px; font-size: 14.5px; min-height: 20px; text-align: center; }
.pin-hint.err { color: #ffc2c6; }
.pin-dots { display: flex; gap: 18px; margin-bottom: 34px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); transition: background .15s; }
.pin-dots i.on { background: #fff; border-color: #fff; }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 16px 24px; }
.pin-pad button { width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; font: 600 28px/1 Manrope, sans-serif; }
.pin-pad button:active { background: rgba(255,255,255,.32); transform: scale(.95); }
.pin-pad .del { background: transparent; border-color: transparent; font-size: 24px; }
.pin-link { margin-top: 30px; color: rgba(255,255,255,.8); font-weight: 700; font-size: 14px; }
.auth .logo-tile img { width: 140px; }

/* ===== Açılış: logo küçükten büyüğe, sonra ekran yukarı kayarak uygulamaya geçer ===== */
#splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--band); transition: transform .62s cubic-bezier(.7,0,.2,1), opacity .5s ease .12s; }
#splash .sp-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(140,120,255,.55), transparent 62%); opacity: 0; animation: spGlow 1.6s ease-out .15s forwards; }
#splash .sp-logo { position: relative; width: 112px; height: auto; transform: scale(.35); opacity: 0; filter: drop-shadow(0 18px 40px rgba(0,0,0,.35)); animation: spLogo 1.05s cubic-bezier(.2,.9,.25,1.15) forwards; }
#splash .sp-name { position: relative; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: .32em; text-indent: .32em; opacity: 0; transform: translateY(10px); animation: spName .7s ease .55s forwards; min-height: 30px; }
#splash .sp-line { position: relative; width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; opacity: 0; animation: spName .4s ease .8s forwards; }
#splash .sp-line i { position: absolute; inset: 0; width: 40%; border-radius: 3px; background: #fff; animation: spLoad 1.1s ease-in-out infinite; }
#splash.out { transform: translateY(-100%); opacity: .2; }
@keyframes spLogo { 0% { transform: scale(.35); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spGlow { 0% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; } 100% { opacity: .55; transform: scale(1.15); } }
@keyframes spName { to { opacity: 1; transform: none; } }
@keyframes spLoad { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ===== Yavaş bağlantıda ortada dönen gösterge ===== */
#busy { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(12,10,40,.18); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#busy.show { opacity: 1; pointer-events: auto; }
#busy .busy-card { min-width: 96px; padding: 22px 22px 18px; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 24px 60px rgba(20,14,70,.28); display: flex; flex-direction: column; align-items: center; gap: 12px; transform: scale(.92); transition: transform .25s cubic-bezier(.2,.9,.3,1.2); }
#busy.show .busy-card { transform: none; }
#busy .busy-msg { white-space: pre-line; font-size: 13.5px; font-weight: 700; color: var(--label2); text-align: center; max-width: 220px; }
#busy .busy-msg:empty { display: none; }
.ring { width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 25%, var(--brand) 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px)); animation: spin .75s linear infinite; }
.ring.sm { display: inline-block; width: 20px; height: 20px; }

/* ===== Sayfa geçişleri (yerel uygulama hissi) ===== */
.screen.anim-push { animation: pushIn .34s cubic-bezier(.2,.8,.2,1); }
.screen.anim-pop { animation: popIn .3s cubic-bezier(.2,.8,.2,1); }
.screen.anim-tab { animation: tabIn .26s ease; }
@keyframes pushIn { from { transform: translateX(42%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: translateX(-28%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes tabIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.tap, .btn, .tab, .qcard { -webkit-tap-highlight-color: transparent; }
.row.tap:active, .qcard:active { transform: scale(.985); transition: transform .08s; }

/* iskelet yükleme */
.skel { margin: 8px 16px; display: grid; gap: 10px; }
.skel i { display: block; height: 54px; border-radius: 14px; background: linear-gradient(90deg, var(--fill) 0%, var(--card) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* gönderim ilerlemesi */
.prog { margin-top: 8px; display: grid; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--orange); }
.prog small { color: var(--label3); font-weight: 700; margin-left: 4px; }
.prog-bar { height: 6px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.prog-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent, #3bb7f5), var(--brand)); transition: width .6s ease; position: relative; }
.badge.warn { color: var(--orange); }
.btn.ghost { background: var(--card); color: var(--brand); box-shadow: 0 2px 10px rgba(20,14,70,.08); }

/* destek hattı */
.support { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px auto 0; padding: 10px 18px 10px 10px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; text-decoration: none; width: max-content; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.support:active { transform: scale(.97); }
.support .sp-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--brand); }
.support .sp-ico svg { width: 20px; height: 20px; }
.support small { display: block; font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.7); }
.support b { display: block; font-size: 16px; font-weight: 800; letter-spacing: .02em; }

/* teslim durumu: canlı nokta */
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.rbadge .pulse { width: 6px; height: 6px; margin-right: 4px; }

/* imza satırı */
.powered-by { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 16px 6px; font-size: 12.5px; font-weight: 600; color: var(--label3); }
.powered-by b { color: var(--label2); font-weight: 800; }
.powered-by .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--label3); }
.powered-by a, .powered-by .site { color: var(--brand); font-weight: 800; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); }
.powered-by a:active { opacity: .7; }

/* satir gibi gorunen baglantilar (destek hatti) */
a.row { text-decoration: none; color: inherit; }
a.row .main, a.row .detail { text-decoration: none; }

/* iPhone durum cubugu opak cizilirse de mor gorunsun: zemin mor, sayfa icerigi kendi acik zemininde */
body { background: var(--deep-1); }
.screen { background: var(--page); }
#app { min-height: 100vh; background: var(--page); }
body:has(.auth) #app, body:has(.pin-screen) #app { background: transparent; }

/* kişiye özel alan düğmeleri */
.fields { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 14px 12px; border-top: 1px solid var(--sep); scrollbar-width: none; }
.fields::-webkit-scrollbar { display: none; }
.fields span { flex: none; font-size: 11.5px; font-weight: 800; color: var(--label3); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.fields button { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 800; }
.fields button:first-of-type { background: var(--grad); color: #fff; }
.fields button:active { transform: scale(.96); }
.meter .perso { color: var(--brand); font-weight: 700; }

/* gönderim seçenekleri: dil, ileri tarih, son gönderim */
.opts { padding: 10px 14px 12px; border-top: 1px solid var(--sep); display: grid; gap: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--fill2); }
.seg button { height: 34px; border-radius: 9px; font-size: 13.5px; font-weight: 800; color: var(--label2); display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s, box-shadow .2s; }
.seg button small { font-size: 11px; font-weight: 700; opacity: .7; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 2px 8px rgba(15,23,42,.12); }
.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { height: 36px; min-width: 0; padding: 0 10px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; }
.opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt svg { flex: none; }
.opt.on { background: var(--grad); color: #fff; }
.opt:active, .seg button:active { transform: scale(.97); }
.opt-note { font-size: 12px; font-weight: 600; color: var(--orange); }

/* Excel önizleme */
.xl-info { margin: 4px 16px 10px; font-size: 13px; line-height: 1.5; color: var(--label2); font-weight: 600; }
.xl-info b { color: var(--text); }
.xl-wrap { margin: 0 16px; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
.xl { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.xl th { position: sticky; top: 0; background: var(--fill); padding: 8px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.xl-col { font-size: 11px; font-weight: 800; color: var(--label3); margin: 0 0 5px 2px; }
.xl-sel { width: 100%; min-width: 92px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); padding: 0 8px; font-size: 13px; font-weight: 700; color: var(--label2); }
.xl-sel.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.xl td { padding: 8px; border-bottom: 1px solid var(--sep); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; color: var(--label2); }
.xl td.m { color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--brand) 5%, transparent); }
.xl tr:last-child td { border-bottom: 0; }
.xl-radio { gap: 12px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.xl-radio input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.xl-sum { margin: 4px 18px 20px; font-size: 13.5px; font-weight: 600; color: var(--label2); }
.xl-sum b { color: var(--green); font-weight: 800; }
.xl-sum .bad { color: var(--red); font-weight: 700; }
