/* ============================================
   ATENA CRYPTO — DASHBOARD
   ============================================ */

.page-layout { display: block; min-height: calc(100vh - 52px); }

/* SIDEBAR */
.sidebar {
  width: 220px; flex-shrink: 0;
  background: #050505;
  border-right: 1px solid var(--glass-border);
  padding: 1.5rem 0.75rem; position: sticky; top: 52px;
  height: calc(100vh - 52px); overflow-y: auto;
}
.sidebar-section { margin-bottom: 1.75rem; }
.sidebar-label {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-tertiary); padding: 0 0.5rem; margin-bottom: 0.4rem;
}
.sidebar-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.48rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.82rem; color: var(--text-secondary);
  cursor: pointer; transition: background 0.15s, color 0.15s;
  width: 100%; background: none; border: none;
  text-align: left; font-family: var(--font-display); text-decoration: none;
  border-left: 2px solid transparent;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item.active {
  background: var(--green-dim); color: var(--green); font-weight: 600;
  border-left-color: var(--green); padding-left: calc(0.75rem - 2px);
}
.si-icon { font-size: 0.85rem; width: 1rem; }
.sidebar-premium {
  margin-top: 0.5rem; padding: 0.75rem;
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  font-size: 0.74rem; color: var(--text-secondary); line-height: 1.5;
}
.sidebar-premium strong { color: var(--text); display: block; margin-bottom: 0.15rem; }
.sidebar-premium a { color: var(--green); font-weight: 600; }

/* MAIN CONTENT */
.main-content { width: 100%; max-width: 1400px; margin: 0 auto; padding: 2rem 2.5rem; box-sizing: border-box; }
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.25rem; color: var(--text); }
.page-sub { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1.75rem; }

/* METRICS */
.metrics-row { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric-card {
  background: var(--bg-glass); backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s;
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 30px; height: 2px; background: var(--green);
  border-radius: 0 0 2px 0;
}
.metric-card:hover { border-color: var(--glass-border-hover); }
.mc-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mc-val { font-size: 1.3rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-family: var(--font-mono); }
.mc-change { font-family: var(--font-mono); font-size: 0.68rem; margin-top: 0.2rem; color: var(--text-tertiary); }
.mc-change.up { color: var(--positive); }
.mc-change.down { color: var(--negative); }

/* PANELS */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.panel {
  background: var(--bg-glass); backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.15s;
  position: relative; overflow: hidden;
}
.panel::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
}
.panel:hover { border-color: var(--glass-border-hover); }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.panel-meta { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-tertiary); }

/* COIN TABLE */
.coin-table { width: 100%; border-collapse: collapse; }
.coin-table th {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-tertiary);
  text-align: left; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--glass-border);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.coin-table td { padding: 0.6rem 0.85rem; font-size: 0.82rem; border-bottom: 1px solid var(--glass-border); color: var(--text-secondary); }
.coin-table tr:last-child td { border-bottom: none; }
.coin-table tr:hover td { background: rgba(46,184,92,0.04); }
.coin-name { display: flex; align-items: center; gap: 0.5rem; color: var(--text); }
.coin-sym { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-tertiary); }
.up { color: var(--positive); }
.down { color: var(--negative); }
.mini-bar { width: 60px; height: 22px; display: inline-block; }
.mini-bar svg { width: 100%; height: 100%; }

/* SENTIMENT */
.sentiment-bar { height: 4px; border-radius: 2px; background: var(--bg-hover); overflow: hidden; margin: 0.4rem 0; }
.sentiment-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--negative), var(--warning) 50%, var(--positive)); transition: width 0.4s; }
.sentiment-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); }

/* WHALE FEED */
.whale-item { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border); }
.whale-item:last-child { border-bottom: none; }
.whale-icon { font-size: 0.88rem; flex-shrink: 0; margin-top: 2px; }
.whale-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.whale-text strong { color: var(--text); }
.whale-time { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); margin-top: 0.15rem; }
.whale-dot-buy  { color: var(--positive); }
.whale-dot-sell { color: var(--negative); }
.whale-dot-move { color: var(--warning); }

/* FEAR & GREED */
.fg-gauge { display: flex; flex-direction: column; align-items: center; padding: 0.7rem 0; }
.fg-number { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--text); font-family: var(--font-mono); }
.fg-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-tertiary); margin-top: 0.3rem; }
.fg-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.65rem; text-align: center; line-height: 1.5; }

/* TICKER */
.ticker-wrap {
  overflow: hidden; background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.38rem 0; white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  animation: ticker 30s linear infinite;
  font-family: var(--font-mono); font-size: 0.72rem;
}
.ticker-track:hover { animation-play-state: paused; }
.tick-item { margin-right: 2.5rem; color: var(--text-tertiary); }
.tick-sym { color: var(--text); font-weight: 500; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTION TABS */
.section-tabs {
  display: flex; gap: 0; margin-bottom: 1.5rem;
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px; padding: 3px; width: fit-content;
}
.section-tab {
  padding: 0.42rem 1.1rem; border-radius: 999px; cursor: pointer;
  font-size: 0.8rem; font-weight: 500; transition: background 0.15s, color 0.15s;
  color: var(--text-secondary); border: none; background: none;
  font-family: var(--font-display); display: flex; align-items: center; gap: 0.45rem;
}
.section-tab:hover { color: var(--text); }
.section-tab.active { background: var(--green-dim); color: var(--green); font-weight: 600; }
.section-tab .tab-icon { font-size: 0.85rem; }

/* SECTION PANELS */
.dash-section { display: none; }
.dash-section.active { display: block; }

/* SECTION HEADER */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.5rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}
.section-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.section-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* SUBSECTION PILLS */
.subsection-pills { display: flex; gap: 0.4rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.sub-pill {
  padding: 0.28rem 0.8rem; border-radius: 999px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  border: 1px solid var(--glass-border); color: var(--text-tertiary);
  background: transparent; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sub-pill:hover { border-color: var(--glass-border-hover); color: var(--text); background: var(--bg-hover); }
.sub-pill.active { border-color: rgba(46,184,92,0.3); color: var(--green); background: var(--green-dim); }

/* WIDGET GRID */
.widget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.widget {
  background: var(--bg-glass); backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s; position: relative; overflow: hidden;
}
.widget::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 24px; height: 2px; background: var(--green);
  border-radius: 0 0 2px 0;
}
.widget:hover { border-color: var(--glass-border-hover); }
.widget-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.45rem; }
.widget-val { font-size: 1.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.025em; font-family: var(--font-mono); }
.widget-sub { font-family: var(--font-mono); font-size: 0.64rem; margin-top: 0.2rem; }
.widget-sub.up { color: var(--positive); }
.widget-sub.down { color: var(--negative); }
.widget-sub.neutral { color: var(--text-tertiary); }
.widget-accent { display: none; }

/* CHART PLACEHOLDER */
.chart-placeholder {
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem;
  position: relative; overflow: hidden;
}
.chart-placeholder::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
}
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.chart-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.chart-controls { display: flex; gap: 0.35rem; }
.chart-btn {
  font-family: var(--font-mono); font-size: 0.6rem; padding: 0.2rem 0.55rem;
  border-radius: 999px; border: 1px solid var(--glass-border);
  background: transparent; color: var(--text-tertiary); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chart-btn:hover, .chart-btn.active { border-color: rgba(46,184,92,0.3); color: var(--green); background: var(--green-dim); }
.chart-body { height: 180px; position: relative; }
.chart-svg { width: 100%; height: 100%; }

/* QUERY CONSOLE */
.query-console {
  background: var(--bg-secondary); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem;
}
.console-header {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem;
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}
.console-dot { width: 8px; height: 8px; border-radius: 50%; }
.console-title { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-secondary); margin-left: 0.25rem; letter-spacing: 0.06em; }
.console-body { padding: 1rem 1.25rem; }
.query-input-wrap { display: flex; gap: 0.7rem; margin-bottom: 0.85rem; }
.query-input {
  flex: 1; background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: 999px; padding: 0.5rem 0.9rem; color: var(--text);
  font-family: var(--font-mono); font-size: 0.78rem; outline: none; transition: border-color 0.15s;
}
.query-input:focus { border-color: rgba(46,184,92,0.4); }
.query-input::placeholder { color: var(--text-tertiary); }
.query-run {
  background: var(--green); border: none; border-radius: 999px;
  padding: 0.5rem 1.1rem; color: #000; font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.query-run:hover { background: var(--green-bright); box-shadow: var(--shadow-glow-green); }
.query-result {
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  font-family: var(--font-mono); font-size: 0.73rem; color: var(--text-secondary);
  line-height: 1.8; min-height: 80px;
}
.qr-key { color: var(--text-secondary); }
.qr-val { color: var(--positive); }
.qr-num { color: var(--warning); }
.query-templates { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.query-tpl {
  font-family: var(--font-mono); font-size: 0.6rem; padding: 0.2rem 0.55rem;
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.query-tpl:hover { border-color: var(--glass-border-hover); color: var(--text); }

/* PORTFOLIO */
.portfolio-header { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
.pf-stat {
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 1rem 1.2rem; position: relative; overflow: hidden;
}
.pf-stat::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 24px; height: 2px; background: var(--green);
  border-radius: 0 0 2px 0;
}
.pf-stat-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem; }
.pf-stat-val { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.025em; font-family: var(--font-mono); }
.pf-stat-val.green { color: var(--positive); }
.pf-stat-val.red { color: var(--negative); }
.pf-stat-val.white { color: var(--text); }
.pf-stat-sub { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-tertiary); margin-top: 0.18rem; }
.portfolio-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }

/* ALLOCATION */
.allocation-wrap { display: flex; gap: 1.5rem; align-items: flex-start; }
.donut-wrap { flex-shrink: 0; position: relative; width: 140px; height: 140px; }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.donut-center-val { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.donut-center-label { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-tertiary); text-transform: uppercase; }
.allocation-legend { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.alloc-row { display: flex; align-items: center; gap: 0.6rem; }
.alloc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.alloc-name { font-size: 0.8rem; color: var(--text); flex: 1; }
.alloc-pct { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }
.alloc-bar-wrap { flex: 1; height: 3px; background: var(--bg-hover); border-radius: 1px; overflow: hidden; }
.alloc-bar { height: 100%; border-radius: 1px; }

/* HOLDINGS TABLE */
.holdings-table { width: 100%; border-collapse: collapse; }
.holdings-table th { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--glass-border); text-transform: uppercase; letter-spacing: 0.08em; }
.holdings-table td { padding: 0.55rem 0.7rem; font-size: 0.82rem; border-bottom: 1px solid var(--glass-border); color: var(--text-secondary); }
.holdings-table tr:last-child td { border-bottom: none; }
.holdings-table tr:hover td { background: rgba(46,184,92,0.04); }
.h-coin { display: flex; align-items: center; gap: 0.5rem; }
.h-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; flex-shrink: 0; background: var(--bg-elevated); }

/* PERFORMANCE */
.perf-chart-wrap { height: 180px; position: relative; }
.perf-legend { display: flex; gap: 1rem; margin-top: 0.65rem; }
.perf-leg-item { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-secondary); }
.perf-leg-line { width: 18px; height: 2px; border-radius: 2px; }

/* ADD ASSET */
.add-asset-panel {
  background: var(--bg-elevated); border: 1px dashed rgba(46,184,92,0.15);
  border-radius: var(--radius); padding: 1.1rem;
}
.add-asset-title { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.add-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.65rem; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 0.28rem; }
.form-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.form-input {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 0.45rem 0.8rem; color: var(--text);
  font-family: var(--font-display); font-size: 0.85rem; outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: rgba(46,184,92,0.4); }
.form-input::placeholder { color: var(--text-tertiary); }
.btn-add {
  background: var(--green); border: none; border-radius: var(--radius-sm);
  padding: 0.45rem 1.1rem; color: #000; font-weight: 600;
  font-family: var(--font-display); font-size: 0.82rem; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-add:hover { background: var(--green-bright); box-shadow: var(--shadow-glow-green); }

/* PERFORMANCE ROWS */
.perf-row { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border); }
.perf-row:last-child { border-bottom: none; }
.perf-coin { font-weight: 700; font-size: 0.85rem; color: var(--text); width: 50px; flex-shrink: 0; }
.perf-bar-track { flex: 1; height: 4px; background: var(--bg-hover); border-radius: 2px; overflow: visible; position: relative; }
.perf-bar-center { position: absolute; left: 50%; top: -2px; width: 1px; height: 8px; background: rgba(255,255,255,0.1); }
.perf-bar-fill { height: 100%; border-radius: 2px; position: absolute; top: 0; }
.perf-pct { font-family: var(--font-mono); font-size: 0.72rem; width: 55px; text-align: right; flex-shrink: 0; }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .widget-grid { grid-template-columns: repeat(2,1fr); }
  .portfolio-header { grid-template-columns: repeat(2,1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
  .add-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1.25rem 1.5rem; }
  .metrics-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .widget-grid { grid-template-columns: 1fr; }
  .section-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .section-tabs::-webkit-scrollbar { display: none; }
  .section-tab { flex-shrink: 0; justify-content: center; }
  .allocation-wrap { flex-direction: column; }
  .main-content { padding: 1rem; }
  .portfolio-header { grid-template-columns: 1fr 1fr; }
  .add-form { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(2,1fr); gap: 0.75rem; }
}
@media (max-width: 400px) {
  .metrics-row { grid-template-columns: 1fr; }
  .main-content { padding: 0.75rem; }
}

/* ─── CUSTOM DASHBOARD GRID ─── */
#dashGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 0 16px;
}
@media (max-width: 1024px) { #dashGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { #dashGrid { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, border-color 0.15s;
  position: relative;
}
.dash-card::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
}
.dash-card:hover { border-color: var(--glass-border-hover); }
.dash-card.dragging { opacity: 0.4; transform: scale(0.98); }
.dash-card.drag-over { border-color: rgba(46,184,92,0.5); box-shadow: 0 0 0 2px rgba(46,184,92,0.15); }

@keyframes squiggle {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(0.5deg); }
  75%       { transform: rotate(-0.5deg); }
}
.edit-mode .dash-card {
  border: 2px dashed rgba(46,184,92,0.3) !important;
  cursor: grab;
  animation: squiggle 0.3s ease-in-out infinite;
}
.edit-mode .dash-card:nth-child(even) { animation-delay: 0.15s; }
.edit-mode .dash-card.dragging { animation: none; cursor: grabbing; }

.dash-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 0;
}
.dash-card-title {
  font-family: var(--font-mono); font-size: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary);
}
.dash-card-controls { display: none; gap: 4px; }
.edit-mode .dash-card-controls { display: flex; }
.dash-card-body { padding: 6px 14px 14px; }

.dash-ctrl {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-tertiary); width: 22px; height: 22px;
  border-radius: 4px; cursor: pointer; font-size: 0.68rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.12s, color 0.12s; padding: 0;
}
.dash-ctrl:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.dash-remove:hover { border-color: rgba(230,90,79,0.4); color: var(--negative); }

.dash-toolbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.dash-toolbar-hint {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-tertiary); display: none;
}
.edit-mode-active .dash-toolbar-hint { display: block; }

.btn-edit-dash {
  padding: 0.38rem 0.9rem; border-radius: var(--radius-sm); font-size: 0.78rem;
  font-family: var(--font-display); cursor: pointer;
  border: 1px solid var(--glass-border); background: transparent; color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-edit-dash:hover { border-color: var(--glass-border-hover); color: var(--text); }
.btn-edit-dash.active { background: var(--green-dim); border-color: rgba(46,184,92,0.35); color: var(--green); font-weight: 600; }

.dash-add-card {
  border: 2px dashed rgba(255,255,255,0.08); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 100px; cursor: pointer;
  color: var(--text-tertiary); font-size: 0.82rem; font-family: var(--font-display);
  transition: border-color 0.15s, color 0.15s;
}
.dash-add-card:hover { border-color: rgba(46,184,92,0.35); color: var(--green); }

/* Add Widget Modal */
.modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1; background: var(--bg-elevated);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  width: min(600px, 90vw); max-height: 80vh; overflow-y: auto;
  padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: 1px solid var(--glass-border);
  color: var(--text-tertiary); width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--glass-border-hover); color: var(--text); }

.widget-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 0.75rem; }
.widget-option {
  background: var(--bg-glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 0.85rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.widget-option:hover { border-color: rgba(46,184,92,0.35); background: var(--bg-hover); }
.widget-option.disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.wo-icon { font-size: 1.3rem; margin-bottom: 0.35rem; }
.wo-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.wo-desc { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 0.2rem; line-height: 1.4; }
.wo-badge { font-family: var(--font-mono); font-size: 0.55rem; color: var(--green); margin-top: 0.3rem; }
