/* StockDash — dark theme */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0f1117;
    --surface:   #1a1d27;
    --surface2:  #22263a;
    --border:    #2a2e44;
    --text:      #e2e8f0;
    --muted:     #64748b;
    --primary:   #6366f1;
    --primary-h: #818cf8;
    --success:   #10b981;
    --danger:    #ef4444;
    --warn:      #f59e0b;
    --radius:    10px;
    --radius-sm: 6px;
}

html { font-size: 15px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}
.navbar-brand:hover { color: var(--primary-h); }
.navbar-right { display: flex; align-items: center; gap: 1rem; }
.navbar-user { color: var(--muted); font-size: 0.85rem; }
.navbar-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.navbar-link:hover, .navbar-link.active { color: var(--text); }

/* ── Navbar search ── */
.navbar-search { position: relative; }
.navbar-search input {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.8rem;
    padding: .3rem .75rem;
    width: 180px;
    outline: none;
    transition: border-color .15s, width .2s;
}
.navbar-search input:focus { border-color: var(--primary); width: 220px; }
.navbar-search input::placeholder { color: var(--muted); }
.navbar-search .suggestions-dropdown { min-width: 240px; }

/* ── Main content ── */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
    background: none;
    color: var(--text);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--muted); }
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
    background: none;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    line-height: 0;
}
.btn-danger-icon { color: var(--muted); }
.btn-danger-icon:hover { color: var(--danger); background: rgba(239,68,68,0.12); }
.btn-edit-icon { color: var(--muted); }
.btn-edit-icon:hover { color: var(--danger); background: rgba(239,68,68,0.12); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
input[type="text"], input[type="email"],
input[type="password"], input[type="number"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}
input:focus { border-color: var(--primary); }
input::placeholder { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; }
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* ── Auth pages ── */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 400px;
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted); }
.auth-switch a { color: var(--primary); }

/* ── Alerts ── */
.alert {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}
.alert-success {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #6ee7b7;
}

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.page-sub { color: var(--muted); font-size: 0.875rem; margin-top: 0.2rem; }
.back-link {
    font-size: 0.8rem;
    color: var(--muted);
    display: block;
    margin-bottom: 0.35rem;
}
.back-link:hover { color: var(--text); }

/* ── Summary bar ── */
.summary-bar {
    display: flex;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.summary-item {
    flex: 1;
    background: var(--surface);
    padding: 0.9rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.summary-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.summary-value { font-size: 1.1rem; font-weight: 600; }
.period-bar { margin-top: 0.5rem; }
.period-bar .summary-value { font-size: 0.95rem; }
.period-note-item { justify-content: flex-end; flex: 0 0 auto; padding-right: 1rem; }
.period-note { font-size: 0.72rem; color: var(--muted); font-style: italic; align-self: flex-end; padding-bottom: 0.75rem; }

/* ── Pots grid ── */
.pots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.pot-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    border-top: 3px solid var(--pot-colour, var(--primary));
}
.pot-card:hover {
    border-color: var(--pot-colour, var(--primary));
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    color: var(--text);
}
.pot-card-header { display: flex; align-items: center; gap: 0.5rem; }
.pot-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pot-dot-lg {
    width: 14px; height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.pot-name { font-weight: 600; flex: 1; font-size: 0.95rem; }
.pot-count { font-size: 0.75rem; color: var(--muted); }
.pot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.pot-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.pot-stat-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pot-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.pot-stat-value small { font-size: 0.75rem; font-weight: 400; }
.pot-tickers { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ticker-chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.03em;
}
.ticker-chip.muted { color: var(--muted); }

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.card-title { font-size: 1rem; font-weight: 600; }
.chart-card { padding-bottom: 1rem; }

/* ── Data table ── */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.action-cell { text-align: right; width: 40px; }
.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sort-th:hover { color: var(--text); }
.sort-th::after { content: ' ↕'; opacity: 0.35; font-size: 0.7em; }
.sort-th.asc::after  { content: ' ↑'; opacity: 0.8; }
.sort-th.desc::after { content: ' ↓'; opacity: 0.8; }
.holding-name { font-size: 0.78rem; color: var(--muted); margin-top:.2rem; }
.symbol-badge {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
a.symbol-link {
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
a.symbol-link:hover {
    border-color: var(--primary);
    color: var(--primary-h);
}

/* ── Inline edit row ── */
.edit-row td { background: var(--surface2); padding: 0.75rem; }
.inline-edit-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.inline-edit-form .form-group label { font-size: 0.78rem; }

/* ── Add holding form ── */
.add-holding-form {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}
.add-holding-form h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.holding-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.holding-form-row .form-group { flex: 1; min-width: 120px; }
.form-group-btn { flex: 0 0 auto; }
.empty-hint { color: var(--muted); font-size: 0.875rem; padding: 0.5rem 0 1rem; }

/* ── Symbol autocomplete ── */
.symbol-input-wrap { position: relative; }
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    z-index: 50;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    overflow: hidden;
}
.suggestion-item {
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.suggestion-item:hover { background: var(--surface2); }
.suggestion-item strong { color: var(--text); }
.suggestion-item span { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Form card ── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-card form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Colour picker ── */
.colour-picker-row { display: flex; align-items: center; gap: 0.75rem; }
.colour-picker-row input[type="color"] {
    width: 40px; height: 36px;
    padding: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface2);
    cursor: pointer;
}
.colour-swatches { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.swatch {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.1s;
}
.swatch:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.3); }

/* ── Divider & danger zone ── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}
.danger-zone {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.danger-zone h3 { font-size: 0.875rem; font-weight: 600; color: var(--danger); }
.danger-zone p { font-size: 0.85rem; color: var(--muted); }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.empty-state svg { opacity: 0.4; }
.empty-state h2 { font-size: 1.1rem; color: var(--text); }
.empty-state p { font-size: 0.875rem; max-width: 300px; }

/* ── Currency toggle ── */
.currency-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.cur-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-right: 1px solid var(--border);
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.cur-btn:last-child { border-right: none; }
.cur-btn:hover { background: var(--surface2); color: var(--text); }
.cur-btn.active { background: var(--primary); color: #fff; }

/* ── Brokerage ── */
.page-sub-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}
.brokerage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}
.brokerage-group { margin-bottom: 2rem; }
.cash-badge {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 4px;
    padding: 0.1rem 0.5rem;
    letter-spacing: 0;
    text-transform: none;
}
.cash-badge-label { font-weight: 400; color: var(--muted); margin-left: 0.2rem; }
.brokerage-group-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.brokerage-total {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
}

/* ── View toggle ── */
.view-toggle { display: flex; gap: .25rem; }
.view-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    padding: .35rem .6rem;
    font-size: .9rem;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
}
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Compact view ── */
.compact-group { margin-bottom: .5rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compact-group-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1rem;
    cursor: pointer;
    user-select: none;
    background: var(--surface);
    font-size: .85rem;
    font-weight: 600;
    transition: background .12s;
}
.compact-group-header:hover { background: var(--surface2); }
.compact-chevron {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform .2s;
    font-style: normal;
}
.compact-group.open .compact-chevron { transform: rotate(90deg); }
.compact-group-name { color: var(--text); text-transform: none; letter-spacing: 0; }
.compact-group-meta { color: var(--muted); font-weight: 400; font-size: .78rem; }
.compact-group-value { margin-left: auto; font-weight: 700; color: var(--text); font-size: .9rem; }
.compact-group-body { display: none; border-top: 1px solid var(--border); }
.compact-group.open .compact-group-body { display: block; }
.compact-pot-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1rem .55rem 2.25rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
    transition: background .1s;
}
.compact-pot-row:last-child { border-bottom: none; }
.compact-pot-row:hover { background: var(--surface2); }
.compact-pot-name { flex: 1 1 140px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-pot-stocks { flex-shrink: 0; color: var(--muted); font-size: .78rem; width: 60px; }
.compact-pot-value { flex-shrink: 0; width: 90px; text-align: right; font-weight: 600; }
.compact-pot-today { flex-shrink: 0; width: 110px; text-align: right; font-size: .8rem; }
.compact-pot-gain  { flex-shrink: 0; width: 110px; text-align: right; font-size: .8rem; }

/* ── Stocks page pot chips ── */
.pot-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pot-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.pot-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ── Gain / loss colours ── */
.positive { color: var(--success); }
.negative { color: var(--danger); }
.muted    { color: var(--muted); }

/* ── CSV Import ── */
.import-card { max-width: 640px; gap: 1.5rem; }

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
}
.drop-zone input[type="file"] { display: none; }
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
}
.drop-zone.has-file {
    border-color: var(--success);
    background: rgba(16,185,129,0.05);
}
.drop-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: 0.25rem; }
.drop-sub   { font-size: 0.875rem; }
.drop-browse { color: var(--primary); cursor: pointer; text-decoration: underline; }
.drop-browse:hover { color: var(--primary-h); }
.drop-hint  { font-size: 0.78rem; }
.drop-filename { font-size: 0.85rem; color: var(--success); font-weight: 500; min-height: 1.2em; }

.import-tips { background: var(--surface2); border-radius: var(--radius-sm); padding: 1rem 1.25rem; }
.import-tips h3 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; }
.tip-cols { display: flex; gap: 1rem; flex-wrap: wrap; }
.tip-col  { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 0.3rem; }
.tip-col p { font-size: 0.8rem; color: var(--muted); }
.tip-col code { background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; font-size: 0.78rem; }

.tip-badge {
    display: inline-block;
    border-radius: 4px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tip-badge-primary  { background: rgba(99,102,241,0.2);  color: #a5b4fc; }
.tip-badge-success  { background: rgba(16,185,129,0.2);  color: #6ee7b7; }
.tip-badge-warn     { background: rgba(245,158,11,0.2);  color: #fcd34d; }
.tip-badge-invested { background: rgba(20,184,166,0.2);  color: #5eead4; }

/* ── Column mapping ── */
:root { --invested: #14b8a6; }
.map-card  { max-width: 860px; gap: 1.5rem; }
.map-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.map-field { display: flex; flex-direction: column; gap: 0.4rem; }
.map-field label { font-size: 0.85rem; }
.map-field select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    width: 100%;
}
.map-field select:focus { border-color: var(--primary); }
.map-hint { font-size: 0.78rem; color: var(--muted); }
.required { color: var(--danger); }
.optional-tag { font-size: 0.72rem; color: var(--muted); margin-left: 0.3rem; font-weight: 400; }
.optional-note {
    font-size: 0.8rem;
    color: var(--muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface2);
    border: 1px solid var(--border);
}
.optional-note-warn {
    color: #fcd34d;
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.3);
}

.preview-section { margin-top: 0.5rem; }
.preview-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ── Currency section ── */
.currency-section {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.currency-section-title { font-size: 0.875rem; font-weight: 600; }
.currency-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gbx-note {
    font-size: 0.8rem;
    color: #fcd34d;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
}
.stored-as-col {
    background: rgba(16,185,129,0.06);
    border-left: 2px solid rgba(16,185,129,0.3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success);
    white-space: nowrap;
}
.stored-as-cell {
    border-left: 2px solid rgba(16,185,129,0.15);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (max-width: 480px) { .currency-row { grid-template-columns: 1fr; } }

@media (max-width: 700px) {
    .map-grid { grid-template-columns: repeat(2, 1fr); }
    .tip-cols { flex-direction: column; }
}
@media (max-width: 480px) {
    .map-grid { grid-template-columns: 1fr; }
}

/* ── Skipped rows ── */
.skipped-card {
    border-color: rgba(245,158,11,0.4);
    background: rgba(245,158,11,0.04);
}
.skipped-title {
    color: var(--warn);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.skipped-hint { font-size: 0.8rem; color: var(--muted); }
.skip-reason {
    font-size: 0.78rem;
    color: var(--warn);
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .summary-bar { flex-wrap: wrap; }
    .summary-item { min-width: 50%; }
    .pots-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem; }
    .form-card { padding: 1.25rem; }
    .holding-form-row { flex-direction: column; }
    .holding-form-row .form-group { min-width: 100%; }
    .page-header { flex-direction: column; }
}
