/**
 * WooNotif Dashboard Styles
 * 
 * Dashboard-specific styles for the WooNotif My Account dashboard page.
 * CSS variables and design system are defined in my-account-global.css
 */

/* Dashboard Container */
.woonotif-dashboard-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Dashboard Header */
.dashboard-header {
    background: #97588B;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(151, 88, 139, 0.15);
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.dashboard-title i {
    font-size: 1.75rem;
    opacity: 0.9;
}

.welcome-text {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

.logout-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: white;
    text-decoration: underline;
}

/* Subscription Status Card */
.subscription-status-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.dashboard-info-wrapper {
    margin: -21px -21px 21px;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-header .status-info-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.status-header i {
    font-size: 2rem;
}

.status-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.expires-text {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.subscription-actions {
    display: flex;
    align-items: center;
}

.manage-subscription-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #97588B 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(151, 88, 139, 0.2);
}

.manage-subscription-btn:hover {
    background: linear-gradient(135deg, #7d4a73 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(151, 88, 139, 0.3);
    color: white;
    text-decoration: none;
}

.manage-subscription-btn i {
    font-size: 14px;
}

/* API Error Card */
.api-error-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.error-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.error-content i {
    font-size: 1.5rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.error-info h3 {
    margin: 0 0 0.5rem 0;
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: 600;
}

.error-info p {
    margin: 0 0 1rem 0;
    color: #7f1d1d;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #97588B;
    color: white;
}

.btn-primary:hover {
    background: #7d4a73;
    color: white;
}

/* Unified Statistics Grid */
.unified-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive adjustments for unified grid */
@media (max-width: 1200px) {
    .unified-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .unified-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .unified-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* General Statistics Cards */
.stat-item {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(151, 88, 139, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 50%;
    transform: translate(40px, -40px);
    transition: all 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(151, 88, 139, 0.2);
}

.stat-item:hover::before {
    transform: translate(30px, -30px) scale(1.1);
    background: linear-gradient(135deg, rgba(151, 88, 139, 0.15) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(151, 88, 139, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 50%;
    transform: translate(40px, -40px);
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(151, 88, 139, 0.2);
}

.stat-card:hover::before {
    transform: translate(30px, -30px) scale(1.1);
    background: linear-gradient(135deg, rgba(151, 88, 139, 0.15) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
    background: linear-gradient(135deg, #97588B 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(151, 88, 139, 0.3);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(151, 88, 139, 0.4);
}

.stat-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    line-height: 1.2;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content p {
    margin: 0 0 0.75rem 0;
    color: #4b5563;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.stat-content small {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: auto;
    opacity: 0.8;
}

.usage-bar {
    width: 100%;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #97588B, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
}


/* WhatsApp Statistics Grid - Two Column Layout */
.whatsapp-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .whatsapp-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions h3 i {
    color: #97588B;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.action-card i {
    font-size: 2rem;
    color: #97588B;
    margin-bottom: 0.5rem;
}

.action-card h4 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.action-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
}

/* WhatsApp Accounts Info Section */
.wa-accounts-info-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.wa-accounts-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.wa-accounts-title h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wa-accounts-title h3 i {
    color: #25D366;
    font-size: 1.75rem;
}

.wa-accounts-title p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

.wa-accounts-usage {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.wa-usage-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.wa-usage-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wa-account-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.wa-account-icon.wa-account-used {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.wa-account-icon.wa-account-available {
    background: #f3f4f6;
    color: #9ca3af;
    border: 2px dashed #d1d5db;
}

.wa-account-icon:hover {
    transform: scale(1.1);
}

.wa-usage-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wa-usage-numbers {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.wa-usage-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-connect-action {
    display: flex;
    align-items: center;
}

.wa-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}

.wa-connect-btn:hover {
    background: linear-gradient(135deg, #1ea952 0%, #0f6b5e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.wa-connect-btn i {
    font-size: 0.875rem;
}

.wa-limit-reached {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid #bae6fd;
}

.wa-limit-reached i {
    color: #059669;
}

/* Responsive Design for WhatsApp Accounts Section */
@media (max-width: 1024px) {
    .wa-accounts-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .wa-accounts-usage {
        justify-content: center;
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .wa-accounts-info-section {
        padding: 1.5rem;
    }
    
    .wa-usage-display {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wa-account-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .wa-usage-icons {
        gap: 0.375rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.5rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .status-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}