﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.panel,
.sales-card {
    position: relative;
}

/* =========================
   TOOL SELECTOR (pill / segmented control)
========================= */

.tool-selector {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #eef2f7;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    margin-bottom: 16px;
}

.tool-pill {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    font-size: clamp(0.74rem, 3vw, 0.95rem);
    padding: 10px 4px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

    .tool-pill:hover {
        color: var(--text);
    }

    .tool-pill.is-active {
        background: #fff;
        color: var(--blue-dark);
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14), 0 1px 2px rgba(15, 23, 42, 0.08);
    }

    .tool-pill:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    }

/* =========================
   TOOL HEADER ROW
   Rubrik + sekundär kontroll (t.ex. Multipris läges-toggle).
   Desktop: sida vid sida. Smartphone: staplat, toggle på hela bredden.
========================= */

.tool-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 8px;
}

    .tool-header-row .tool-title {
        margin: 0;
        flex: 1 1 auto;
        min-width: 0;
    }

/* =========================
   MODE SELECTOR (sekundär tvåläges segmented control,
   t.ex. Simulator | Eget multipris)
   Samma visuella språk som .tool-selector men mindre/tystare,
   för att kännas underordnad huvudnavigationen.
========================= */

.mode-selector {
    display: inline-flex;
    flex-shrink: 0;
    gap: 3px;
    padding: 3px;
    background: #eef2f7;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

.mode-pill {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

    .mode-pill:hover {
        color: var(--text);
    }

    .mode-pill.is-active {
        background: #fff;
        color: var(--blue-dark);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    }

    .mode-pill:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    }

.mode-panel[hidden] {
    display: none;
}

/* Smartphone: rubrik och toggle bredvid varandra blir för trångt —
   stapla dem och låt togglen ta hela bredden med jämnstora segment. */
@media (max-width: 640px) {
    .tool-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-selector {
        display: flex;
        width: 100%;
    }
}

/* =========================
   TOOL CONTENT (shared card + panels)
========================= */

.tool-content {
    overflow: hidden;
}

.tool-panel[hidden] {
    display: none;
}

.tool-title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.2;
    font-weight: 800;
    word-break: break-word;
}

.tool-description {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 60ch;
}

.result-figure {
    font-size: clamp(1.4rem, 3.2vw, 1.9rem);
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

    .result-figure.is-negative {
        color: var(--danger-text);
    }

.waste-stats {
    margin-top: 0;
}

.waste-breakeven strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.95rem;
}

.mini-calculator-title {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.mini-calculator + .mini-calculator {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-soft);
}

.formula-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px dashed var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.calculator-page {
    min-height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 16px;
}

.calculator-card {
    width: 100%;
    max-width: 320px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.calculator-title {
    margin: 0 0 20px;
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

.calculator-field {
    margin-bottom: 16px;
}

    .calculator-field label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #475569;
    }

    .calculator-field input {
        width: 100%;
        padding: 16px 18px;
        border: 1px solid #d1d5db;
        border-radius: 16px;
        font-size: 18px;
        background: #f9fafb;
        color: #111827;
        outline: none;
        transition: 0.2s ease;
    }

        .calculator-field input:focus {
            border-color: #22c55e;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
        }

.calculator-btn {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.25);
}

    .calculator-btn:hover {
        transform: translateY(-1px);
    }

.calculator-result {
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: 0.2s ease;
}

.result-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.result-value {
    font-size: 28px;
    font-weight: 700;
    color: #16a34a;
}

.calculator-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

:root {
    --bg: #f5f7fb;
    --panel-bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #d1d5db;
    --border-soft: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --green: #16a34a;
    --green-dark: #15803d;
    --danger-bg: #fee2e2;
    --danger-text: #b91c1c;
    --badge-bg: #dbeafe;
    --badge-text: #1d4ed8;
    --result-bg: #eff6ff;
    --shadow: 0 10px 25px rgba(0,0,0,0.05);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.sales-dashboard {
    width: 100%;
}

.dashboard-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px);
}

.dashboard-header {
    margin-bottom: clamp(16px, 2vw, 24px);
}

.dashboard-eyebrow {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.dashboard-title {
    margin: 0 0 8px 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.1;
    font-weight: 800;
    word-break: break-word;
}

.dashboard-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.95rem, 2vw, 1rem);
    max-width: 65ch;
}

.panel {
    background: var(--panel-bg);
    border-radius: var(--radius-lg);
    padding: clamp(16px, 2.4vw, 24px);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.panel-header {
    margin-bottom: 16px;
}

    .panel-header h2,
    .table-topbar h2 {
        margin: 0;
        font-size: clamp(1.2rem, 2vw, 1.5rem);
    }

.calculator-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.calculator-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .calculator-group label {
        font-size: 0.9rem;
        font-weight: 600;
        color: #475569;
    }

    .calculator-group input {
        width: 100%;
    }

input,
select,
.table-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font: inherit;
}

    input:focus,
    select:focus,
    .table-input:focus {
        outline: none;
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

.primary-btn,
.secondary-btn,
.danger-btn {
    font: inherit;
}

.primary-btn {
    background: var(--blue);
    color: white;
    border: none;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

    .primary-btn:hover {
        background: var(--blue-dark);
        transform: translateY(-1px);
    }

.secondary-btn {
    background: var(--green);
    color: white;
    border: none;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

    .secondary-btn:hover {
        background: var(--green-dark);
        transform: translateY(-1px);
    }

.danger-btn {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    min-height: 40px;
}

.result-card {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--result-bg);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .result-card span {
        color: #334155;
    }

.table-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-topbar-text {
    min-width: 0;
    flex: 1 1 320px;
}

.table-subtitle {
    color: var(--muted);
    margin: 6px 0 0 0;
    font-size: 0.95rem;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .custom-table th {
        background: var(--text);
        color: white;
        padding: 12px 10px;
        text-align: left;
        font-size: 0.95rem;
    }

    .custom-table td {
        padding: 10px;
        border-top: 1px solid #eee;
        vertical-align: middle;
    }

        .custom-table th:nth-child(1),
        .custom-table td:nth-child(1) {
            width: 32%;
        }

        .custom-table th:nth-child(2),
        .custom-table td:nth-child(2),
        .custom-table th:nth-child(3),
        .custom-table td:nth-child(3) {
            width: 18%;
        }

        .custom-table th:nth-child(4),
        .custom-table td:nth-child(4) {
            width: 12%;
        }

        .custom-table th:nth-child(5),
        .custom-table td:nth-child(5) {
            width: 20%;
        }

.remaining-badge {
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    min-width: 48px;
    text-align: center;
}

@media (max-width: 992px) {
    .dashboard-shell {
        padding: 20px 16px;
    }

    .custom-table th:nth-child(1),
    .custom-table td:nth-child(1) {
        width: 28%;
    }

    .custom-table th:nth-child(5),
    .custom-table td:nth-child(5) {
        width: 22%;
    }
}

@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: visible;
    }

    .table-topbar {
        padding: 0 14px; /* 🔥 flytta padding hit istället */
    }

    .table-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
    }

        .table-actions button {
            width: 100%;
            height: 44px;
        }


    .custom-table {
        width: 100%;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }

        .custom-table thead {
            display: none;
        }

        .custom-table,
        .custom-table tbody,
        .custom-table tr,
        .custom-table td {
            display: block;
            width: 100%;
        }


            .custom-table tbody {
                display: flex;
                flex-direction: column;
                gap: 16px;
            }

            .custom-table tr {
                width: 100%;
                background: #fff;
                border: 1px solid #d9d9d9;
                padding: 20px 14px;
                border-radius: 0;
                box-shadow: none;
            }

            .custom-table td {
                width: 100% !important;
                padding: 0;
                margin: 0 0 14px 0;
                border: none;
            }

                .custom-table td:last-child {
                    margin-bottom: 0;
                }

                .custom-table td::before {
                    content: attr(data-label);
                    display: block;
                    text-align: center;
                    font-size: 0.95rem;
                    font-weight: 600;
                    color: #1f2937;
                    margin-bottom: 8px;
                }

                .custom-table td > input,
                .custom-table td > .table-input,
                .custom-table td > .article-name,
                .custom-table td > .article-target,
                .custom-table td > .article-current {
                    display: block;
                    width: 100% !important;
                    max-width: none !important;
                    min-width: 0 !important;
                    height: 52px;
                    margin: 0;
                    padding: 0 14px;
                    box-sizing: border-box;
                    border: 1px solid #dcdcdc;
                    border-radius: 0;
                    background: #fff;
                    text-align: center;
                    -webkit-appearance: none;
                    appearance: none;
                }

                .custom-table td > .remaining-badge {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 100% !important;
                    min-height: 52px;
                    padding: 0 14px;
                    box-sizing: border-box;
                    border-radius: 0;
                    text-align: center;
                }

                .custom-table td > .danger-btn {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 100% !important;
                    min-height: 52px;
                    padding: 0 14px;
                    box-sizing: border-box;
                    border-radius: 0;
                    text-align: center;
                }
}

@media (max-width: 480px) {
    .dashboard-shell {
        padding: 14px;
    }

    .panel {
        border-radius: 14px;
        padding: 14px;
    }

    .calculator-row {
        grid-template-columns: 1fr;
    }

    .tool-selector {
        gap: 3px;
        padding: 3px;
        border-radius: 12px;
    }

    .tool-pill {
        padding: 9px 4px;
        border-radius: 8px;
    }

    .table-actions {
        grid-template-columns: 1fr;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    input,
    select,
    .table-input {
        height: 42px;
    }

    .dashboard-title {
        font-size: 1.6rem;
    }

    .sim-card {
        padding: 14px;
    }
}

@media (min-width: 1400px) {
    .dashboard-shell {
        max-width: 1240px;
    }
}

.sales-card {
    max-width: 100%;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

    .sales-card h2 {
        margin: 0 0 8px;
        font-size: 1.5rem;
    }

    .sales-card p {
        margin: 0 0 20px;
        color: #4b5563;
    }

.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .field label {
        font-weight: 600;
    }

    .field input,
    .field select {
        padding: 12px 14px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        font-size: 1rem;
    }

.actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

    .actions button {
        padding: 12px 18px;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 600;
    }

        .actions button.secondary {
            background: #e5e7eb;
        }

        .actions button:not(.secondary) {
            background: #111827;
            color: white;
        }

.result-panel {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--result-bg);
    border: 1px solid #dbeafe;
    margin-bottom: 20px;
}

    .result-panel p {
        margin: 0 0 8px;
        color: #334155;
    }

    .result-panel strong {
        display: block;
        margin-bottom: 6px;
    }

    .result-panel small {
        display: block;
        color: var(--muted);
        line-height: 1.5;
    }

.error-message {
    margin-top: 12px;
    color: #b91c1c;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

    .price-table th,
    .price-table td {
        padding: 14px;
        text-align: left;
        border-bottom: 1px solid #e5e7eb;
    }

    .price-table th {
        background: #f9fafb;
        font-weight: 700;
    }

/* =========================
   MULTIPRIS – SIMULATOR
   Kompakta resultatkort istället för en stor tabell.
========================= */

.sim-results-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 4px;
}

/* Laptop / mindre desktop: fem kort blir för smala – gå till 3+2 */
@media (max-width: 1366px) {
    .sim-results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* iPad portrait och mindre: två kort per rad */
@media (max-width: 768px) {
    .sim-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Smartphone: ett kort per rad */
@media (max-width: 480px) {
    .sim-results-grid {
        grid-template-columns: 1fr;
    }
}

.sim-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    background: var(--result-bg);
    border: 1px solid #dbeafe;
    border-radius: var(--radius-md);
    padding: 16px;
}

    .sim-card.is-best {
        border-color: var(--blue);
        box-shadow: 0 0 0 1px var(--blue);
    }

.sim-card-badge {
    align-self: flex-start;
    max-width: 100%;
    background: var(--blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
    word-break: break-word;
}

.sim-card-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.sim-card-unit {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.sim-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 8px 0 0;
}

    .sim-card-stats > div {
        min-width: 0;
    }

    .sim-card-stats dt {
        margin: 0 0 2px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--muted);
        overflow-wrap: anywhere;
    }

    .sim-card-stats dd {
        margin: 0;
        font-weight: 700;
        font-size: 0.92rem;
        color: var(--text);
        overflow-wrap: anywhere;
    }

.sim-card-volume {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-soft);
    font-size: 0.8rem;
    color: var(--muted);
    word-break: break-word;
}

/* =========================
   MULTIPRISKALKYLATOR
   Responsiv och scoped
   Lägg längst ner i CSS-filen
========================= */

#multiSection {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

    #multiSection .multi-intro {
        margin: 0 0 20px;
        color: #4b5563;
        font-size: 0.98rem;
        line-height: 1.6;
    }

    #multiSection .sales-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 18px;
    }

    #multiSection .sim-margin-field {
        grid-column: 1 / -1;
    }

    #multiSection .field {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

        #multiSection .field label {
            margin: 0;
            font-weight: 600;
            color: #374151;
            font-size: 0.95rem;
        }

        #multiSection .field input,
        #multiSection .field select {
            width: 100%;
            min-width: 0;
            height: 48px;
            padding: 0 14px;
            border: 1px solid #d1d5db;
            border-radius: 10px;
            font-size: 1rem;
            background: #fff;
            color: #111827;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

            #multiSection .field input:focus,
            #multiSection .field select:focus {
                outline: none;
                border-color: #93c5fd;
                background: #ffffff;
                box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
            }

    #multiSection .result-panel p {
        font-size: 0.95rem;
    }

    #multiSection .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #multiSection .price-table {
        width: 100%;
        border-collapse: collapse;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
    }

        #multiSection .price-table th,
        #multiSection .price-table td {
            padding: 14px 16px;
            text-align: left;
            border-bottom: 1px solid #e5e7eb;
            vertical-align: middle;
        }

        #multiSection .price-table th {
            background: #f9fafb;
            font-weight: 700;
            color: #111827;
            white-space: nowrap;
        }

        #multiSection .price-table td {
            color: #374151;
            word-break: break-word;
        }

        #multiSection .price-table tbody tr:last-child td {
            border-bottom: none;
        }

    #multiSection .error-message {
        margin-top: 12px;
        color: #b91c1c;
        font-weight: 600;
        line-height: 1.5;
        word-break: break-word;
    }

/* Tablet */
@media (max-width: 900px) {
    #multiSection .sales-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobil */
@media (max-width: 640px) {
        #multiSection .sales-grid {
            grid-template-columns: 1fr;
            gap: 14px;
        }

        #multiSection .field input,
        #multiSection .field select {
            height: 46px;
            font-size: 16px; /* bättre i iPhone, undviker zoom */
        }

        #multiSection .result-panel {
            padding: 16px;
        }

        #multiSection .table-wrapper {
            overflow-x: visible;
        }

        #multiSection .price-table,
        #multiSection .price-table thead,
        #multiSection .price-table tbody,
        #multiSection .price-table tr,
        #multiSection .price-table th,
        #multiSection .price-table td {
            display: block;
            width: 100%;
        }

        #multiSection .price-table {
            border: none;
            background: transparent;
        }

            #multiSection .price-table thead {
                display: none;
            }

            #multiSection .price-table tbody {
                display: flex;
                flex-direction: column;
                gap: 14px;
            }

            #multiSection .price-table tr {
                background: #fff;
                border: 1px solid #e5e7eb;
                border-radius: 12px;
                padding: 14px;
                overflow: hidden;
            }

            #multiSection .price-table td {
                border: none;
                padding: 0;
                margin: 0 0 12px 0;
                text-align: left;
            }

                #multiSection .price-table td:last-child {
                    margin-bottom: 0;
                }

                #multiSection .price-table td::before {
                    content: attr(data-label);
                    display: block;
                    margin-bottom: 6px;
                    font-size: 0.84rem;
                    font-weight: 700;
                    color: #6b7280;
                    text-transform: uppercase;
                    letter-spacing: 0.02em;
                }
}

/* Extra små skärmar */
@media (max-width: 380px) {
    #multiSection .price-table tr {
        padding: 12px;
    }
}

/* Stora skärmar */
@media (min-width: 1400px) {
    #multiSection .sales-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #multiSection .price-table th,
    #multiSection .price-table td {
        padding: 16px 18px;
    }
}
