:root {
    --bg: #0f1317;
    --panel: #1b2127;
    --panel-2: #14181d;
    --text: #f2f2f2;
    --muted: #a9b4bf;
    --accent: #3367d6;
    --ok: #3c8038;
    --radius: 12px;
    --tap: 60px;
    --fs: 1rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
    max-width: 520px;
    margin: 0 auto;
    padding: 1rem;
}

h2 {
    margin: .5rem 0 1rem;
}

.card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

label {
    display: block;
    margin-top: 1rem;
    color: var(--muted);
}

input,
select,
textarea,
button {
    width: 100%;
    font-size: calc(var(--fs) * 1.05);
    border-radius: 10px;
    border: 1px solid transparent;
    padding: .6rem .8rem;
    color: var(--text);
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

input,
select,
textarea {
    background: #2a323b;
}

textarea {
    resize: vertical;
}

button {
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.row {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.row>.seg {
    flex: 1;
}

.seg {
    background: #444c56;
}

.seg.sel {
    outline: 2px solid #5bbdff;
}

.seg--green {
    background: var(--ok);
}

.monthbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.monthlabel {
    font-weight: 700;
    font-size: 1.2rem;
}

.nav {
    width: 3rem;
    background: #2a323b;
}

.txlist {
    margin-top: 1rem;
    max-height: 55vh;
    overflow-y: auto;
    background: var(--panel-2);
    border-radius: 10px;
    border: 1px solid #222;
}

.txlist .rowitem {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    padding: .5rem .8rem;
    border-bottom: 1px solid #222;
}

.txlist .rowitem:last-child {
    border-bottom: none;
}

.txlist .amt.pos {
    color: #7ceaa5;
}

.txlist .amt.neg {
    color: #ff9aa0;
}

.txlist .mono {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 2rem;
}

.zoom {
    width: 3.1rem;
    background: #2a323b;
    border: 1px solid #29323b;
}

.export {
    width: auto;
    min-width: 10rem;
}

/* Mobilförstoring */
@media (max-width: 520px),
(pointer:coarse) {
    :root {
        --fs: 1.12rem;
        --tap: 68px;
    }

    input,
    select,
    textarea,
    button {
        min-height: var(--tap);
    }
}