/* ============================================================
   BROKERS MODULE — Reswip CRM
  
   ============================================================ */

.reswip-brokers-page {
    padding: 26px 30px 40px;
}

/* Breadcrumb */
.reswip-page-crumb {
    font-size: 13px;
    font-weight: 700;
    color: #1A1F2C !important;
    letter-spacing: 0.06em;
    margin: 0 0 18px;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.reswip-page-crumb--link:hover {
    color: #1A1F2C !important;
    text-decoration: none;
}

/* ============================================================
   1) BROKERS LIST PAGE
   ============================================================ */

/* Manage Brokers header card */
.reswip-brokers-header {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    flex-wrap: wrap;
}

.reswip-brokers-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reswip-brokers-header__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #F4F7FB;
    color: #1A1F2C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reswip-brokers-header__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1A1F2C;
    line-height: 1.2;
}

.reswip-brokers-header__sub {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.reswip-btn--add-broker {
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    display: inline-flex;
    align-items: center;
}

/* List of Brokers title */
.reswip-brokers-list-title {
    font-size: 16px;
    font-weight: 700;
    color: #1A1F2C;
    margin: 0 0 14px;
}

/* White wrapper around table */
.reswip-brokers-wrap {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 18px 22px 22px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.reswip-brokers-wrap__filter {
    padding: 6px 0 12px;
}

.reswip-brokers-wrap__filter-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

/* Table */
.reswip-brokers-table {
    display: flex;
    flex-direction: column;
}

.reswip-brokers-table__head,
.reswip-brokers-table__row {
    display: grid;
    grid-template-columns: 2fr 2fr 1.3fr 1.5fr 1.2fr 40px;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
}

.reswip-brokers-table__head {
    background: #FAFBFC;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 4px;
}

.reswip-brokers-table__row {
    background: transparent;
    border-bottom: 1px solid #F4F6F8;
    text-decoration: none;
    color: #1A1F2C !important;
    transition: background 0.2s;
}

.reswip-brokers-table__row:last-child {
    border-bottom: 0;
}

.reswip-brokers-table__row:hover {
    background: #FAFBFC;
    color: #1A1F2C !important;
    text-decoration: none;
}

.reswip-brokers-table__name {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1A1F2C;
}

.reswip-brokers-table__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #F4F7FB;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reswip-brokers-table__email,
.reswip-brokers-table__num,
.reswip-brokers-table__date {
    font-size: 13px;
    color: #6B7280;
}

.reswip-brokers-table__chevron {
    color: #9CA3AF;
    display: inline-flex;
    justify-content: flex-end;
}

.reswip-brokers-empty {
    padding: 60px 20px;
    text-align: center;
    color: #6B7280;
}

/* Pagination — brokers variant uses same style as leads */
.reswip-pagination--brokers {
    margin-top: 20px;
    justify-content: flex-end;
}

/* ============================================================
   2) ADD NEW BROKER — wizard (3 steps)
   ============================================================ */

.reswip-broker-add {
    max-width: 760px;
    margin: 0 auto;
}

.reswip-form-error {
    background: #FEE2E2;
    color: #991B1B;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13px;
    margin-bottom: 18px;
}

/* Stepper */
.reswip-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 30px auto 26px;
    padding: 0;
    max-width: 620px;
    position: relative;
    gap: 0;
}

.reswip-stepper__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.reswip-stepper__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #C4B5FD;
    position: relative;
    transition: all 0.2s;
}

.reswip-stepper__dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #C4B5FD;
    transition: background 0.2s;
}

.reswip-stepper__item.is-active .reswip-stepper__dot,
.reswip-stepper__item.is-complete .reswip-stepper__dot {
    background: #7C3AED;
    border-color: #7C3AED;
}

.reswip-stepper__item.is-active .reswip-stepper__dot::after,
.reswip-stepper__item.is-complete .reswip-stepper__dot::after {
    background: #FFFFFF;
}

/* Line between dots */
.reswip-stepper__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 11px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #C4B5FD;
    z-index: -1;
}

.reswip-stepper__item.is-complete:not(:last-child)::after {
    background: #7C3AED;
}

.reswip-stepper__label {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    margin-top: 12px;
    text-align: center;
}

.reswip-stepper__item.is-active .reswip-stepper__label,
.reswip-stepper__item.is-complete .reswip-stepper__label {
    color: #1A1F2C;
    font-weight: 600;
}

/* Form steps */
.reswip-broker-form__step {
    display: none;
}

.reswip-broker-form__step.is-active {
    display: block;
}

.reswip-broker-form__card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 26px 30px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    margin-bottom: 20px;
}

/* Fields */
.reswip-field {
    display: block;
    margin-bottom: 18px;
}

.reswip-field:last-child {
    margin-bottom: 0;
}

.reswip-field__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A1F2C;
    margin-bottom: 8px;
}

.reswip-field input[type="text"],
.reswip-field input[type="email"],
.reswip-field input[type="tel"],
.reswip-field input[type="password"],
.reswip-field input[type="number"],
.reswip-field textarea,
.reswip-field .reswip-select,
.reswip-broker-form input[type="text"],
.reswip-broker-form input[type="email"],
.reswip-broker-form input[type="tel"],
.reswip-broker-form input[type="password"],
.reswip-broker-form .reswip-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    font-size: 14px;
    color: #1A1F2C;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: 0;
}

.reswip-field input::placeholder,
.reswip-broker-form input::placeholder {
    color: #9CA3AF;
}

.reswip-field input:focus,
.reswip-field textarea:focus,
.reswip-broker-form input:focus,
.reswip-broker-form select:focus {
    border-color: #C4B5FD;
    outline: 0;
    box-shadow: none;
}

.reswip-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Phone input (country + number) */
.reswip-phone-input {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    background: #FFFFFF;
}

.reswip-phone-input:focus-within {
    border-color: #C4B5FD;
}

.reswip-phone-input__country {
    border: 0 !important;
    border-right: 1px solid #E5E7EB !important;
    background: transparent !important;
    padding: 14px 32px 14px 16px !important;
    border-radius: 0 !important;
    width: auto !important;
    flex-shrink: 0;
    font-weight: 500;
}

.reswip-phone-input__number {
    border: 0 !important;
    border-radius: 0 !important;
    flex: 1;
    padding: 14px 16px !important;
}

/* Password field with eye toggle */
.reswip-field__password {
    position: relative;
    display: block;
}

.reswip-field__password input {
    padding-right: 44px !important;
}

.reswip-field__eye {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #6B7280;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
}

.reswip-field__eye:hover {
    color: #1A1F2C;
}

/* Dropzone (file upload) */
.reswip-dropzone {
    margin-top: 6px;
}

.reswip-dropzone__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 36px 24px;
    border: 2px dashed #C4B5FD;
    border-radius: 12px;
    background: #FFFFFF;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.reswip-dropzone__inner:hover,
.reswip-dropzone.is-dragover .reswip-dropzone__inner {
    background: #F5F0FF;
    border-color: #7C3AED;
}

.reswip-dropzone__icon {
    color: #7C3AED;
    display: inline-flex;
}

.reswip-dropzone__text {
    font-size: 14px;
    font-weight: 600;
    color: #7C3AED;
    text-align: center;
}

.reswip-dropzone.has-file .reswip-dropzone__text {
    color: #1A1F2C;
}

/* Form nav (Previous / Next) */
.reswip-broker-form__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reswip-broker-form__nav--end {
    justify-content: flex-end;
}

.reswip-btn--prev,
.reswip-btn--next {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E5E7EB;
}

.reswip-btn--prev {
    background: #FFFFFF;
    color: #1A1F2C !important;
    border: 1px solid #E5E7EB !important;
}

.reswip-btn--prev:hover {
    background: #FAFBFC;
    color: #1A1F2C !important;
}

.reswip-btn--next {
    background: #7C3AED !important;
    color: #FFFFFF !important;
    border: 1px solid #7C3AED !important;
}

.reswip-btn--next:hover {
    background: #6D28D9 !important;
    border-color: #6D28D9 !important;
    color: #FFFFFF !important;
}

/* ============================================================
   3) SUCCESS SCREEN
   ============================================================ */

.reswip-broker-success__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.reswip-broker-success__art {
    margin-bottom: 20px;
}

.reswip-broker-success__title {
    font-size: 18px;
    font-weight: 700;
    color: #1A1F2C;
    margin: 0 0 28px;
}

.reswip-btn--success-cta,
.reswip-btn--success-cta:hover,
.reswip-btn--success-cta:focus {
    padding: 14px 38px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #7C3AED !important;
    border: 1px solid #7C3AED !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 4px 14px rgba(124,58,237,.25);
    transition: background 0.2s, box-shadow 0.2s;
}
.reswip-btn--success-cta:hover {
    background: #6D28D9 !important;
    border-color: #6D28D9 !important;
    box-shadow: 0 6px 20px rgba(124,58,237,.32);
}

/* ============================================================
   4) BROKER DETAIL PAGE
   ============================================================ */

/* Hero banner — background image set in override below; this rule
   only sets the layout/shape properties. */
.reswip-broker-hero {
    background: #F1ECFB;
    border-radius: 16px;
    padding: 30px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    color: #1A1F2C;
    position: relative;
    overflow: hidden;
}

.reswip-broker-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 78% 30%, rgba(255,255,255,0.25), transparent 38%),
        radial-gradient(circle at 92% 80%, rgba(255,255,255,0.18), transparent 40%);
    pointer-events: none;
}

.reswip-broker-hero__left {
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.reswip-broker-hero__avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #1A1F2C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.reswip-broker-hero__name {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 4px;
    line-height: 1.2;
}

.reswip-broker-hero__email {
    font-size: 14px;
    color: #FFFFFF;
    margin: 0;
    opacity: 0.95;
}

.reswip-broker-hero__edit {
    background: #FFFFFF;
    color: #1A1F2C !important;
    border-color: #FFFFFF;
    position: relative;
    z-index: 1;
}

/* Grid: 2 columns */
.reswip-broker-detail__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1100px) {
    .reswip-broker-detail__grid { grid-template-columns: 1fr; }
}

/* Info card with header action (Compliances / Filter by) */
.reswip-info-card__head--with-action {
    justify-content: space-between;
    padding-bottom: 18px;
}

.reswip-info-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #F4F7FB;
    color: #1A1F2C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reswip-info-card__head--with-action h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1A1F2C;
    margin: 0;
}

.reswip-info-card__divider {
    height: 1px;
    background: #F1F3F5;
    margin: 12px 0;
}

/* Filter dropdown on Billing History card */
.reswip-info-card__filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reswip-info-card__filter-label {
    font-size: 12px;
    color: #6B7280;
}

.reswip-select--sm {
    padding: 8px 32px 8px 14px !important;
    font-size: 13px !important;
    width: auto !important;
    min-width: 110px;
}

/* Compliances button (small pill) */
.reswip-btn-pill--sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* Billing history list */
.reswip-billing-list {
    padding: 14px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 540px;
    overflow-y: auto;
}

.reswip-billing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #FAFBFC;
    border-radius: 12px;
}

.reswip-billing-item__left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reswip-billing-item__dates {
    font-size: 14px;
    font-weight: 600;
    color: #1A1F2C;
    margin: 0;
}

.reswip-billing-item__status {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    align-self: flex-start;
}

.reswip-billing-item__status--current {
    background: #DBEAFE;
    color: #1E40AF;
}

.reswip-billing-item__status--completed {
    background: #D1FAE5;
    color: #065F46;
}

.reswip-billing-item__right {
    text-align: right;
}

.reswip-billing-item__leads {
    font-size: 14px;
    font-weight: 600;
    color: #1A1F2C;
    margin: 0 0 4px;
}

.reswip-billing-item__converted {
    font-size: 13px;
    color: #10B981;
    font-weight: 600;
    margin: 0;
}

/* Responsive — pagination on smaller screens */
@media (max-width: 900px) {
    .reswip-brokers-table__head { display: none; }
    .reswip-brokers-table__row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .reswip-brokers-table__chevron { display: none; }
}

/* ============================================================
   SHARED — Info card styles (copied from leads.css so they load
   on /brokers/ where leads.css is not enqueued).
   ============================================================ */

.reswip-info-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.reswip-info-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #F1F3F5;
}

.reswip-info-card__head h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.reswip-info-card__head--blue  { color: #3B82F6; }
.reswip-info-card__head--green { color: #10B981; }
.reswip-info-card__head--dark  { color: #1A1F2C; }
.reswip-info-card__head--blue h2  { color: #3B82F6; }
.reswip-info-card__head--green h2 { color: #10B981; }
.reswip-info-card__head--dark h2  { color: #1A1F2C; }

.reswip-info-card__title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.reswip-info-card__rows {
    margin: 0;
    padding: 14px 22px 18px;
}

.reswip-info-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
    border-bottom: 1px solid #F4F6F8;
}

.reswip-info-card__row:last-child { border-bottom: 0; }

.reswip-info-card__row dt {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    margin: 0;
}

.reswip-info-card__row dd {
    font-size: 13px;
    color: #1A1F2C;
    font-weight: 600;
    margin: 0;
    text-align: right;
    word-break: break-word;
}

.reswip-info-card__row dd a { color: #2563EB; text-decoration: none; }
.reswip-info-card__row dd a:hover { text-decoration: underline; }

/* ============================================================
   FIX — Broker detail page corrections (4 issues)
   1) Hero uses Reswip wave PNG (not flat gradient)
   2) Remove per-row borders, keep only the central divider
   3) Style Bi-weekly filter dropdown (was unstyled)
   4) Pill buttons (Edit, Compliances) — styles for brokers page
   ============================================================ */

/* 1) Hero with wave PNG background — no gradient fallback so we never
   see a purple flash before the PNG finishes downloading. */
.reswip-broker-hero {
    background: #F1ECFB url('https://reswip.com/wp-content/uploads/2026/05/Mask-group-2026-05-12T231958.607.png') no-repeat right center / cover;
}

.reswip-broker-hero::before {
    /* Remove the manual radial gradients — the PNG provides the texture now. */
    display: none;
}

/* 2) Remove per-row borders inside broker detail (keep only the central divider) */
.reswip-broker-detail .reswip-info-card__row {
    border-bottom: 0;
    padding: 12px 0;
}

/* The central divider between contact info and identification numbers */
.reswip-broker-detail .reswip-info-card__divider {
    height: 1px;
    background: #E5E7EB;
    margin: 14px 0;
}

/* 3) Filter dropdown (Bi-weekly) — proper pill style */
.reswip-info-card__filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.reswip-info-card__filter-label {
    font-size: 13px;
    color: #6B7280;
}

.reswip-select--sm {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 36px 9px 16px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #1A1F2C;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    width: auto !important;
    min-width: 130px;
    cursor: pointer;
    outline: 0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.reswip-select--sm:focus {
    border-color: #C4B5FD !important;
}

/* 4) Pill buttons (Edit, Compliances) — duplicated from leads.css */
.reswip-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    color: #1A1F2C !important;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}

.reswip-btn-pill:hover {
    border-color: #D1D5DB;
    background: #FAFBFC;
    color: #1A1F2C !important;
    text-decoration: none;
}

.reswip-btn-pill--sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* Edit button on hero — white with subtle shadow */
.reswip-broker-hero__edit {
    background: #FFFFFF !important;
    color: #1A1F2C !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.reswip-broker-hero__edit:hover {
    background: #F8F8FB !important;
    border-color: #F8F8FB !important;
    color: #1A1F2C !important;
}

/* "No billing history yet." centered */
.reswip-billing-list .reswip-history__empty {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

/* ============================================================
   FIX — Custom dropdown styles (for Billing History filter)
   ============================================================ */
.reswip-dropdown {
    position: relative;
}

.reswip-dropdown__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 130px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1A1F2C !important;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color 0.2s, background 0.2s;
}

.reswip-dropdown__btn:hover {
    border-color: #D1D5DB;
    background: #FAFBFC;
    color: #1A1F2C !important;
}

.reswip-dropdown.is-open .reswip-dropdown__btn {
    border-color: #C4B5FD;
}

.reswip-dropdown__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    flex: 1;
}

.reswip-dropdown__btn svg {
    flex-shrink: 0;
    color: #6B7280;
    transition: transform 0.2s;
}

.reswip-dropdown.is-open .reswip-dropdown__btn svg {
    transform: rotate(180deg);
}

.reswip-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #FFFFFF;
    border: 1px solid #EAECEF;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15,23,42,.14);
    padding: 6px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.reswip-dropdown.is-open .reswip-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.reswip-dropdown__item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1A1F2C !important;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.reswip-dropdown__item:hover {
    background: #F5F7FA;
    color: #1A1F2C !important;
}

.reswip-dropdown__item.is-active {
    background: #F5F0FF;
    color: #7C3AED !important;
    font-weight: 600;
}

/* ============================================================
   FIX — Add New Broker button: purple solid (Figma image 6)
   ============================================================ */
.reswip-btn--add-broker,
.reswip-btn--add-broker:hover,
.reswip-btn--add-broker:focus {
    background: #7C3AED !important;
    border: 1px solid #7C3AED !important;
    color: #FFFFFF !important;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(124,58,237,.25);
    transition: background 0.2s, box-shadow 0.2s;
}

.reswip-btn--add-broker:hover {
    background: #6D28D9 !important;
    border-color: #6D28D9 !important;
    box-shadow: 0 6px 20px rgba(124,58,237,.32);
}

.reswip-btn--add-broker svg {
    color: #FFFFFF;
}

/* ============================================================
   FIX — Table header polish (Brokers list)
   Plus de radius + gris un peu plus marqué + shadow comme Figma
   ============================================================ */

.reswip-brokers-table__head {
    background: #F1F3F7 !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: 0.02em;
}

/* ============================================================
   FIX — Restore avatar polish (user liked it)
   ============================================================ */

.reswip-broker-hero {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.18);
}

.reswip-broker-hero__avatar {
    background: #FAFAFC !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset,
        0 -2px 6px rgba(255, 255, 255, 0.6) inset;
    width: 84px;
    height: 84px;
    color: #2A2D3A;
}

.reswip-broker-hero__avatar svg {
    width: 38px;
    height: 38px;
}

.reswip-broker-hero__name {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.reswip-broker-hero__email {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   FIX — Remove red/blue focus outline on Billing dropdown
   (parent theme adds default red outline on button focus)
   ============================================================ */

.reswip-dropdown__btn,
.reswip-dropdown__btn:focus,
.reswip-dropdown__btn:focus-visible,
.reswip-dropdown__btn:active {
    outline: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.reswip-dropdown__item,
.reswip-dropdown__item:focus,
.reswip-dropdown__item:focus-visible,
.reswip-dropdown__item:active {
    outline: 0 !important;
    box-shadow: none !important;
}

.reswip-select--sm,
.reswip-select--sm:focus,
.reswip-select--sm:focus-visible {
    outline: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

/* ============================================================
   FIX FINAL — 3 corrections
   1) Remove shadow from table header (user request)
   2) Custom avatar image (Group-1437252955.png) — sizing
   3) Remove dropdown background color change on hover/open
   ============================================================ */

/* 1) Table header — no shadow */
.reswip-brokers-table__head {
    box-shadow: none !important;
}

/* 2) Avatar with image — let the PNG be the avatar (no background/shadow override) */
.reswip-broker-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

/* 3) Dropdown — keep background WHITE at all times (no grey color shift) */
.reswip-dropdown__btn,
.reswip-dropdown__btn:hover,
.reswip-dropdown__btn:focus,
.reswip-dropdown.is-open .reswip-dropdown__btn {
    background: #FFFFFF !important;
    border-color: #E5E7EB !important;
}

/* Subtle hover feedback: just darken the border a hair, no bg change */
.reswip-dropdown__btn:hover {
    border-color: #D1D5DB !important;
}

/* ============================================================
   FIX — Avatar PNG everywhere (table rows, header card, etc.)
   ============================================================ */

/* Manage Brokers header card icon (large) */
.reswip-brokers-header__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

/* Broker table row icon (small, 30x30 container) */
.reswip-brokers-table__icon {
    background: transparent !important;
    overflow: hidden;
    border-radius: 50%;
}

.reswip-brokers-table__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================================
   EDIT BROKER — section titles, hint, success flash
   ============================================================ */

.reswip-broker-edit__form {
    max-width: 760px;
    margin: 0 auto;
}

.reswip-edit-section {
    margin-bottom: 26px;
}

.reswip-edit-section__title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1F2C;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

.reswip-edit-section__hint {
    font-size: 12px;
    color: #6B7280;
    margin: 0 0 10px;
    font-style: italic;
}

.reswip-edit-section__note {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 10px;
}

.reswip-edit-section__note a {
    color: #7C3AED;
    text-decoration: none;
    font-weight: 600;
}

.reswip-edit-section__note a:hover {
    text-decoration: underline;
}

/* Success flash banner */
.reswip-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.reswip-flash--success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.reswip-flash svg {
    flex-shrink: 0;
}

/* ============================================================
   Form error banner (validation failure)
   ============================================================ */

.reswip-form-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #B91C1C;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.reswip-form-error svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Invalid field — red border + subtle red bg */
.reswip-field input.is-invalid,
.reswip-field select.is-invalid,
.reswip-field textarea.is-invalid,
input.is-invalid,
select.is-invalid {
    border-color: #DC2626 !important;
    background-color: #FEF2F2 !important;
}

.reswip-field input.is-invalid:focus,
input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* ============================================================
   Toast notification + submit button loading state
   ============================================================ */

.reswip-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: #FFFFFF;
    color: #1A1F2C;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.reswip-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reswip-toast--success {
    border-left: 4px solid #10B981;
}

.reswip-toast--success svg {
    color: #10B981;
    flex-shrink: 0;
}

.reswip-toast--error {
    border-left: 4px solid #DC2626;
}

.reswip-toast--info {
    border-left: 4px solid #7C3AED;
}

/* Submit button — loading state with spinner */
.reswip-btn.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.reswip-btn__spinner {
    animation: reswip-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes reswip-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Mobile: toast goes full-width at top */
@media (max-width: 640px) {
    .reswip-toast {
        top: 12px;
        left: 12px;
        right: 12px;
    }
}

/* ===================================================================
   Custom phone country-code dropdown (reused from team-form).
   Used in broker-add + broker-edit "Phone number" + "Language" fields.
   Override the OLD .reswip-phone-input unified-container style so the
   dropdown menu isn't clipped and the number input gets its own border.
   =================================================================== */
.reswip-phone-input {
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}
.reswip-phone-input:focus-within { border: 0 !important; }

.reswip-phone-input__number,
input.reswip-phone-input__number {
    flex: 1;
    border: 1px solid #E5E7EB !important;
    border-radius: 12px !important;
    padding: 11px 12px !important;
    background: #F9FAFB !important;
    font-size: 14px !important;
    color: #1A1F2C !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.reswip-phone-input__number:hover {
    background: #fff !important;
    border-color: #D1D5DB !important;
}
.reswip-phone-input__number:focus {
    outline: 0 !important;
    background: #fff !important;
    border-color: #7C3AED !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

.reswip-cc-select {
    position: relative;
    flex-shrink: 0;
}
.reswip-cc-select__btn,
button.reswip-cc-select__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 11px 12px !important;
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #1A1F2C !important;
    cursor: pointer !important;
    width: 92px !important;
    height: auto !important;
    min-height: 0 !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.reswip-cc-select__btn:hover {
    background: #fff !important;
    border-color: #D1D5DB !important;
    color: #1A1F2C !important;
}
.reswip-cc-select.is-open .reswip-cc-select__btn {
    background: #fff !important;
    border-color: #7C3AED !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}
.reswip-cc-select__label {
    flex: 1;
    text-align: left;
    color: #1A1F2C !important;
}
.reswip-cc-select__btn svg {
    color: #6B7280 !important;
    stroke: #6B7280 !important;
    flex-shrink: 0;
    transition: transform .15s ease;
}
.reswip-cc-select.is-open .reswip-cc-select__btn svg { transform: rotate(180deg); }

.reswip-cc-select__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 92px;
    background: #fff !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
    padding: 4px !important;
    z-index: 100000;
    max-height: 180px;
    overflow-y: auto;
}
.reswip-cc-select__opt,
button.reswip-cc-select__opt {
    display: block !important;
    width: 100% !important;
    padding: 8px 10px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: #1A1F2C !important;
    font-size: 13px !important;
    text-align: left !important;
    cursor: pointer !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    font-weight: 400 !important;
    transition: background .12s ease, color .12s ease;
}
.reswip-cc-select__opt:hover {
    background: #F3F4F6 !important;
    color: #1A1F2C !important;
}
.reswip-cc-select__opt.is-active {
    background: #EFF6FF !important;
    color: #1D4ED8 !important;
    font-weight: 600 !important;
}

/* Full-width variant — used for the Language select on broker-add / broker-edit. */
.reswip-cc-select--full { display: block; width: 100%; }
.reswip-cc-select--full .reswip-cc-select__btn { width: 100% !important; padding: 11px 14px !important; }
.reswip-cc-select--full .reswip-cc-select__menu { width: 100%; max-height: 180px; }

/* Smart flip: when there's no room below the button (e.g. dropdown near the
 * bottom of a modal), JS adds .is-flip-up to the wrapper and we position the
 * menu ABOVE the button instead. */
.reswip-cc-select.is-flip-up .reswip-cc-select__menu {
    top: auto;
    bottom: calc(100% + 6px);
}

/* ============================================================
   DASHBOARD ACCESS — vertical scope checkboxes
   Scoped to .reswip-broker-form so we don't leak into other modules.
   Style mirrors the team form services checkboxes (team.css).
   ============================================================ */
.reswip-broker-form .reswip-field--services {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    gap: 24px !important;
    row-gap: 14px !important;
    align-items: center !important;
}
/* Respect the HTML `hidden` attribute even against the !important display
 * rule above (defensive — for any future JS toggling). */
.reswip-broker-form .reswip-field--services[hidden] {
    display: none !important;
}
.reswip-broker-form .reswip-field--services .reswip-field__label,
.reswip-broker-form .reswip-field--services legend {
    width: 100% !important;
    flex-basis: 100%;
    margin: 0 0 6px !important;
    font-weight: 600;
    color: #1A1F2C;
    font-size: 13px;
    text-transform: none;
}
.reswip-broker-form .reswip-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    color: #1A1F2C !important;
    font-size: 14px !important;
    user-select: none;
    position: relative;
}
.reswip-broker-form .reswip-check input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
}
.reswip-broker-form .reswip-check__box {
    width: 22px !important;
    height: 22px !important;
    border: 1.5px solid #D1D5DB !important;
    border-radius: 6px !important;
    background: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    position: relative;
    box-shadow: none !important;
}
.reswip-broker-form .reswip-check input:checked + .reswip-check__box {
    background: #7C3AED !important;
    border-color: #7C3AED !important;
}
.reswip-broker-form .reswip-check input:checked + .reswip-check__box::after {
    content: "" !important;
    width: 6px !important;
    height: 11px !important;
    border: solid #fff !important;
    border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg);
    margin-top: -2px;
}



@media (max-width: 640px) {

    /* Hide the table header on mobile — labels are implicit in the card */
    .reswip-brokers-table__head { display: none; }

    /* Each row becomes a card */
    .reswip-brokers-table__row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;   /* 3 stats + chevron col */
        grid-template-rows: auto auto auto;
        gap: 6px 10px;
        padding: 14px;
        background: #FFFFFF;
        border: 1px solid #F1F3F5;
        border-radius: 12px;
        margin-bottom: 8px;
        align-items: center;
    }

    /* Row 1 — name spans the 3 stat columns, chevron in the right col */
    .reswip-brokers-table__name {
        grid-row: 1;
        grid-column: 1 / -2;
        font-size: 14px;
        font-weight: 600;
    }
    .reswip-brokers-table__chevron {
        grid-row: 1;
        grid-column: -2 / -1;
        display: inline-flex;                       /* re-show (tablet rule hid it) */
        justify-content: flex-end;
    }

    /* Row 2 — email spans the whole card width */
    .reswip-brokers-table__email {
        grid-row: 2;
        grid-column: 1 / -1;
        font-size: 12px;
        color: #6B7280;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Row 3 — the 3 stat fields auto-place across cols 1-3 */
    .reswip-brokers-table__num,
    .reswip-brokers-table__date {
        grid-row: 3;
        font-size: 12px;
        color: #6B7280;
    }
	
	 .reswip-broker-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }

    /* Actions zone : reste en row (boutons côte à côte), full width */
    .reswip-broker-hero__actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Each button takes equal share of the row, centered text */
    .reswip-broker-hero__actions > .reswip-btn,
    .reswip-broker-hero__actions > a,
    .reswip-broker-hero__actions > button,
    .reswip-broker-hero__actions .reswip-btn-pill {
        flex: 1 1 0 !important;
        justify-content: center !important;
    }
}