/* Muhasebe Portalı — temiz kurumsal stil. Dış font/CDN kullanılmaz. */

:root {
  --bg: #f5f6f8;
  --bg-panel: #ffffff;
  --text: #1c2230;
  --text-muted: #5a6472;
  --border: #dde1e7;
  --accent: #1f3a5f;
  --accent-2: #2f5788;
  --pos: #1a7a3c;
  --neg: #b3261e;
  --warn: #b3261e;
  --shadow: 0 1px 3px rgba(20, 24, 34, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --bg-panel: #1a1e28;
    --text: #e7eaf0;
    --text-muted: #9aa3b2;
    --border: #2c3242;
    --accent: #6f9ceb;
    --accent-2: #8fb4f2;
    --pos: #57c785;
    --neg: #f18b85;
    --warn: #f0c46a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent-2); }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }

.muted { color: var(--text-muted); font-size: 0.9rem; }
.warn { color: var(--warn); font-weight: 600; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; margin-right: auto; }
.brand-name { font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.78rem; opacity: 0.85; }
.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.92rem;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.18); }
.lang-switch { display: flex; gap: 0.3rem; font-size: 0.82rem; }
.lang-switch a { color: rgba(255,255,255,0.75); text-decoration: none; padding: 0.2rem 0.4rem; border-radius: 4px; }
.lang-switch a.active { color: #fff; font-weight: 700; background: rgba(255,255,255,0.18); }
.lang-switch a:hover { color: #fff; }
.lang-switch-login { justify-content: center; padding: 0.75rem 0 0; }
.lang-switch-login a { color: var(--accent-2); }
.lang-switch-login a.active { color: var(--text); font-weight: 700; }
.logout-form { margin: 0; }
.link-button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.topbar .link-button { color: #fff; opacity: 0.9; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.card-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.card-value { font-size: 1.5rem; font-weight: 700; margin: 0.15rem 0; }
.card-note { font-size: 0.78rem; color: var(--text-muted); }

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.panel-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

.table-wrap { overflow-x: auto; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table th { background: rgba(31,58,95,0.06); font-weight: 600; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 0.5rem; white-space: nowrap; }

.filter-form, .inline-form { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-form select, .inline-form select { padding: 0.35rem 0.5rem; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }

.record-form { display: flex; flex-direction: column; gap: 0.9rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.form-grid label.span-2 { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--text-muted); }
input, select, button {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  align-self: flex-start;
  font-weight: 600;
}
button:hover { background: var(--accent-2); }

.flash { padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash-error { background: rgba(179,38,30,0.12); color: var(--neg); border: 1px solid rgba(179,38,30,0.35); }
.flash-info { background: rgba(31,58,95,0.1); border: 1px solid rgba(31,58,95,0.25); }

.bar-chart { display: flex; flex-direction: column; gap: 0.6rem; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 100px; align-items: center; gap: 0.6rem; }
.bar-label { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--border); border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { background: var(--accent-2); height: 100%; }
.bar-value { font-size: 0.85rem; text-align: right; font-variant-numeric: tabular-nums; }

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-gecikti { background: rgba(179,38,30,0.14); color: var(--neg); }
.status-yaklasiyor { background: rgba(179,110,10,0.16); color: #b36e0a; }
.status-ileride { background: rgba(31,58,95,0.1); color: var(--accent-2); }
.status-tamam { background: rgba(26,122,60,0.14); color: var(--pos); }
@media (prefers-color-scheme: dark) {
  .status-yaklasiyor { color: var(--warn); }
}

.warning-box {
  background: rgba(179,38,30,0.08);
  border: 1px solid rgba(179,38,30,0.3);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}
.warning-box ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.login-box {
  max-width: 360px;
  margin: 4rem auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-box .record-form { text-align: left; }

/* --- Rapor / imza-hazır çıktı --- */
.report {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.report-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--accent); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.report-company-name { font-weight: 700; font-size: 1.1rem; }
.report-company-meta { font-size: 0.8rem; color: var(--text-muted); }
.report-title { margin: 0.5rem 0 0.1rem; }
.report-period { color: var(--text-muted); margin-bottom: 1.25rem; }
.report-table { width: 100%; }
.report-summary { max-width: 460px; margin-top: 1rem; }
.report-net td { font-weight: 700; border-top: 2px solid var(--border); }
.report-signature { margin-top: 3rem; max-width: 320px; }
.sig-line { border-bottom: 1px solid var(--text); height: 2.5rem; }
.sig-label { font-weight: 600; margin-top: 0.25rem; }
.sig-date { color: var(--text-muted); margin-top: 0.75rem; font-size: 0.9rem; }
.report-footer { margin-top: 2rem; font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.5rem; }

@media print {
  .no-print, .topbar, .site-footer, .filter-form, .inline-form { display: none !important; }
  body, .container { background: #fff !important; color: #000 !important; margin: 0; padding: 0; }
  .container { max-width: none; padding: 0; }
  .report { box-shadow: none; border: none; padding: 0; }
  .report-header { border-bottom: 2px solid #000; }
  a { color: #000; text-decoration: none; }
  .table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  .status-badge { background: none !important; color: #000 !important; border: 1px solid #000; }
}
