/**
 * Frontend Members Admin Styles
 *
 * @package FF_Member_Renewals
 */

/* Reset and Base */
.ffmr-ma-wrapper,
.ffmr-ma-login-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
}

.ffmr-ma-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== LOGIN FORM ===== */
.ffmr-ma-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    padding: 20px;
    /* Full width - break out of any container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    left: 0;
    box-sizing: border-box;
}

.ffmr-ma-login-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.ffmr-ma-login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.ffmr-ma-login-logo h1 {
    margin: 0 0 5px;
    font-size: 28px;
    color: #1a472a;
}

.ffmr-ma-login-logo p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.ffmr-ma-login-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ffmr-ma-login-form .ffmr-ma-form-group {
    margin-bottom: 20px;
}

.ffmr-ma-login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.ffmr-ma-login-form input[type="text"],
.ffmr-ma-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ffmr-ma-login-form input:focus {
    outline: none;
    border-color: #1a472a;
}

.ffmr-ma-remember {
    display: flex;
    align-items: center;
}

.ffmr-ma-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.ffmr-ma-login-btn {
    width: 100%;
    padding: 14px;
    background: #1a472a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ffmr-ma-login-btn:hover {
    background: #2d5a3d;
}

/* ===== ACCESS DENIED ===== */
.ffmr-ma-access-denied {
    text-align: center;
    padding: 60px 20px;
}

.ffmr-ma-access-denied h2 {
    color: #c00;
    margin-bottom: 10px;
}

/* ===== HEADER ===== */
.ffmr-ma-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.ffmr-ma-header h1 {
    margin: 0;
    font-size: 24px;
    color: #1a472a;
}

.ffmr-ma-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ffmr-ma-user {
    color: #666;
    font-size: 14px;
}

.ffmr-ma-logout {
    color: #1a472a;
    text-decoration: none;
    font-size: 14px;
}

.ffmr-ma-logout:hover {
    text-decoration: underline;
}

/* ===== STATS CARDS ===== */
.ffmr-ma-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.ffmr-ma-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.ffmr-ma-stat-success {
    border-left: 4px solid #28a745;
}

.ffmr-ma-stat-warning {
    border-left: 4px solid #dc3545;
}

.ffmr-ma-stat-revenue {
    border-left: 4px solid #1a472a;
}

.ffmr-ma-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 5px;
}

.ffmr-ma-stat-warning .ffmr-ma-stat-number {
    color: #dc3545;
}

.ffmr-ma-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== ACTION BAR ===== */
.ffmr-ma-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ffmr-ma-filters {
    display: flex;
    gap: 5px;
}

.ffmr-ma-filter-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.ffmr-ma-filter-btn:hover {
    border-color: #1a472a;
    color: #1a472a;
}

.ffmr-ma-filter-btn.active {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}

.ffmr-ma-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ffmr-ma-search-form {
    display: flex;
    gap: 5px;
}

.ffmr-ma-search-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
}

.ffmr-ma-search-form button {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.ffmr-ma-clear-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #dc3545;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.ffmr-ma-clear-search:hover {
    background: #c82333;
    color: #fff;
}

.ffmr-ma-btn {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.ffmr-ma-btn:hover {
    border-color: #1a472a;
    color: #1a472a;
}

.ffmr-ma-btn-primary {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}

.ffmr-ma-btn-primary:hover {
    background: #2d5a3d;
    border-color: #2d5a3d;
    color: #fff;
}

/* ===== TABLE ===== */
.ffmr-ma-table-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.ffmr-ma-table {
    width: 100%;
    border-collapse: collapse;
}

.ffmr-ma-table th,
.ffmr-ma-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ffmr-ma-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ffmr-ma-table th.sortable {
    cursor: pointer;
}

.ffmr-ma-table th.sortable:hover {
    background: #eee;
}

.ffmr-ma-table tbody tr:hover {
    background: #f8f9fa;
}

.ffmr-ma-table tbody tr.inactive {
    opacity: 0.6;
}

.ffmr-ma-table a {
    color: #1a472a;
    text-decoration: none;
}

.ffmr-ma-table a:hover {
    text-decoration: underline;
}

.ffmr-ma-no-results {
    text-align: center;
    padding: 40px !important;
    color: #666;
}

/* Status badges */
.ffmr-ma-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ffmr-ma-status-paid {
    background: #d4edda;
    color: #155724;
}

.ffmr-ma-status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

.ffmr-ma-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.ffmr-ma-badge-inactive {
    background: #ffc107;
    color: #000;
}

/* Action buttons */
.ffmr-ma-actions-cell {
    white-space: nowrap;
}

.ffmr-ma-action-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
    border: none;
}

.ffmr-ma-action-edit {
    background: #1a472a;
    color: #fff;
}

.ffmr-ma-action-edit:hover {
    background: #2d5a3d;
}

.ffmr-ma-action-inactive {
    background: #6c757d;
    color: #fff;
}

.ffmr-ma-action-inactive:hover {
    background: #5a6268;
}

.ffmr-ma-action-payment {
    background: #28a745;
    color: #fff;
}

.ffmr-ma-action-payment:hover {
    background: #218838;
}

.ffmr-ma-payment-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}

.ffmr-ma-payment-info strong {
    color: #1a472a;
}

/* ===== MODAL ===== */
.ffmr-ma-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.ffmr-ma-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ffmr-ma-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.ffmr-ma-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a472a;
}

.ffmr-ma-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.ffmr-ma-modal-close:hover {
    color: #333;
}

.ffmr-ma-modal-body {
    padding: 25px;
}

.ffmr-ma-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ffmr-ma-form-group {
    margin-bottom: 18px;
}

.ffmr-ma-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.ffmr-ma-form-group input,
.ffmr-ma-form-group select,
.ffmr-ma-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.ffmr-ma-form-group input:focus,
.ffmr-ma-form-group select:focus,
.ffmr-ma-form-group textarea:focus {
    outline: none;
    border-color: #1a472a;
}

.ffmr-ma-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.ffmr-ma-modal-cancel {
    background: #fff;
}

/* ===== FOOTER ===== */
.ffmr-ma-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* ===== NOTIFICATIONS ===== */
.ffmr-ma-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ffmr-ma-notification.show {
    transform: translateX(0);
}

.ffmr-ma-notification-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ffmr-ma-notification-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ffmr-ma-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .ffmr-ma-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ffmr-ma-filters {
        justify-content: center;
    }

    .ffmr-ma-actions {
        flex-direction: column;
    }

    .ffmr-ma-search-form {
        width: 100%;
    }

    .ffmr-ma-search-form input {
        flex: 1;
        width: auto;
    }

    .ffmr-ma-table-wrapper {
        overflow-x: auto;
    }

    .ffmr-ma-table {
        min-width: 600px;
    }

    .ffmr-ma-form-row {
        grid-template-columns: 1fr;
    }
}

