/* Premium Dashboard Theme for WooCommerce */
:root {
    --dash-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;
    --border: #f1f5f9;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 30px -10px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px -10px rgba(0,0,0,0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce-account .woocommerce {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    flex-wrap: wrap;
}

/* Hide WooCommerce's default navigation if it's there */
.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 280px;
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    column-count: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
}

/* Sidebar Styling */
.kts-dash-sidebar {
    background: var(--card-bg);
    flex: 0 0 280px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px 24px;
    box-shadow: var(--shadow-md);
    align-self: flex-start;
    position: sticky;
    top: 40px;
}

.kts-dash-profile {
    text-align: center;
    margin-bottom: 35px;
}

.kts-dash-avatar {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3);
    border: 3px solid #ffffff;
}

.kts-dash-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kts-dash-edit-profile {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.kts-dash-edit-profile:hover {
    color: #d97706;
    transform: translateY(-1px);
}

.kts-dash-name {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.kts-dash-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.kts-dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(253, 230, 138, 0.4);
}

/* Navigation Links */
.kts-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kts-dash-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.kts-dash-nav a .nav-icon {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: var(--transition);
}

.kts-dash-nav a:hover {
    background: #f8fafc;
    color: var(--primary);
    transform: translateX(5px);
}

.kts-dash-nav a:hover .nav-icon {
    opacity: 1;
    transform: scale(1.1);
}

.kts-dash-nav a.active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow: 0 4px 15px rgba(253, 230, 138, 0.4);
}

.kts-dash-nav a.active .nav-icon {
    opacity: 1;
}

/* Main Content Wrapper */
.kts-dash-main {
    flex: 1;
    column-count: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
}

.kts-dash-alert {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 500;
}

.kts-dash-page-title {
    margin-bottom: 5px;
}
.kts-dash-page-title h2 {
    font-size: 2.2rem;
    color: var(--text-main);
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
}

/* Stats Row */
.kts-dash-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
    width: 100% !important;
}

.kts-dash-stat-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    flex: 1 1 0 !important;
    min-width: 0 !important;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kts-dash-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kts-dash-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    pointer-events: none;
}

.kts-dash-stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.kts-dash-stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.kts-dash-stat-card .stat-icon {
    font-size: 1.4rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #f1f5f9;
}

/* Specific Stat Icon Colors */
.kts-dash-stat-card:nth-child(1) .stat-icon { background: #dbeafe; } /* Blue */
.kts-dash-stat-card:nth-child(2) .stat-icon { background: #f3e8ff; } /* Purple */
.kts-dash-stat-card:nth-child(3) .stat-icon { background: #dcfce7; } /* Green */
.kts-dash-stat-card:nth-child(4) .stat-icon { background: #fef3c7; } /* Gold */

.kts-dash-stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1;
}

/* Grids & Panels */
.kts-dash-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    width: 100% !important;
}

.kts-dash-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    flex: 1 1 50% !important;
    min-width: 0 !important;
}

.kts-dash-panel {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.kts-dash-panel:hover {
    box-shadow: var(--shadow-lg);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.panel-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 20px;
    background: #eff6ff;
}
.view-all:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(3px);
}

/* Lists */
.panel-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: var(--transition);
    border: 1px solid transparent;
}

.list-item:hover {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.item-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.item-details {
    flex: 1;
}

.item-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.item-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.item-status {
    text-align: right;
}

.item-price {
    font-weight: 800;
    color: var(--text-main);
    margin-top: 6px;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge.pending { background: #fef3c7; color: #b45309; }
.badge.completed { background: #dcfce7; color: #15803d; }
.badge.paid { background: #dbeafe; color: #1d4ed8; }

/* Rewards Specific */
.rewards-summary {
    text-align: center;
    padding: 20px 0 10px;
}
.points-huge {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -2px;
    text-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}
.points-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar {
    height: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fcd34d 0%, #f59e0b 100%);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Support Grid */
.support-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}
.support-panel .panel-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
.support-panel .panel-header h4 {
    color: #ffffff;
}
.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.support-card {
    text-align: center;
    padding: 25px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.support-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}
.support-card .icon {
    font-size: 2rem;
    margin-bottom: 15px;
}
.support-card h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
}
.support-card p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 30px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px dashed #cbd5e1;
}

/* Responsiveness */
@media (max-width: 992px) {
    .kts-dash-container, .woocommerce-account .woocommerce { flex-direction: column; gap: 25px; }
    .kts-dash-sidebar, .woocommerce-account .woocommerce-MyAccount-navigation { flex: none; width: 100%; position: static; }
    .kts-dash-stats { flex-wrap: wrap !important; }
    .kts-dash-stat-card { flex: 1 1 40% !important; }
    .kts-dash-grid { flex-wrap: wrap !important; }
    .kts-dash-col { flex: 1 1 100% !important; }
    .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .kts-dash-stats { flex-direction: column !important; }
    .kts-dash-stat-card { flex: 1 1 100% !important; }
}
