/* Dashboard Overlay Styles */
.dash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dash-overlay.dash-active {
    display: flex;
    opacity: 1;
}

.dash-container {
    width: 90%;
    max-width: 1200px;
    height: 85%;
    max-height: 800px;
    margin: auto;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: dashSlideIn 0.4s ease-out;
}

@keyframes dashSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Sidebar Navigation */
.dash-sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.dash-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dash-sidebar > * {
    position: relative;
    z-index: 2;
}

.dash-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.dash-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-header p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.dash-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dash-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.dash-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
    font-weight: 500;
}

.dash-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.dash-nav-item.dash-nav-active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

.dash-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.dash-nav-item span {
    font-size: 0.95rem;
}

/* Main Content Area */
.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dash-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.dash-tab-content {
    display: none;
    animation: dashFadeIn 0.3s ease-in-out;
}

.dash-tab-content.dash-tab-active {
    display: block;
}

@keyframes dashFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Header */
.dash-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dash-content-title {
    color: var(--text-color);
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-content-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Stats Grid */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dash-stat-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.dash-stat-card.dash-full-width {
    grid-column: 1 / -1;
}

.dash-stat-header {
    margin-bottom: 1.5rem;
}

.dash-stat-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-info-item:last-child {
    border-bottom: none;
}

.dash-info-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-info-value {
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-flag {
    font-size: 1.2rem;
}

/* Quick Stats */
.dash-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dash-quick-stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.dash-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dash-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.dash-stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: rgba(99, 102, 241, 0.3);
}

/* History Table */
.dash-table-wrapper {
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th,
.dash-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.dash-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-color);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.dash-table td {
    color: var(--text-secondary);
}

.dash-no-data {
    text-align: center;
    padding: 3rem !important;
}

.dash-no-data i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.dash-no-data p {
    color: var(--text-secondary);
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Downloads Grid */
.dash-downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dash-download-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dash-download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dash-download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-download-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Subscription Plans */
.dash-current-plan {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.dash-current-plan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dash-current-plan > * {
    position: relative;
    z-index: 2;
}

.dash-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dash-plan-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.dash-plan-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.dash-plan-badge.dash-free {
    background: rgba(255, 255, 255, 0.2);
}

.dash-plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.dash-plan-price .dash-currency {
    font-size: 1.5rem;
    font-weight: 600;
}

.dash-plan-price .dash-amount {
    font-size: 3rem;
    font-weight: 700;
}

.dash-plan-price .dash-period {
    font-size: 1rem;
    opacity: 0.8;
}

.dash-plan-features {
    margin-bottom: 1.5rem;
}

.dash-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.dash-feature-item.dash-disabled {
    opacity: 0.5;
}

.dash-feature-item i {
    width: 16px;
    text-align: center;
}

.dash-plan-usage {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.dash-usage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dash-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.dash-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.dash-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dash-plan-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.dash-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Settings */
.dash-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dash-settings-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.dash-settings-card h4 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.dash-setting-item {
    margin-bottom: 1.5rem;
}

.dash-setting-item:last-child {
    margin-bottom: 0;
}

.dash-toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.dash-setting-info {
    flex: 1;
}

.dash-setting-info label {
    display: block;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.dash-setting-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.dash-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.dash-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dash-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.dash-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .dash-toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .dash-toggle-slider:before {
    transform: translateX(26px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dash-container {
        width: 95%;
        height: 95%;
        flex-direction: column;
    }
    
    .dash-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .dash-header {
        padding: 1rem;
        min-width: 200px;
    }
    
    .dash-nav {
        display: flex;
        padding: 1rem 0;
        min-width: 500px;
    }
    
    .dash-nav-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        text-align: center;
        border-left: none;
        border-bottom: 3px solid transparent;
        min-width: 100px;
    }
    
    .dash-nav-item.dash-nav-active {
        border-left: none;
        border-bottom-color: white;
    }
    
    .dash-nav-item span {
        font-size: 0.8rem;
    }
    
    .dash-content {
        padding: 1rem;
    }
    
    .dash-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dash-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .dash-downloads-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-toggle-setting {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dash-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .dash-container {
        border-radius: 12px;
    }
    
    .dash-nav {
        min-width: 400px;
    }
    
    .dash-nav-item {
        min-width: 80px;
        padding: 0.75rem;
    }
    
    .dash-stat-number {
        font-size: 2rem;
    }
    
    .dash-content-title {
        font-size: 1.5rem;
    }
}

/* More Important Buttons */

#dashClearHistoryBtn{
    padding: 0.75rem;
    background: red;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#dashExportHistoryBtn{
        padding: 0.75rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#dashClearDownloadsBtn{
        padding: 0.75rem;
    background: red;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#dashExportDataBtn{
            padding: 0.75rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#dashClearAllDataBtn{
            padding: 0.75rem;
    background: red;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}



/* Action Buttons */
.dash-action-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.dash-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dash-action-btn.dash-danger:hover {
    background: var(--error-color);
    border-color: var(--error-color);
}

/* Form Elements */
.dash-form-input,
.dash-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-background);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dash-form-input:focus,
.dash-form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dash-data-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Filter Groups */
.dash-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}