/* ---------- Design tokens (Claude-achtige warme, rustige stijl) ---------- */
:root {
  --bg: #FAF9F6;
  --bg-alt: #F0EEE6;
  --surface: #FFFFFF;
  --surface-sunken: #F5F3EC;
  --border: #E6E2D8;
  --border-strong: #D8D3C4;
  --text: #30291F;
  --text-muted: #6F6A5C;
  --text-faint: #98937F;
  --accent: #D97757;
  --accent-hover: #C4643F;
  --accent-soft: #F3E3D8;
  --accent-text: #7A3B1F;
  --success: #4F7942;
  --buy: #2F6FDE;
  --sell: #D9822B;
  --success-soft: #E6EFDF;
  --danger: #C0392B;
  --danger-soft: #F8E3E0;
  --warn: #9A6B14;
  --warn-soft: #F5EBD3;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(48, 41, 31, 0.06);
  --shadow: 0 4px 16px rgba(48, 41, 31, 0.08);
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #21201C;
    --bg-alt: #2A2822;
    --surface: #2A2822;
    --surface-sunken: #24231F;
    --border: #3B382F;
    --border-strong: #4A4638;
    --text: #EDE9DD;
    --text-muted: #B0AA97;
    --text-faint: #837D6A;
    --accent: #E28B6D;
    --accent-hover: #EDA486;
    --accent-soft: #3D2A21;
    --accent-text: #F0B79A;
    --buy: #6C9BF0;
    --sell: #EBA04F;
    --success-soft: #26301F;
    --danger-soft: #3A211E;
    --warn-soft: #362D19;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}
p { margin: 0 0 8px; }
a { color: var(--accent-text); }
button, input, select { font-family: inherit; font-size: inherit; }
svg.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.boot-loader { display: flex; align-items: center; justify-content: center; height: 100vh; }
.boot-mark {
  width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-size: 28px; display: flex; align-items: center;
  justify-content: center; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .7; transform: scale(.94); } }

/* ---------- Auth screens ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 20% 0%, var(--accent-soft), transparent 55%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600;
}
.auth-brand span { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.auth-card h1 { font-size: 22px; }
.auth-card .sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.auth-switch button { background: none; border: none; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; }

/* ---------- Form elements ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s;
}
a.btn { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-sunken); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { opacity: .85; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- App shell ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--bg-alt); border-right: 1px solid var(--border);
  display: none; flex-direction: column; padding: 20px 14px;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; }
.sidebar .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; }
.sidebar .brand span { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.nav-link:hover { background: var(--surface-sunken); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
/* Inklapbaar zijmenu (desktop): ingeklapt blijven alleen de iconen over */
.sidebar { transition: width .18s ease; }
.sidebar-toggle { margin-bottom: 8px; }
.layout.sidebar-collapsed .sidebar { width: 68px; padding: 20px 10px; }
.layout.sidebar-collapsed .sidebar .brand { padding: 6px 0 14px; justify-content: center; }
.layout.sidebar-collapsed .sidebar .brand span,
.layout.sidebar-collapsed .sidebar .nav-link span,
.layout.sidebar-collapsed .sidebar .user-email { display: none; }
.layout.sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: 10px 0; }
.sidebar .spacer { flex: 1; }
.sidebar .user-box { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }
.sidebar .user-email { font-size: 12.5px; color: var(--text-faint); padding: 0 12px 8px; word-break: break-all; }

.main { flex: 1; min-width: 0; padding-bottom: 76px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5;
}
.topbar .brand-mobile { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; }
.topbar .brand-mobile .mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.page { padding: 22px 20px 40px; max-width: 980px; margin: 0 auto; }
.page-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; }
.page-header .sub { color: var(--text-muted); font-size: 13.5px; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--surface);
  border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}
.bottom-nav .nav-link { flex-direction: column; gap: 3px; font-size: 11px; text-align: center; padding: 6px 4px; }
.bottom-nav .nav-link.active { background: none; }
.bottom-nav .nav-link.active svg { stroke: var(--accent); }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .bottom-nav { display: none; }
  .main { padding-bottom: 0; }
  .topbar { display: none; }
  .page { padding: 34px 40px 50px; max-width: 1080px; }
  .page.page-wide { max-width: 1640px; }
}

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 15px; margin-bottom: 12px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--danger); }
.stat-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }

.coin-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.clickable-card { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.clickable-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.stat-grid-2 { grid-template-columns: 1fr 1fr; }
/* Dashboard: telefoon/smal = alles onder elkaar; vanaf 1280 px twee kolommen (portefeuille + verkopen | open posities) */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
.dash-col { min-width: 0; }
.dash-col > .card, .dash-col > .dash-stats { margin-bottom: 14px; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-stats .dash-free { grid-column: 1 / -1; }
.dash-stats .card { padding: 16px; }
@media (min-width: 768px) {
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-stats .dash-free { grid-column: auto; }
}
.sell-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.sell-row:first-of-type { border-top: none; }
@media (max-width: 1279px) {
  .dash-grid { display: flex; flex-direction: column; }
  .dash-col { display: contents; }
  .recent-sells { order: 1; }
}
@media (min-width: 1280px) {
  .dash-grid { grid-template-columns: minmax(380px, 5fr) minmax(0, 7fr); }
  .dash-col .coin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.stat-sub-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.stat-sub-row span:last-child { text-align: right; }
.coin-card h2 { margin-bottom: 0; font-size: 16px; }
.sparkline-wrap { margin: 10px 0 2px; }
.chart-host { width: 100%; }
.sparkline { width: 100%; height: auto; display: block; touch-action: pan-y; cursor: crosshair; }
.sparkline-label { font-size: var(--chart-fs, 9px); fill: var(--text-faint); font-family: var(--font-ui); pointer-events: none; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-target { stroke: var(--success); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart-target-label { fill: var(--success); font: 600 var(--chart-fs, 9px) var(--font-ui); pointer-events: none; }
.chart-dash { width: 14px; height: 0; border-top: 2px dashed var(--success); display: inline-block; }
.chart-marker { stroke: var(--surface); stroke-width: 2; }
.chart-marker.buy { fill: var(--buy); }
.chart-marker.sell { fill: var(--sell); }
.chart-live-dot { stroke: var(--surface); stroke-width: 1.5; }
.chart-live-ring { transform-box: fill-box; transform-origin: center; animation: chart-pulse 1.8s ease-out infinite; }
@keyframes chart-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3.6); opacity: 0; } }
.chart-cursor { pointer-events: none; }
.chart-cursor-line { stroke: var(--text-faint); stroke-width: 1; }
.chart-cursor-dot { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.chart-tip-bg { fill: var(--text); opacity: .92; }
.chart-tip-price { fill: var(--bg); font: 600 10px var(--font-ui); }
.chart-tip-time { fill: var(--bg); opacity: .75; font: 400 9px var(--font-ui); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 11.5px; color: var(--text-faint); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.chart-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chart-dot.buy { background: var(--buy); }
.chart-dot.sell { background: var(--sell); }
.chart-dot.live { background: var(--success); animation: chart-blink 1.8s ease-in-out infinite; }
@keyframes chart-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(79, 121, 66, .5); } 60% { box-shadow: 0 0 0 6px rgba(79, 121, 66, 0); } }
@media (prefers-reduced-motion: reduce) { .chart-live-ring, .chart-dot.live { animation: none; } .chart-live-ring { display: none; } }
.sparkline-empty {
  height: 120px; margin: 10px 0 2px; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 12px; background: var(--surface-sunken); border-radius: var(--radius-sm);
  text-align: center; padding: 0 10px;
}
.coin-metrics { display: flex; flex-direction: column; margin-top: 8px; }
.coin-metrics .row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.coin-metrics .row .label { color: var(--text-muted); }
.coin-metrics .row .value { font-weight: 600; text-align: right; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-idle { background: var(--surface-sunken); color: var(--text-muted); }
.badge-holding { background: var(--accent-soft); color: var(--accent-text); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-trend-up { background: var(--success-soft); color: var(--success); }
.badge-trend-down { background: var(--danger-soft, #f6dcd6); color: var(--danger); }
.badge-trend-sideways { background: var(--surface-sunken); color: var(--text-muted); }
.trend-gauge { position: relative; height: 8px; border-radius: 100px; background: linear-gradient(90deg, var(--danger) 0%, var(--surface-sunken) 35%, var(--surface-sunken) 65%, var(--success) 100%); opacity: .85; }
.trend-marker { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.trend-gauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.trend-reasons { margin: 14px 0 0; padding-left: 18px; font-size: 14px; color: var(--text); line-height: 1.5; }
.badge-admin { background: var(--accent-soft); color: var(--accent-text); }

.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 28px 0 12px; }
.section-title:first-child { margin-top: 0; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; background: var(--surface-sunken); }
tr:last-child td { border-bottom: none; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.empty-state .icon-wrap { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-sunken); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

.log-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.log-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-sunken); font-size: 13px; }
.log-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.log-item.log-success .dot { background: var(--success); }
.log-item.log-error .dot { background: var(--danger); }
.log-item.log-warn .dot { background: var(--warn); }
.log-item.log-info .dot { background: var(--text-faint); }
.log-item time { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }

.toast-wrap { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: 92%; max-width: 380px; }
@media (min-width: 1024px) { .toast-wrap { bottom: 24px; } }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow); }
.toast-error { background: var(--danger); color: #fff; }
.toast-success { background: var(--success); color: #fff; }

.form-card { max-width: 520px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 100px; transition: background .15s; cursor: pointer; }
.switch .track::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled + .track { opacity: .5; cursor: not-allowed; }

.key-display { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-family: monospace; font-size: 13.5px; }
.key-display span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }

.install-banner {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 45;
  width: 92%; max-width: 480px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text);
}
.install-banner span { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; }
@media (min-width: 1024px) { .install-banner { bottom: 24px; } }

.divider { height: 1px; background: var(--border); margin: 22px 0; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
.btn-secondary .spinner, .btn-danger .spinner { border-color: var(--border-strong); border-top-color: var(--text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Melding bovenin bij aankoop/verkoop ---------- */
.trade-banner-wrap {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 60; width: 94%; max-width: 460px; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.trade-banner {
  pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); font-size: 13.5px; animation: trade-banner-in .25s ease-out;
}
.trade-banner-buy { background: var(--accent-soft); color: var(--accent-text); }
.trade-banner-sell { background: var(--success-soft); color: var(--success); }
.trade-banner-detail { font-size: 12.5px; opacity: .9; margin-top: 2px; overflow-wrap: anywhere; }
.trade-banner-close { background: none; border: none; color: inherit; cursor: pointer; padding: 4px; display: flex; opacity: .7; }
.trade-banner-out { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
@keyframes trade-banner-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* Schakelaar voor de periode van de grafieken (12u / 24u) */
.range-toggle { display: inline-flex; background: var(--surface-sunken); border-radius: 100px; padding: 3px; gap: 2px; flex-shrink: 0; }
.range-toggle button { border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 100px; cursor: pointer; }
.range-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Kansen */
.opp-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.opp-score { font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.opp-score strong { font-size: 22px; color: var(--text); font-family: 'Fraunces', serif; }
.opp-meter { height: 6px; border-radius: 100px; background: var(--surface-sunken); margin-bottom: 12px; overflow: hidden; }
.opp-meter span { display: block; height: 100%; border-radius: 100px; background: var(--accent); }
.opp-warnings { margin-top: 8px; color: var(--warn); }

/* Submenu met tabs (Instellingen | Transacties | Beheer) */
.subtabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.subtab { padding: 9px 14px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--accent-text); border-bottom-color: var(--accent); }

/* Bevestigingsvenster (bv. Verkopen) */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 26, 20, .55); }
.modal { width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.modal h2 { margin: 0; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; margin: 6px 0; cursor: pointer; }
.check-row input { margin-top: 3px; }
.modal .hint { font-size: 12.5px; color: var(--text-faint); line-height: 1.45; }

/* Prijswatch */
.pw-form { display: grid; gap: 12px; max-width: 460px; }
.pw-form .field { margin: 0; }
.pw-repeat { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.pw-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border, rgba(128,128,128,.25)); }
.pw-row:first-child { border-top: 0; }
.pw-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Muntpagina: op desktop twee kolommen (grafiek + richting | instellingen + laatste transactie); activiteit en knoppen eronder over de volle breedte */
.coin-detail-col { min-width: 0; }
@media (min-width: 1100px) {
  .coin-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
}
