/**
 * WooCommerce Customer Portal - Custom My Account Styles
 * Version: 2.0.0
 * 
 * Note: This file is separate from wc-license-tab.css
 * to avoid conflicts with existing license functionality
 */
 
 
 /**
 * ========================================================================
 * CUSTOM MY ACCOUNT NAVIGATION - CLEAN & SIMPLE
 * ========================================================================
 */

/* Navigation Container - STICKY */
.woocommerce-MyAccount-navigation {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.woocommerce-MyAccount-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-MyAccount-navigation li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
}

.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

/* Navigation Links - SIMPLE */
.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.woocommerce-MyAccount-navigation li a:hover {
    background: #f9fafb;
    color: #111827;
}

/* Active State - SOLID BLUE */
.woocommerce-MyAccount-navigation li.is-active a {
    background: #3b82f6;
    color: #ffffff;
}

/* SVG Icons - CLEAN & SIMPLE */
.woocommerce-MyAccount-navigation li a::before {
    content: '';
    width: 20px;
    height: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Dashboard Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--dashboard a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--dashboard.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

/* Orders Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--orders a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--orders.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z'/%3E%3C/svg%3E");
}

/* Licenses Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--licenses a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0110 0v4'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--licenses.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0110 0v4'/%3E%3C/svg%3E");
}

/* Downloads Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--downloads a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--downloads.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

/* Addresses Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-address a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-address.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

/* Account Details Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-account a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-account.is-active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* Logout Icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation {
        position: relative;
        top: 0;
        margin-bottom: 24px;
    }
}

/* ========== RESET & BASE ========== */
.woocommerce-MyAccount-content > p,
.woocommerce-MyAccount-content > h2:first-child {
    display: none !important;
}

.portal-account-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Arial, sans-serif;
}

/* ========== USER CARD ========== */
.dashboard-user-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.user-avatar {
    width: 72px;
    height: 72px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    border: 3px solid #e5e7eb;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    font-size: 28px;
    font-weight: 700;
    color: #6b7280;
}

.user-meta {
    flex: 1;
}

.dashboard-title {
    font-size: 24px;
    margin: 0 0 6px;
    font-weight: 700;
    color: #111827;
}

.dashboard-login {
    font-size: 14px;
    margin: 0;
    color: #6b7280;
}

.user-role {
    color: #9ca3af;
    font-size: 13px;
}

.user-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.btn-icon:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* ========== ALERTS ========== */
.dashboard-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #fed7aa;
    background: #fffbeb;
}

.alert-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    font-size: 14px;
    color: #92400e;
}

.alert-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
}

.alert-content a {
    color: #ea580c;
    font-weight: 600;
    text-decoration: none;
}

.alert-content a:hover {
    text-decoration: underline;
}

/* ========== STATS GRID ========== */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-orders .stat-icon {
    background: #3b82f6;
}

.stat-licenses .stat-icon {
    background: #10b981;
}

.stat-products .stat-icon {
    background: #f59e0b;
}

.stat-spent .stat-icon {
    background: #8b5cf6;
}

.stat-icon svg {
    stroke: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
    color: #9ca3af;
}

/* ========== SECTIONS ========== */
.dashboard-section {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.view-all-link {
    font-size: 13px;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* ========== QUICK ACTIONS ========== */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    border: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-blue {
    background: #3b82f6;
}

.btn-blue:hover {
    background: #2563eb;
}

.btn-green {
    background: #10b981;
}

.btn-green:hover {
    background: #059669;
}

.btn-orange {
    background: #f59e0b;
}

.btn-orange:hover {
    background: #d97706;
}

.btn-purple {
    background: #8b5cf6;
}

.btn-purple:hover {
    background: #7c3aed;
}

.btn-text {
    font-size: 14px;
    font-weight: 600;
}

.btn-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.2);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ========== TWO COLUMN GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========== LICENSES PREVIEW ========== */
.licenses-preview {
    display: grid;
    gap: 14px;
}

.license-card-mini {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
}

.license-card-mini:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.license-product {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
}

.license-status {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.license-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.license-key {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #374151;
}

.copy-btn-mini {
    width: 38px;
    height: 38px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn-mini:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.copy-btn-mini svg {
    stroke: currentColor;
}

.license-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.license-meta-row strong {
    color: #111827;
}

/* View All Licenses Button */
.btn-view-all-licenses {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #3b82f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 16px;
    transition: all 0.2s;
}

.btn-view-all-licenses:hover {
    background: #e5e7eb;
    color: #2563eb;
}

/* ========== ORDERS LIST ========== */
.orders-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-item {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.order-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-number {
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
    font-size: 15px;
}

.order-number:hover {
    text-decoration: underline;
}

.order-status {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.order-total {
    font-weight: 700;
    color: #111827;
}

.order-items-count {
    font-size: 12px;
    color: #9ca3af;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

/* ========== DOWNLOADS LIST ========== */
.downloads-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.downloads-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.downloads-list li:hover {
    border-color: #3b82f6;
}

.download-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.download-icon svg {
    stroke: currentColor;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info strong {
    display: block;
    color: #111827;
    font-size: 14px;
    margin-bottom: 2px;
    font-weight: 700;
}

.download-product {
    font-size: 12px;
    color: #6b7280;
}

.btn-download {
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border: none;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #2563eb;
}

/* ========== ACCOUNT SUMMARY ========== */
.account-summary .summary-content {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.summary-content {
    display: grid;
    gap: 14px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.summary-value {
    font-size: 14px;
    color: #111827;
    font-weight: 700;
}

.btn-edit-account {
    display: block;
    text-align: center;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 14px;
    border: none;
    transition: all 0.2s;
}

.btn-edit-account:hover {
    background: #2563eb;
}

/* ========== EMPTY STATES ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.empty-state-small {
    text-align: center;
    padding: 32px 16px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
    font-size: 14px;
}

.empty-icon {
    margin: 0 auto 12px;
    opacity: 0.5;
}

.empty-icon svg {
    stroke: #d1d5db;
}

.empty-state p {
    color: #6b7280;
    margin: 8px 0 20px;
    font-size: 14px;
}

.btn-primary-small {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.2s;
}

.btn-primary-small:hover {
    background: #2563eb;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portal-account-dashboard {
        padding: 12px;
    }
    
    .dashboard-user-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    
    .dashboard-stats-grid,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .license-key-row,
    .order-header,
    .order-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}