.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 300px;
}

.dash-inputs {
    padding: 28px;
    border-right: 1px solid var(--border);
}

.dash-inputs-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
}

.field-full {
    grid-column: 1 / -1;
}

.dash-highlight {
    background: linear-gradient(155deg, #0a3528 0%, #155c40 100%);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hl-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
}

.hl-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.hl-value-sm {
    font-size: 1.75rem;
    font-weight: 800;
    color: #5dd6a8;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hl-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.38);
    margin-top: 3px;
}

.hl-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 18px 0;
}

.hl-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hl-row-label {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
}

.hl-row-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
}

.hl-ad {
    text-align: center;
}


.card-body {
    padding: 24px 24px 0;
}

.split-bar-dot--primary { background: var(--primary); }
.split-bar-dot--accent  { background: var(--accent); }

.hl-ad-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 10px;
}

.hl-ad-btn {
    display: inline-block;
    background: #d4af37;
    color: #0b3b2a;
    padding: 9px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    transition: opacity 0.15s, transform 0.15s;
    margin-bottom: 8px;
}

.hl-ad-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* Ad slot shown as a deliberate, styled placeholder */
.hl-ad-btn.hl-ad-btn--placeholder {
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    border: 1.5px dashed rgba(255, 255, 255, 0.22);
    box-shadow: none;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: default;
    pointer-events: none;
}

.hl-ad-btn.hl-ad-btn--placeholder:hover {
    opacity: 1;
    transform: none;
}

.hl-ad-disclosure {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.32);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field {
    margin-bottom: 14px;
}

.field:last-of-type {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.field input,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 144, 103, 0.14);
}

.field input.input-warning {
    border-color: var(--error-border);
    background: var(--error-bg);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.09);
}

.field-hint {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 5px;
}

.field-hint.warning {
    color: var(--error-text);
    font-weight: 600;
}

.reset-btn {
    width: 100%;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-strong);
    background: transparent;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--primary-light);
}

.tbl-wrap {
    overflow: auto;
    max-height: 500px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

thead th {
    position: sticky;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 11px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: right;
    z-index: 2;
}

thead th:first-child {
    text-align: center;
}

tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    text-align: right;
    color: var(--ink);
}

tbody td:first-child {
    text-align: center;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.8rem;
}

tbody tr:nth-child(even) {
    background: var(--surface-alt);
}

tbody tr:hover {
    background: var(--primary-light);
}

.tbl-note {
    padding: 12px 20px;
    font-size: 0.77rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
}

@media (max-width: 820px) {
    .dashboard-card {
        grid-template-columns: 1fr;
    }

    .dash-inputs {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 600px) {
    .fields-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: 1;
    }

    .hl-value {
        font-size: 2rem;
    }

    .hl-value-sm {
        font-size: 1.45rem;
    }

    /* Skjul gebyrerkolonnen på mobil – vises sjelden og smalner inn tabellen */
    table thead th:nth-child(4),
    table tbody td:nth-child(4) {
        display: none;
    }

    /* Scroll-gradient som antyder at tabellen kan scrolles horisontalt */
    .tbl-wrap {
        background:
            linear-gradient(to right, var(--surface) 0%, transparent 5%),
            linear-gradient(to left,  var(--surface) 0%, transparent 5%)
            center / 100% 100%;
        background-attachment: local, local;
    }
}
