/* ================================================================
   GL Account — Shell & Navigation
   Pure custom classes + parent selectors (NO Tailwind for layout)
   ================================================================ */

/* ── 0. WP Page-level overrides ── */
.woocommerce-account .gl-main {
    background: #f5f5f5;
    min-height: 600px;
}

.woocommerce-account .gl-main .gl-content-wrap {
    padding-top: 30px;
    padding-bottom: 80px;
}

.woocommerce-account .gl-content-wrap article {
    margin: 0;
    padding: 0;
    background: none;
}

.woocommerce-account .storefront-breadcrumb {
    display: none;
}

/* Kill Storefront / WC default form spacing inside account */
.gl-account__content form,
.gl-account__content .woocommerce-EditAccountForm,
.gl-account__content .woocommerce-address-fields,
.gl-account__content .edit-account {
    margin-bottom: 0;
}

.gl-account__body .clear {
    display: block;
    clear: both;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    visibility: hidden;
}

.gl-account__body .woocommerce-EditAccountForm > .clear {
    display: none;
}

/* Ensure icon fonts render inside account area */
.gl-account i[class^="fi-rr-"],
.gl-account i[class*=" fi-rr-"] {
    font-family: 'uicons-regular-rounded' !important;
    font-style: normal;
    speak: never; /* stylelint-disable-line */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WC notices — visual style from immunity.css, only spacing here.
   When reordered (Tier A/B), wrapper sits between tabs and body. */
.gl-account__content .woocommerce-notices-wrapper {
    max-width: none;
    margin: 0;
    padding: 20px 32px 0;
    width: 100%;
    box-sizing: border-box;
}

.gl-account__content .woocommerce-notices-wrapper:empty {
    display: none;
}

.gl-account__content .woocommerce-error,
.gl-account__content .woocommerce-message,
.gl-account__content .woocommerce-info {
    margin: 0 0 12px;
}

.gl-account__content .woocommerce-error:last-child,
.gl-account__content .woocommerce-message:last-child,
.gl-account__content .woocommerce-info:last-child {
    margin-bottom: 0;
}

/* Notices output directly by WC templates (orders/downloads empty state) */
.gl-account__content > .woocommerce-error,
.gl-account__content > .woocommerce-message,
.gl-account__content > .woocommerce-info {
    margin: 20px 32px;
}

/* ── 1. Page-level wrapper ── */
.gl-account-page {
    background: transparent;
}

/* ── 2. Account shell ── */
.gl-account {
    display: flex;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}

/* ── 3. Sidebar ── */
.gl-account__sidebar {
    position: sticky;
    top: 30px;
    align-self: flex-start;
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* 3a. User card */
.gl-account-user {
    padding: 24px 20px;
    border-bottom: 1px solid #e5e5e7;
    background: #fafafa;
}

.gl-account-user__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #5a8219;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.gl-account-user__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.gl-account-user__name {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 2px;
    line-height: 1.3;
}

.gl-account-user__email {
    font-size: 14px;
    color: #999;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gl-account-user__group {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #525252;
    background: #f0f0f0;
    border-radius: 4px;
    line-height: 1.4;
}

/* 3b. Navigation */
.gl-account-nav {
    padding: 12px 0;
}

.gl-account-nav__group {
    padding: 0;
    margin: 0;
    list-style: none;
}

.gl-account-nav__item {
    list-style: none;
    margin-bottom: 2px;
}

.gl-account-nav__item:last-child {
    margin-bottom: 0;
}

.gl-account-nav__link {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    margin: 0 12px;
    font-size: 14px;
    color: #262626;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.gl-account-nav__link i {
    display: inline-flex;
    width: 18px;
    font-size: 16px;
    margin-right: 10px;
    color: inherit;
    flex-shrink: 0;
}

.gl-account-nav__link:hover {
    color: #262626;
    background: #f5f5f5;
}

.gl-account-nav__item.is-active .gl-account-nav__link {
    color: #3d6b0f;
    font-weight: 600;
    background: rgba(90, 130, 25, 0.08);
}

.gl-account-nav__badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
}

/* 3c. Sidebar footer (logout) */
.gl-account-nav__footer {
    border-top: 1px solid #e5e5e7;
    padding: 8px 0;
    margin-top: 8px;
}

.gl-account-nav__footer .gl-account-nav__link {
    color: #999;
    font-weight: 400;
}

.gl-account-nav__footer .gl-account-nav__link:hover {
    color: #ef4444;
}

/* ── 4. Content area ── */
.gl-account__content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* 4a. Header */
.gl-account__header {
    padding: 28px 32px 8px;
}

.gl-account__title {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin: 0;
    line-height: 1.2;
}

.gl-account__subtitle {
    font-size: 14px;
    color: #737373;
    margin: 6px 0 0;
    line-height: 1.5;
}

/* 4b. Topbar (back navigation) */
.gl-account__topbar {
    padding: 12px 32px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.gl-topbar-back {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    padding: 6px 14px 6px 8px;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.gl-topbar-back i {
    font-size: 18px;
    margin-right: 4px;
    color: inherit;
}

.gl-topbar-back:hover {
    color: #262626;
    border-color: #d4d4d4;
    background: #fafafa;
}

/* 4c. Body */
.gl-account__body {
    padding: 32px 32px 36px;
}

/* ── 5. Mobile header + scroll nav ── */
.gl-account__mobile-header {
    display: none;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.gl-account-user--mobile {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    border-bottom: none;
    background: #fff;
}

.gl-account-user--mobile .gl-account-user__avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin-bottom: 0;
    margin-right: 12px;
    flex-shrink: 0;
}

.gl-account-user--mobile .gl-account-user__info {
    min-width: 0;
}

.gl-account-user--mobile .gl-account-user__name {
    font-size: 16px;
    margin: 0;
}

.gl-account-user--mobile .gl-account-user__group {
    margin-top: 4px;
}

.gl-account__mobile-nav {
    border-top: 1px solid #f0f0f0;
    padding-bottom: 0;
}

.gl-account__mobile-nav::-webkit-scrollbar {
    display: none;
}

.gl-account__mobile-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 8px 14px;
    gap: 6px;
}

.gl-account__mobile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    background: transparent;
    transition: all 0.15s ease;
}

.gl-account__mobile-link i {
    font-size: 14px;
    color: inherit;
    display: inline-flex;
    width: 16px;
    flex-shrink: 0;
}

.gl-account__mobile-link:hover {
    color: #262626;
    background: #f5f5f5;
}

.gl-account__mobile-link.is-active {
    color: #3d6b0f;
    font-weight: 600;
    background: rgba(90, 130, 25, 0.08);
}

/* ── 6. Content sub-tabs ── */
.gl-content-tabs {
    display: flex;
    gap: 0;
    padding: 0 32px;
    border-bottom: 1px solid #e5e5e7;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gl-content-tabs::-webkit-scrollbar {
    display: none;
}

.gl-content-tabs__item,
.gl-content-tab {
    display: inline-flex;
    align-items: center;
    padding: 14px 0;
    margin-right: 28px;
    font-size: 14px;
    font-weight: 500;
    color: #737373;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.gl-content-tabs__item:last-child,
.gl-content-tab:last-child {
    margin-right: 0;
}

.gl-content-tabs__item:hover,
.gl-content-tab:hover {
    color: #262626;
}

.gl-content-tabs__item.is-active,
.gl-content-tab.is-active {
    color: #5a8219;
    font-weight: 600;
    border-bottom-color: #5a8219;
}

/* ================================================================
   7. Tier B/C — WC component overrides
   Scoped to .gl-account__body so checkout/other pages are safe
   ================================================================ */

/* 7a. Custom form containers (Tier B) */
.gl-form-section {
    margin-bottom: 36px;
}

.gl-form-section__title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 24px;
    line-height: 1.3;
}

.gl-form-section__desc {
    font-size: 14px;
    color: #999;
    margin: 0 0 24px;
    line-height: 1.5;
}

.gl-form-section__desc + .gl-form-grid,
.gl-form-section__desc + .form-row {
    margin-top: 0;
}

/* Form group divider */
.gl-form-divider {
    margin-top: 32px;
    margin-bottom: 24px;
    padding-top: 32px;
    border-top: 1px solid #ebebeb;
    clear: both;
}

.gl-form-divider:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.gl-form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.gl-form-grid > .form-row {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gl-form-grid:last-child {
    margin-bottom: 0;
}

/* 7b. WC form-row field layout */
.gl-account__body .form-row {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.gl-account__body .form-row:last-child {
    margin-bottom: 0;
}

.gl-form-grid .form-row {
    margin-bottom: 0;
}

.gl-account__body .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 6px;
}

.gl-account__body .form-row label .required,
.gl-account__body .form-row label abbr[title="required"] {
    color: #ef4444;
    text-decoration: none;
    border: none;
}

/* WC display name description hint */
.gl-account__body #account_display_name_description,
.gl-account__body #account_display_name_description em {
    display: block;
    font-size: 12px;
    font-style: normal;
    color: #999;
    margin-top: 6px;
    line-height: 1.4;
}

/* WC buttons */
.gl-account__body .woocommerce-Button,
.gl-account__body button[type="submit"].button,
.gl-form-actions .woocommerce-Button,
.gl-form-actions button[type="submit"].button,
.gl-form-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #5a8219;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    line-height: 1.4;
}

.gl-account__body .woocommerce-Button:hover,
.gl-account__body button[type="submit"].button:hover,
.gl-form-actions .woocommerce-Button:hover,
.gl-form-actions button[type="submit"].button:hover,
.gl-form-actions .button:hover {
    opacity: 0.7;
}

/* fieldset legend (e.g. Password change) */
.gl-account__body fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.gl-account__body fieldset legend {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 24px;
    padding: 0;
    line-height: 1.3;
}

/* 7c. WC input / select / textarea */
.gl-account__body .input-text,
.gl-account__body textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #262626;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.gl-account__body .input-text:focus,
.gl-account__body textarea:focus {
    outline: none;
    border-color: #5a8219;
    box-shadow: 0 0 0 3px rgba(90, 130, 25, 0.1);
}

.gl-account__body select,
.gl-account__body select:not(.gl-account__mobile-select) {
    display: block !important;
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: inherit;
    color: #262626 !important;
    background: #fff !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 8px !important;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px !important;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 42px !important;
    line-height: 1.4 !important;
}

.gl-account__body select:not(.gl-account__mobile-select):focus {
    outline: none;
    border-color: #5a8219;
    box-shadow: 0 0 0 3px rgba(90, 130, 25, 0.1);
}

.gl-account__body .gf-form .gf-select-wrap select {
    background-image: none !important;
    padding: 0 40px 0 20px !important;
}

/* WC form-row first/last two-column layout */
.gl-account__body .form-row-first,
.gl-account__body .form-row-last {
    width: 48% !important;
    float: left !important;
}

.gl-account__body .form-row-last {
    float: right !important;
}

.gl-account__body .form-row-first + .form-row-last + .clear,
.gl-account__body .woocommerce-address-fields__field-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Cancel float inside gl-form-grid, use grid instead */
.gl-form-grid .form-row-first,
.gl-form-grid .form-row-last {
    width: 100% !important;
    float: none !important;
}

.gl-form-grid + .clear {
    display: none;
}

/* 7d. Select2 dropdown (country/state selector) */
.gl-account__body .select2-container--default .select2-selection--single {
    height: auto;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    background: #fff;
}

.gl-account__body .select2-container--default .select2-selection--single:focus,
.gl-account__body .select2-container--default.select2-container--focus .select2-selection--single,
.gl-account__body .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #5a8219;
    box-shadow: 0 0 0 3px rgba(90, 130, 25, 0.1);
    outline: none;
}

.gl-account__body .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.4;
    color: #262626;
}

.gl-account__body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

/* 7e. Password strength meter (WC JS injected) */
.gl-account__body .woocommerce-password-strength {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-align: center;
}

.gl-account__body .woocommerce-password-strength.short {
    background: #fef2f2;
    color: #dc2626;
}

.gl-account__body .woocommerce-password-strength.bad {
    background: #fff7ed;
    color: #ea580c;
}

.gl-account__body .woocommerce-password-strength.good {
    background: #f0fdf4;
    color: #5a8219;
}

.gl-account__body .woocommerce-password-strength.strong {
    background: #f0fdf4;
    color: #15803d;
}

/* WP password hint text */
.gl-account__body .pw-weak,
.gl-account__body p small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    font-style: normal;
    background: transparent !important;
}

/* Password visibility toggle */
.gl-account__body .show-password-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.15s ease;
}

.gl-account__body .show-password-input:hover {
    color: #525252;
}

/* 7f. Payment gateway list (add-payment-method) */
.gl-account__body .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.gl-account__body .payment_methods li {
    padding: 16px 20px;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: border-color 0.15s ease;
}

.gl-account__body .payment_methods li:last-child {
    margin-bottom: 0;
}

.gl-account__body .payment_methods li label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    cursor: pointer;
}

.gl-account__body .payment_methods li .input-radio {
    accent-color: #5a8219;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gl-account__body .payment_box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.gl-back-link {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.gl-back-link:hover {
    color: #5a8219;
}

.gl-back-link i {
    font-size: 18px;
    margin-right: 2px;
}

.gl-form-hint {
    display: block;
    margin: 0 0 20px;
    font-size: 14px;
    color: #999;
    font-style: normal;
    line-height: 1.5;
}

.form-row .gl-form-hint {
    margin: 6px 0 0;
}

/* ── 8. Dashboard ── */
.gl-dashboard-welcome {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #ebebeb;
    font-size: 14px;
    line-height: 1.7;
    color: #525252;
}

.gl-dashboard-welcome p {
    margin: 0 0 8px;
}

.gl-dashboard-welcome p:last-child {
    margin-bottom: 0;
}

.gl-dashboard-welcome a {
    color: #5a8219;
    text-decoration: none;
    font-weight: 500;
}

.gl-dashboard-welcome a:hover {
    opacity: 0.7;
}

.gl-dashboard-section {
    margin-bottom: 32px;
}

.gl-dashboard-section:last-child {
    margin-bottom: 0;
}

.gl-dashboard-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.gl-dashboard-section__header .gl-form-section__title {
    margin-bottom: 0;
}

.gl-dashboard-section__header .gl-action-link {
    gap: 2px;
}

/* Dashboard table */
.gl-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gl-dashboard-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #ebebeb;
}

.gl-dashboard-table td {
    padding: 14px 12px;
    color: #262626;
    border-bottom: 1px solid #f5f5f5;
}

.gl-dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.gl-dashboard-table tbody tr:hover {
    background: #fafafa;
}

/* Order status badges */
.gl-status {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.gl-status--processing {
    color: #b45309;
    background: #fef3c7;
}

.gl-status--completed {
    color: #15803d;
    background: #f0fdf4;
}

.gl-status--on-hold {
    color: #1d4ed8;
    background: #eff6ff;
}

.gl-status--cancelled {
    color: #dc2626;
    background: #fef2f2;
}

.gl-form-actions {
    padding-top: 24px;
}

.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gl-btn:hover {
    opacity: 0.7;
}

.gl-btn--primary {
    background: #5a8219;
    color: #fff;
}

/* ── 9. Address cards ── */
.gl-address-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.gl-address-card {
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gl-address-card:hover {
    border-color: #d4d4d4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.gl-address-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.gl-address-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin: 0;
}

.gl-address-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(90, 130, 25, 0.08);
    color: #5a8219;
    font-size: 14px;
    flex-shrink: 0;
}

.gl-address-card__edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gl-address-card__body {
    padding: 20px;
    font-size: 14px;
    font-style: normal;
    line-height: 1.8;
    color: #525252;
}

.gl-address-card__empty {
    color: #999;
    font-style: italic;
}

/* ── 10. Payment methods ── */
.gl-pm-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gl-pm-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    transition: border-color 0.15s ease;
}

.gl-pm-card:hover {
    border-color: #d4d4d4;
}

.gl-pm-card--default {
    border-color: #5a8219;
    background: #fafff4;
}

.gl-pm-card--default:hover {
    border-color: #5a8219;
}

.gl-pm-card__main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.gl-pm-card__icon {
    flex-shrink: 0;
    line-height: 0;
}

.gl-pm-card__icon svg {
    display: block;
    border-radius: 4px;
}

.gl-pm-card__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gl-pm-card__label {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gl-pm-card__expires {
    font-size: 14px;
    color: #999;
    margin-top: 2px;
}

.gl-pm-card__badge {
    flex-shrink: 0;
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #5a8219;
    background: rgba(90, 130, 25, 0.1);
    border-radius: 4px;
    white-space: nowrap;
}

.gl-pm-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 20px;
}

/* Action links (shared across account) */
.gl-action-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.gl-action-link:hover {
    color: #5a8219;
    border-color: #5a8219;
}

.gl-action-link--danger {
    color: #999;
    border-color: #e5e5e7;
}

.gl-action-link--danger:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.gl-btn--secondary {
    background: #fff;
    color: #525252;
    border: 1px solid #d4d4d4;
}

.gl-btn--secondary:hover {
    opacity: 1;
    border-color: #5a8219;
    color: #5a8219;
}

/* Empty state */
.gl-pm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.gl-pm-empty__icon {
    margin-bottom: 16px;
}

.gl-pm-empty__text {
    font-size: 14px;
    color: #999;
    margin: 0 0 24px;
}

/* ── 11. Gateway selector (add-payment-method) ── */
.gl-gateway-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gl-gateway {
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.gl-gateway--active {
    border-color: #5a8219;
}

.gl-gateway__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.gl-gateway__label:hover {
    background: #fafafa;
}

.gl-gateway__radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #5a8219;
    cursor: pointer;
}

.gl-gateway__name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.gl-gateway__icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.gl-gateway__icons svg {
    display: block;
    border-radius: 3px;
}

.gl-gateway__fields {
    padding: 0 20px 20px;
}

.gl-gateway__note {
    font-size: 14px;
    color: #999;
    margin: 0 0 16px;
}

/* Stripe mock (prototype placeholder) */
.gl-stripe-mock {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gl-stripe-mock__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gl-stripe-mock__field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 6px;
}

.gl-stripe-mock__input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    background: #fafafa;
}

.gl-stripe-mock__placeholder {
    font-size: 14px;
    color: #bbb;
}

.gl-stripe-mock__badge {
    font-size: 12px;
    font-weight: 600;
    color: #635bff;
    background: rgba(99, 91, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ================================================================
   12. View-order / Tier C — temporary baseline
   WC native output inside gl-account__content, CSS-only override.
   ================================================================ */

/* -- 12a. Shared direct-child spacing for Tier C pages -- */
.gl-account__content > p,
.gl-account__content > section {
    padding-left: 32px;
    padding-right: 32px;
}

/* -- 12b. Order summary line -- */
.gl-account__content > p:first-of-type {
    padding-top: 28px;
    padding-bottom: 20px;
    margin: 0;
    font-size: 14px;
    color: #525252;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
}

.gl-account__content > p mark {
    background: none;
    font-weight: 600;
    color: #262626;
}

/* -- 12c. Order details section -- */
.gl-account__content .woocommerce-order-details {
    padding-top: 24px;
    padding-bottom: 8px;
}

.gl-account__content .woocommerce-order-details__title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 16px;
    padding: 0;
}

/* -- 12d. Order details table -- */
.gl-account__content .woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    overflow: hidden;
}

.gl-account__content .woocommerce-table--order-details thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e7;
}

.gl-account__content .woocommerce-table--order-details thead th.product-total {
    text-align: right;
}

.gl-account__content .woocommerce-table--order-details tbody td,
.gl-account__content .woocommerce-table--order-details tbody th {
    padding: 14px 16px;
    color: #262626;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 400;
    vertical-align: middle;
}

.gl-account__content .woocommerce-table--order-details tbody tr:last-child td,
.gl-account__content .woocommerce-table--order-details tbody tr:last-child th {
    border-bottom: none;
}

.gl-account__content .woocommerce-table--order-details .product-name a {
    color: #262626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.gl-account__content .woocommerce-table--order-details .product-name a:hover {
    color: #5a8219;
}

.gl-account__content .woocommerce-table--order-details .product-quantity {
    color: #999;
    font-weight: 400;
    margin-left: 4px;
}

.gl-account__content .woocommerce-table--order-details .product-total {
    text-align: right;
}

/* tfoot: summary rows (Subtotal / Shipping / Total) */
.gl-account__content .woocommerce-table--order-details tfoot {
    border-top: 1px solid #e5e5e7;
}

.gl-account__content .woocommerce-table--order-details tfoot th,
.gl-account__content .woocommerce-table--order-details tfoot td {
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.gl-account__content .woocommerce-table--order-details tfoot th {
    text-align: left;
    font-weight: 500;
    color: #525252;
}

.gl-account__content .woocommerce-table--order-details tfoot td {
    text-align: right;
    color: #262626;
}

.gl-account__content .woocommerce-table--order-details tfoot tr:last-child th,
.gl-account__content .woocommerce-table--order-details tfoot tr:last-child td {
    font-weight: 600;
    color: #262626;
    font-size: 15px;
    border-bottom: none;
    padding-top: 12px;
    padding-bottom: 12px;
    border-top: 1px solid #e5e5e7;
}

/* Actions row button (Pay / Reorder) */
.gl-account__content .woocommerce-table--order-details .order-actions-button,
.gl-account__content .woocommerce-table--order-details .button {
    display: inline-flex;
    align-items: center;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #5a8219;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gl-account__content .woocommerce-table--order-details .order-actions-button:hover,
.gl-account__content .woocommerce-table--order-details .button:hover {
    opacity: 0.7;
}

/* tfoot: actions heading row */
.gl-account__content .woocommerce-table--order-details tfoot .order-actions--heading {
    font-weight: 500;
    color: #525252;
}

/* -- 12e. Customer details (billing/shipping) -- */
.gl-account__content .woocommerce-customer-details {
    padding-top: 24px;
    padding-bottom: 36px;
    border-top: 1px solid #f0f0f0;
}

.gl-account__content .woocommerce-columns--addresses {
    display: flex;
    gap: 20px;
}

/* Kill WC default col2-set pseudo-elements */
.gl-account__content .woocommerce-columns--addresses::before,
.gl-account__content .woocommerce-columns--addresses::after {
    display: none !important;
}

.gl-account__content .woocommerce-columns--addresses .woocommerce-column {
    flex: 1;
    min-width: 0;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gl-account__content .woocommerce-column__title {
    font-size: 15px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 10px;
    padding: 0;
}

/* Remove WC Storefront h2 green bar */
.gl-account__content .woocommerce-column__title::before {
    display: none !important;
}

.gl-account__content .woocommerce-customer-details address {
    font-size: 14px;
    font-style: normal;
    line-height: 1.8;
    color: #525252;
    padding: 16px 18px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.gl-account__content .woocommerce-customer-details address p {
    margin: 4px 0 0;
}

/* -- 12f. Orders list table -- */
.gl-account__content .woocommerce-orders-table {
    border-collapse: collapse;
    font-size: 14px;
    margin: 20px 32px;
    width: calc(100% - 64px);
}

.gl-account__content .woocommerce-orders-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #ebebeb;
}

.gl-account__content .woocommerce-orders-table td,
.gl-account__content .woocommerce-orders-table tbody th {
    padding: 14px 12px;
    color: #262626;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 400;
}

.gl-account__content .woocommerce-orders-table tbody tr:hover {
    background: #fafafa;
}

.gl-account__content .woocommerce-orders-table a.button {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #525252;
    background: none;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-right: 6px;
}

.gl-account__content .woocommerce-orders-table a.button:hover {
    color: #5a8219;
    border-color: #5a8219;
}

/* ── 13. Responsive ── */
@media (max-width: 991px) {
    .woocommerce-account .gl-main .gl-content-wrap {
        padding-top: 16px;
        padding-bottom: 60px;
    }

    .gl-account {
        flex-direction: column;
        gap: 16px;
    }

    .gl-account__sidebar {
        display: none;
    }

    .gl-account__mobile-header {
        display: block;
    }

    .gl-account__topbar {
        padding: 10px 20px;
    }

    .gl-account__header {
        padding: 20px 20px 6px;
    }

    .gl-content-tabs {
        padding: 0 20px;
    }

    .gl-account__body {
        padding: 20px;
    }

    .gl-account__content .woocommerce-notices-wrapper {
        padding: 16px 20px 0;
    }

    .gl-account__content > .woocommerce-error,
    .gl-account__content > .woocommerce-message,
    .gl-account__content > .woocommerce-info {
        margin: 16px 20px;
    }

    .gl-account__content > p,
    .gl-account__content > section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .gl-account__content .woocommerce-orders-table {
        margin: 16px 20px;
        width: calc(100% - 40px);
    }

    .gl-account__content .woocommerce-columns--addresses {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .gl-address-cards {
        grid-template-columns: 1fr;
    }

    .gl-pm-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gl-pm-card__actions {
        margin-left: 0;
    }
}

@media (max-width: 575px) {
    .gl-account__topbar {
        padding: 10px 16px;
    }

    .gl-account__header {
        padding: 16px 16px 4px;
    }

    .gl-account__body {
        padding: 16px;
    }

    .gl-content-tabs {
        padding: 0 16px;
    }

    .gl-account__content .woocommerce-notices-wrapper {
        padding: 16px 16px 0;
    }

    .gl-account__content > .woocommerce-error,
    .gl-account__content > .woocommerce-message,
    .gl-account__content > .woocommerce-info {
        margin: 16px;
    }

    .gl-account__content > p,
    .gl-account__content > section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .gl-account__content .woocommerce-orders-table {
        margin: 16px;
        width: calc(100% - 32px);
    }

    .gl-form-section {
        margin-bottom: 28px;
    }

    .gl-account__body .form-row {
        margin-bottom: 12px;
    }

    .gl-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }

    .gl-form-grid--3col {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gl-stripe-mock__row {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   14. Non-logged-in /my-account/ layout
   Page bg, sidebar hiding, auth card centering, lost-password form.
   Auth modal UI itself lives in core.css.
   ================================================================ */

/* Page background */
body.woocommerce-account:not(.logged-in) .gl-main {
    background: #fafafa !important;
}

body.woocommerce-account:not(.logged-in) .gl-main .gl-content-wrap {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    background: transparent !important;
}

body.woocommerce-account:not(.logged-in) .gl-content-wrap article,
body.woocommerce-account:not(.logged-in) .gl-content-wrap .entry-content,
body.woocommerce-account:not(.logged-in) .gl-content-wrap .page-content {
    background: transparent !important;
}

body.woocommerce-account:not(.logged-in) .gl-breadcrumb {
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
}

/* Hide sidebar nav, reset flex to block */
body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-navigation {
    display: none !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce {
    display: block !important;
    max-width: none !important;
}

/* Auth card full-width container */
body.woocommerce-account:not(.logged-in) #customer_login {
    max-width: none !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.woocommerce-account:not(.logged-in) #customer_login.gl-auth-ready {
    opacity: 1;
}

/* Lost Password / Reset Password standalone forms */
body.woocommerce-account:not(.logged-in) .woocommerce > .woocommerce-ResetPassword,
body.woocommerce-account:not(.logged-in) .woocommerce > .lost_reset_password {
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 48px 40px !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04) !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password > p:first-of-type {
    font-size: 14px !important;
    color: #525252 !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #262626 !important;
    margin-bottom: 8px !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password input.input-text {
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    font-size: 16px !important;
    color: #262626 !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password input.input-text:focus {
    border-color: #5a8219 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(90, 130, 25, 0.1) !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password button.button {
    width: 100% !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #5a8219 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    margin-top: 8px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password button.button:hover {
    opacity: 0.7 !important;
}

body.woocommerce-account:not(.logged-in) .lost_reset_password .form-row {
    margin-bottom: 20px !important;
    width: 100% !important;
    float: none !important;
}

/* WC Notices on auth page — match theme grid breakpoints */
body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
    margin: 0 auto 12px auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-error,
body.woocommerce-account:not(.logged-in) .woocommerce-message,
body.woocommerce-account:not(.logged-in) .woocommerce-info {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
}

@media (min-width: 576px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 540px !important;
    }
}

@media (min-width: 768px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 720px !important;
    }
}

@media (min-width: 992px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 960px !important;
    }
}

@media (min-width: 1200px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 1140px !important;
    }
}

@media (min-width: 1400px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 1320px !important;
    }
}

@media (min-width: 1488px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
        max-width: 1488px !important;
    }
}

/* ================================================================
   15. Welcome Card — unauthenticated /my-account/ landing
   Centered card that triggers the Plan D auth modal.
   ================================================================ */
.gl-auth-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
}

.gl-auth-welcome-card {
    text-align: center;
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
}

.gl-auth-welcome-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
}

.gl-auth-welcome-icon i {
    font-size: 24px;
    color: #525252;
}

.gl-auth-welcome-card h2 {
    font-size: 24px !important;
    font-weight: 600;
    color: #262626;
    margin: 0 0 12px !important;
    padding: 0 !important;
    letter-spacing: 0;
    line-height: 1.2;
}

.gl-auth-welcome-card h2::before {
    display: none !important;
}

.gl-auth-welcome-card > p {
    font-size: 15px;
    color: #525252;
    line-height: 1.6;
    margin: 0 0 32px;
}

.gl-auth-welcome-card .gl-auth-welcome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background-color: #5a8219;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
    letter-spacing: 0;
    -webkit-appearance: none;
    appearance: none;
}

.gl-auth-welcome-card .gl-auth-welcome-btn:hover {
    opacity: 0.7;
}

.gl-auth-welcome-hint {
    font-size: 13px !important;
    color: #999999 !important;
    margin: 16px 0 0 !important;
    line-height: 1.5;
}

@media (max-width: 575px) {
    .gl-auth-welcome {
        padding: 24px 16px;
        min-height: 320px;
    }

    .gl-auth-welcome-card {
        padding: 40px 24px;
    }
}
