/*   body {
        background-color: #fbf8f6;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    } */
body {
    background: #f3f4f6;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
}

/*   .napa-container {
        max-width: 1100px;
        margin: 0 auto;
        padding: 40px 20px;
    } */

.napa-container {
    max-width: 960px;
    margin: 5px auto;
    padding: 0 20px;
}

/* Not Logged In */
.md-login-prompt {
    text-align: center;
    max-width: 440px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    padding: 48px 36px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.md-lock-icon {
    font-size: 48px;
    color: #BF060A;
    margin-bottom: 16px;
}

.md-login-prompt h2 {
    font-size: 24px;
    color: #2a2a2a;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.md-login-prompt p {
    color: #666;
    font-size: 14px;
    margin: 0 0 24px 0;
}

.md-login-btn {
    display: inline-block;
    background: linear-gradient(135deg, #E8453C, #BF060A);
    color: white !important;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

    .md-login-btn:hover {
        opacity: 0.88;
    }

.md-register-text {
    margin-top: 20px !important;
    font-size: 13px !important;
    color: #888 !important;
}

    .md-register-text a {
        color: #BF060A;
        font-weight: 600;
        text-decoration: none;
    }

        .md-register-text a:hover {
            text-decoration: underline;
        }

/* Profile Header */
.md-profile-header {
    background: white;
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.md-profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.md-avatar {
    width: 52px;
    height: 52px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BF060A;
    font-size: 22px;
    border: 2px solid #BF060A;
}

.md-profile-info h2 {
    font-size: 20px;
    color: #2a2a2a;
    margin: 0;
    font-weight: 700;
}

.md-profile-info p {
    font-size: 14px;
    color: #666;
    margin: 2px 0 0 0;
}

.md-donate-more-btn {
    background: linear-gradient(135deg, #E8453C, #BF060A);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

    .md-donate-more-btn:hover {
        opacity: 0.88;
    }

/* Stats */
.md-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.md-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: center;
}

.md-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #BF060A;
    margin-bottom: 4px;
}

.md-stat-label {
    font-size: 13px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section */
.md-section {
    background: white;
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.md-section-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

    .md-section-header h3 {
        font-size: 18px;
        color: #2a2a2a;
        margin: 0;
        font-weight: 700;
    }

/* Loading */
.md-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
}

/* Error */
.md-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #fecaca;
}

/* Empty */
.md-empty {
    text-align: center;
    padding: 48px 20px;
}

.md-empty-icon {
    font-size: 48px;
    color: #d0d0d0;
    margin-bottom: 16px;
}

.md-empty h3 {
    font-size: 18px;
    color: #2a2a2a;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.md-empty p {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
}

/* Table */
.md-table {
    width: 100%;
    border-collapse: collapse;
}

    .md-table thead th {
        font-size: 12px;
        color: #888;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 10px 12px;
        border-bottom: 2px solid #f0f0f0;
        text-align: left;
    }

    .md-table tbody td {
        padding: 14px 12px;
        font-size: 14px;
        color: #333;
        border-bottom: 1px solid #f5f5f5;
    }

    .md-table tbody tr:hover {
        background: #fafafa;
    }

    .md-table tbody tr:last-child td {
        border-bottom: none;
    }

.md-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.md-status-completed {
    background: #f0fdf4;
    color: #16a34a;
}

.md-status-pending {
    background: #fff7ed;
    color: #ea580c;
}

.md-status-failed {
    background: #fef2f2;
    color: #dc2626;
}

.md-type-anonymous {
    color: #888;
    font-style: italic;
    font-size: 13px;
}

.md-type-named {
    color: #333;
    font-size: 13px;
}

.md-amount {
    font-weight: 700;
    color: #BF060A;
}

.md-table-wrap {
    overflow-x: auto;
}

/* Tab Header */
.md-tab-header {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.md-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

    .md-tab-btn:hover {
        color: #BF060A;
    }

    .md-tab-btn.active {
        color: #BF060A;
        border-bottom-color: #BF060A;
    }

.md-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #f0f0f0;
    color: #666;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.md-tab-btn.active .md-tab-count {
    background: #fef2f2;
    color: #BF060A;
}

/* Tab Panel */
.md-tab-panel {
    display: block;
}

.md-tab-empty {
    text-align: center;
    padding: 36px 20px;
    color: #aaa;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .md-tab-empty i {
        font-size: 32px;
        color: #ddd;
    }

/* Manage Recurring Popup */
.md-manage-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.md-manage-modal {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.md-manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px 24px;
    border-bottom: 2px solid #f0f0f0;
}

    .md-manage-header h3 {
        font-size: 17px;
        font-weight: 700;
        color: #2a2a2a;
        margin: 0;
    }

.md-manage-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

    .md-manage-close:hover {
        color: #BF060A;
    }

.md-manage-summary {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin: 20px 24px 0 24px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.md-manage-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.md-manage-summary-label {
    color: #888;
    font-weight: 600;
}

.md-manage-summary-value {
    color: #2a2a2a;
    /**font-weight: 600;
    text-align: right;*/
    text-align: left;
}

.md-manage-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 24px;
}

.md-manage-section {
    padding: 0 24px;
    margin-bottom: 20px;
}

.md-manage-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.md-manage-amount-row {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

    .md-manage-amount-row:focus-within {
        border-color: #BF060A;
    }

.md-manage-dollar {
    padding: 10px 12px;
    background: #f9f9f9;
    color: #666;
    font-weight: 700;
    font-size: 15px;
    border-right: 1px solid #e0e0e0;
}

.md-manage-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1a1a1a;
    background: white;
}

    .md-manage-input::-webkit-outer-spin-button,
    .md-manage-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

.md-manage-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #E8453C, #BF060A);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .md-manage-btn-primary:hover:not(:disabled) {
        opacity: 0.88;
    }

    .md-manage-btn-primary:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.md-manage-cancel-note {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.md-manage-btn-danger {
    width: 100%;
    background: white;
    color: #dc2626;
    border: 2px solid #fecaca;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

    .md-manage-btn-danger:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #dc2626;
    }

    .md-manage-btn-danger:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.md-manage-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    border: 1px solid #fecaca;
}

.md-manage-success {
    margin: 0 24px 20px 24px;
    background: #f0fdf4;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.md-manage-row-btn {
    background: white;
    border: 0px solid #e0e0e0;
    border-radius: 7px;
    padding: 0px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

/*  .md-manage-row-btn:hover {
        border-color: #BF060A;
        color: #BF060A;
    } */

/* Responsive */
@@media (max-width: 768px) {
    .md-stats-row {
        grid-template-columns: 1fr;
    }

    .md-profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .md-table-wrap {
        overflow-x: auto;
    }

    .md-table {
        min-width: 500px;
    }

    .md-tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
