/* WooCommerce My Account Pro - SaaS Dashboard Redesign */

:root {
    --wcmap-primary: #667eea;
    --wcmap-secondary: #764ba2;
    --wcmap-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --wcmap-sidebar-width: 280px;
    --wcmap-sidebar-bg: #0f172a;
    --wcmap-sidebar-text: #94a3b8;
    --wcmap-sidebar-text-hover: #e2e8f0;
    --wcmap-sidebar-active-bg: rgba(102, 126, 234, 0.15);
    --wcmap-sidebar-active-text: #667eea;
    --wcmap-content-bg: #f1f5f9;
    --wcmap-card-bg: #ffffff;
    --wcmap-card-border: #e2e8f0;
    --wcmap-text-primary: #1e293b;
    --wcmap-text-secondary: #64748b;
    --wcmap-text-muted: #94a3b8;
    --wcmap-border: #e2e8f0;
    --wcmap-radius: 12px;
    --wcmap-radius-sm: 8px;
    --wcmap-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --wcmap-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --wcmap-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --wcmap-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --wcmap-header-height: 56px;
}

.woocommerce-account .woocommerce {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    min-height: 100vh;
    background: var(--wcmap-content-bg);
    box-sizing: border-box;
}

.logged-in.woocommerce-account .woocommerce > h2 {
    display: none;
}

/* Only hide non-dashboard elements when user is logged in.
   When logged out, WooCommerce renders the login form directly
   inside .woocommerce without navigation/content wrappers — so
   we must NOT apply this rule on the guest login page. */
.logged-in.woocommerce-account .woocommerce > *:not(.woocommerce-MyAccount-navigation):not(.woocommerce-MyAccount-content):not(.wcmap-mobile-header):not(.wcmap-mobile-overlay) {
    display: none;
}

.woocommerce-account .entry-header,
.woocommerce-account .entry-title,
.woocommerce-account .page-title {
    display: none;
}

/* ========================================
   SIDEBAR NAVIGATION
======================================== */
.woocommerce-MyAccount-navigation {
    flex: 0 0 var(--wcmap-sidebar-width);
    background: var(--wcmap-sidebar-bg);
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 24px 12px;
}

.woocommerce-MyAccount-navigation li {
    margin: 0;
    border-bottom: none;
    border-radius: var(--wcmap-radius-sm);
    overflow: hidden;
    margin-bottom: 2px;
}

.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--wcmap-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--wcmap-transition);
    position: relative;
    border-radius: var(--wcmap-radius-sm);
    gap: 12px;
}

.woocommerce-MyAccount-navigation a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--wcmap-sidebar-text-hover);
    transform: none;
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: var(--wcmap-sidebar-active-bg);
    color: var(--wcmap-sidebar-active-text);
    font-weight: 600;
}

.woocommerce-MyAccount-navigation li.is-active a:hover {
    transform: none;
}

.woocommerce-MyAccount-navigation li.is-active a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--wcmap-primary);
    border-radius: 0 4px 4px 0;
}

/* ========================================
   NAVIGATION ICONS (mask-image approach)
   - Uses currentColor so icons always match text color
======================================== */
.woocommerce-MyAccount-navigation a::before {
    content: '';
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-right: 0;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--dashboard a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-4'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--orders a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--downloads a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--edit-address a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z'/%3E%3Cpath d='M15 11a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z'/%3E%3Cpath d='M15 11a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--edit-account a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--customer-logout a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--memberships a::before,
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--my-membership a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--subscriptions a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--bookings a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--payment-methods a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z'/%3E%3C/svg%3E");
}

/* Home link icon */
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--home a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
}

/* Home link — no separator, sits naturally above Dashboard */

/* Logout link separator */
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */
.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    background: var(--wcmap-content-bg);
    border-radius: 0;
    box-shadow: none;
    padding: 32px 40px;
    border: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Style the default WooCommerce welcome message */
.woocommerce-MyAccount-content > p:first-child {
    background: var(--wcmap-gradient);
    padding: 28px 32px;
    border-radius: var(--wcmap-radius);
    border-left: none;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    box-shadow: var(--wcmap-shadow-md);
}

.woocommerce-MyAccount-content > p:first-child a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ========================================
   DASHBOARD STATS CARDS (SaaS-style)
======================================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--wcmap-card-bg);
    padding: 24px;
    border-radius: var(--wcmap-radius);
    box-shadow: var(--wcmap-shadow);
    border: 1px solid var(--wcmap-card-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--wcmap-transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--wcmap-shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card .stat-icon.orders {
    background: rgba(102, 126, 234, 0.1);
    color: var(--wcmap-primary);
}

.stat-card .stat-icon.spent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card .stat-icon.subscriptions {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card .stat-icon.downloads {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-card .stat-icon.membership {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--wcmap-text-primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wcmap-text-secondary);
    margin: 0;
}

/* ========================================
   DASHBOARD SECTIONS
======================================== */
.dashboard-section {
    background: var(--wcmap-card-bg);
    border-radius: var(--wcmap-radius);
    box-shadow: var(--wcmap-shadow);
    border: 1px solid var(--wcmap-card-border);
    margin-bottom: 24px;
    overflow: hidden;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--wcmap-border);
}

.dashboard-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wcmap-text-primary);
}

.dashboard-section-header a {
    font-size: 13px;
    font-weight: 500;
    color: var(--wcmap-primary);
    text-decoration: none;
    transition: var(--wcmap-transition);
}

.dashboard-section-header a:hover {
    color: var(--wcmap-secondary);
}

.dashboard-section-body {
    padding: 0;
}

.dashboard-section-body .dashboard-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-section-body .dashboard-orders-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--wcmap-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--wcmap-border);
}

.dashboard-section-body .dashboard-orders-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--wcmap-text-primary);
    border-bottom: 1px solid var(--wcmap-border);
}

.dashboard-section-body .dashboard-orders-table tr:last-child td {
    border-bottom: none;
}

.dashboard-section-body .dashboard-orders-table tr:hover {
    background: #f8fafc;
}

/* Order status badges */
.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.order-status-badge.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.order-status-badge.status-processing {
    background: rgba(102, 126, 234, 0.1);
    color: var(--wcmap-primary);
}

.order-status-badge.status-on-hold {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-status-badge.status-failed,
.order-status-badge.status-cancelled,
.order-status-badge.status-refunded {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-status-badge.status-pending {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Quick Actions */
.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--wcmap-radius-sm);
    border: 1px solid var(--wcmap-border);
    text-decoration: none;
    color: var(--wcmap-text-primary);
    transition: var(--wcmap-transition);
    cursor: pointer;
}

.quick-action-card:hover {
    border-color: var(--wcmap-primary);
    background: rgba(102, 126, 234, 0.03);
    transform: translateY(-1px);
    box-shadow: var(--wcmap-shadow-md);
    color: var(--wcmap-primary);
}

.quick-action-card .quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--wcmap-primary);
    flex-shrink: 0;
}

.quick-action-card .quick-action-text {
    font-size: 14px;
    font-weight: 500;
}

.quick-action-card .quick-action-desc {
    font-size: 12px;
    color: var(--wcmap-text-secondary);
    margin-top: 2px;
}

/* ========================================
   PAGE HEADINGS
======================================== */
.woocommerce-MyAccount-content h2 {
    color: var(--wcmap-text-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wcmap-border);
}

.woocommerce-MyAccount-content h3 {
    color: var(--wcmap-text-primary);
    font-weight: 600;
    margin-bottom: 16px;
}

/* ========================================
   TABLES
======================================== */
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: var(--wcmap-card-bg);
    border-radius: var(--wcmap-radius);
    overflow: hidden;
    box-shadow: var(--wcmap-shadow);
    border: 1px solid var(--wcmap-card-border);
}

.woocommerce-MyAccount-content table th {
    background: #f8fafc;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--wcmap-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--wcmap-border);
    white-space: nowrap;
}

.woocommerce-MyAccount-content table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wcmap-border);
    color: var(--wcmap-text-primary);
    font-size: 14px;
}

.woocommerce-MyAccount-content table tr:last-child td {
    border-bottom: none;
}

.woocommerce-MyAccount-content table tr:hover {
    background: #f8fafc;
}

/* ========================================
   BUTTONS - Override WooCommerce defaults
======================================== */
.woocommerce-account .woocommerce a.button,
.woocommerce-account .woocommerce button.button,
.woocommerce-account .woocommerce input.button,
.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce .woocommerce-button,
.woocommerce-account .woocommerce input[type="submit"] {
    background: var(--wcmap-primary) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: var(--wcmap-radius-sm) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: var(--wcmap-transition) !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    height: auto !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.woocommerce-account .woocommerce a.button:hover,
.woocommerce-account .woocommerce button.button:hover,
.woocommerce-account .woocommerce input.button:hover,
.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce .woocommerce-button:hover,
.woocommerce-account .woocommerce input[type="submit"]:hover {
    background: var(--wcmap-secondary) !important;
    transform: none !important;
    box-shadow: var(--wcmap-shadow-md) !important;
    color: #ffffff !important;
}

.woocommerce-account .button.alt {
    background: var(--wcmap-primary) !important;
}

.woocommerce-account .button.alt:hover {
    opacity: 0.9 !important;
}

.woocommerce-account .button.wc-forward {
    background: transparent !important;
    color: var(--wcmap-primary) !important;
    border: 1px solid var(--wcmap-primary) !important;
}

.woocommerce-account .button.wc-forward:hover {
    background: var(--wcmap-primary) !important;
    color: #ffffff !important;
}

/* ========================================
   LINKS - Override WooCommerce defaults
======================================== */
.woocommerce-account .woocommerce-MyAccount-content a {
    color: var(--wcmap-primary);
    text-decoration: none;
    transition: var(--wcmap-transition);
}

.woocommerce-account .woocommerce-MyAccount-content a:hover {
    color: var(--wcmap-secondary);
}

/* ========================================
   WOOCOMMERCE COLOR OVERRIDES
======================================== */
.woocommerce-account .woocommerce .woocommerce-Price-amount {
    color: var(--wcmap-text-primary);
    font-weight: 600;
}

.woocommerce-account mark {
    background: transparent;
    color: var(--wcmap-primary);
    font-weight: 600;
}

.woocommerce-account .woocommerce .amount {
    color: var(--wcmap-text-primary);
}

.woocommerce-account .woocommerce-order-details__title,
.woocommerce-account .woocommerce-customer-details__title,
.woocommerce-account .woocommerce-order-downloads__title,
.woocommerce-account .woocommerce-order-address__title {
    color: var(--wcmap-text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wcmap-border);
}

/* ========================================
   FORMS
======================================== */
.woocommerce-MyAccount-content .woocommerce-form-row {
    margin-bottom: 20px;
}

.woocommerce-MyAccount-content label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--wcmap-text-primary);
}

.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content input[type="number"],
.woocommerce-MyAccount-content input[type="url"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--wcmap-border);
    border-radius: var(--wcmap-radius-sm);
    font-size: 14px;
    transition: var(--wcmap-transition);
    background: var(--wcmap-card-bg);
    color: var(--wcmap-text-primary);
    box-sizing: border-box;
}

.woocommerce-MyAccount-content input[type="text"]:focus,
.woocommerce-MyAccount-content input[type="email"]:focus,
.woocommerce-MyAccount-content input[type="password"]:focus,
.woocommerce-MyAccount-content input[type="tel"]:focus,
.woocommerce-MyAccount-content input[type="number"]:focus,
.woocommerce-MyAccount-content input[type="url"]:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
    outline: none;
    border-color: var(--wcmap-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.woocommerce-MyAccount-content input.error,
.woocommerce-MyAccount-content textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ========================================
   NOTICES
======================================== */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 14px 18px;
    border-radius: var(--wcmap-radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid;
    font-size: 14px;
    position: relative;
}

.woocommerce-message {
    background: rgba(16, 185, 129, 0.06);
    border-left-color: #10b981;
    color: #065f46;
}

.woocommerce-error {
    background: rgba(239, 68, 68, 0.06);
    border-left-color: #ef4444;
    color: #991b1b;
}

.woocommerce-info {
    background: rgba(102, 126, 234, 0.06);
    border-left-color: var(--wcmap-primary);
    color: #1e40af;
}

.notice-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    padding: 4px;
}

.notice-close:hover {
    opacity: 1;
}

/* ========================================
   MEMBERSHIP STATUS BADGES
======================================== */
.membership-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.membership-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.membership-status.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.membership-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* ========================================
   LOADING ANIMATION
======================================== */
@keyframes wcmapFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.woocommerce-MyAccount-content > * {
    animation: wcmapFadeIn 0.4s ease-out;
}

.stat-card {
    animation: wcmapFadeIn 0.4s ease-out;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.2s; }

/* Loading state */
.button.loading,
.woocommerce-button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.button.loading::after,
.woocommerce-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wcmapSpin 0.6s linear infinite;
}

@keyframes wcmapSpin {
    to { transform: rotate(360deg); }
}

/* ========================================
   MOBILE TOP HEADER BAR
======================================== */
.wcmap-mobile-header {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--wcmap-header-height);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 99;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    box-sizing: border-box;
}

.wcmap-mobile-header .wcmap-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wcmap-mobile-header .wcmap-hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--wcmap-radius-sm);
    transition: var(--wcmap-transition);
    padding: 0;
    color: var(--wcmap-text-primary);
    -webkit-tap-highlight-color: transparent;
}

.wcmap-mobile-header .wcmap-hamburger-btn:hover {
    background: #f1f5f9;
}

.wcmap-mobile-header .wcmap-hamburger-btn:active {
    background: #e2e8f0;
    transform: scale(0.95);
}

.wcmap-mobile-header .wcmap-hamburger-btn svg {
    width: 22px;
    height: 22px;
    transition: var(--wcmap-transition);
}

.wcmap-mobile-header .wcmap-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wcmap-text-primary);
    letter-spacing: -0.02em;
}

.wcmap-mobile-header .wcmap-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wcmap-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* ========================================
   MOBILE OVERLAY
======================================== */
.wcmap-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wcmap-mobile-overlay.active {
    display: block;
    opacity: 1;
}

body.wcmap-menu-open {
    overflow: hidden;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {

    /* --- Mobile Header: Show --- */
    .wcmap-mobile-header {
        display: flex;
    }

    /* --- Layout: Stack vertically --- */
    .woocommerce-account .woocommerce {
        flex-direction: column;
        min-height: auto;
    }

    /* --- Off-Canvas Sidebar Navigation --- */
    .woocommerce-MyAccount-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: none;
    }

    /* Hide close button on desktop line, show only on mobile */
    .wcmap-sidebar-close {
        display: none !important;
    }

    /* Extra top padding on mobile so nav links clear the close button */
    .woocommerce-MyAccount-navigation ul {
        padding-top: 56px;
    }

    .woocommerce-MyAccount-navigation.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    /* Also support legacy class */
    .woocommerce-MyAccount-navigation.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    /* --- Close Button inside sidebar (injected via JS) --- */
    .wcmap-sidebar-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: rgba(255, 255, 255, 0.12);
        cursor: pointer;
        border-radius: var(--wcmap-radius-sm);
        color: #e2e8f0;
        transition: var(--wcmap-transition);
        position: absolute;
        top: 46px; /* Space for WP admin bar if present */
        left: 12px;
        right: auto;
        z-index: 10;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .wcmap-sidebar-close:hover,
    .wcmap-sidebar-close:active {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }

    .wcmap-sidebar-close svg {
        width: 20px;
        height: 20px;
    }

    /* --- Main Content Area --- */
    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 20px 16px;
        padding-top: 24px;
        min-height: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex: 1;
    }

    /* --- Dashboard Stats Grid: 2 columns, full width --- */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }

    .stat-card {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    /* --- Quick Actions --- */
    .dashboard-quick-actions {
        grid-template-columns: 1fr;
    }

    /* --- Page Headings --- */
    .woocommerce-MyAccount-content h2 {
        font-size: 20px;
    }

    /* --- Welcome message: preserve gradient card on mobile --- */
    .woocommerce-MyAccount-content > p:first-child {
        background: var(--wcmap-gradient) !important;
        color: #ffffff !important;
        padding: 20px;
        font-size: 14px;
        border-radius: var(--wcmap-radius);
        box-shadow: var(--wcmap-shadow-md);
    }

    .woocommerce-MyAccount-content > p:first-child a {
        color: #ffffff !important;
    }

    /* ==================================================================
       MOBILE TABLE LAYOUT — CARD-PER-ROW (ONLY for LIST tables)
       ==================================================================
       Applied to orders list, subscriptions list only.
       NOT applied to detail/single-item tables.
    ================================================================== */

    /* --- Global box-sizing for all table elements --- */
    .woocommerce-MyAccount-content table,
    .woocommerce-MyAccount-content table * {
        box-sizing: border-box !important;
    }

    /* --- LIST tables: convert to block, full width, remove borders --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders,
    .woocommerce-MyAccount-content table.my_account_orders {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Subscriptions list table */
    .woocommerce-MyAccount-content table.shop_table.my_account_orders,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* --- LIST tables: hide thead --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table thead,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders thead,
    .woocommerce-MyAccount-content table.my_account_orders thead,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions thead {
        display: none !important;
    }

    /* --- LIST tables: tbody full width --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table tbody,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders tbody,
    .woocommerce-MyAccount-content table.my_account_orders tbody,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions tbody {
        display: block !important;
        width: 100% !important;
    }

    /* --- LIST tables: each row becomes a card --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table tbody tr,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders tbody tr,
    .woocommerce-MyAccount-content table.my_account_orders tbody tr,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions tbody tr {
        display: block !important;
        width: 100% !important;
        background: var(--wcmap-card-bg) !important;
        border: 1px solid var(--wcmap-card-border) !important;
        border-radius: var(--wcmap-radius) !important;
        margin-bottom: 12px !important;
        padding: 16px !important;
        box-shadow: var(--wcmap-shadow) !important;
        transition: var(--wcmap-transition) !important;
    }

    .woocommerce-MyAccount-content table.woocommerce-orders-table tbody tr:hover,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders tbody tr:hover,
    .woocommerce-MyAccount-content table.my_account_orders tbody tr:hover {
        box-shadow: var(--wcmap-shadow-md) !important;
    }

    /* --- LIST tables: each cell becomes a label:value flex row --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table td,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders td,
    .woocommerce-MyAccount-content table.my_account_orders td,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
        text-align: right !important;
        font-size: 14px !important;
    }

    .woocommerce-MyAccount-content table.woocommerce-orders-table td:last-child,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders td:last-child,
    .woocommerce-MyAccount-content table.my_account_orders td:last-child,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .woocommerce-MyAccount-content table.woocommerce-orders-table td:first-child,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders td:first-child,
    .woocommerce-MyAccount-content table.my_account_orders td:first-child,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions td:first-child {
        padding-top: 0 !important;
    }

    /* --- LIST tables: pseudo-label from data-title attribute --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table td::before,
    .woocommerce-MyAccount-content table.woocommerce-MyAccount-orders td::before,
    .woocommerce-MyAccount-content table.my_account_orders td::before,
    .woocommerce-MyAccount-content table.woocommerce-orders-table--subscriptions td::before {
        content: attr(data-title);
        font-weight: 600;
        font-size: 12px;
        color: var(--wcmap-text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        flex-shrink: 0;
        margin-right: 16px;
    }

    /* --- Actions cell: stack buttons --- */
    .woocommerce-MyAccount-content table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions,
    .woocommerce-MyAccount-content table.my_account_orders td.order-actions,
    .woocommerce-MyAccount-content table td.order-actions,
    .woocommerce-MyAccount-content table td.subscription-actions {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        padding-top: 12px !important;
    }

    .woocommerce-MyAccount-content table td.order-actions a.button,
    .woocommerce-MyAccount-content table td.subscription-actions a.button,
    .woocommerce-MyAccount-content table td.woocommerce-orders-table__cell-order-actions a.button {
        font-size: 12px !important;
        padding: 8px 16px !important;
        width: auto !important;
    }

    /* ==================================================================
       DETAIL / SINGLE-ITEM TABLES — KEEP AS ONE CARD
       ==================================================================
       Subscription detail, order detail, etc.
       These tables show one item's details — we wrap the whole
       table in a card, NOT each row.
    ================================================================== */

    /* --- Subscription detail table: single card wrapper --- */
    .woocommerce-MyAccount-content table.shop_table.subscription_details,
    .woocommerce-MyAccount-content table.shop_table.order_details,
    .woocommerce-MyAccount-content .woocommerce-table--order-details {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        background: var(--wcmap-card-bg) !important;
        border: 1px solid var(--wcmap-card-border) !important;
        border-radius: var(--wcmap-radius) !important;
        box-shadow: var(--wcmap-shadow) !important;
        overflow: hidden !important;
        border-collapse: collapse !important;
    }

    /* Keep thead visible for detail tables */
    .woocommerce-MyAccount-content table.shop_table.subscription_details thead,
    .woocommerce-MyAccount-content table.shop_table.order_details thead,
    .woocommerce-MyAccount-content .woocommerce-table--order-details thead {
        display: table-header-group !important;
    }

    .woocommerce-MyAccount-content table.shop_table.subscription_details tbody,
    .woocommerce-MyAccount-content table.shop_table.order_details tbody,
    .woocommerce-MyAccount-content .woocommerce-table--order-details tbody {
        display: table-row-group !important;
    }

    .woocommerce-MyAccount-content table.shop_table.subscription_details tbody tr,
    .woocommerce-MyAccount-content table.shop_table.order_details tbody tr,
    .woocommerce-MyAccount-content .woocommerce-table--order-details tbody tr {
        display: table-row !important;
        background: var(--wcmap-card-bg) !important;
        border: none !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .woocommerce-MyAccount-content table.shop_table.subscription_details td,
    .woocommerce-MyAccount-content table.shop_table.subscription_details th,
    .woocommerce-MyAccount-content table.shop_table.order_details td,
    .woocommerce-MyAccount-content table.shop_table.order_details th,
    .woocommerce-MyAccount-content .woocommerce-table--order-details td,
    .woocommerce-MyAccount-content .woocommerce-table--order-details th {
        display: table-cell !important;
        padding: 12px 16px !important;
        border-bottom: 1px solid var(--wcmap-border) !important;
        text-align: left !important;
        font-size: 14px !important;
        word-break: break-word !important;
    }

    .woocommerce-MyAccount-content table.shop_table.subscription_details td::before,
    .woocommerce-MyAccount-content table.shop_table.order_details td::before,
    .woocommerce-MyAccount-content .woocommerce-table--order-details td::before {
        content: none !important;
    }

    .woocommerce-MyAccount-content table.shop_table.subscription_details tr:last-child td,
    .woocommerce-MyAccount-content table.shop_table.order_details tr:last-child td,
    .woocommerce-MyAccount-content .woocommerce-table--order-details tr:last-child td {
        border-bottom: none !important;
    }

    /* --- Subscription detail actions (Cancel, Change payment, Renew now) --- */
    .woocommerce-MyAccount-content .subscription_details + .subscription_actions,
    .woocommerce-MyAccount-content .order-actions-wrapper,
    .woocommerce-MyAccount-content .subscription-actions-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Stack subscription action buttons vertically on very small space */
    .woocommerce-MyAccount-content .subscription_details ~ p a.button,
    .woocommerce-MyAccount-content .subscription_details ~ .subscription_actions a.button {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 8px !important;
    }

    /* --- Dashboard Recent Orders table (custom JS-generated) --- */
    .dashboard-section-body .dashboard-orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
    }

    /* --- Order/Subscription detail wrapper: contained overflow --- */
    .woocommerce-MyAccount-content .woocommerce-order-details,
    .woocommerce-MyAccount-content .woocommerce-customer-details,
    .woocommerce-MyAccount-content .woocommerce-order-downloads,
    .woocommerce-MyAccount-content .woocommerce-order-address {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Order detail tables: keep scrollable, full width --- */
    .woocommerce-MyAccount-content .woocommerce-table--order-items,
    .woocommerce-MyAccount-content .woocommerce-table--order-downloads {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 0;
        width: 100% !important;
    }

    /* --- Subscription detail sections --- */
    .woocommerce-MyAccount-content .subscription-details,
    .woocommerce-MyAccount-content .wcs-subscription-details,
    .woocommerce-MyAccount-content .wcs-subscription-next-payment,
    .woocommerce-MyAccount-content .wcs-subscription-schedule,
    .woocommerce-MyAccount-content .wcs-subscription-related-orders {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Membership detail page --- */
    .woocommerce-MyAccount-content .wc-memberships-membership-details {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Booking detail page --- */
    .woocommerce-MyAccount-content .wc-booking-details,
    .woocommerce-MyAccount-content .wc-bookings-details {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Address forms responsive --- */
    .woocommerce-MyAccount-content .woocommerce-Addresses {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .woocommerce-MyAccount-content .woocommerce-Address {
        width: 100%;
    }

    /* --- Form layout responsive --- */
    .woocommerce-MyAccount-content .woocommerce-form-row-first,
    .woocommerce-MyAccount-content .woocommerce-form-row-last {
        width: 100%;
        float: none;
    }

    .woocommerce-MyAccount-content .woocommerce-form-row-wide {
        clear: both;
    }

    /* --- Subscription detail related-orders table --- */
    .woocommerce-MyAccount-content .wcs-subscription-related-orders table {
        min-width: 0;
    }

    /* --- Payment methods table --- */
    .woocommerce-MyAccount-content .woocommerce-PaymentMethods {
        min-width: 0;
        width: 100% !important;
    }

    /* --- Quick action cards --- */
    .quick-action-card {
        padding: 14px;
    }

    .quick-action-card .quick-action-icon {
        width: 36px;
        height: 36px;
    }

    /* --- Ensure dl elements in order details don't overflow --- */
    .woocommerce-MyAccount-content .woocommerce-order-details dl,
    .woocommerce-MyAccount-content .woocommerce-customer-details dl {
        max-width: 100%;
        overflow-x: auto;
    }

    /* --- Order again button --- */
    .woocommerce-MyAccount-content .woocommerce-order-again {
        margin-bottom: 16px;
    }

    /* --- Ensure WooCommerce table wrapper doesn't restrict width --- */
    .woocommerce-MyAccount-content .woocommerce-orders-table__row,
    .woocommerce-MyAccount-content .woocommerce-orders-table__cell {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- Override any WooCommerce theme table width restrictions --- */
    .woocommerce-MyAccount-content > .woocommerce-orders-table,
    .woocommerce-MyAccount-content > table,
    .woocommerce-MyAccount-content > div > table {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* --- Dashboard section (Recent Orders, Quick Actions): full width --- */
    .dashboard-section {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ========================================
   EXTRA SMALL SCREENS (≤ 480px)
======================================== */
@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card .stat-value {
        font-size: 20px;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 16px 12px;
    }

    .woocommerce-MyAccount-content > p:first-child {
        padding: 16px;
        font-size: 13px;
    }

    .dashboard-quick-actions {
        gap: 10px;
        padding: 16px;
    }

    .quick-action-card {
        padding: 12px;
        gap: 10px;
    }

    .woocommerce-MyAccount-content h2 {
        font-size: 18px;
    }

    .woocommerce-account .woocommerce a.button,
    .woocommerce-account .woocommerce button.button,
    .woocommerce-account .woocommerce input.button,
    .woocommerce-account .woocommerce .button,
    .woocommerce-account .woocommerce .woocommerce-button,
    .woocommerce-account .woocommerce input[type="submit"] {
        width: 100%;
        justify-content: center;
    }

    .woocommerce-account .woocommerce .button.wc-forward {
        width: auto;
    }

    /* Slightly smaller text in card cells */
    .woocommerce-MyAccount-content table td {
        font-size: 13px !important;
    }

    .woocommerce-MyAccount-content table td::before {
        font-size: 11px !important;
    }
}

/* ========================================
   GUEST LOGIN / REGISTER PAGE
   ========================================
   When a non-logged-in user visits the My Account page,
   WooCommerce renders the login form directly inside .woocommerce
   WITHOUT the navigation/content wrappers. These styles create
   a professional, centered login experience.
======================================== */

/* Reset the flex layout for guest pages — center the login form */
.woocommerce-account:not(.logged-in) .woocommerce {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--wcmap-content-bg);
    padding: 40px 20px;
}

/* Hide any stray page titles on login page */
.woocommerce-account:not(.logged-in) .entry-header,
.woocommerce-account:not(.logged-in) .entry-title,
.woocommerce-account:not(.logged-in) .page-title {
    display: none;
}

/* WooCommerce notices */
.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper {
    width: 100%;
    max-width: 480px;
    margin-bottom: 16px;
}

/* Login / Register two-column wrapper */
.woocommerce-account:not(.logged-in) .u-columns.col2-set {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

/* Single-column login */
.woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login,
.woocommerce-account:not(.logged-in) .u-column1 {
    width: 100%;
    max-width: 440px;
    background: var(--wcmap-card-bg);
    border-radius: var(--wcmap-radius);
    box-shadow: var(--wcmap-shadow-lg);
    padding: 40px;
    border: 1px solid var(--wcmap-card-border);
}

/* Hide Register section and column dividers */
.woocommerce-account:not(.logged-in) .u-column1 {
    border-right: none;
}

.woocommerce-account:not(.logged-in) .u-column2 {
    display: none !important;
}

/* Form rows */
.woocommerce-account:not(.logged-in) .form-row {
    margin-bottom: 20px;
}

/* Labels */
.woocommerce-account:not(.logged-in) .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wcmap-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.woocommerce-account:not(.logged-in) .form-row label .required {
    color: #ef4444;
}

/* Input fields */
.woocommerce-account:not(.logged-in) .form-row input.input-text,
.woocommerce-account:not(.logged-in) .form-row input[type="text"],
.woocommerce-account:not(.logged-in) .form-row input[type="email"],
.woocommerce-account:not(.logged-in) .form-row input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wcmap-border);
    border-radius: var(--wcmap-radius-sm);
    font-size: 15px;
    color: var(--wcmap-text-primary);
    background: #f8fafc;
    transition: var(--wcmap-transition);
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}

.woocommerce-account:not(.logged-in) .form-row input.input-text:focus,
.woocommerce-account:not(.logged-in) .form-row input[type="text"]:focus,
.woocommerce-account:not(.logged-in) .form-row input[type="email"]:focus,
.woocommerce-account:not(.logged-in) .form-row input[type="password"]:focus {
    border-color: var(--wcmap-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #ffffff;
}

/* Remember me checkbox */
.woocommerce-account:not(.logged-in) .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--wcmap-text-secondary);
}

.woocommerce-account:not(.logged-in) .woocommerce-form-login__rememberme input[type="checkbox"] {
    accent-color: var(--wcmap-primary);
}

/* Login / Register buttons */
.woocommerce-account:not(.logged-in) button[type="submit"],
.woocommerce-account:not(.logged-in) .woocommerce-form-login__submit,
.woocommerce-account:not(.logged-in) .woocommerce-form-register__submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--wcmap-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--wcmap-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wcmap-transition);
    letter-spacing: 0.02em;
    font-family: inherit;
    margin-top: 8px;
}

.woocommerce-account:not(.logged-in) button[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.woocommerce-account:not(.logged-in) button[type="submit"]:active {
    transform: translateY(0);
}

/* Lost password link */
.woocommerce-account:not(.logged-in) .lost_password {
    text-align: center;
    margin-top: 16px;
}

.woocommerce-account:not(.logged-in) .lost_password a {
    color: var(--wcmap-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--wcmap-transition);
}

.woocommerce-account:not(.logged-in) .lost_password a:hover {
    color: var(--wcmap-secondary);
    text-decoration: underline;
}

/* Password reset form (lost password page) */
.woocommerce-account:not(.logged-in) .woocommerce-ResetPassword {
    width: 100%;
    max-width: 440px;
    background: var(--wcmap-card-bg);
    border-radius: var(--wcmap-radius);
    box-shadow: var(--wcmap-shadow-lg);
    padding: 40px;
    border: 1px solid var(--wcmap-card-border);
}

/* Info text above the form */
.woocommerce-account:not(.logged-in) .woocommerce-ResetPassword > p:first-child {
    font-size: 14px;
    color: var(--wcmap-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---- Guest login page: Mobile responsive ---- */
@media (max-width: 768px) {
    .woocommerce-account:not(.logged-in) .woocommerce {
        padding: 24px 16px;
        justify-content: flex-start;
    }

    .woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login,
    .woocommerce-account:not(.logged-in) .woocommerce-ResetPassword,
    .woocommerce-account:not(.logged-in) .u-column1 {
        padding: 24px;
    }

    .woocommerce-account:not(.logged-in) .u-columns h2 {
        font-size: 20px;
    }
}


