/* GOLDI – onaylanmış prototip görünümü */
:root {
  --bg: #0F0F12; --nav: #141418; --card: #18181D; --line: #2C2C35; --line2: #26262E; --line3: #3A3A44; --input: #34343E;
  --text: #F2EFE8; --soft: #DAD7DE; --muted: #C9C6CF; --dim: #A9A6B0; --faint: #8C8994;
  --gold: #E0B23A; --gold2: #F2C866; --gold-bg: #3A2E14; --gold-nav: #2A2416;
  --green: #7BE0AE; --green-bg: #1E3A2C; --red: #F4A3A3; --red-bg: #3D1F1F; --red-line: #5A2E2E;
  --mono: 'IBM Plex Mono', ui-monospace, monospace; --head: 'Sora', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--gold); } a:hover { color: var(--gold2); }
input, textarea, select, button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=range] { accent-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.nav { min-width: 0; flex: 1 1 250px; max-width: 290px; background: var(--nav); border-right: 1px solid #24242C; padding: 24px 14px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text span { font-family: var(--head); font-weight: 700; font-size: 16px; }
.brand-text small { color: var(--gold); font-size: 12px; font-weight: 600; }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.navbtn { text-align: left; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: none; cursor: pointer; font-size: 14px; display: flex; gap: 10px; align-items: center; background: transparent; color: var(--muted); text-decoration: none; }
.navbtn:hover { color: var(--gold2); }
.navbtn.on { background: var(--gold-nav); color: var(--gold2); font-weight: 600; }
.navnum { width: 20px; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ptitle { margin: 0; font-family: var(--head); font-size: 28px; font-weight: 600; }
.citybar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#view { display: flex; flex-direction: column; gap: 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.grow { flex: 999 1 460px; min-width: 0; }
.side { flex: 1 1 300px; min-width: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.sm { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.h2 { margin: 0; font-family: var(--head); font-size: 18px; font-weight: 600; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lbl { font-size: 13px; color: var(--muted); }
.muted { font-size: 12px; color: var(--faint); margin: 0; }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.tool { font-family: var(--mono); font-size: 13px; color: var(--gold); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nocity { color: var(--faint); font-style: italic; }
.nowrap { white-space: nowrap; }

.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .k { color: var(--dim); font-size: 13px; }
.stat .v { font-family: var(--head); font-weight: 600; font-size: 34px; line-height: 1.15; }
.stat .v.small { font-size: 22px; }
.stat .s { color: var(--faint); font-size: 12px; }
.t-green { color: var(--green); } .t-red { color: var(--red); } .t-gold { color: var(--gold); } .t-amber { color: var(--gold2); }

.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-block; }
.spaced { letter-spacing: .06em; }
.badge-amber { background: var(--gold-bg); color: var(--gold2); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--line2); color: var(--dim); }
.badge-cat { background: var(--line2); color: var(--gold); }

.btn { min-height: 44px; padding: 0 18px; border: none; border-radius: 10px; background: var(--gold); color: #141414; font-weight: 600; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--gold2); color: #141414; }
.btn.sm { min-height: 38px; padding: 0 14px; }
.btn2 { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line3); background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn2:hover { border-color: var(--gold); color: var(--gold2); }
.btn2.gold { color: var(--gold); }
.btn2.pillsm { min-height: 36px; border-radius: 999px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--gold2); border: 1px solid var(--gold); }
.del { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--red-line); background: transparent; color: var(--red); cursor: pointer; font-size: 13px; }
.pill { min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pill.on { border: none; background: var(--green-bg); color: var(--green); }
.pill.off { border: 1px solid var(--line3); background: transparent; color: var(--dim); }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; border: 1px solid var(--line3); background: transparent; color: var(--muted); }
.chip.on { border-color: var(--gold); background: var(--gold); color: #141414; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

.field { display: flex; flex-direction: column; gap: 6px; }
.inp { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--input); background: var(--bg); color: var(--text); font-size: 15px; width: 100%; }
.inp:disabled { color: var(--faint); background: #16161A; }
.ta { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--input); background: var(--bg); color: var(--text); font-size: 15px; resize: vertical; width: 100%; }
.formgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.tablewrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--dim); font-weight: 500; padding: 10px 8px; white-space: nowrap; }
.tbl td { padding: 12px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.hl td { background: #211D12; }
.kv { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.kv > span:first-child { font-size: 12px; color: var(--dim); }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.line > span:first-child { color: var(--dim); }
.line > span:last-child { text-align: right; }
.yes { color: var(--green); font-weight: 600; }

.listenbar { border-color: var(--gold); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.listenbar .wave rect { animation: wave 1s ease-in-out infinite; transform-origin: center; }
.listenbar .wave rect:nth-child(2) { animation-delay: .15s } .listenbar .wave rect:nth-child(3) { animation-delay: .3s }
.listenbar .wave rect:nth-child(4) { animation-delay: .45s } .listenbar .wave rect:nth-child(5) { animation-delay: .6s }
@keyframes wave { 0%, 100% { transform: scaleY(.5) } 50% { transform: scaleY(1) } }
@media (prefers-reduced-motion: reduce) { .listenbar .wave rect { animation: none; } }

.chatbox { height: 460px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 80%; display: flex; flex-direction: column; gap: 4px; }
.bubble.goldi { align-self: flex-start; }
.bubble.user { align-self: flex-end; align-items: flex-end; }
.bubble .who { font-size: 12px; }
.bubble.goldi .who { color: var(--gold); font-weight: 600; }
.bubble.user .who { color: var(--dim); }
.bubble .msg { padding: 12px 16px; }
.bubble.goldi .msg { background: #24242B; border-radius: 4px 16px 16px 16px; }
.bubble.user .msg { background: var(--gold); color: #141414; border-radius: 16px 4px 16px 16px; }
.chatfoot { border-top: 1px solid var(--line2); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.chatrow { display: flex; gap: 10px; }
.chatrow .inp { flex: 1; min-width: 0; height: 48px; }
.typing { color: var(--faint); font-size: 13px; }

.groupbtn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0; border: none; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.groupbtn svg { transition: transform .15s; }
.groupbtn[aria-expanded=true] svg { transform: rotate(90deg); }

.folder { text-align: left; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 10px; font: inherit; text-decoration: none; }
.folder:hover { border-color: var(--gold); color: var(--text); }
.folder .name { font-family: var(--head); font-size: 20px; font-weight: 600; }
.bar { height: 8px; background: var(--line2); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--gold); border-radius: 999px; }
.bar.tall { height: 10px; }
.vchart { display: grid; gap: 8px; align-items: end; height: 150px; }
.vcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.vcol .n { font-size: 12px; color: var(--muted); }
.vcol .b { width: 70%; background: var(--gold); border-radius: 6px 6px 2px 2px; }
.vcol .l { font-size: 12px; color: var(--dim); white-space: nowrap; }

.player { display: flex; flex-direction: column; gap: 12px; }
.loglist { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.loglist span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.okmsg { font-size: 13px; color: var(--green); }
.state { color: var(--dim); padding: 28px; text-align: center; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2A1B1B; color: var(--red); border: 1px solid var(--red-line); padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: calc(100vw - 32px); }
.toast.ok { background: var(--green-bg); color: var(--green); border-color: #2E5A43; }
.insights { border-color: #4A3B17; }
.ins { display: flex; gap: 10px; } .ins b { color: var(--gold); }

@media (max-width: 760px) {
  .nav { flex: 1 1 100%; max-width: none; border-right: none; border-bottom: 1px solid #24242C; padding: 14px 12px 10px; gap: 12px; }
  .navlist { flex-direction: row; overflow-x: auto; max-width: 100%; min-width: 0; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .navlist::-webkit-scrollbar { display: none; }
  .navbtn { flex: 0 0 auto; white-space: nowrap; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; }
  .navnum { display: none; }
  .main { padding: 18px 14px 40px; gap: 16px; }
  .ptitle { font-size: 22px; }
  .card { padding: 16px; border-radius: 14px; }
  .chatbox { height: 360px; padding: 14px; }
  .chatrow { flex-wrap: wrap; }
  .chatrow .inp { flex: 1 1 100%; }
  .chatrow .btn, .chatrow .btn2 { flex: 1 1 0; }
  .bubble { max-width: 90%; }
  .stat .v { font-size: 28px; }
}
