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

html, body {
    margin: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
}

#vue-b2b-app {
    min-height: 100vh;
}

/* ── Splash (initial loading) ───────────────────────────── */

.b2b-splash {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f2f7;
    gap: 10px;
}

.b2b-splash-logo {
    height: 48px;
    width: auto;
    display: block;
}

.b2b-splash-text {
    font-size: 14px;
    color: #8a94a6;
}

/* ── Navbar ─────────────────────────────────────────────── */

.b2b-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    border-bottom: 1px solid #e8edf5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.b2b-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2b-nav-logo {
    height: 32px;
    width: auto;
    display: block;
}

.b2b-nav-subtitle {
    font-size: 11px;
    color: #b0bac8;
    font-weight: 400;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* ── Nav user button ────────────────────────────────────── */

.b2b-nav-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #1a2236;
    cursor: pointer;
    padding: 5px 10px 5px 6px;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.15s;
}

.b2b-nav-user-btn:hover {
    background: #f0f3f8;
}

.b2b-nav-user-btn::after {
    border-color: #6b7a90 transparent transparent;
}

.b2b-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b6ff0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.b2b-nav-user-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a2236;
}

/* ── Profile dropdown ───────────────────────────────────── */

.b2b-profile-dropdown {
    min-width: 230px;
    border: 1px solid #e4eaf4;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.b2b-profile-dropdown-header {
    padding: 14px 16px 12px;
    background: #f8faff;
}

.b2b-profile-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a2236;
}

.b2b-profile-email {
    font-size: 12px;
    color: #8a94a6;
    margin-top: 2px;
}

.b2b-profile-company {
    font-size: 12px;
    color: #5f6b7a;
    margin-top: 4px;
}

.b2b-profile-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #e6eeff;
    color: #3b6ff0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.b2b-logout-btn {
    color: #d93025 !important;
    font-size: 14px;
    padding: 10px 16px;
}

.b2b-logout-btn:hover {
    background: #fff4f3 !important;
}

/* ── Iframe layout ──────────────────────────────────────── */

.b2b-iframe-wrap {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
}

.b2b-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Auth page ──────────────────────────────────────────── */

.b2b-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #f0f2f7;
}

.b2b-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 40px 36px 32px;
}

/* ── Auth brand ─────────────────────────────────────────── */

.b2b-auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.b2b-auth-logo {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.b2b-auth-logo-sub {
    font-size: 12px;
    color: #8a94a6;
    margin-top: 4px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* ── Auth heading ───────────────────────────────────────── */

.b2b-auth-heading {
    font-size: 17px;
    font-weight: 700;
    color: #1a2236;
    margin: 0 0 20px;
}

/* ── Form ───────────────────────────────────────────────── */

.b2b-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.b2b-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.b2b-label {
    font-size: 13px;
    font-weight: 500;
    color: #3d4a5c;
}

.b2b-form-error {
    background: #fff4f3;
    border: 1px solid #fcc;
    color: #c0392b;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* ── Switch link (login ↔ register) ─────────────────────── */

.b2b-switch-link {
    text-align: center;
    font-size: 13px;
    color: #8a94a6;
    margin: 20px 0 0;
}

.b2b-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: #3b6ff0;
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.b2b-link-btn:hover {
    color: #2a56d0;
}

/* ── Password group ─────────────────────────────────────── */

.b2b-password-group {
    background: #f5f7ff;
    border: 1px solid #dde4f5;
    border-radius: 10px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-password-group-label {
    font-size: 11px;
    font-weight: 700;
    color: #3b6ff0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: -4px;
}

.b2b-label-optional {
    font-weight: 400;
    color: #b0b8c8;
    font-size: 11px;
}

.b2b-label-required {
    color: #e03c31;
    font-weight: 600;
}

.b2b-field-error {
    font-size: 12px;
    color: #d93025;
    margin-top: 4px;
}

/* ── Policy checkbox ────────────────────────────────────── */

.b2b-policy-field {
    margin-top: 2px;
}

.b2b-policy-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.b2b-policy-checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3b6ff0;
}

.b2b-policy-label small {
    font-size: 11px;
    line-height: 1.5;
    color: #8a94a6;
}

.b2b-policy-link {
    color: #8a94a6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.b2b-policy-link:hover {
    color: #3b6ff0;
}

/* ── Status screens (pending / denied) ──────────────────── */

.b2b-status-screen {
    text-align: center;
    padding: 4px 0;
}

.b2b-status-icon {
    font-size: 42px;
    margin-bottom: 16px;
}

.b2b-status-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2236;
    margin: 0 0 8px;
}

.b2b-status-text {
    font-size: 14px;
    color: #6a7482;
    margin-bottom: 6px;
}

.b2b-status-reason {
    font-size: 13px;
    color: #d93025;
    margin-bottom: 20px;
}
