.dash-page { min-height: 100vh; display: flex; flex-direction: column; }

/* Info banner (token usage disclaimer) */
.dash-info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.dash-info-banner .dib-icon { font-size: 16px; line-height: 1.5; flex-shrink: 0; }
.dash-info-banner p { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.dash-info-banner strong { color: var(--text); font-weight: 600; }

/* Usage by model */
.model-usage { display: flex; flex-direction: column; gap: 11px; padding: 16px 18px; }
.mu-row { display: flex; align-items: center; gap: 12px; }
.mu-name { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 135px; flex-shrink: 0; }
.mu-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mu-dot.claude { background: #D97757; }
.mu-dot.gemini { background: #4A96E3; }
.mu-dot.openai { background: #10a37f; }
.mu-bar-wrap { flex: 1; height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.mu-bar { height: 100%; border-radius: 999px; }
.mu-bar.claude { background: #D97757; }
.mu-bar.gemini { background: #4A96E3; }
.mu-bar.openai { background: #10a37f; }
.mu-val { font-size: 13px; font-weight: 600; min-width: 62px; text-align: right; flex-shrink: 0; }
.mu-empty { color: var(--text-muted); font-size: 13px; padding: 6px 0; }
@media (max-width: 480px) {
  .model-usage { padding: 14px; }
  .mu-name { min-width: 92px; font-size: 12px; }
  .mu-val { min-width: 48px; font-size: 12px; }
}

/* Header */
.dash-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  position: sticky; top: 0; z-index: 10;
}
.dash-brand { font-size: 15px; font-weight: 600; color: var(--accent); }
.dash-nav   { display: flex; align-items: center; gap: 6px; }

/* Nav links rendered as subtle pills with clear hover targets */
.header-link {
  color: var(--text-muted); font-size: 13px; text-decoration: none;
  padding: 8px 13px; border-radius: 8px; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.header-link:hover { color: var(--text); background: var(--surface2); }

/* Thin divider between navigation links and the action button */
.nav-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; flex-shrink: 0; }

.btn-ghost {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 8px 15px;
  white-space: nowrap; transition: all 0.15s;
}
.btn-ghost:hover { border-color: #dc2626; color: #ef4444; background: rgba(220,38,38,0.06); }

/* Main */
.dash-main {
  padding: 32px 28px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dash-title-row { display: flex; align-items: baseline; gap: 12px; }
.dash-title-row h1 { font-size: 22px; font-weight: 700; }
.dash-user { color: var(--text-muted); font-size: 14px; }

/* Stat cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.dc-label {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dc-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.dc-value.accent { color: #a78bfa; }

.dc-sub { color: #444; font-size: 11px; margin-top: 5px; }

/* Balance bar */
.balance-bar-wrap {
  background: var(--border);
  border-radius: 4px;
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.balance-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Sections */
.dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dash-section h2 {
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-sub { color: var(--text-muted); font-size: 12px; font-weight: 400; }

/* Chart */
.chart-wrap {
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  height: 100%;
}

.bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: height 0.4s ease;
  min-height: 2px;
}

.bar.bar-empty { background: var(--border); }

.bar-tooltip {
  position: absolute;
  bottom: 105%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 11px;
  padding: 3px 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.bar-col:hover .bar-tooltip { opacity: 1; }
.bar-col:hover .bar { background: #6d28d9; }
.bar-col:hover .bar.bar-empty { background: #444; }

.chart-labels {
  display: flex;
  gap: 4px;
  padding-bottom: 16px;
}

.chart-labels span {
  flex: 1;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

/* Conversations table */
.conv-table-wrap { overflow-x: auto; }

.conv-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}

.conv-table th {
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  text-align: left;
  text-transform: uppercase;
}

.conv-table td { border-top: 1px solid var(--border); padding: 13px 16px; }
.conv-table tr:hover td { background: rgba(255,255,255,0.02); }

.conv-title-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokens-cell { color: #a78bfa; font-weight: 600; white-space: nowrap; }
.date-cell   { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

/* Model column in the recent-chats table */
.conv-model-cell { white-space: nowrap; }
.conv-model { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; margin-right: 10px; }
.conv-model:last-child { margin-right: 0; }
.conv-model-empty { color: var(--text-muted); }
.deleted-badge {
  display: inline-block; font-size: 10.5px; font-weight: 600; color: #ef4444;
  background: rgba(239,68,68,0.12); border-radius: 5px; padding: 1px 6px; margin-left: 6px;
  vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em;
}
.conv-deleted td { opacity: 0.62; }
.conv-deleted .tokens-cell { opacity: 1; }

.open-link {
  color: var(--accent);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}
.open-link:hover { text-decoration: underline; }

/* ─── RESPONSIVE — TABLET ≤ 768px ──────────── */
@media (max-width: 768px) {
  .dash-header { padding: 11px 14px; }
  .dash-brand { font-size: 14px; }
  .dash-main { padding: 18px 14px; gap: 20px; }
  .dash-title-row h1 { font-size: 19px; }
  .dash-user { font-size: 12px; }

  .dc-value { font-size: 21px; }
  .chart-bars { height: 100px; }
  .chart-labels span:nth-child(even) { display: none; } /* sıkışınca her ikincisini gizle */

  .dash-section h2 { padding: 12px 16px; font-size: 13px; }
  .conv-table th, .conv-table td { padding: 10px 12px; font-size: 12.5px; }
}

/* ─── RESPONSIVE — PHONE ≤ 480px ───────────── */
@media (max-width: 480px) {
  .dash-header { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .dash-nav { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .header-link { font-size: 12px; padding: 7px 10px; }
  .btn-ghost { font-size: 12px; padding: 7px 12px; }
  .nav-sep { display: none; }
  .dash-main { padding: 12px 10px; gap: 14px; }
  .dash-title-row { flex-direction: column; gap: 2px; align-items: flex-start; }
  .dash-title-row h1 { font-size: 17px; }

  .dash-card { padding: 14px 14px; }
  .dc-value { font-size: 18px; }
  .dc-label { font-size: 10.5px; }

  .chart-bars { height: 80px; }
  .chart-labels span:nth-child(3n+1):not(:last-child) { display: inline; }
  .chart-labels span { font-size: 9px; }

  .conv-title-cell { max-width: 180px; }
}
