/* ==========================================================
   YONETIKS — Dijital Defter Tasarım Sistemi
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink:        #0B1220;
  --ink-soft:   #38445C;
  --green:      #12B76A;
  --green-deep: #0C8A50;
  --green-tint: #E7F8EF;
  --gold:       #F2B705;
  --gold-tint:  #FDF3D6;
  --danger:     #E5484D;
  --danger-tint:#FBE7E7;
  --surface:    #F7F9F5;
  --card:       #FFFFFF;
  --line:       #E3E8E2;
  --muted:      #64748B;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .figure {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
}

a { color: inherit; text-decoration: none; }

.figure {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Layout: kimlik dogrulama disi (login/register) ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

.auth-hero {
  background: var(--ink);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero .wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.auth-hero .wordmark span { color: var(--green); }

.auth-hero .pitch {
  max-width: 420px;
}

.auth-hero .pitch h1 {
  color: #fff;
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 16px;
}

.auth-hero .pitch p {
  color: #AEB8CC;
  font-size: 15px;
}

.ledger-preview {
  border: 1px solid #26304A;
  border-radius: 10px;
  overflow: hidden;
}
.ledger-preview .row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #26304A;
  font-size: 13px;
}
.ledger-preview .row:last-child { border-bottom: none; }
.ledger-preview .row .amt.pos { color: var(--green); font-family: var(--font-display); }
.ledger-preview .row .amt.neg { color: #F08C8F; font-family: var(--font-display); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-box h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.auth-box .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ---------- Form elemanlari ---------- */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--ink); color: #fff; width: 100%; }
.btn-primary:hover { background: #1A2438; }

.btn-accent { background: var(--green); color: #fff; }
.btn-accent:hover { background: var(--green-deep); }

.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}
.auth-switch a { color: var(--green-deep); font-weight: 600; }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-danger  { background: var(--danger-tint); color: #9B1C1F; border-color: #F3C6C7; }
.alert-success { background: var(--green-tint); color: var(--green-deep); border-color: #BEE9D3; }
.alert-warning { background: var(--gold-tint); color: #8A6400; border-color: #F2DFA0; }
.alert-info    { background: #EAF1FB; color: #2A5AA6; border-color: #C9DCF3; }

/* ---------- Uygulama kabuğu (dashboard sonrasi) ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
}

.app-sidebar {
  background: var(--ink);
  color: #C9D2E3;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.app-sidebar .wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.app-sidebar .wordmark span { color: var(--green); }

.brand-mark {
  display: inline-block;
  background: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.brand-mark img {
  display: block;
  height: 26px;
  width: auto;
}
.auth-hero .brand-mark { margin-bottom: 40px; }
.auth-hero .brand-mark img { height: 32px; }
.app-sidebar .tagline {
  font-size: 11.5px;
  color: #6E7A93;
  margin-bottom: 36px;
}

.nav-group { margin-bottom: 8px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  color: #C9D2E3;
}
.nav-link:hover { background: #161F35; color: #fff; }
.nav-link.active { background: var(--green); color: #fff; }
.nav-link .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .55; flex-shrink: 0;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #1E2A44;
  font-size: 13px;
}
.sidebar-foot .user-name { color: #fff; font-weight: 600; }
.sidebar-foot a { color: #8592AD; }
.sidebar-foot a:hover { color: #fff; }

.app-main {
  padding: 32px 40px 60px;
  max-width: 1080px;
}

@media (max-width: 640px) {
  .app-main { padding: 24px 18px 40px; }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-head h1 { font-size: 26px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Ozet seridi: kart yigini yerine defter basligi ---------- */

.statement-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  margin-bottom: 24px;
}
@media (max-width: 760px) {
  .statement-strip { grid-template-columns: repeat(2, 1fr); }
}
.statement-cell {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.statement-cell:last-child { border-right: none; }
.statement-cell .label {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.statement-cell .figure { font-size: 22px; }
.statement-cell .figure.pos { color: var(--green-deep); }
.statement-cell .figure.neg { color: var(--danger); }

.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
}
.status-banner.success { background: var(--green-tint); color: var(--green-deep); }
.status-banner.warning { background: var(--gold-tint); color: #8A6400; }
.status-banner.danger  { background: var(--danger-tint); color: #9B1C1F; }
.status-banner.info    { background: #EAF1FB; color: #2A5AA6; }

/* ---------- Defter satirlari (islem listesi) ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 14px;
}
.section-head h2 { font-size: 17px; }

.ledger {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.ledger-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: none; }

.ledger-row .date {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ledger-row .desc .title { font-weight: 600; font-size: 14.5px; }
.ledger-row .desc .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.ledger-row .amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.ledger-row .amt.pos { color: var(--green-deep); }
.ledger-row .amt.neg { color: var(--danger); }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Formlar (icerik alani icinde) ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 16px; }

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.inline-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 140px;
}
@media (min-width: 640px) {
  .inline-form .btn { grid-column: auto; }
}

.table-wrap { overflow-x: auto; }

.debt-list { display: flex; flex-direction: column; gap: 12px; }
.debt-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.debt-card .name { font-weight: 600; font-size: 14.5px; }
.debt-card .type-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-deep);
  margin-left: 8px;
  font-weight: 500;
}
.debt-card .bar-track {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 8px;
}
.debt-card .bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}
