/* Portföy Radar paneli — koyu tema.
   Rapor şablonuyla aynı palet kullanılır ki panelden rapora geçiş kesintisiz olsun.
   Yön göstergeleri (▲▼) kasıtlı olarak yeşil/kırmızı DEĞİLDİR: o palet kâr/zarar
   refleksini tetikliyor, araç ise bilgi vermeyi hedefliyor. */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-alt: #1c2128;
  --border: #30363d;
  --border-soft: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #d29922;
  --structural: #58a6ff;
  --danger: #f85149;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--structural); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

/* --- Üst çubuk --- */

header.top {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.top .inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .2px;
  color: var(--text);
  margin-right: auto;
}
.brand span { color: var(--muted); font-weight: 400; font-size: 12px; display: block; }

nav.links { display: flex; gap: 4px; flex-wrap: wrap; }

nav.links a, .btn, button {
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
nav.links a:hover, .btn:hover, button:hover { background: #262c36; text-decoration: none; }
nav.links a.active { border-color: var(--structural); color: var(--structural); }

.btn.primary { background: var(--structural); border-color: var(--structural); color: #06121f; font-weight: 600; }
.btn.primary:hover { background: #79b8ff; }
.btn.quiet { background: transparent; }
.btn.danger { color: var(--danger); border-color: #5c2a26; background: transparent; }
.btn.danger:hover { background: #2c1614; }
.btn.small { font-size: 12px; padding: 5px 9px; }

/* --- Kartlar --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 18px;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
}
.card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }

.page-title { font-size: 22px; font-weight: 700; margin: 26px 0 2px; }
.page-sub { color: var(--muted); font-size: 13px; }

/* --- Bildirim şeritleri --- */

.notice {
  border-radius: 8px;
  padding: 11px 14px;
  margin-top: 16px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.notice.ok { border-left: 3px solid var(--structural); }
.notice.warn { border-left: 3px solid var(--accent); }
.notice.error { border-left: 3px solid var(--danger); }

/* --- Tablolar --- */

.table-scroll { overflow-x: auto; margin: 0 -4px; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 600;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
td.sym { font-family: var(--mono); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* --- Arşiv listesi --- */

.archive-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.archive-item:last-child { border-bottom: none; }
.archive-item .day { font-weight: 600; font-size: 14.5px; min-width: 148px; }
.archive-item .meta { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

#search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  margin-bottom: 8px;
}

/* --- Formlar --- */

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}
input:focus, select:focus { outline: none; border-color: var(--structural); }

.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row > div { flex: 1 1 140px; min-width: 0; }
.field-actions { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* Maliyet alanı: varsayılan gizli. Rapora hiç gitmez; panelde de kazara
   görünmesin diye maskelenir. */
.masked { color: transparent; text-shadow: 0 0 7px rgba(230,237,243,.55); user-select: none; }
.masked.revealed { color: var(--muted); text-shadow: none; user-select: auto; }

/* --- Rapor gömme --- */

.report-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 18px;
  background: var(--bg);
}

.report-nav { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* --- Giriş ekranı --- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-box { width: 100%; max-width: 360px; }
.login-box .card { margin-top: 0; }
.login-box .brand { text-align: center; margin-bottom: 18px; font-size: 20px; }

/* --- Küçük ekran --- */

@media (max-width: 560px) {
  .archive-item { flex-wrap: wrap; }
  .archive-item .day { min-width: 0; }
  .archive-item .meta { margin-left: 0; width: 100%; }
  .brand span { display: none; }
}

footer.foot {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 14px;
}
