/*
 * MEC User Dashboard 2.0.4-cvx.7 — CVX internal pages polish
 * Scope: Profile, Organizer, Events Calendar and Reports only.
 * Navigation geometry/behaviour intentionally lives in cvx-horizontal-nav.*
 */

.cvx-mec-ud {
    --cvx-internal-card: #ffffff;
    --cvx-internal-soft: #f8fbff;
    --cvx-internal-line: #dfe7f1;
    --cvx-internal-muted: #667085;
    --cvx-internal-error: #b42318;
    --cvx-internal-success: #067647;
}

/* Shared loading / empty / error language across internal routes. */
.cvx-mec-ud .mec-ud-spinner {
    min-height: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    color: var(--cvx-blue) !important;
}

.cvx-mec-ud .mec-ud-spinner__svg {
    width: 34px !important;
    height: 34px !important;
}

.cvx-mec-ud .mec-ud-spinner__label,
.cvx-mec-ud .cvx-internal-loading-label {
    margin: 0 !important;
    color: var(--cvx-internal-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.cvx-mec-ud .mec-ud-error-state {
    background: #fff8f7 !important;
    border-color: #f5c7c1 !important;
}

.cvx-mec-ud .mec-ud-error-state .mec-ud-empty-icon {
    background: #fff0ee !important;
    color: var(--cvx-internal-error) !important;
}

.cvx-mec-ud .mec-ud-empty-state,
.cvx-mec-ud .mec-ud-error-state {
    max-width: none !important;
}

/* --------------------------------------------------------------------------
 * PROFILE
 * ----------------------------------------------------------------------- */
.cvx-mec-ud #mec-ud-profile .mec-profile-form {
    display: block !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-form-subtitle {
    margin: 0 0 8px !important;
    color: var(--cvx-text) !important;
    font-size: 12px !important;
    font-weight: 760 !important;
}

/* Compact avatar: keep the action obvious without wasting a full card height. */
.cvx-mec-ud #mec-ud-profile .mec-ud-profile-avatar-row {
    min-height: 0 !important;
    margin: 7px 0 12px !important;
    padding: 10px 12px !important;
    gap: 10px !important;
    align-items: center !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-avatar-box {
    width: 54px !important;
    height: 54px !important;
    flex: 0 0 54px !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-avatar-img,
.cvx-mec-ud #mec-ud-profile .mec-ud-avatar-placeholder {
    width: 54px !important;
    height: 54px !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-avatar-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
}

/* Stripe Connect stays visually separated from account credentials. */
.cvx-mec-ud #mec-ud-profile .mec-ud-stripe-section {
    position: relative !important;
    margin: 16px 0 !important;
    padding: 16px !important;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%) !important;
    border: 1px solid #d8e5f6 !important;
    border-radius: 14px !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-stripe-section .mec-ud-form-hint {
    margin: 2px 0 12px !important;
}

.cvx-mec-ud #mec-ud-profile input[name="mec_stripe_connect_publishable_key"],
.cvx-mec-ud #mec-ud-profile input[name="mec_stripe_connect_secret_key"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    letter-spacing: .01em !important;
}

.cvx-mec-ud #mec-ud-profile input[name="mec_stripe_connect_secret_key"] {
    padding-right: 74px !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-stripe-section .mec-ud-form:last-child label::after {
    content: "Protegida";
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 2px 6px;
    color: #175cd3;
    background: #eef4ff;
    border: 1px solid #d7e5ff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.2;
    vertical-align: middle;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-field-hint {
    color: #526071 !important;
    line-height: 1.5 !important;
}

.cvx-mec-ud #mec-ud-profile .mec-ud-password-section {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
 * ORGANIZER
 * ----------------------------------------------------------------------- */
.cvx-mec-ud #mec-ud-organizer .mec-organizer-form > .row:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 16px !important;
    background: var(--cvx-internal-card) !important;
    border: 1px solid var(--cvx-internal-line) !important;
    border-radius: 14px !important;
}

.cvx-mec-ud #mec-ud-organizer .mec-organizer-form > .row:first-child > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.cvx-mec-ud #mec-ud-organizer .cvx-organizer-field--wide {
    grid-column: 1 / -1 !important;
}

.cvx-mec-ud #mec-ud-organizer .cvx-organizer-field--social {
    position: relative;
}

.cvx-mec-ud #mec-ud-organizer .mec-ud-form-p > p,
.cvx-mec-ud #mec-ud-organizer .mec-ud-image-hint {
    margin: 5px 0 0 !important;
    color: var(--cvx-internal-muted) !important;
    font-size: 10.5px !important;
    line-height: 1.5 !important;
}

.cvx-mec-ud #mec-ud-organizer input.cvx-field-invalid {
    border-color: #ef9a92 !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .08) !important;
}

.cvx-mec-ud #mec-ud-organizer .mec-ud-image {
    margin: 14px 0 !important;
    padding: 14px !important;
    background: var(--cvx-internal-soft) !important;
    border: 1px solid var(--cvx-internal-line) !important;
    border-radius: 14px !important;
}

.cvx-mec-ud #mec-ud-organizer .mec-ud-image-upload-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.cvx-mec-ud #mec-ud-organizer .mec-ud-image-box-preview,
.cvx-mec-ud #mec-ud-organizer .mec-ud-image-preview-img,
.cvx-mec-ud #mec-ud-organizer .mec-ud-image-placeholder {
    width: 64px !important;
    height: 64px !important;
}

.cvx-mec-ud #mec-ud-organizer .mec-ud-image-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
}

/* --------------------------------------------------------------------------
 * REPORTS
 * ----------------------------------------------------------------------- */
.cvx-mec-ud #mec-ud-reports .mec-ud-reports-filters {
    grid-template-columns: minmax(190px, 1.35fr) minmax(135px, .75fr) minmax(135px, .75fr) minmax(130px, .7fr) !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-tabs {
    display: inline-flex !important;
    padding: 3px !important;
    background: #f3f6fa !important;
    border: 1px solid var(--cvx-internal-line) !important;
    border-radius: 11px !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-tab {
    color: #475467 !important;
    background: transparent !important;
    border: 0 !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-tab.is-active {
    color: #fff !important;
    background: var(--cvx-blue) !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number .mec-ud-spec {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-ticket,
.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-total {
    min-height: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 12px !important;
    background: #fbfdff !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 12px !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-ticket > div:first-child,
.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-total > div:first-child {
    color: var(--cvx-blue) !important;
    font-size: 24px !important;
    font-weight: 780 !important;
    line-height: 1 !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-ticket > div:last-child,
.cvx-mec-ud #mec-ud-reports .mec-ud-reports-number-spec-total > div:last-child {
    color: #526071 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}

.cvx-mec-ud #mec-ud-reports .mec-ud-reports-chart-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

/* --------------------------------------------------------------------------
 * CALENDAR
 * ----------------------------------------------------------------------- */
.cvx-mec-ud #mec-ud-events-calendar .mec-gCalendar {
    width: 100% !important;
    min-width: 0 !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-header-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 14px !important;
    padding: 14px !important;
    background: #fff !important;
    border: 1px solid var(--cvx-internal-line) !important;
    border-radius: 13px !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-toolbar-title {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    color: var(--cvx-text) !important;
    font-size: 20px !important;
    font-weight: 770 !important;
    letter-spacing: -.02em !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-toolbar-title button.cvx-calendar-filter-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 74px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 9px !important;
    color: #fff !important;
    background: var(--cvx-blue) !important;
    border: 1px solid var(--cvx-blue) !important;
    border-radius: 9px !important;
    font-size: 11px !important;
    font-weight: 720 !important;
}

.cvx-mec-ud #mec-ud-events-calendar .cvx-calendar-control-label {
    display: inline-block !important;
    pointer-events: none !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-button-group {
    display: inline-flex !important;
    gap: 2px !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-toolbar-chunk > .fc-button,
.cvx-mec-ud #mec-ud-events-calendar .fc-button-group > .fc-button {
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 8px !important;
    color: #344054 !important;
    background: #fff !important;
    border: 1px solid #d9e2ec !important;
    box-shadow: none !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-today-button {
    min-width: 56px !important;
    font-weight: 700 !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-col-header-cell-cushion {
    color: #344054 !important;
    font-size: 11px !important;
    font-weight: 730 !important;
    text-transform: none !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-daygrid-day-number {
    color: #27364b !important;
    font-size: 11.5px !important;
    font-weight: 650 !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-day-today {
    background: #f3f8ff !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-day-today .fc-daygrid-day-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 26px !important;
    height: 26px !important;
    padding: 0 6px !important;
    color: #fff !important;
    background: var(--cvx-blue) !important;
    border-radius: 999px !important;
}

.cvx-mec-ud #mec-ud-events-calendar .fc-event {
    border-radius: 6px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .cvx-mec-ud #mec-ud-organizer .mec-organizer-form > .row:first-child,
    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-filter-event {
        grid-column: 1 / -1 !important;
    }
}

/* Mobile */
@media (max-width: 720px) {
    .cvx-mec-ud #mec-ud-profile .row.row-ud-nm,
    .cvx-mec-ud #mec-ud-organizer .mec-organizer-form > .row:first-child,
    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-filters {
        grid-template-columns: 1fr !important;
    }

    .cvx-mec-ud #mec-ud-organizer .cvx-organizer-field--wide,
    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-filter-event {
        grid-column: auto !important;
    }

    .cvx-mec-ud #mec-ud-profile .mec-ud-stripe-section {
        padding: 13px !important;
    }

    .cvx-mec-ud #mec-ud-profile .mec-ud-profile-avatar-row,
    .cvx-mec-ud #mec-ud-organizer .mec-ud-image-upload-row {
        align-items: flex-start !important;
    }

    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-number .mec-ud-spec {
        grid-template-columns: 1fr !important;
    }

    .cvx-mec-ud #mec-ud-events-calendar {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .cvx-mec-ud #mec-ud-events-calendar .fc-header-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .cvx-mec-ud #mec-ud-events-calendar .fc-toolbar-chunk {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .cvx-mec-ud #mec-ud-events-calendar .fc-toolbar-title {
        justify-content: center !important;
        font-size: 17px !important;
    }

    .cvx-mec-ud #mec-ud-events-calendar .fc-view-harness,
    .cvx-mec-ud #mec-ud-events-calendar .fc-scrollgrid {
        min-width: 620px !important;
    }

    .cvx-mec-ud #mec-ud-reports .mec-ud-reports-chart-head {
        align-items: flex-start !important;
        flex-direction: column !important;
    }
}

@media (max-width: 480px) {
    .cvx-mec-ud #mec-ud-profile .mec-ud-avatar-actions,
    .cvx-mec-ud #mec-ud-organizer .mec-ud-image-actions {
        width: 100% !important;
    }

    .cvx-mec-ud #mec-ud-profile .mec-ud-avatar-actions .mec-ud-btn,
    .cvx-mec-ud #mec-ud-organizer .mec-ud-image-actions .mec-ud-btn {
        flex: 1 1 auto !important;
    }
}
