.mr-dashboard-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Summary Cards */
.mr-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mr-summary-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mr-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mr-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
}

.mr-total-card .mr-summary-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mr-active-card .mr-summary-icon {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.mr-expiring-card .mr-summary-icon {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.mr-expired-card .mr-summary-icon {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.mr-summary-content {
    flex: 1;
}

.mr-summary-number {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 5px;
}

.mr-summary-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.mr-dashboard-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2d3748;
}

.mr-dashboard-table-wrapper {
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mr-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.mr-dashboard-table thead {
    background: #f8fafc;
}

.mr-dashboard-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.mr-dashboard-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.mr-dashboard-table tbody tr {
    transition: background-color 0.2s ease;
}

.mr-dashboard-table tbody tr:hover {
    background-color: #f8fafc;
}

.mr-company-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.mr-username {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.mr-renewal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.mr-renewal-options .mr-renew-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #3182ce;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.mr-renewal-options .mr-renew-btn:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
}

.mr-renewal-options .mr-renew-btn i {
    font-size: 14px;
}

.mr-custom-renewal-table {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.mr-custom-renewal-table .mr-custom-date-input {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.mr-custom-renewal-table .mr-custom-date-input:focus {
    outline: none;
    border-color: #3182ce;
}

.mr-custom-renewal-table .mr-custom-renew-btn {
    padding: 6px 10px;
    background: #805ad5;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mr-custom-renewal-table .mr-custom-renew-btn:hover {
    background: #6b46c1;
    transform: translateY(-1px);
}

.mr-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mr-status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.mr-status-badge.expired {
    background-color: #f8d7da;
    color: #721c24;
}

.mr-renew-btn,
.mr-reminder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    margin: 2px;
    border: 0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.2;
    min-width: 90px;
    outline: none;
    color: #ffffff;
    background-color: #3182ce;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mr-reminder-btn {
    min-width: 40px;
    padding: 6px;
    border-radius: 50%;
}

.mr-reminder-btn i {
    margin-right: 0;
    font-size: 0.95rem;
}

.mr-renew-btn small {
    display: block;
    margin-top: 4px;
    opacity: 0.9;
    font-size: 11px;
    font-weight: normal;
}

.mr-renew-btn:hover,
.mr-reminder-btn:hover {
    background-color: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mr-renew-btn:active,
.mr-reminder-btn:active {
    transform: translateY(0);
}

.mr-renew-btn:disabled,
.mr-reminder-btn:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.mr-renew-btn[data-years="3"] {
    background-color: #805ad5;
}

.mr-renew-btn[data-years="3"]:hover {
    background-color: #6b46c1;
}

.mr-reminder-btn {
    background-color: #f9722f;
}

.mr-reminder-btn:hover {
    background-color: #d85f20;
}

.mr-reminder-btn i {
    margin-right: 0px;
    font-size: 0.9rem;
}

.mr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1280px) {
    .mr-card-right {
        grid-template-columns: 24% 15% 10% 15% 32% 4%;
    }
}

@media (max-width: 1100px) {
    .mr-card-right {
        grid-template-columns: 32% 18% 12% 14% 1fr;
    }

    .mr-card-toggle {
        justify-self: end;
    }
}

@media (max-width: 992px) {
    .mr-card-right {
        grid-template-columns: 1fr;
    }

    .mr-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.mr-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideIn 0.3s ease;
}

.mr-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mr-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mr-mobile-accordion-wrapper {
    display: none;
}

.mr-accordion-item {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    background: #ffffff;
}

.mr-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.3s ease;
    gap: 12px;
}

.mr-accordion-header:hover {
    background: #e9ecef;
}

.mr-accordion-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.mr-accordion-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mr-accordion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.mr-accordion-company {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.2;
}

.mr-accordion-username {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.2;
}

.mr-accordion-title {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.mr-accordion-toggle {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #3182ce;
}

.mr-accordion-item.active .mr-accordion-toggle {
    transform: rotate(180deg);
}

.mr-accordion-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mr-accordion-content {
    display: none;
    padding: 16px;
    background: #ffffff;
}

.mr-accordion-item.active .mr-accordion-content {
    display: block;
}

.mr-accordion-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mr-accordion-row:last-child {
    border-bottom: none;
}

.mr-accordion-label {
    font-weight: 600;
    color: #555;
    flex: 0 0 40%;
}

.mr-accordion-value {
    flex: 1;
    text-align: right;
    font-size: 14px;
    color: #333;
}

/* Desktop Card View */
.mr-desktop-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mr-member-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.mr-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mr-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 22px;
}

.mr-card-user-info {
    flex: 0 0 22%;
    max-width: 22%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mr-card-company {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    line-height: 1.2;
}

.mr-card-username {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.mr-card-status {
    display: flex;
    align-items: center;
}

.mr-card-body {
    padding: 15px;
}

.mr-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.mr-card-row:last-child {
    margin-bottom: 0;
}

.mr-card-field {
    display: flex;
    flex-direction: column;
}

.mr-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.mr-field-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.mr-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.mr-card-actions .mr-renew-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: #3182ce;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 70px;
}

.mr-card-actions .mr-renew-btn:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
}

.mr-card-actions .mr-renew-btn i {
    font-size: 18px;
    margin-bottom: 4px;
}

.mr-card-actions .mr-renew-btn span {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mr-card-actions .mr-renew-btn small {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 400;
}

.mr-custom-renewal {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.mr-custom-renewal .mr-custom-date-input {
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.mr-custom-renewal .mr-custom-date-input:focus {
    outline: none;
    border-color: #3182ce;
}

.mr-custom-renew-btn {
    padding: 8px 12px;
    background: #805ad5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.mr-custom-renew-btn:hover {
    background: #6b46c1;
    transform: translateY(-2px);
}

.mr-no-members {
    text-align: center;
    padding: 30px;
    color: #718096;
    font-size: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* New Card Structure */

/* Unified Card List */
.mr-dashboard-cards-wrapper {
    display: block;
}

.mr-member-card-item {
    background: #f8fafc;
    border-radius: 14px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    overflow: hidden;
}

.mr-member-card-item:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.mr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    cursor: pointer;
    background: #f8fafc;
    transition: background-color 0.2s ease;
    gap: 15px;
}

.mr-card-header:hover {
    background: #f1f5f9;
}

.mr-card-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.mr-user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    background: #a0aec0;
}

.mr-user-details {
    flex: 1;
}

.mr-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-user-username {
    font-size: 11px;
    color: #718096;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-card-right {
    display: grid;
    grid-template-columns: 20% 13% 10% 13% 32% 12%;
    align-items: center;
    gap: 6px;
    flex: 1 1 78%;
    width: 78%;
}

.mr-user-email {
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.2;
    width: 100%;
}

.mr-user-level {
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    background: #edf2f7;
    padding: 4px 10px;
    border-radius: 16px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.mr-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: nowrap;
    min-width: 210px;
}

.mr-header-renew-btn {
    font-size: 12px !important;
    font-weight: 700 !important;
}

.mr-header-reminder-btn {
    font-size: 12px !important;
    font-weight: 700 !important;
}

.mr-user-status {
    white-space: nowrap;
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.mr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.mr-status-badge i {
    font-size: 12px;
}

.mr-status-badge.active {
    background: #def7ec;
    color: #046c4e;
}

.mr-status-badge.expired {
    background: #fdecea;
    color: #b43429;
}

.mr-status-badge.expiring-soon {
    background: #fff7e6;
    color: #b7791f;
}

.mr-user-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.mr-card-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.2s ease;
}

.mr-card-toggle i {
    font-size: 14px;
    color: #4a5568;
    transition: transform 0.2s ease;
}

.mr-member-card-item.active .mr-card-toggle i {
    transform: rotate(180deg);
}

.mr-card-content {
    display: none;
    padding: 18px 20px 22px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.mr-member-card-item.active .mr-card-content {
    display: block;
}

.mr-card-email {
    margin-bottom: 16px;
    font-size: 14px;
    color: #4a5568;
}

.mr-renewal-section h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #1f2937;
    font-weight: 700;
}

.mr-renewal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mr-renewal-buttons .elementor-button {
    margin: 0 !important;
    width: 100%;
    justify-content: center;
}

.mr-custom-renewal {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.mr-custom-renewal label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.mr-custom-renewal .mr-custom-date-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    width: 30%;
    min-width: 180px;
}

.mr-custom-renewal .mr-custom-date-input:focus {
    outline: none;
    border-color: #3182ce;
}

.mr-custom-renewal .elementor-button {
    margin: 0 !important;
    white-space: nowrap;
    width: 30%;
    min-width: 180px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {

    /* Header compact on mobile: show only name/username + status */
    .mr-user-email,
    .mr-user-level,
    .mr-header-actions,
    .mr-user-expiry {
        display: none !important;
    }

    .mr-card-header {
        align-items: center;
    }

    .mr-card-right {
        gap: 6px;
    }

    /* Stack custom renewal controls in accordion for readability */
    .mr-accordion-actions .mr-custom-date-input,
    .mr-accordion-actions .mr-custom-renew-btn,
    .mr-custom-renewal .mr-custom-date-input,
    .mr-custom-renewal .elementor-button {
        width: 100% !important;
        min-width: 0;
        text-align: center;
    }

    /* Hide cards on mobile; show accordion */
    .mr-dashboard-table-wrapper,
    .mr-desktop-cards-wrapper,
    .mr-dashboard-cards-wrapper {
        display: none !important;
    }

    .mr-mobile-accordion-wrapper {
        display: block !important;
    }

    /* Adjust summary cards for mobile */
    .mr-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }

    .mr-summary-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .mr-summary-number {
        font-size: 24px;
    }

    .mr-summary-label {
        font-size: 13px;
    }
}

@media (min-width: 769px) {

    /* Hide accordion wrapper on desktop */
    .mr-mobile-accordion-wrapper {
        display: none !important;
    }

    /* Show cards on desktop */
    .mr-dashboard-cards-wrapper {
        display: block !important;
    }

    /* Adjust summary cards for desktop */
    .mr-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
}

/* Tablet compatibility */
@media (min-width: 769px) and (max-width: 1024px) {
    .mr-desktop-cards-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 18px;
    }

    .mr-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 18px;
    }

    .mr-card-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mr-card-actions .mr-renew-btn {
        min-height: 60px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .mr-card-actions .mr-renew-btn i {
        margin-bottom: 0;
        margin-right: 8px;
    }

    .mr-card-actions .mr-renew-btn small {
        margin-left: auto;
        margin-bottom: 0;
    }

    .mr-custom-renewal {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.mr-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mr-no-permission {
    padding: 40px 20px;
    text-align: center;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 16px;
}


/* Danger Zone / Delete User */
.mr-danger-section {
    margin-top: 15px;
    padding: 15px;
    border-top: 2px solid #f5c6cb;
    background: #fff5f5;
    border-radius: 0 0 14px 14px;
}

.mr-danger-section h4 {
    color: #c53030;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mr-danger-warning {
    font-size: 12px;
    color: #9b2c2c;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.mr-delete-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #e53e3e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.2;
}

.mr-delete-user-btn:hover {
    background-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(197, 48, 48, 0.3);
}

.mr-delete-user-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.mr-delete-user-btn:disabled {
    background-color: #feb2b2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mr-delete-user-btn i {
    font-size: 12px;
}

/* Edit User Details Section */
.mr-edit-details-section {
    margin-top: 12px;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 0 12px 12px;
}

.mr-edit-details-section h4 {
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mr-edit-details-section h4::before {
    content: '';
    width: 3px;
    height: 12px;
    background: #3b82f6;
    border-radius: 2px;
}

.mr-edit-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.mr-edit-details-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
}

.mr-edit-details-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.mr-edit-details-btn i {
    font-size: 10px;
}

/* Edit Form Container */
.mr-edit-form-container {
    margin-top: 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.mr-edit-form-loading {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    background: #f8fafc;
}

.mr-edit-form-loading i {
    margin-right: 5px;
    color: #3b82f6;
}

.mr-edit-form {
    padding: 12px 14px;
}

/* Edit Form Grid - 2x2 Professional Layout */
.mr-edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.mr-edit-form-grid-mobile {
    grid-template-columns: 1fr;
}

.mr-edit-section-title {
    grid-column: 1 / -1;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    margin: 14px 0 6px 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 3px solid #3b82f6;
}

.mr-edit-section-title::before {
    display: none;
}

.mr-edit-section-title:first-child {
    margin-top: 0;
}

.mr-edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mr-edit-field-full {
    grid-column: 1 / -1;
}

.mr-edit-field label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    margin-bottom: 2px;
}

.mr-edit-field input[type="text"],
.mr-edit-field input[type="email"],
.mr-edit-field input[type="tel"],
.mr-edit-field input[type="url"],
.mr-edit-field input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
}

.mr-edit-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mr-edit-field input[readonly],
.mr-edit-field input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Read Only Badge */
.mr-readonly-badge {
    display: inline-block;
    padding: 1px 4px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 8px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    vertical-align: middle;
    margin-left: 3px;
}

/* Taxonomy Checkbox Grid */
.mr-taxonomy-checkboxes {
    margin-top: 4px;
}

.mr-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.mr-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
    margin: 0;
}

.mr-checkbox-item:hover {
    background: #e2e8f0;
}

.mr-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.mr-checkbox-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
    user-select: none;
}

.mr-checkbox-item input[type="checkbox"]:checked + .mr-checkbox-label {
    color: #1e40af;
    font-weight: 600;
}

/* Textarea fields */
.mr-edit-field textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.mr-edit-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* File/Image upload fields */
.mr-file-field-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    overflow: hidden;
}

.mr-file-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.mr-file-preview:empty {
    display: none;
}

.mr-file-preview img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.mr-file-preview .mr-file-name {
    font-size: 11px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-media-upload-btn,
.mr-media-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
    flex-shrink: 0;
    box-sizing: border-box;
}

.mr-media-upload-btn {
    background: #ffffff;
    color: #1e293b;
    border-color: #94a3b8;
}

.mr-media-upload-btn:hover {
    background: #f8fafc;
    border-color: #64748b;
}

.mr-media-remove-btn {
    background: #fff5f5;
    color: #dc2626;
    border-color: #fecaca;
    padding: 3px 6px;
}

.mr-media-remove-btn:hover {
    background: #fee2e2;
}

.mr-media-upload-btn i,
.mr-media-remove-btn i {
    font-size: 9px;
}

/* Fix WordPress media modal — smaller close button, visible tabs */
.media-modal .media-modal-close {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
}
.media-modal .media-modal-close .media-modal-icon {
    width: 20px !important;
    height: 20px !important;
}

/* Fix WordPress media modal tabs — ensure inactive tab is visible */
.media-modal .media-router .media-menu-item {
    color: #3c434a !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.media-modal .media-router .media-menu-item.active {
    color: #000000 !important;
    border-bottom-color: #000000 !important;
}
.media-modal .media-toolbar .media-button {
    color: #2271b1 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Form Actions */
.mr-edit-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.mr-save-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.mr-save-details-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}

.mr-save-details-btn:disabled {
    background: #a7f3d0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mr-save-details-btn i {
    font-size: 10px;
}

.mr-cancel-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mr-cancel-edit-btn:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.mr-cancel-edit-btn i {
    font-size: 10px;
}

/* Accordion edit row */
.mr-accordion-edit-container {
    display: block;
    padding: 0 10px 10px;
}

/* Edit form message */
.mr-edit-form-message {
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 10px;
    display: none;
}

.mr-edit-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.mr-edit-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Mobile-friendly edit form */
@media (max-width: 768px) {
    .mr-edit-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mr-edit-form {
        padding: 14px 12px;
    }

    .mr-edit-form-container {
        margin-top: 12px;
        border-radius: 10px;
    }

    .mr-edit-section-title {
        font-size: 11px;
        padding: 10px 12px;
        margin: 16px 0 8px 0;
    }

    .mr-edit-field {
        gap: 5px;
    }

    .mr-edit-field label {
        font-size: 12px;
        font-weight: 600;
        color: #374151;
    }

    .mr-edit-field input[type="text"],
    .mr-edit-field input[type="email"],
    .mr-edit-field input[type="tel"],
    .mr-edit-field input[type="url"],
    .mr-edit-field input[type="number"] {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 8px;
        border: 1px solid #d1d5db;
    }

    .mr-edit-field input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .mr-edit-form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .mr-save-details-btn,
    .mr-cancel-edit-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
    }

    .mr-save-details-btn {
        order: 1;
    }

    .mr-cancel-edit-btn {
        order: 2;
    }

    .mr-edit-details-section {
        padding: 16px;
        margin-top: 14px;
    }

    .mr-edit-details-section h4 {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .mr-edit-details-btn {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .mr-readonly-badge {
        font-size: 9px;
        padding: 2px 5px;
    }

    /* Mobile checkbox grid - single column */
    .mr-checkbox-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px;
        max-height: 180px;
    }

    .mr-checkbox-item {
        padding: 10px 12px;
    }

    .mr-checkbox-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .mr-checkbox-label {
        font-size: 14px;
    }
}

/* Tablet - keep 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .mr-edit-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 18px;
    }

    .mr-edit-form {
        padding: 16px 18px;
    }
}