/* =========================================================
   DBU MEMBERSHIP MANAGER - FRONTEND FINAL STYLING
========================================================= */

.dbu-mm-wrap {
    width: 100%;
    max-width: 1120px;
    margin: 50px auto;
    padding: 0 20px;
    box-sizing: border-box;
}


/* =========================================================
   NORMAL MEMBERSHIP / PROFILE CARDS
========================================================= */

.dbu-mm-wrap .dbu-mm-card {
    width: 100%;
    max-width: none;
    margin: 0 0 28px;
    padding: 34px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 20px;

    box-shadow: 0 15px 40px rgba(20, 35, 70, 0.08);

    color: #172033;
    font-family: inherit;
}

.dbu-mm-wrap .dbu-mm-card h2,
.dbu-mm-wrap .dbu-mm-card h3 {
    margin: 0 0 10px;

    color: #172033;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.dbu-mm-wrap .dbu-mm-card > p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   PROFILE CARD
========================================================= */

.dbu-profile-card {
    padding: 34px !important;
}


/* Profile top */

.dbu-profile-head {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 30px;
}


/* Avatar */

.dbu-profile-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #f2a01d;

    color: #ffffff;

    font-size: 24px;
    font-weight: 800;

    box-shadow: 0 10px 24px rgba(242, 160, 29, 0.20);
}


.dbu-profile-kicker {
    display: block;

    margin-bottom: 5px;

    color: #f2a01d;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}


.dbu-profile-head h2 {
    margin: 0 0 5px !important;

    color: #172033;

    font-size: 28px !important;
    font-weight: 700;
}


.dbu-profile-head p {
    margin: 0;

    color: #667085;

    font-size: 14px;
}


/* =========================================================
   PROFILE DETAILS GRID
========================================================= */

.dbu-profile-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;
}


.dbu-profile-item {
    min-width: 0;

    padding: 16px 18px;

    background: #f8f9fc;

    border: 1px solid #edf0f4;
    border-radius: 12px;
}


.dbu-profile-item small {
    display: block;

    margin-bottom: 5px;

    color: #7b8495;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}


.dbu-profile-item strong {
    display: block;

    color: #172033;

    font-size: 15px;
    line-height: 1.45;
    font-weight: 650;

    overflow-wrap: anywhere;
    word-break: break-word;
}


.dbu-profile-item-wide {
    grid-column: 1 / -1;
}


/* =========================================================
   MEMBERSHIP HEADER
========================================================= */

.dbu-head {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}


.dbu-head h2 {
    margin-bottom: 8px !important;
}


.dbu-price {
    color: #172033;

    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;

    text-align: right;
}


.dbu-price small {
    display: block;

    margin-top: 4px;

    color: #7b8495;

    font-size: 12px;
    font-weight: 500;
}


/* =========================================================
   MEMBERSHIP DATA GRID
========================================================= */

.dbu-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;
}


.dbu-grid > div {
    padding: 16px 18px;

    background: #f8f9fc;

    border: 1px solid #edf0f4;
    border-radius: 12px;
}


.dbu-grid small {
    display: block;

    margin-bottom: 5px;

    color: #7b8495;

    font-size: 12px;
}


.dbu-grid strong {
    display: block;

    color: #172033;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}


/* =========================================================
   STATUS
========================================================= */

.dbu-status {
    display: inline-flex;

    align-items: center;

    min-height: 28px;

    padding: 5px 10px;

    border-radius: 999px;

    background: #eef2f7;

    color: #667085;

    font-size: 12px;
    font-weight: 700;
}


.dbu-status.active,
.dbu-status.trialing {
    background: #e8f8ee;
    color: #20894d;
}


.dbu-status.canceled {
    background: #fdecec;
    color: #c13b3b;
}


.dbu-status.past_due,
.dbu-status.unpaid {
    background: #fff4df;
    color: #b96c00;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.dbu-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 24px;
}


.dbu-inline {
    display: inline-block;
    margin: 0;
}


.dbu-actions button,
.dbu-actions .button {
    min-height: 44px;

    padding: 10px 17px;

    border: 1px solid #f2a01d;
    border-radius: 10px;

    background: #f2a01d;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


.dbu-actions .button-secondary {
    background: #ffffff;
    color: #172033;
    border-color: #dce1e8;
}


/* =========================================================
   PAYMENT HISTORY TABLE
========================================================= */

.dbu-table {
    width: 100%;
    overflow-x: auto;
}


.dbu-table table {
    width: 100%;

    border-collapse: collapse;

    margin-top: 20px;
}


.dbu-table th,
.dbu-table td {
    padding: 14px 12px;

    border-bottom: 1px solid #edf0f4;

    text-align: left;

    font-size: 14px;
}


.dbu-table th {
    color: #667085;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
}


/* =========================================================
   LOGIN CARD ONLY
   Important: only card containing #loginform
========================================================= */

.dbu-mm-card:has(#loginform) {
    width: 100%;
    max-width: 520px;

    margin: 60px auto;

    padding: 42px 40px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e7eaf0;
    border-radius: 18px;

    box-shadow: 0 15px 45px rgba(20, 35, 70, 0.10);
}


.dbu-mm-card:has(#loginform) h3 {
    margin: 0 0 8px;

    color: #182033;

    font-size: 30px;
    font-weight: 700;
}


.dbu-mm-card:has(#loginform) > p {
    margin: 0 0 30px;

    color: #697386;

    font-size: 15px;
}


/* Login labels */

.dbu-mm-card #loginform label {
    display: block;

    margin-bottom: 8px;

    color: #252b3a;

    font-size: 14px;
    font-weight: 600;
}


/* Login inputs */

.dbu-mm-card #loginform input[type="text"],
.dbu-mm-card #loginform input[type="password"] {
    display: block;

    width: 100%;
    height: 52px;

    padding: 0 16px;

    box-sizing: border-box;

    background: #f8f9fc;

    border: 1px solid #dfe3eb;
    border-radius: 10px;

    color: #172033;

    font-size: 15px;

    outline: none;

    transition: 0.2s ease;
}


.dbu-mm-card #loginform input[type="text"]:focus,
.dbu-mm-card #loginform input[type="password"]:focus {
    background: #ffffff;

    border-color: #f2a01d;

    box-shadow: 0 0 0 4px rgba(242, 160, 29, 0.12);
}


/* Login field spacing */

.dbu-mm-card #loginform > p {
    margin: 0 0 20px;
}


/* Remember me */

.dbu-mm-card #loginform .login-remember label {
    display: inline-flex;

    flex-direction: row;

    align-items: center;

    gap: 8px;

    margin: 0;

    color: #5d6678;

    font-weight: 500;
}


.dbu-mm-card #loginform input[type="checkbox"] {
    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: #f2a01d;
}


/* Login button */

.dbu-mm-card #loginform #wp-submit {
    width: 100%;

    min-height: 52px;

    padding: 13px 20px;

    border: none;
    border-radius: 10px;

    background: #f2a01d;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 10px 22px rgba(242, 160, 29, 0.22);

    transition: 0.2s ease;
}


.dbu-mm-card #loginform #wp-submit:hover {
    background: #db8d13;

    transform: translateY(-1px);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767px) {

    .dbu-mm-wrap {
        margin: 25px auto;

        padding: 0 14px;
    }


    .dbu-mm-wrap .dbu-mm-card {
    padding: 15px !important;
    padding: 24px 20px;
    border-radius: 16px;
}


    .dbu-profile-head {
        align-items: flex-start;
    }


    .dbu-profile-avatar {
        width: 54px;
        height: 54px;
        min-width: 54px;

        border-radius: 15px;
    }


    .dbu-profile-head h2 {
        font-size: 23px !important;
    }


    .dbu-profile-grid {
        grid-template-columns: 1fr;
    }


    .dbu-profile-item-wide {
        grid-column: auto;
    }


    .dbu-grid {
        grid-template-columns: 1fr;
    }


    .dbu-head {
        flex-direction: column;
    }


    .dbu-price {
        text-align: left;
    }


    .dbu-mm-card:has(#loginform) {
        width: auto;

        margin: 25px 14px;

        padding: 30px 22px;
    }
}
/* =========================================================
   V1.3 BILLING / ACTION ENHANCEMENTS
========================================================= */
.dbu-membership-card .dbu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dbu-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px !important; overflow-wrap: anywhere; }
.dbu-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.dbu-inline { display: inline-flex; margin: 0; }
.dbu-action-btn { appearance: none; border: 1px solid #dfe4ec; border-radius: 10px; padding: 12px 18px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.dbu-primary-btn { background: #172033; color: #fff; border-color: #172033; }
.dbu-secondary-btn { background: #fff; color: #172033; }
.dbu-danger-btn { background: #fff5f5; color: #b42318; border-color: #f5c8c5; }
.dbu-action-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,35,70,.08); }
.dbu-cancel-note { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #fff8e8; border: 1px solid #f4deb0; color: #8c5d00; font-size: 14px; }
.dbu-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dbu-section-title > strong { color: #667085; font-size: 13px; font-weight: 600; }
.dbu-table { width: 100%; overflow-x: auto; }
.dbu-table table { width: 100%; min-width: 850px; border-collapse: collapse; }
.dbu-table th, .dbu-table td { padding: 14px 12px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; font-size: 13px; }
.dbu-table th { color: #667085; font-weight: 700; background: #fafbfc; }
.dbu-table td { color: #172033; }
.dbu-invoice-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eef2f7; font-size: 12px; font-weight: 700; }
.dbu-invoice-link { color: #175cd3; font-weight: 700; text-decoration: none; }
.dbu-mm-notice { max-width: 1120px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #cfe0ff; border-radius: 12px; background: #f3f7ff; color: #194185; }
.dbu-empty-membership p + p { margin-top: 12px !important; }

@media (max-width: 820px) {
    .dbu-membership-card .dbu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dbu-head { flex-direction: column; }
    .dbu-price { text-align: left; }
}
@media (max-width: 560px) {
    .dbu-profile-grid, .dbu-membership-card .dbu-grid { grid-template-columns: 1fr; }
    .dbu-profile-item-wide { grid-column: auto; }
    .dbu-mm-wrap { padding: 0 12px; margin: 24px auto; }
    .dbu-mm-wrap .dbu-mm-card { padding: 22px; border-radius: 16px; }
    .dbu-actions, .dbu-inline, .dbu-action-btn { width: 100%; }
    .dbu-action-btn { justify-content: center; }
}

/* =========================================================
   BILLING SUMMARY / LATEST PAYMENT / NEW PACKAGE
========================================================= */
.dbu-billing-grid > div span {
    display: block;
    margin-top: 5px;
    color: #7b8495;
    font-size: 12px;
    line-height: 1.45;
}

.dbu-last-payment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
}

.dbu-last-payment > div {
    padding: 15px 17px;
    background: #fffaf1;
    border: 1px solid #f6e3bd;
    border-radius: 12px;
}

.dbu-last-payment small {
    display: block;
    margin-bottom: 5px;
    color: #8a6a35;
    font-size: 12px;
}

.dbu-last-payment strong {
    display: block;
    color: #172033;
    font-size: 15px;
}

.dbu-package-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dbu-package-option {
    padding: 24px;
    background: #f8f9fc;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
}

.dbu-package-option h3 {
    font-size: 20px !important;
}

.dbu-package-price {
    margin: 10px 0 4px;
    color: #172033;
    font-size: 28px;
    font-weight: 800;
}

.dbu-package-option p {
    margin: 0 0 18px !important;
    color: #667085;
}

.dbu-new-package-card {
    border-left: 4px solid #f2a01d !important;
}

.dbu-status.cancelled {
    background: #fdecec;
    color: #c13b3b;
}

@media (max-width: 760px) {
    .dbu-last-payment,
    .dbu-package-grid {
        grid-template-columns: 1fr;
    }
}
