/* ZVeresiye web demo - programin masaustu gorunumunu birebir taklit eder */

:root {
  --window: #0d0f14;
  --panel: #151821;
  --panel-alt: #1d222d;
  --card: #191e27;
  --card-hover: #242b36;
  --border: #343a46;
  --text: #f7f3ea;
  --muted: #a7adb7;
  --neutral: #c6cbd4;
  --positive: #00e676;
  --negative: #ff3b3b;
  --primary: #2f7cff;
  --primary-hover: #5593ff;
  --success: #00e676;
  --warning: #d9a441;
  --danger: #ff3b3b;
  --input-bg: #10131a;
  --menu-bg: #181c24;
  --table-header: #1f242e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --window: #f4f6f8;
  --panel: #ffffff;
  --panel-alt: #eef1f5;
  --card: #ffffff;
  --card-hover: #edf2f4;
  --border: #d6dce3;
  --text: #17202a;
  --muted: #66707d;
  --neutral: #4e5865;
  --primary: #256dff;
  --primary-hover: #1558d8;
  --warning: #b87918;
  --input-bg: #ffffff;
  --menu-bg: #fbfcfd;
  --table-header: #eef1f5;
  --shadow: 0 18px 50px rgba(40, 60, 90, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(47, 124, 255, 0.10), transparent 60%),
    var(--window);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: 100%;
}

/* === Pencere kabugu === */
.app-window {
  width: 100%;
  max-width: 1040px;
  height: min(720px, calc(100vh - 36px));
  background: var(--window);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.demo-ribbon {
  position: absolute;
  top: 14px;
  right: -38px;
  transform: rotate(45deg);
  background: var(--warning);
  color: #1a1305;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 11px;
  padding: 4px 44px;
  z-index: 40;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* === Topbar === */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}

.topbar.hidden { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-title {
  font-size: 22px;
  font-weight: 860;
  color: var(--primary);
}

/* === Butonlar === */
.btn {
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, background .12s, transform .04s;
}
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 760; }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--success { background: var(--success); border-color: var(--success); color: #06340f; font-weight: 760; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* === Inputlar === */
.input, select.input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 11px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.input:focus { border-color: var(--primary); background: var(--panel); }

/* === Sayfa govdesi === */
.page {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.page.active { display: flex; }

.page-title { font-size: 25px; font-weight: 760; margin: 0; }
.subtitle { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.pos { color: var(--positive); }
.neg { color: var(--negative); }
.neu { color: var(--neutral); }

/* === Giris ekrani === */
#page-login { align-items: center; justify-content: center; }
.login-card { width: 360px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.login-logo { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; margin-bottom: 4px; box-shadow: var(--shadow); }
.login-card .input, .login-card .btn { width: 100%; }
.login-hint {
  font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px;
  background: var(--panel-alt); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; width: 100%;
}

/* === Araclar satiri === */
.header-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; }
.toolbar .input { flex: 1; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* === Liste === */
.list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }

.row-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.row-card:hover { background: var(--card-hover); border-color: var(--primary); }
.row-card .name { font-size: 15px; font-weight: 650; flex: 1; }
.row-card .amount { font-weight: 700; }

.badge {
  border-radius: 9px;
  padding: 3px 9px;
  font-weight: 760;
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
}
.badge--debt { background: var(--danger); }
.badge--credit { background: var(--success); color: #06340f; }
.badge--zero { background: var(--muted); }
.badge--group { background: var(--primary); }
.badge--cash { background: var(--success); color: #06340f; }
.badge--card { background: var(--primary); }
.badge--paid { background: var(--panel-alt); color: var(--muted); border: 1px solid var(--border); }

/* === Islem tablosu === */
.tx-head, .tx-row {
  display: grid;
  grid-template-columns: 120px 80px 1fr 120px;
  gap: 10px;
  align-items: center;
}
.tx-head { color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 14px 4px; }
.tx-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}
.tx-row.paid { background: var(--panel-alt); opacity: .8; }
.tx-row .tx-type { text-align: center; }
.tx-row .tx-amount { text-align: right; font-weight: 700; }
.tx-date { color: var(--muted); font-size: 12px; }

/* === Detay basligi === */
.detail-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.detail-head .big-balance { font-size: 22px; font-weight: 820; }

/* === Islem ekleme === */
.add-tx { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.add-tx .input { flex: 1; min-width: 120px; }

/* === Modal === */
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; width: 340px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0; font-size: 18px; }
.modal .input { width: 100%; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* === Toast === */
.toast {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--menu-bg); border: 1px solid var(--primary); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-weight: 650; z-index: 60;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === Acilis yukleme ekrani === */
.splash {
  position: absolute; inset: 0; z-index: 100;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s; overflow: hidden;
}
.splash::before { content: ""; position: absolute; inset: 0; background: rgba(3, 8, 12, .45); }
.splash.hide { opacity: 0; pointer-events: none; }
.splash-badge {
  position: absolute; top: 18px; left: 18px;
  background: rgba(5,12,16,.78); color: #39ff9d; border: 1px solid rgba(57,255,157,.55);
  border-radius: 6px; padding: 5px 12px; font-family: Consolas, "Courier New", monospace;
  font-weight: 700; letter-spacing: 2px; font-size: 12px; z-index: 2;
}
.splash-title {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(5,12,16,.70); color: #7dffc4; border: 1px solid rgba(57,255,157,.45);
  border-radius: 6px; padding: 5px 16px; font-family: Consolas, monospace;
  font-weight: 800; letter-spacing: 4px; font-size: 13px; z-index: 2;
}
.splash-console {
  position: absolute; bottom: 56px; left: 18px; width: 320px; max-width: 60%;
  background: rgba(5,12,16,.80); border: 1px solid rgba(57,255,157,.40); border-radius: 8px;
  padding: 10px; font-family: Consolas, monospace; font-size: 10px; color: #39ff9d; z-index: 2;
  line-height: 1.5; min-height: 90px;
}
.splash-bar {
  position: absolute; bottom: 26px; left: 18px; right: 18px; height: 8px;
  background: rgba(5,12,16,.55); border: 1px solid rgba(57,255,157,.35); border-radius: 4px; z-index: 2;
}
.splash-bar > div { height: 100%; width: 0; background: #39ff9d; border-radius: 4px; transition: width .15s linear; }
.splash-skip {
  position: absolute; bottom: 40px; right: 18px; z-index: 3;
}

.list::-webkit-scrollbar, .page::-webkit-scrollbar { width: 10px; }
.list::-webkit-scrollbar-thumb, .page::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
