:root {
  --bg: #07090d;
  --panel: #0d1118;
  --panel-2: #111722;
  --panel-3: #151d29;
  --line: #202a39;
  --text: #edf3fb;
  --muted: #8b99ad;
  --accent: #f5b942;
  --accent-2: #ffcf67;
  --green: #22c993;
  --red: #ff5c72;
  --blue: #4ca7ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .36);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: radial-gradient(circle at 70% -10%, rgba(245,185,66,.08), transparent 32%), var(--bg); color: var(--text); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 30; background: linear-gradient(180deg, #0c1017, #080b10); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 24px; font-weight: 800; letter-spacing: .2px; font-size: 17px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--accent-2), #a86c00); color: #111; box-shadow: 0 8px 25px rgba(245,185,66,.2); }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.4px; }
.nav-label { color: #607087; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; padding: 18px 12px 8px; }
.nav { display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: #9eacbf; font-weight: 650; transition: .18s ease; }
.nav a:hover { color: #fff; background: #111722; border-color: #1b2635; transform: translateX(2px); }
.nav a.active { color: #14100a; background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: #ffd77f; box-shadow: 0 10px 30px rgba(245,185,66,.14); }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 15px; }
.root-chip { padding: 11px 12px; border-radius: 11px; background: #101620; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.root-chip strong { color: var(--text); }
.logout-form button { margin-top: 9px; width: 100%; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 70px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(7,9,13,.86); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(32,42,57,.8); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; border: 0; background: #111722; color: #fff; width: 40px; height: 40px; border-radius: 10px; }
.page-title { margin: 0; font-size: 20px; letter-spacing: -.3px; }
.live-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(34,201,147,.08); }
.content { padding: 24px 28px 50px; max-width: 1800px; margin: 0 auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: linear-gradient(145deg, rgba(17,23,34,.98), rgba(12,17,24,.98)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { padding: 17px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-body { padding: 19px; }
.stat { padding: 18px; position: relative; min-height: 120px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { margin-top: 11px; font-size: 27px; font-weight: 800; letter-spacing: -.7px; }
.stat-foot { margin-top: 8px; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.02); font-size: 11px; font-weight: 700; }
.badge.green { color: var(--green); border-color: rgba(34,201,147,.25); background: rgba(34,201,147,.08); }
.badge.red { color: var(--red); border-color: rgba(255,92,114,.25); background: rgba(255,92,114,.08); }
.badge.yellow { color: var(--accent-2); border-color: rgba(245,185,66,.25); background: rgba(245,185,66,.08); }
.badge.blue { color: var(--blue); border-color: rgba(76,167,255,.25); background: rgba(76,167,255,.08); }
.positive { color: var(--green)!important; }
.negative { color: var(--red)!important; }
.muted { color: var(--muted); }
.alert { margin-bottom: 16px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: #111722; }
.alert.success { border-color: rgba(34,201,147,.3); color: #9ce8cf; background: rgba(34,201,147,.08); }
.alert.danger { border-color: rgba(255,92,114,.35); color: #ffb1bc; background: rgba(255,92,114,.08); }
.alert.warning { border-color: rgba(245,185,66,.35); color: #ffe0a1; background: rgba(245,185,66,.08); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { color: #b8c4d4; font-size: 12px; font-weight: 700; }
.field small { color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; border: 1px solid #263244; background: #090d13; color: var(--text); border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s; }
textarea.input { min-height: 100px; resize: vertical; }
.input:focus { border-color: #806728; box-shadow: 0 0 0 3px rgba(245,185,66,.08); }
.input::placeholder { color: #526074; }
.btn { min-height: 42px; border: 1px solid #2a3545; border-radius: 10px; padding: 9px 14px; background: #151d29; color: #e8eef7; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .15s; }
.btn:hover { transform: translateY(-1px); border-color: #3b4b60; }
.btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #161006; border-color: #ffd97f; }
.btn.danger { color: #ffb1bc; background: rgba(255,92,114,.08); border-color: rgba(255,92,114,.35); }
.btn.green { color: #a7f1d8; background: rgba(34,201,147,.08); border-color: rgba(34,201,147,.35); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #7f8da1; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; background: rgba(8,11,16,.7); }
td { color: #cbd5e2; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.coin-row { display: flex; align-items: center; gap: 10px; }
.coin-logo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #17120a; background: linear-gradient(145deg, var(--accent-2), #af7300); font-weight: 900; }
.risk-bar { height: 8px; border-radius: 999px; background: #080b10; overflow: hidden; border: 1px solid #202b3b; }
.risk-bar > span { display: block; height: 100%; width: var(--risk, 0%); background: linear-gradient(90deg, var(--green), var(--accent), var(--red)); }
.section-space { margin-top: 18px; }
.kpi-strip { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.kpi-strip > div { min-width: 120px; }
.kpi-strip small { display: block; color: var(--muted); }
.kpi-strip strong { display: block; margin-top: 3px; font-size: 16px; }
.trade-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; }
.trade-main { min-width: 0; display: grid; gap: 12px; }
.trade-side { min-width: 0; display: grid; gap: 12px; align-content: start; }
.market-head { padding: 15px 18px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.market-symbol { font-size: 21px; font-weight: 850; }
.market-price { font-size: 22px; font-weight: 800; }
.chart-toolbar { display: flex; gap: 5px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chart-toolbar button { border: 0; background: transparent; color: var(--muted); padding: 6px 9px; border-radius: 7px; }
.chart-toolbar button.active, .chart-toolbar button:hover { background: #1a2330; color: #fff; }
.chart-wrap { position: relative; height: 470px; background: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 70px 70px; }
#candleChart { width: 100%; height: 100%; display: block; }
.book { max-height: 355px; overflow: hidden; }
.book-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 5px 12px; font-size: 11px; font-variant-numeric: tabular-nums; }
.book-head { color: var(--muted); border-bottom: 1px solid var(--line); }
.book-row span:nth-child(n+2) { text-align: right; }
.trade-tape { max-height: 290px; overflow: auto; }
.trade-tape .book-row { grid-template-columns: 1fr 1fr 1fr; }
.order-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-panel { padding: 18px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, rgba(245,185,66,.12), transparent 35%), #07090d; }
.login-card { width: min(440px,100%); background: linear-gradient(145deg,#111722,#0b0f16); border: 1px solid #263142; border-radius: 22px; padding: 30px; box-shadow: 0 28px 100px rgba(0,0,0,.55); }
.login-logo { width: 60px; height: 60px; border-radius: 17px; margin-bottom: 22px; display: grid; place-items: center; background: linear-gradient(145deg,var(--accent-2),#9e6700); color: #171108; font-size: 28px; font-weight: 900; }
.login-card h1 { margin: 0 0 5px; font-size: 26px; }
.login-card p { color: var(--muted); margin: 0 0 24px; }
.login-card .field { margin-top: 13px; }
.login-card .btn { width: 100%; margin-top: 18px; }
.security-note { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); color: #6f7e92; font-size: 11px; }
.qr-box { background: #fff; border-radius: 14px; padding: 12px; width: 284px; max-width: 100%; }
.code { padding: 3px 7px; border-radius: 6px; background: #080b10; border: 1px solid var(--line); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; color: #dce7f5; word-break: break-all; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.danger-zone { border-color: rgba(255,92,114,.3); }
.mobile-overlay { display: none; }
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trade-layout { grid-template-columns: 1fr; }
  .trade-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: .2s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25; }
  body.sidebar-open .mobile-overlay { display: block; }
  .main { width: 100%; }
  .menu-toggle { display: grid; place-items: center; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 14px 40px; }
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .trade-side, .order-panels { grid-template-columns: 1fr; }
  .chart-wrap { height: 380px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .page-title { font-size: 17px; }
  .live-chip span:last-child { display: none; }
  .market-head { gap: 12px; }
  .chart-wrap { height: 330px; }
}
.market-card-head { align-items: flex-start; }
.market-summary { margin-top: 4px; font-size: 12px; }
.market-tools { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.market-search { display: flex; align-items: center; gap: 8px; flex: 1 1 520px; }
.market-search .input { flex: 1 1 300px; }
.market-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.market-warning { margin: 14px 18px 0; }
.sort-link { color: inherit; display: inline-flex; align-items: center; gap: 5px; }
.sort-link:hover { color: var(--text); }
.pagination { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagination-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn.disabled { opacity: .38; pointer-events: none; }
@media (max-width: 700px) {
  .market-search { width: 100%; flex-wrap: wrap; }
  .market-search .input { flex-basis: 100%; }
  .market-filters { width: 100%; }
  .market-filters .btn { flex: 1; }
  .pagination { align-items: stretch; }
  .pagination-links { width: 100%; }
}

/* YapayCoin v2.9.0 - Emir defteri 7 satış / 7 alış ayrımı */
.book-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.book-divider-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.book-divider strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}


/* YapayCoin v3.0.0 - Emir defteri 6 satış / 6 alış */
.book-divider {
  margin: 6px 12px 7px;
  padding: 8px 0 7px;
  border-top: 0;
  border-bottom: 2px solid var(--accent);
}
.book-divider-label {
  flex: 1;
}
.book-divider strong {
  margin-left: auto;
  text-align: right;
  min-width: 110px;
  color: #fff;
  font-size: 13px;
}
