/*
Theme Name: Social Growth
Theme URI: https://myduck.es/
Author: Antigravity
Author URI: https://myduck.es/
Description: A modern, premium, high-performance theme for social growth software. Version 4.1.0: Polish and Layout Fixes.
Version: 4.1.0
*/

:root {
    /* Permanent Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;

    /* Vibrant Accents */
    --accent-primary: #8b5cf6;
    /* Violet */
    --accent-secondary: #ec4899;
    /* Pink */
    --accent-tertiary: #3b82f6;
    /* Blue */
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --accent-gradient-hover: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);

    /* Neomorphism / Soft UI Shadows */
    --card-bg: rgba(255, 255, 255, 0.95);
    /* Increased opacity for cleaner look */
    --card-border: rgba(241, 245, 249, 1);
    --card-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.03),
        0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --card-shadow-hover:
        0 20px 25px -5px rgba(0, 0, 0, 0.08),
        0 10px 10px -5px rgba(0, 0, 0, 0.03);

    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-height: 80px;
    --container-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-panel:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(139, 92, 246, 0.2);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Header Redesign (V4.4) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-decoration: none;
}

/* Centered Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.header-nav a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.header-nav a:hover {
    color: var(--text-primary);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.header-nav a:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 968px) {
    .header-inner {
        display: flex;
        justify-content: space-between;
    }

    .header-nav,
    .header-actions {
        display: none;
        /* Hide on mobile for now (requires JS toggle) */
    }

    .mobile-toggle {
        display: block;
    }
}

/* User Widget Premium Styles */
.user-widget {
    position: relative;
    cursor: pointer;
    font-size: 0.95rem;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    /* Tight left padding for avatar */
    border-radius: 99px;
    background: transparent;
    transition: background 0.2s;
}

.user-trigger:hover {
    background: rgba(0, 0, 0, 0.03);
}

.user-avatar-circle img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-name-label {
    font-weight: 600;
    color: var(--text-primary);
}

.user-chevron {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.user-widget:hover .user-chevron {
    transform: rotate(180deg);
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    margin-top: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
    overflow: hidden;
}

.user-widget:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.2rem;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.d-name {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
}

.d-email {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--accent-primary);
}

.dropdown-item:hover i {
    color: var(--accent-primary);
}

.dropdown-item.is-danger:hover {
    color: #ef4444;
    background: #fef2f2;
}

.dropdown-item.is-danger:hover i {
    color: #ef4444;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    /* Reduced from 100vh to fit better */
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    padding-bottom: 4rem;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Force 2 columns */
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 5;
}

/* Hero Background Glows */
.hero-bg-glow {
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    top: -300px;
    right: -200px;
    z-index: -1;
    animation: float 20s ease-in-out infinite alternate;
}

/* Hero Content */
.hero-content {
    text-align: left;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.75rem;
    /* Slightly smaller for better fit */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

/* Hero Mockup (CSS Only Interface) */
.hero-mockup {
    position: relative;
    perspective: 1200px;
    /* Better perspective */
    z-index: 2;
    display: block !important;
    /* Force display */
}

.mockup-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Clean border */
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    /* Push right in column */
}

.mockup-card:hover {
    transform: rotateY(0) rotateX(0);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.mockup-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    align-items: center;
}

.mockup-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    width: 60%;
    position: relative;
    overflow: hidden;
}

.mockup-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent-gradient);
    width: 75%;
    /* Animated later */
    border-radius: 4px;
}

/* Trust Banner */
.trust-banner {
    padding: 4rem 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    opacity: 0.6;
    flex-wrap: wrap;
    font-size: 2.5rem;
    /* Larger Logos */
    color: var(--text-secondary);
}

.trust-logos i {
    transition: all 0.3s ease;
    cursor: pointer;
}

.trust-logos i:hover {
    opacity: 1;
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* Stats Section */
.stats-section {
    padding: 6rem 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Features Grid Fix */
.features {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    padding: 3rem;
    /* More padding */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Ensure left alignment */
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* Process Section */
.process-section {
    padding: 8rem 0;
    background: white;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns on desktop */
    gap: 4rem;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent-primary);
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--bg-secondary);
    font-size: 1.4rem;
}

/* FAQ Section */
.faq-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    padding: 1.5rem;
    /* Increased padding */
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-mockup {
        display: none;
        /* Hide complex mockup on mobile */
    }

    .process-steps {
        grid-template-columns: 1fr;
        /* Stack steps */
        gap: 3rem;
    }

    .trust-logos {
        gap: 2.5rem;
        font-size: 2rem;
    }

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

/* Premium Footer Styles */
.site-footer {
    background-color: #f8fafc;
    /* Very light cool gray */
    padding-top: 5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    /* Wide Brand col, then 3 links cols */
    gap: 4rem;
    padding-bottom: 4rem;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-col ul a:hover {
    color: var(--accent-primary);
}

.brand-desc {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #ecfdf5;
    color: #059669;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #059669;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Footer Bottom / Disclaimer */
.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding: 2rem 0;
    background: white;
}

.disclaimer-text {
    font-size: 0.75rem;
    color: #94a3b8;
    /* Muted text */
    line-height: 1.6;
    margin-bottom: 1rem;
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile Footer */
@media (max-width: 968px) {
    .footer-top {
        grid-template-columns: 1fr;
        /* Stack everything */
        gap: 2.5rem;
        text-align: left;
    }

    .brand-desc {
        max-width: 100%;
    }
}

/* =========================================
   WooCommerce Client Portal / Dashboard
   ========================================= */

/* Main Container Override */
.woocommerce-account .site-header {
    position: sticky;
}

/* Keep header sticky */
.woocommerce-account .page-content {
    background: #f8fafc;
    min-height: 100vh;
    padding: 2rem 0 5rem;
}

.woocommerce-MyAccount-content {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
}

.woocommerce {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Sidebar Navigation */
.woocommerce-MyAccount-navigation {
    flex: 0 0 280px;
}

.woocommerce-MyAccount-navigation ul {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
}

.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid #f1f5f9;
}

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

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 1.25rem 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #fafbfc;
    color: var(--accent-primary);
    border-left: 4px solid var(--accent-primary);
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: #fafbfc;
    color: var(--text-primary);
}

/* Dashboard Cards (Orders Table, etc) */
.woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.woocommerce-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid #f1f5f9;
}

.woocommerce-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    font-weight: 500;
}

.woocommerce-button {
    padding: 0.5rem 1.5rem;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.woocommerce-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Hide Notices/Info that look ugly */
.woocommerce-info {
    border-top: 3px solid var(--accent-primary);
    background: #fdf2f8;
    /* Pink tint alert */
    color: var(--text-primary);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.woocommerce-message {
    border-top: 3px solid #10b981;
    /* Green success */
    background: #ecfdf5;
    color: #065f46;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

/* Setup Page structure for My Account if styled directly */
.entry-content .woocommerce {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

@media (max-width: 968px) {
    .woocommerce {
        flex-direction: column;
    }

    .woocommerce-MyAccount-navigation {
        flex: 1;
        width: 100%;
    }
}

/* =========================================
   Global Polish & Spacing (V4.6)
   ========================================= */

/* Increase vertical rhythm */
section {
    padding: 8rem 0;
    /* More air between sections */
}

/* Typography Polish */
body {
    line-height: 1.75;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.025em;
    /* Tighter headings */
}

p {
    margin-bottom: 1.5rem;
}

/* Inner Page Header (Hero) */
.page-header-hero {
    padding: 10rem 0 5rem;
    /* Space for fixed header */
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4rem;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.breadcrumbs {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumbs .sep {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--accent-primary);
    font-weight: 600;
}

/* App Preloader */
#app-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#app-preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    animation: pulseLogo 2s infinite ease-in-out;
}

.loading-bar {
    width: 150px;
    height: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.bar-fill {
    width: 50%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    animation: loading 1.5s infinite ease-in-out;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* =========================================
   SaaS Dashboard Overhaul (V4.8)
   ========================================= */

/* =========================================
   SaaS Dashboard Radical Redesign (Command Center) V4.9
   ========================================= */

@media (min-width: 992px) {
    .woocommerce-account .entry-content {
        /* REBUILD V4.15: Switch to Flexbox for stability */
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        /* Aligns sidebar and content to top */
        gap: 2.5rem;
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
    }

    /* Fixed Sidebar width */
    .woocommerce-MyAccount-navigation {
        width: 280px;
        flex-shrink: 0;
        /* NEVER shrink below 280px */
        flex-grow: 0;
    }

    /* Content fills remaining space */
    .woocommerce-MyAccount-content {
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: auto;
        min-width: 0;
        /* CRITICAL: prevents flex item from overflowing */
        width: auto !important;
        /* Reset 100% force, let flex handle it */
    }
}

/* =========================================
   SaaS Dashboard Ultra-Premium (Mobile App) V4.10
   ========================================= */

/* --- 1. Sidebar Profile Card --- */
.sidebar-profile {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.sidebar-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    display: inline-block;
}

/* --- 2. Premium Graphic Widgets --- */
.dash-card {
    position: relative;
    overflow: hidden;
    background: white;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    z-index: 1;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    z-index: -1;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(var(--accent-primary-rgb), 0.1);
}

.dash-icon-bg {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 5rem;
    color: rgba(0, 0, 0, 0.03);
    transform: rotate(-15deg);
    transition: transform 0.3s;
}

.dash-card:hover .dash-icon-bg {
    transform: rotate(0deg) scale(1.1);
    color: rgba(var(--accent-primary-rgb), 0.05);
}

.dash-cta {
    margin-top: 1.5rem;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.08);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.dash-card:hover .dash-cta {
    background: var(--accent-primary);
    color: white;
}

/* --- 3. Mobile Details (Hide sidebar, show bottom bar) --- */
@media (max-width: 991px) {

    /* Hide desktop Sidebar */
    .woocommerce-MyAccount-navigation {
        display: none !important;
    }

    /* Reset Grid for Mobile to single column */
    .woocommerce-account .entry-content {
        display: block;
    }

    .woocommerce-MyAccount-content {
        padding: 1.5rem !important;
        margin-bottom: 5rem;
        /* Space for bottom bar */
        min-height: auto;
    }

    /* Welcome Banner Mobile adjustment */
    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-banner h2 {
        font-size: 1.5rem;
    }
}

/* --- 4. Mobile Bottom App Bar --- */
.mobile-app-bar {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 991px) {
    .mobile-app-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0.8rem 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        border-top: 1px solid rgba(0, 0, 0, 0.03);
        padding-bottom: env(safe-area-inset-bottom, 15px);
        /* iPhone Home Bar safe area */
    }

    .app-bar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.7rem;
        gap: 0.3rem;
        width: 60px;
    }

    .app-bar-icon {
        font-size: 1.4rem;
        margin-bottom: 2px;
        transition: transform 0.2s;
    }

    .app-bar-item.is-active {
        color: var(--accent-primary);
    }

    .app-bar-item.is-active .app-bar-icon {
        transform: translateY(-2px);
    }
}

/* =========================================
   Endpoint Refinement & Margins (V4.11)
   ========================================= */

/* --- 1. Global Content Margins --- */
/* --- 1. Global Content Margins --- */
.woocommerce-MyAccount-content {
    /* EMERGENCY POLISH V4.16: "White Paper" UI */
    /* This is now the ONLY card. */
    background: white !important;
    padding: 3rem !important;
    /* Spacious internal padding */
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    min-height: 600px;
    /* Ensure it looks like a substantial sheet of paper */

    /* Flexbox Child Properties */
    width: 100%;
    max-width: 100%;
}

/* RESET V4.16: Remove Inner Card styling because the Parent is now the Card */
.woocommerce-orders-table,
.woocommerce-MyAccount-downloads,
.u-columns.woocommerce-Addresses,
.woocommerce-EditAccountForm,
.woocommerce-address-fields,
.woocommerce-order-details {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {

    .woocommerce-orders-table,
    .woocommerce-MyAccount-downloads,
    .u-columns.woocommerce-Addresses,
    .woocommerce-EditAccountForm,
    .woocommerce-address-fields,
    .woocommerce-order-details {
        padding: 0;
        width: 100%;
        overflow-x: auto;
        /* Handle table overflow */
    }

    .woocommerce-MyAccount-content {
        padding: 1.5rem !important;
        /* Smaller text padding on mobile */
    }
}

/* --- 2. Enhanced Tables (Orders/Downloads) --- */
table.shop_table {
    border: none !important;
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

table.shop_table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 1.25rem 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f1f5f9;
}

table.shop_table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.95rem;
    color: var(--text-primary);
    vertical-align: middle;
}

table.shop_table tr:last-child td {
    border-bottom: none;
}

/* Buttons inside tables */
.woocommerce-button.button.view {
    background: #f1f5f9;
    color: var(--text-primary) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex !important;
    align-items: center;
}

.woocommerce-button.button.view:hover {
    background: var(--text-primary);
    color: white !important;
    transform: translateY(-1px);
    text-decoration: none;
}

/* --- 3. Address Grid --- */
.u-columns.woocommerce-Addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 1rem;
}

.u-column1,
.u-column2 {
    flex: 1 1 300px;
    background: transparent !important;
    /* Remove inner white card */
    padding: 0 !important;
    /* Remove inner padding */
    border-radius: 0;
    box-shadow: none !important;
    /* Remove inner shadow */
    border: 1px solid #f1f5f9 !important;
    /* Simple light border for separation */
    border-radius: 12px;
    padding: 1.5rem !important;
    /* Minimal spacing inside the outline */
}

header.woocommerce-Address-title.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

header.woocommerce-Address-title h3 {
    margin: 0;
    font-size: 1.25rem;
}

header.woocommerce-Address-title .edit {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    background: rgba(var(--accent-primary-rgb), 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
}

header.woocommerce-Address-title .edit:hover {
    background: var(--accent-primary);
    color: white;
}

/* --- 4. Forms (Account Details) --- */
form.woocommerce-EditAccountForm fieldset {
    border: none;
    padding: 0;
    margin: 2rem 0;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
}

form.woocommerce-EditAccountForm legend {
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    width: 100%;
}

.woocommerce-form-row {
    margin-bottom: 1.5rem;
}

.woocommerce-Input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    background: #fff;
    transition: all 0.2s;
}

.woocommerce-Input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.1);
    outline: none;
}

.woocommerce-Button.button.save {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

@media (min-width: 768px) {
    .woocommerce-Button.button.save {
        width: auto;
    }
}

/* =========================================
   Professional Empty States & Notices (V4.16 - Embedded)
   ========================================= */

/* Common Card Style for Notices */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* V4.16: Remove card styling, become embedded content */
    padding: 4rem 2rem;
    background: transparent !important;
    border-radius: 0;
    box-shadow: none;
    border: none !important;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary) !important;
    list-style: none !important;
    position: relative;
    overflow: hidden;

    width: 100% !important;
    box-sizing: border-box !important;
}

/* Icon Containers (Pseudo-elements) */
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 4rem;
    margin: 0;
    /* Let Gap handle this */
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    opacity: 0.2;
}

/* 1. Empty State (Info) - e.g. No Orders */
/* 1. Empty State (Info) - e.g. No Orders */
.woocommerce-info {
    border-top: none !important;
    gap: 0;
    /* JS wrapper handles spacing now */
    justify-content: center;
}

/* The JS-wrapped text container */
.wc-formatted-text {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 2rem 0;
    /* The robust gap we needed */
    display: block;
    width: 100%;
}

.woocommerce-info::before {
    content: "\f290";
    /* fa-shopping-bag */
    color: var(--text-primary);
    background: transparent;
}

.woocommerce-info a {
    order: 3;
    margin: 0;
    font-size: 1rem !important;
    padding: 1rem 2.5rem !important;
}

.woocommerce-info a {
    order: 2;
    /* Move button to bottom */
    margin-top: 1.5rem;
}

/* 2. Success Messages */
.woocommerce-message {
    border-top: 5px solid #10b981 !important;
}

.woocommerce-message::before {
    content: "\f00c";
    /* fa-check */
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* 3. Error Messages */
.woocommerce-error {
    border-top: 5px solid #ef4444 !important;
}

.woocommerce-error::before {
    content: "\f12a";
    /* fa-exclamation */
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.woocommerce-error li {
    margin-bottom: 0.5rem;
}

/* Actions/Buttons inside Notices */
.woocommerce-info .button,
.woocommerce-message .button {
    background: var(--accent-gradient) !important;
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 99px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 10px 20px rgba(var(--accent-primary-rgb), 0.3);
    transition: transform 0.2s;
    float: none !important;
    /* Override WC float */
    display: inline-block !important;
    margin-top: 1.5rem;
    font-size: 1rem !important;
}

.woocommerce-info .button:hover,
.woocommerce-message .button:hover {
    transform: translateY(-2px);
    background: var(--accent-primary) !important;
}

/* Payment Methods Table specific fix */
.woocommerce-MyAccount-paymentMethods {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 2rem;
    border-spacing: 0;
    width: 100%;
}

.woocommerce-MyAccount-paymentMethods th,
.woocommerce-MyAccount-paymentMethods td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Add Payment Method Button */
#add_payment_method .woocommerce-notices-wrapper+.button {
    width: 100%;
    text-align: center;
    padding: 1rem;
}

.woocommerce-Button.button.save:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--accent-primary-rgb), 0.3);
}



/* Sidebar "Glass" Panel */
.woocommerce-MyAccount-navigation {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 140px;
    /* Below fixed header */
    overflow: hidden;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.woocommerce-MyAccount-navigation-link a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    font-size: 0.95rem;
}

/* Hover State */
.woocommerce-MyAccount-navigation-link a:hover {
    background: #f8fafc;
    color: var(--text-primary);
    transform: translateX(4px);
}

/* Active State */
.woocommerce-MyAccount-navigation-link.is-active a {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--accent-primary-rgb), 0.3);
    transform: translateX(4px);
    font-weight: 600;
}

/* Icon placement (injected via JS, but styled here) */
.nav-icon {
    font-size: 1.1em;
    width: 24px;
    text-align: center;
    opacity: 0.7;
}

.woocommerce-MyAccount-navigation-link.is-active a .nav-icon {
    opacity: 1;
}

/* Main Content Area */
.woocommerce-MyAccount-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    min-height: 500px;
}

/* Dashboard Widget Cards (Injected JS) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dash-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.dash-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.dash-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.dash-link-text {
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.welcome-banner p {
    color: #94a3b8;
    margin-bottom: 0;
    max-width: 600px;
}

/* Table Override Cleanups */
.woocommerce-table {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.woocommerce-table tr:hover td {
    background: transparent;
    /* Remove table hover inside cards if needed */
}


/* Dashboard Sidebar & Content Layout adjustment */
.woocommerce-MyAccount-content {
    background: #fff;
    padding: 0;
    /* Let content breathe naturally */
    border: none;
    box-shadow: none;
}

/* SaaS Data Tables (Orders, Downloads) */
.woocommerce-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.woocommerce-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.woocommerce-table td {
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    font-size: 0.95rem;
    vertical-align: middle;
    transition: background 0.2s;
}

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

.woocommerce-table tr:hover td {
    background: #fdfdfd;
}

/* Actions Column (View Button) */
.woocommerce-table .woocommerce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    background: #f1f5f9;
    color: var(--text-primary) !important;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.woocommerce-table .woocommerce-button:hover {
    background: var(--text-primary);
    color: #fff !important;
    transform: translateY(-1px);
}

/* Status Badges in Tables */
.order-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.order-status.completed {
    background: #dcfce7;
    color: #166534;
}

.order-status.processing {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.on-hold {
    background: #fef9c3;
    color: #854d0e;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Dashboard Welcome Message */
.woocommerce-MyAccount-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.woocommerce-MyAccount-content a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Address Box */
.woocommerce-Address {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.woocommerce-Address-title h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.woocommerce-Address address {
    font-style: normal;
    color: var(--text-secondary);
    line-height: 1.6;
}

```