/* Renkler erah.aero kimliğinden: altın (#b6985a), siyah, beyaz. Açık ve canlı tema; koyu mod yok. */
:root {
  color-scheme: light;
  --bg: #fdfaf3; --panel: #fff; --line: #eee4cc; --text: #17140e; --muted: #7b705a;
  --brand: #b6985a;      /* erah.aero altını */
  --gold: #e3b341;       /* canlı altın: düğmeler, vurgular */
  --gold-soft: #fbf1d6;  /* seçili / üzerine gelinen zemin */
  --accent: #8f6b16;     /* beyaz üzerinde okunur koyu altın: bağlantılar */
  --pos: #12a150; --neg: #e5362b; --warn: #e88a00; --neu: #8d95a3;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
h1 { font-size: 20px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 14px; margin: 14px 0 6px; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.muted { color: var(--muted); } .small { font-size: 12px; } .error { color: var(--neg); min-height: 18px; }
[hidden] { display: none !important; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 360px; display: grid; gap: 10px; }

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside { background: var(--panel); color: var(--text); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 16px; font-weight: 800; font-size: 16px; letter-spacing: .04em; border-bottom: 3px solid var(--gold); } .brand span { font-weight: 500; color: var(--accent); letter-spacing: 0; }
nav { flex: 1; }
nav .grp { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 700; }
nav a { display: flex; justify-content: space-between; padding: 7px 16px 7px 13px; color: var(--text); border-left: 3px solid transparent; }
nav a:hover { background: var(--gold-soft); text-decoration: none; }
nav a.active { background: var(--gold-soft); border-left-color: var(--gold); font-weight: 700; }
nav .badge { background: var(--neg); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.who { padding: 12px 16px; font-size: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.who .link { color: var(--accent); }
main { padding: 20px 24px 60px; min-width: 0; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head p { margin: 2px 0 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat { border-top: 3px solid var(--gold); }
.stat b { display: block; font-size: 22px; } .stat span { color: var(--muted); font-size: 12px; }
.note { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }

button { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 7px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--gold); background: var(--gold-soft); }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--text); font-weight: 600; }
button.primary:hover { background: #efc253; }
button.link:hover { background: none; }
button.danger { color: var(--neg); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
input[type=checkbox] { accent-color: var(--gold); width: auto; margin: 0 6px 0 0; }
label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
label.check { display: flex; align-items: center; font-size: 14px; color: var(--text); }
.form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.form .hint { font-size: 11px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.picker { border: 1px solid var(--line); border-radius: 7px; max-height: 170px; overflow-y: auto; padding: 6px 8px; display: grid; gap: 2px; }
.picker .ptitle { font-size: 11px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: #fffcf4; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.actions { white-space: nowrap; text-align: right; } td.actions button { margin-left: 4px; padding: 3px 8px; }
.tablewrap { overflow-x: auto; }
.tag { display: inline-block; font-size: 11px; border-radius: 10px; padding: 1px 8px; background: color-mix(in srgb, var(--neu) 18%, transparent); color: var(--text); white-space: nowrap; }
.tag.olumlu, .tag.ok { background: color-mix(in srgb, var(--pos) 20%, transparent); color: var(--pos); }
.tag.olumsuz, .tag.bad { background: color-mix(in srgb, var(--neg) 18%, transparent); color: var(--neg); }
.tag.warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.clamp { max-width: 520px; } .pre { white-space: pre-wrap; word-break: break-word; }

.bars { display: flex; gap: 6px; height: 110px; }
.bars .bar { flex: 1; max-width: 44px; height: 100%; display: flex; flex-direction: column-reverse; min-width: 14px; border-radius: 4px 4px 0 0; overflow: hidden; background: color-mix(in srgb, var(--neu) 10%, transparent); }
.bars .bar i { display: block; } .bars .pos { background: var(--pos); } .bars .neg { background: var(--neg); } .bars .neu { background: var(--neu); }
.barlabels { display: flex; gap: 6px; font-size: 10px; color: var(--muted); } .barlabels span { flex: 1; max-width: 44px; text-align: center; min-width: 14px; }

.modal { position: fixed; inset: 0; background: rgba(23,20,14,.45); display: grid; place-items: start center; padding: 40px 16px; overflow-y: auto; z-index: 10; }
.modal-box { background: var(--panel); border-radius: 12px; padding: 20px; width: 100%; max-width: 760px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 20; max-width: 90vw; }
.toast.err { background: var(--neg); }
.chat { display: grid; gap: 8px; } .chat .q { justify-self: end; background: var(--gold); color: var(--text); } .chat .a { justify-self: start; background: color-mix(in srgb, var(--neu) 15%, transparent); }
.chat > div { padding: 8px 12px; border-radius: 10px; max-width: 80%; white-space: pre-wrap; }
.thumb { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: static; height: auto; } nav { display: flex; flex-wrap: wrap; } nav .grp { display: none; } nav a { padding: 6px 10px; }
  main { padding: 16px; } .form { grid-template-columns: 1fr; }
}
