/* TDW B2B Forms — matcher sitedesign */
:root {
    --b2b-blue: #1E73BE;
    --b2b-blue-dark: #155a96;
    --b2b-black: #111;
    --b2b-gray: #f5f5f5;
    --b2b-border: #e0e0e0;
    --b2b-radius: 10px;
}

.tdw-b2b-page {
    min-height: 80vh;
    background: var(--b2b-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.tdw-b2b-card {
    background: #fff;
    border-radius: var(--b2b-radius);
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
    padding: 48px;
    width: 100%;
    max-width: 520px;
}

.tdw-b2b-card--wide { max-width: 640px; }

.tdw-b2b-logo {
    text-align: center;
    margin-bottom: 32px;
}
.tdw-b2b-logo img { height: 48px; }
.tdw-b2b-logo span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--b2b-blue);
    margin-top: 8px;
}

.tdw-b2b-card h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--b2b-black);
    margin: 0 0 8px;
}
.tdw-b2b-card .tdw-b2b-sub {
    font-size: 14px;
    color: #888;
    margin: 0 0 32px;
}

.tdw-b2b-field { margin-bottom: 20px; }
.tdw-b2b-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.tdw-b2b-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--b2b-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--b2b-black);
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.tdw-b2b-field input:focus {
    border-color: var(--b2b-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,115,190,0.1);
}

.tdw-b2b-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .tdw-b2b-row { grid-template-columns: 1fr; } }

.tdw-b2b-btn {
    width: 100%;
    padding: 14px;
    background: var(--b2b-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
    letter-spacing: 0.5px;
}
.tdw-b2b-btn:hover { background: var(--b2b-blue-dark); }
.tdw-b2b-btn:active { transform: scale(0.99); }

.tdw-b2b-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #c0392b;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}
.tdw-b2b-success {
    background: #f0fff4;
    border: 1px solid #b2f2c9;
    color: #1a7a3c;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.tdw-b2b-divider {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin: 24px 0 0;
}
.tdw-b2b-divider a {
    color: var(--b2b-blue);
    text-decoration: none;
    font-weight: 600;
}
.tdw-b2b-divider a:hover { text-decoration: underline; }

.tdw-b2b-cvr-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}
.tdw-b2b-cvr-btn {
    padding: 12px 16px;
    background: #f0f0f0;
    border: 1.5px solid var(--b2b-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.tdw-b2b-cvr-btn:hover { background: #e0e0e0; }

.tdw-b2b-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}
.tdw-b2b-remember input[type=checkbox] { width: 16px; height: 16px; }

.tdw-b2b-pending {
    text-align: center;
    padding: 32px 0;
}
.tdw-b2b-pending .tdw-b2b-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.tdw-b2b-pending h2 { font-size: 20px; margin: 0 0 12px; color: var(--b2b-black); }
.tdw-b2b-pending p { color: #666; font-size: 14px; line-height: 1.7; margin: 0; }

/* ── B2B KONTO — MOBIL ───────────────────────────────── */
@media (max-width: 640px) {

    /* Konto header (navn + log ud) */
    .tdw-b2b-page > .tdw-b2b-card > div[style*="justify-content:space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Firma/konto grid — 2 kolonner → 1 kolonne */
    .tdw-b2b-page > .tdw-b2b-card > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Profil-formular grids */
    .tdw-b2b-page div[style*="grid-template-columns:1fr 1fr"],
    .tdw-b2b-page div[style*="grid-template-columns:1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Ordre-tabel — scroll på mobil */
    .tdw-b2b-page table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        width: 100% !important;
    }

    /* Card bredere på mobil */
    .tdw-b2b-card,
    .tdw-b2b-card--wide {
        padding: 28px 20px !important;
        max-width: 100% !important;
    }

    /* Gem-knap fuld bredde på mobil */
    .tdw-b2b-page .tdw-b2b-btn {
        max-width: 100% !important;
    }

    /* Info-bokse (firma/konto) */
    .tdw-b2b-page div[style*="background:#f8f8f8"] {
        padding: 16px !important;
    }
}
