/* =========================================================
   PREMIUM WOOCOMMERCE PROFILE
   ========================================================= */

.profile-dashboard {
    padding: 70px 0 90px;
    background:
        radial-gradient(
            circle at top right,
            rgba(102, 157, 76, 0.08),
            transparent 35%
        ),
        #f7faf5;
}


.profile-container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
}


/* =========================================================
   ALERTS
   ========================================================= */

.profile-alert {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 25px;
    padding: 16px 20px;

    border-radius: 14px;

    animation: profileAlertIn 0.35s ease;
}


.profile-alert-success {
    color: #216e3a;
    background: #f0faf4;
    border: 1px solid #bce8cc;
}


.profile-alert-error {
    color: #a33131;
    background: #fff4f4;
    border: 1px solid #f0c4c4;
}


.profile-alert-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    font-size: 16px;
    font-weight: 800;
}


.profile-alert-success .profile-alert-icon {
    background: #2e9d59;
}


.profile-alert-error .profile-alert-icon {
    background: #d64545;
}


.profile-alert strong {
    display: block;

    margin-bottom: 2px;

    font-size: 14px;
}


.profile-alert p {
    margin: 0;

    color: inherit;

    opacity: 0.82;

    font-size: 12px;
}


@keyframes profileAlertIn {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   PROFILE HERO
   ========================================================= */

.profile-hero-card {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 22px;
    padding: 30px;

    background: #ffffff;

    border: 1px solid #e8eee5;
    border-radius: 24px;

    box-shadow:
        0 15px 45px rgba(24, 39, 20, 0.06),
        0 3px 12px rgba(24, 39, 20, 0.03);

    overflow: hidden;
}


.profile-hero-card::after {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    right: -100px;
    top: -130px;

    border-radius: 50%;

    background: rgba(102, 157, 76, 0.08);

    pointer-events: none;
}


.profile-hero-left {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;

    gap: 20px;
}


.profile-avatar {
    position: relative;

    width: 92px;
    height: 92px;

    flex: 0 0 92px;
}


.profile-avatar img {
    width: 92px;
    height: 92px;

    display: block;

    object-fit: cover;

    border-radius: 50%;

    border: 4px solid #ffffff;

    box-shadow:
        0 8px 25px rgba(25, 40, 20, 0.12);
}


.profile-online-dot {
    position: absolute;

    right: 5px;
    bottom: 6px;

    width: 15px;
    height: 15px;

    background: #48a868;

    border: 3px solid #ffffff;

    border-radius: 50%;
}


.profile-hero-info {
    min-width: 0;
}


.profile-label {
    display: inline-block;

    margin-bottom: 5px;

    color: #6d8d61;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.1em;
}


.profile-hero-info h1 {
    margin: 0 0 5px;

    color: #20251e;

    font-size: 27px;
    font-weight: 750;

    line-height: 1.2;
}


.profile-hero-info p {
    margin: 0;

    color: #777d77;

    font-size: 13px;
}


.profile-hero-actions {
    position: relative;
    z-index: 2;
}


.profile-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    color: #b33c3c;
    background: #fff7f7;

    border: 1px solid #f0dcdc;
    border-radius: 10px;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.profile-logout-button:hover {
    color: #ffffff;
    background: #d34a4a;

    transform: translateY(-1px);
}


/* =========================================================
   STATISTICS
   ========================================================= */

.profile-stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 25px;
}


.profile-stat-card {
    display: flex;
    align-items: center;

    gap: 13px;

    min-height: 94px;

    padding: 17px;

    background: #ffffff;

    border: 1px solid #e8eee5;
    border-radius: 17px;

    box-shadow:
        0 8px 25px rgba(24, 39, 20, 0.035);
}


.profile-stat-icon {
    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    font-size: 18px;
    font-weight: 800;
}


.profile-stat-icon.orders {
    color: #557e45;
    background: #eef6e9;
}


.profile-stat-icon.completed {
    color: #258454;
    background: #eaf8f0;
}


.profile-stat-icon.processing {
    color: #a46c12;
    background: #fff7e4;
}


.profile-stat-icon.spent {
    color: #68509d;
    background: #f1edfa;
}


.profile-stat-label {
    display: block;

    margin-bottom: 3px;

    color: #8a9088;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.055em;
}


.profile-stat-card strong {
    display: block;

    color: #222820;

    font-size: 18px;
    font-weight: 750;
}


.profile-stat-card strong .woocommerce-Price-amount {
    font-size: inherit;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.profile-layout {
    display: grid;

    grid-template-columns:
        245px minmax(0, 1fr);

    gap: 24px;

    align-items: start;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.profile-sidebar {
    position: sticky;

    top: 25px;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #e8eee5;
    border-radius: 19px;

    box-shadow:
        0 10px 30px rgba(24, 39, 20, 0.04);
}


.profile-sidebar-heading {
    padding: 4px 8px 17px;

    border-bottom: 1px solid #eef2eb;
}


.profile-sidebar-heading span {
    display: block;

    margin-bottom: 4px;

    color: #91a08b;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.1em;
}


.profile-sidebar-heading strong {
    color: #273022;

    font-size: 17px;
    font-weight: 750;
}


.profile-sidebar nav {
    display: flex;
    flex-direction: column;

    gap: 4px;

    margin-top: 14px;
}


.profile-nav-link {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 43px;

    padding: 8px 10px;

    color: #687064;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 650;

    text-decoration: none;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-nav-link:hover {
    color: #38582e;
    background: #f5f9f2;

    transform: translateX(2px);
}


.profile-nav-link.active {
    color: #385f2e;
    background: #edf6e9;
}


.profile-nav-icon {
    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 25px;

    color: currentColor;

    font-size: 12px;
}


.profile-nav-logout {
    margin-top: 8px;

    color: #bd4848;

    background: #fff8f8;
}


.profile-nav-logout:hover {
    color: #ffffff;
    background: #d34d4d;
}


/* =========================================================
   CONTENT
   ========================================================= */

.profile-main {
    min-width: 0;
}


.premium-profile-form {
    display: flex;
    flex-direction: column;

    gap: 20px;
}


.profile-content-card {
    scroll-margin-top: 25px;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #e8eee5;
    border-radius: 20px;

    box-shadow:
        0 10px 30px rgba(24, 39, 20, 0.035);
}


.profile-card-header {
    display: flex;
    justify-content: space-between;

    margin-bottom: 25px;
    padding-bottom: 20px;

    border-bottom: 1px solid #eef2eb;
}


.profile-section-eyebrow {
    display: block;

    margin-bottom: 5px;

    color: #759568;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.1em;
}


.profile-card-header h2 {
    margin: 0 0 5px;

    color: #252a24;

    font-size: 21px;
    font-weight: 750;
}


.profile-card-header p {
    margin: 0;

    color: #858b83;

    font-size: 12px;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.profile-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 19px;
}


.profile-field {
    min-width: 0;
}


.profile-field.full {
    grid-column: 1 / -1;
}


.profile-field label {
    display: block;

    margin: 0 0 7px;

    color: #424a40;

    font-size: 11px;
    font-weight: 700;
}


.profile-field input,
.profile-field select {
    width: 100%;
    height: 47px;

    box-sizing: border-box;

    padding: 0 13px;

    color: #293027;
    background: #fbfcfa;

    border: 1px solid #e0e7dd;
    border-radius: 10px;

    outline: none;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-field input:hover,
.profile-field select:hover {
    background: #ffffff;

    border-color: #ccd8c8;
}


.profile-field input:focus,
.profile-field select:focus {
    background: #ffffff;

    border-color: #79a86a;

    box-shadow:
        0 0 0 3px rgba(90, 140, 72, 0.10);
}


.profile-field input::placeholder {
    color: #a2a8a0;
}


/* =========================================================
   SAVE BAR
   ========================================================= */

.profile-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 19px 22px;

    background: #f1f7ee;

    border: 1px solid #dcebd6;
    border-radius: 16px;
}


.profile-save-bar strong {
    display: block;

    margin-bottom: 3px;

    color: #34482f;

    font-size: 13px;
    font-weight: 750;
}


.profile-save-bar span {
    color: #7c8877;

    font-size: 11px;
}


.profile-save-button {
    min-height: 45px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 20px;

    color: #ffffff;
    background: #3f7131;

    border: 1px solid #315b26;
    border-radius: 10px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(48, 91, 37, 0.16);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-save-button:hover {
    background: #518842;

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(48, 91, 37, 0.20);
}


.profile-save-button:disabled {
    cursor: wait;
    opacity: 0.75;
}


.save-button-icon {
    color: inherit !important;

    font-size: 14px !important;
}


.save-spinner {
    width: 15px;
    height: 15px;

    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;

    border-radius: 50%;

    animation: profileSpin 0.7s linear infinite;
}


@keyframes profileSpin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .profile-stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .profile-layout {
        grid-template-columns:
            210px minmax(0, 1fr);
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 800px) {

    .profile-dashboard {
        padding: 45px 0 60px;
    }


    .profile-container {
        padding: 0 15px;
    }


    .profile-banner-inner {
        padding: 0 15px;
    }


    .profile-banner-decoration {
        display: none;
    }


    .profile-hero-card {
        align-items: flex-start;
        flex-direction: column;

        padding: 23px;
    }


    .profile-hero-left {
        width: 100%;
    }


    .profile-hero-actions {
        width: 100%;
    }


    .profile-logout-button {
        width: 100%;
    }


    .profile-layout {
        display: block;
    }


    .profile-sidebar {
        position: static;

        margin-bottom: 20px;

        overflow-x: auto;
    }


    .profile-sidebar nav {
        flex-direction: row;

        width: max-content;
    }


    .profile-nav-link {
        white-space: nowrap;
    }


    .profile-nav-logout {
        margin-top: 0;
    }

}


/* =========================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .profile-stats-grid {
        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }


    .profile-stat-card {
        min-height: 80px;

        padding: 12px;
    }


    .profile-stat-icon {
        width: 38px;
        height: 38px;

        flex-basis: 38px;
    }


    .profile-stat-card strong {
        font-size: 16px;
    }


    .profile-stat-label {
        font-size: 8px;
    }


    .profile-hero-left {
        align-items: flex-start;
    }


    .profile-avatar,
    .profile-avatar img {
        width: 70px;
        height: 70px;
    }


    .profile-avatar {
        flex-basis: 70px;
    }


    .profile-online-dot {
        right: 2px;
        bottom: 3px;
    }


    .profile-hero-info h1 {
        font-size: 21px;
    }


    .profile-content-card {
        padding: 20px 16px;
    }


    .profile-form-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .profile-field.full {
        grid-column: auto;
    }


    .profile-save-bar {
        align-items: stretch;
        flex-direction: column;
    }


    .profile-save-button {
        width: 100%;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .profile-stats-grid {
        grid-template-columns: 1fr;
    }


    .profile-hero-card {
        padding: 18px;
    }


    .profile-hero-left {
        gap: 12px;
    }


    .profile-hero-info h1 {
        font-size: 19px;
    }


    .profile-card-header h2 {
        font-size: 18px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .profile-alert,
    .profile-nav-link,
    .profile-save-button,
    .profile-logout-button,
    .profile-field input,
    .profile-field select {
        animation: none !important;
        transition: none !important;
    }

}
