.b2b-modal {
    display: none;
    z-index: 10004;
}

.b2b-modal.is-open {
    display: flex;
}

.b2b-modal__box {
    background: #fff;
    max-width: 1200px;
}

.b2b-toolbar {
    align-items: center;
    background: #f4f6f8;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
}

.b2b-toolbar strong {
    white-space: nowrap;
}

.b2b-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.b2b-toolbar__actions form,
.b2b-action-row form,
.b2b-table__actions form {
    margin: 0;
}

.b2b-client-select {
    flex: 1;
    max-width: 300px;
}

.b2b-input {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    padding: 8px;
}

.b2b-input--small {
    border-color: #bce0ea;
    font-size: 0.9rem;
    padding: 6px;
    width: 100%;
}

.b2b-input--danger-password {
    font-size: 0.85rem;
}

.b2b-profile-form {
    background: #eafcf0;
    border: 1px solid #c3e6cb;
    border-left: 3px solid var(--admin-success);
    border-radius: 6px;
    display: none;
    margin-bottom: 25px;
    padding: 20px;
}

.b2b-profile-form.is-open {
    display: block;
}

.b2b-profile-form h4 {
    color: var(--admin-success);
    margin: 0 0 15px;
}

.b2b-profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.b2b-profile-grid .b2b-input {
    flex: 1;
    min-width: 150px;
}

.b2b-profile-grid__wide {
    flex: 2 !important;
    min-width: 200px !important;
}

.b2b-btn {
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    padding: 8px 15px;
    text-decoration: none;
}

.b2b-btn--compact {
    font-size: 0.8rem;
    padding: 4px 8px;
}

.b2b-btn--full {
    width: 100%;
}

.b2b-btn--subtle {
    background: transparent;
    border: 1px solid #ccc;
    color: #333;
}

.b2b-btn--plain {
    background: transparent;
    color: #666;
}

.b2b-btn--danger {
    background: var(--admin-danger);
    color: #fff;
}

.b2b-btn--success {
    background: var(--admin-success);
    color: #fff;
}

.b2b-btn--info {
    background: var(--admin-info);
    color: #fff;
}

.b2b-btn--dark {
    background: var(--admin-primary);
    color: #fff;
}

.b2b-section {
    margin-bottom: 30px;
}

.b2b-section-head {
    align-items: flex-end;
    border-bottom: 2px solid var(--admin-secondary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.b2b-section-head h3,
.b2b-list-title {
    color: var(--admin-primary);
    font-size: 1.2rem;
    margin: 0;
}

.b2b-list-title {
    border-bottom: 2px solid #ccc;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.b2b-alert {
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
}

.b2b-alert--success {
    background: var(--admin-success);
}

.b2b-alert--danger {
    background: var(--admin-danger);
}

.b2b-alert--wide {
    color: #721c24;
    background: #f8d7da;
    font-size: 0.9rem;
    margin: 20px 0 15px;
    padding: 10px;
}

.b2b-empty {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0 0 30px;
}

.b2b-table-wrap {
    margin-bottom: 40px;
    overflow-x: auto;
}

.b2b-table {
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 800px;
    width: 100%;
}

.b2b-table th {
    background: #f4f6f8;
    border-bottom: 2px solid #ccc;
    color: #333;
    padding: 10px;
    text-align: left;
}

.b2b-table td {
    border-bottom: 1px solid #eee;
    padding: 10px;
}

.b2b-table--orders th {
    background: var(--admin-primary);
    color: #fff;
}

.b2b-table--orders tr.is-done {
    background: #fcfcfc;
}

.b2b-table__actions {
    text-align: right;
}

.b2b-action-row {
    align-items: center;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.b2b-value {
    font-weight: 700;
}

.b2b-value--positive {
    color: var(--admin-success);
}

.b2b-status {
    border-radius: 12px;
    color: #fff;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
}

.b2b-status--paid {
    background: var(--admin-success);
}

.b2b-status--open {
    background: var(--admin-info);
}

.b2b-status--overdue {
    background: var(--admin-danger);
}

.b2b-status--draft {
    background: #6c757d;
}

.b2b-add-row {
    background: #e8f4f8;
}

.b2b-muted-strong {
    color: #666;
    font-weight: 700;
}

.b2b-inline-status {
    color: var(--admin-danger);
    font-size: 0.8rem;
    font-weight: 700;
}

.b2b-icon-btn {
    background: transparent;
    border: 0;
    color: var(--admin-danger);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.b2b-danger-zone {
    align-items: center;
    background: #f8d7da;
    border-left: 4px solid var(--admin-danger);
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    margin: 40px 0 20px;
    padding: 15px;
}

.b2b-danger-zone__text {
    flex: 1;
    min-width: 200px;
}

.b2b-danger-zone__text p {
    color: #721c24;
    font-size: 0.85rem;
    margin: 0;
}

.b2b-danger-zone__text p:first-child {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.b2b-danger-zone__form {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 0;
}

@media (max-width: 760px) {
    .b2b-section-head,
    .b2b-danger-zone__form {
        align-items: stretch;
        flex-direction: column;
    }

    .b2b-action-row {
        align-items: flex-end;
        flex-direction: column;
    }
}
