/* ==========================================================
   Tahsilat — editorial / awwwards tarzı arayüz
   ========================================================== */
:root {
  --bg: #0b0b0c;
  --bg-2: #131315;
  --bg-3: #1b1b1e;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --fg: #f2f0ea;
  --fg-2: rgba(242, 240, 234, .62);
  --fg-3: rgba(242, 240, 234, .38);
  --accent: #d7ff3a;
  --accent-ink: #0b0b0c;
  --danger: #ff5a4e;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.55 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font: 500 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }

/* Atmosfer ------------------------------------------------- */
.grain {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -6%); } 60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); }
}
.orb { position: fixed; z-index: 0; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .5; }
.orb-a { width: 520px; height: 520px; background: #3b2cff; top: -180px; right: -120px; animation: float 18s var(--ease) infinite alternate; }
.orb-b { width: 420px; height: 420px; background: #c6ff2e; bottom: -220px; left: -160px; opacity: .18; animation: float 22s var(--ease) infinite alternate-reverse; }
@keyframes float { to { transform: translate(-80px, 60px) scale(1.1); } }

/* Tipografi ------------------------------------------------ */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(215, 255, 58, .15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(215, 255, 58, 0); } }

.mega { font: 400 clamp(56px, 10vw, 156px)/.88 var(--sans); letter-spacing: -.055em; margin: 28px 0 0; font-weight: 600; }
.mega em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.03em; color: var(--accent); }
.mega .line { display: block; overflow: hidden; padding-bottom: .04em; }
.mega .line > span { display: inline-block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
.mega .line:nth-child(2) > span { animation-delay: .08s; }
.mega .line:nth-child(3) > span { animation-delay: .16s; }
.mega-sm { font-size: clamp(52px, 8.5vw, 128px); }
@keyframes rise { to { transform: none; } }
.lead { max-width: 440px; color: var(--fg-2); font-size: 17px; margin: 28px 0 0; }

/* Butonlar ------------------------------------------------- */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; background: none;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s, border-color .3s;
}
.btn:active { transform: scale(.97); }
.btn svg { flex: none; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; }
.btn-xl { --h: 58px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; justify-content: space-between; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #e6ff7a; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-primary svg { transition: transform .3s var(--ease); }
.btn-light { background: var(--fg); color: var(--bg); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.btn-danger { border-color: rgba(255, 90, 78, .35); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-dashed {
  width: 100%; height: 52px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); color: var(--fg-2);
}
.btn-dashed:hover { border-color: var(--accent); color: var(--accent); background: rgba(215, 255, 58, .04); }

/* Form alanları -------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 500; color: var(--fg-2); }
.field input, .search input {
  width: 100%; height: 48px; padding: 0 14px; background: var(--bg-3);
  border: 1px solid var(--line); border-radius: var(--r-sm); outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input::placeholder { color: var(--fg-3); }
.field input:hover { border-color: var(--line-2); }
.field input:focus { border-color: var(--accent); background: #1f1f22; box-shadow: 0 0 0 4px rgba(215, 255, 58, .1); }
.field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 90, 78, .12); }
.field-lg input { height: 68px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; padding: 0 20px; }
.affix { position: relative; }
.affix i { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-style: normal; color: var(--fg-3); pointer-events: none; }
.affix input { padding-right: 32px; }
.affix i { right: 14px; }
.affix-pre input { padding-left: 30px; padding-right: 10px; }
.affix-pre i { left: 13px; right: auto; }
.field-num input { text-align: right; font-variant-numeric: tabular-nums; }

.pw { position: relative; }
.pw input { padding-right: 78px; }
.pw-toggle { position: absolute; right: 8px; top: 8px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--fg-2); font-size: 12px; cursor: pointer; }
.pw-toggle:hover { color: var(--fg); }

.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; }
.alert-err { background: rgba(255, 90, 78, .1); color: #ff8f86; border: 1px solid rgba(255, 90, 78, .25); }

/* Giriş ---------------------------------------------------- */
.login-body { display: flex; }
.login { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 1.25fr 1fr; min-height: 100vh; }
.login-hero { padding: 56px 56px 0; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-card { display: grid; place-items: center; padding: 40px; border-left: 1px solid var(--line); background: rgba(19, 19, 21, .55); backdrop-filter: blur(10px); }
.glass { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; animation: fadeUp .9s .25s var(--ease) both; }
.card-head h2 { font: 400 44px/1 var(--serif); margin: 10px 0 6px; letter-spacing: -.02em; }
.glass .btn-xl { margin-top: 8px; justify-content: space-between; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } }

.ticker { margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; gap: 28px; width: max-content; animation: marquee 22s linear infinite; font: 400 34px/1 var(--serif); color: var(--fg-2); }
.ticker-track i { font-style: normal; color: var(--accent); font-size: 18px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Üst menü ------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px clamp(20px, 4vw, 56px); background: rgba(11, 11, 12, .7); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.03em; }
.brand sup { font-size: 9px; color: var(--fg-3); }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--fg-2); }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3b2cff, #9f7bff); font-weight: 700; font-size: 14px; }
.nav-name { font-size: 14px; color: var(--fg-2); }

/* Ana yerleşim --------------------------------------------- */
.wrap { position: relative; z-index: 1; padding: 0 clamp(20px, 4vw, 56px); max-width: 1480px; margin: 0 auto; }
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid var(--line); }
.stat { padding: 22px 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.stat + .stat { padding-left: 22px; border-left: 1px solid var(--line); }
.stat strong { font-size: clamp(24px, 2.6vw, 38px); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat small { font-size: .55em; color: var(--fg-3); font-weight: 500; }
.stat-accent strong { color: var(--accent); }

.block { padding: 72px 0; border-bottom: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.block-head h2 { margin: 0; font: 400 clamp(36px, 4.4vw, 60px)/1 var(--serif); letter-spacing: -.02em; }
.block-head h2 sup { font: 500 14px var(--mono); color: var(--accent); vertical-align: top; margin-left: 4px; }

/* Giriş formu (kayıt) -------------------------------------- */
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.entry-main { display: flex; flex-direction: column; gap: 16px; }
.panel { background: rgba(19, 19, 21, .75); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; backdrop-filter: blur(6px); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.row {
  display: grid; gap: 10px; align-items: end; padding: 14px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line); animation: rowIn .45s var(--ease);
}
.row.out { animation: rowOut .3s var(--ease) forwards; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } }
@keyframes rowOut { to { opacity: 0; transform: translateX(20px); height: 0; padding-block: 0; margin-top: -10px; } }
.row-item { grid-template-columns: 28px minmax(0, 1fr) 150px 92px 120px 40px; }
.row-appr { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 40px; }
.row-no { align-self: center; padding-top: 22px; font: 500 12px var(--mono); color: var(--fg-3); }
.row-total { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.row-total span { font-size: 12px; color: var(--fg-2); }
.row-total strong { height: 48px; display: flex; align-items: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.row-del {
  width: 40px; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--fg-3);
  display: grid; place-items: center; cursor: pointer; transition: .25s var(--ease);
}
.row-del:hover { color: var(--danger); border-color: rgba(255, 90, 78, .4); background: rgba(255, 90, 78, .08); }
.row-del:disabled { opacity: .25; pointer-events: none; }

.entry-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.summary { background: var(--fg); color: var(--bg); border-radius: var(--r); padding: 24px; }
.summary .mono { color: rgba(11, 11, 12, .5); }
.summary dl { margin: 16px 0 22px; }
.summary dl div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(11, 11, 12, .1); font-variant-numeric: tabular-nums; }
.summary dt { color: rgba(11, 11, 12, .62); font-size: 14px; }
.summary dd { margin: 0; font-weight: 600; }
.summary .sum-total { border: 0; padding-top: 16px; align-items: baseline; }
.summary .sum-total dt { color: var(--bg); font-weight: 600; }
.summary .sum-total dd { font-size: 34px; letter-spacing: -.04em; }
.summary .btn-primary { background: var(--bg); color: var(--fg); }
.summary .btn-primary:hover { background: #26262a; }

.preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: rgba(19, 19, 21, .75); }
.preview-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.preview pre { margin: 0; padding: 16px; white-space: pre-wrap; word-break: break-word; font: 13px/1.6 var(--sans); color: var(--fg-2); max-height: 340px; overflow: auto; }

/* Arama ---------------------------------------------------- */
.search { margin-left: auto; position: relative; width: min(340px, 100%); }
.search svg { position: absolute; left: 14px; top: 15px; color: var(--fg-3); }
.search input { padding-left: 42px; border-radius: 999px; }
.search input:focus { border-color: var(--accent); }

/* Kayıt listesi -------------------------------------------- */
.list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rec {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding: 30px 0;
  border-bottom: 1px solid var(--line); position: relative; animation: fadeUp .7s var(--ease) both; animation-delay: var(--d);
}
.rec::before { content: ""; position: absolute; inset: 0 -24px; border-radius: var(--r); background: rgba(255, 255, 255, .025); opacity: 0; transition: opacity .3s; z-index: -1; }
.rec:hover::before { opacity: 1; }
.rec-top { display: flex; gap: 18px; }
.rec-title { margin: 10px 0 16px; font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; transition: color .3s; }
.rec:hover .rec-title { color: var(--accent); }
.rec-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 720px; }
.rec-items li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; font-size: 14px; color: var(--fg-2); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rec-items b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.rec-appr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); }
.rec-side { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.rec-totals { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.rec-totals div { display: flex; justify-content: space-between; color: var(--fg-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.rec-totals .big { align-items: baseline; color: var(--fg); }
.rec-totals .big b { font-size: 30px; letter-spacing: -.04em; }
.rec-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.inline { display: inline; margin: 0; }
.btn.copied { background: var(--accent); color: var(--accent-ink); }

.empty { padding: 80px 0; text-align: center; color: var(--fg-2); }
.empty-mark { font: 400 96px/1 var(--serif); color: var(--fg-3); display: block; margin-bottom: 8px; }

.pager { display: flex; gap: 6px; justify-content: center; padding-top: 32px; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); font: 500 13px var(--mono); color: var(--fg-2); }
.pager a:hover { border-color: var(--line-2); color: var(--fg); }
.pager a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.foot { display: flex; justify-content: space-between; padding: 32px 0 48px; }

/* Bildirim ------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; padding: 13px 20px; border-radius: 999px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); transition: .45s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-err { background: var(--danger); color: #fff; }

/* Modal ---------------------------------------------------- */
.modal { border: 1px solid var(--line-2); border-radius: 22px; background: var(--bg-2); color: var(--fg); padding: 28px; width: min(420px, 92vw); }
.modal::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.modal[open] { animation: fadeUp .4s var(--ease); }
.modal h3 { font: 400 38px/1 var(--serif); margin: 12px 0 10px; }
.modal p { color: var(--fg-2); margin: 0 0 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Duyarlı -------------------------------------------------- */
@media (max-width: 1180px) {
  .entry { grid-template-columns: 1fr; }
  .entry-side { position: static; }
  .rec { grid-template-columns: 1fr; gap: 20px; }
  .rec-totals { text-align: left; }
  .rec-actions { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 24px 0; }
  .login-card { border-left: 0; border-top: 1px solid var(--line); padding: 40px 24px 56px; }
  .ticker { margin-top: 40px; }
  .nav-links, .nav-name { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 22px; }
  .row-item { grid-template-columns: 1fr 1fr; }
  .row-item .row-no { display: none; }
  .row-item .field:first-of-type { grid-column: 1 / -1; }
  .row-appr { grid-template-columns: 1fr 40px; }
  .row-appr .row-no { display: none; }
  .row-appr .field:first-of-type { grid-column: 1 / -1; }
  .search { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mega .line > span { transform: none; }
}
