/**
 * QuantumLayers Dashboard Styles - Dark Mode
 */

.ql-dashboard {
    min-height: 100vh;
    padding: 0;
}

.ql-dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0px;
}

/* Header */
.ql-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    border-bottom: 2px solid rgba(26,26,26,0.5);
    background: rgba(26,26,26,0.5);
}

.ql-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ql-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #8B7FDB;
}

.ql-user-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C6FD6 0%, #9B8FE8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid #8B7FDB;
    box-shadow: 0 4px 12px rgba(139, 127, 219, 0.3);
}

.ql-user-details h2 {
    margin: 0;
    font-size: 28px;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ql-user-details p {
    margin: 5px 0 0 0;
    color: #B8B8B8;
    font-size: 14px;
}

.ql-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7C6FD6 0%, #9B8FE8 100%);
    color: #FFFFFF;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 6px rgba(139, 127, 219, 0.4);
}

.ql-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* Stats Grid */
.ql-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.ql-stat-card {
    background: linear-gradient(135deg, #252525 0%, #2A2A2A 100%);
    padding: 20px;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(139, 127, 219, 0.2);
}

.ql-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 127, 219, 0.3);
    border-color: rgba(139, 127, 219, 0.5);
}

.ql-stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(139, 127, 219, 0.3));
}

.ql-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #9B8FE8;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(155, 143, 232, 0.4);
}

.ql-stat-label {
    color: #B8B8B8;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section */
.ql-section {
    /*background: linear-gradient(135deg, #252525 0%, #2A2A2A 100%);*/
    background: rgba(26,26,26,0.5);
    padding: 30px;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    border: 2px solid rgba(26,26,26,0.5);
}

.ql-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(26,26,26,0.5);
}

.ql-section-header h3 {
    margin: 0;
    font-size: 22px;
    color: #FFFFFF;
}

/* Empty State */
.ql-empty-state {
    text-align: left;
    padding: 60px 30px;
}

.ql-empty-state-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.4;
    filter: drop-shadow(0 2px 8px rgba(139, 127, 219, 0.3));
}

.ql-empty-state p {
    font-size: 18px;
    color: #B8B8B8;
    margin-bottom: 20px;
}

/* Datasets List - Vertical Layout */
.ql-datasets-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ql-dataset-row {
    background: linear-gradient(135deg, #1C1C1C 0%, #241830 100%);
    border: 1px solid rgba(139, 127, 219, 0.3);
    border-bottom: none;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: pointer;
    flex-wrap: wrap;
}

.ql-dataset-row:first-child {
    border-radius: 2px 2px 0 0;
}

.ql-dataset-row:last-child {
    border-bottom: 1px solid rgba(139, 127, 219, 0.3);
    border-radius: 0 0 2px 2px;
}

.ql-dataset-row:only-child {
    border-radius: 2px;
    border-bottom: 1px solid rgba(139, 127, 219, 0.3);
}

.ql-dataset-row:hover {
    background: linear-gradient(135deg, #2C2C2C 0%, #342840 100%);
    border-color: #8B7FDB;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(139, 127, 219, 0.2);
}

.ql-dataset-row:hover + .ql-dataset-row {
    border-top-color: #8B7FDB;
}

.ql-dataset-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.ql-dataset-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ql-dataset-name {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
}

.ql-dataset-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #B8B8B8;
    flex-wrap: wrap;
}

.ql-dataset-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ql-dataset-right {
    flex: 0 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ql-privacy-label {
    white-space: nowrap;
    padding: 8px 16px;
    color: #B8B8B8;
}

.ql-dataset-action-btn {
    padding: 8px 16px;
    border: 1px solid #8B7FDB;
    background: rgba(139, 127, 219, 0.1);
    color: #9B8FE8;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 2px;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.ql-dataset-action-btn:hover {
    background: #8B7FDB;
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(139, 127, 219, 0.4);
}

.ql-dataset-action-btn.ql-btn-sync {
    border-color: #6FCF97;
    color: #6FCF97;
    background: rgba(111, 207, 151, 0.1);
}

.ql-dataset-action-btn.ql-btn-sync:hover {
    background: #6FCF97;
    color: #1A1A1A;
    box-shadow: 0 4px 12px rgba(111, 207, 151, 0.4);
}

.ql-dataset-action-btn.ql-btn-delete {
    border-color: #EB5757;
    color: #EB5757;
    background: rgba(235, 87, 87, 0.1);
}

.ql-dataset-action-btn.ql-btn-delete:hover {
    background: #EB5757;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(235, 87, 87, 0.4);
}

.ql-dataset-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ql-status-ready {
    background: rgba(111, 207, 151, 0.2);
    color: #6FCF97;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(111, 207, 151, 0.3);
}

.ql-status-processing {
    background: rgba(242, 201, 76, 0.2);
    color: #F2C94C;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
    border: 1px solid rgba(242, 201, 76, 0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ql-status-error {
    background: rgba(235, 87, 87, 0.2);
    color: #EB5757;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(235, 87, 87, 0.3);
}

/* Loading State */
.ql-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.ql-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(139, 127, 219, 0.2);
    border-top-color: #9B8FE8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(155, 143, 232, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ql-loading-text {
    margin-top: 20px;
    color: #B8B8B8;
    font-size: 16px;
}

/* Success Message */
.ql-success-banner {
    background: rgba(111, 207, 151, 0.15);
    border: 1px solid rgba(111, 207, 151, 0.4);
    color: #6FCF97;
    padding: 15px 20px;
    border-radius: 2px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.ql-success-banner strong {
    font-weight: 600;
    color: #FFFFFF;
}

.ql-success-banner .ql-close {
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
    color: #6FCF97;
}

.ql-success-banner .ql-close:hover {
    opacity: 1;
}

/* Quick Actions */
.ql-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.ql-quick-action {
    background: linear-gradient(135deg, #252525 0%, #2A2A2A 100%);
    padding: 20px;
    border-radius: 2px;
    border: 2px solid rgba(139, 127, 219, 0.3);
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.ql-quick-action:hover {
    border-color: #8B7FDB;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 127, 219, 0.3);
    background: linear-gradient(135deg, #2A2A2A 0%, #2F2F2F 100%);
}

.ql-quick-action-icon {
    font-size: 32px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 6px rgba(139, 127, 219, 0.3));
}

.ql-quick-action-label {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
}

/* Sync Upload Modal */
.ql-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.ql-modal-overlay.active {
    display: flex;
}

.ql-modal {
    background: linear-gradient(135deg, #252525 0%, #2A2A2A 100%);
    padding: 30px;
    border-radius: 4px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    position: relative;
    border: 1px solid rgba(139, 127, 219, 0.3);
}

.ql-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(139, 127, 219, 0.3);
}

.ql-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #FFFFFF;
}

.ql-modal-close {
    cursor: pointer;
    font-size: 24px;
    color: #B8B8B8;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ql-modal-close:hover {
    color: #FFFFFF;
}

.ql-modal-body {
    margin-bottom: 20px;
}

.ql-modal-body p {
    margin-bottom: 15px;
    color: #B8B8B8;
}

.ql-file-input-wrapper {
    border: 2px dashed rgba(139, 127, 219, 0.4);
    padding: 30px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 15px;
    transition: all 0.2s;
    background: rgba(139, 127, 219, 0.05);
}

.ql-file-input-wrapper:hover {
    border-color: #8B7FDB;
    background: rgba(139, 127, 219, 0.1);
}

.ql-file-input-wrapper input[type="file"] {
    display: none;
}

.ql-file-input-label {
    cursor: pointer;
    color: #9B8FE8;
    font-weight: 600;
}

.ql-file-selected {
    margin-top: 10px;
    color: #6FCF97;
    font-weight: 600;
}

.ql-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ql-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ql-modal-btn-cancel {
    background: rgba(184, 184, 184, 0.1);
    color: #B8B8B8;
    border: 1px solid rgba(184, 184, 184, 0.3);
}

.ql-modal-btn-cancel:hover {
    background: rgba(184, 184, 184, 0.2);
    border-color: rgba(184, 184, 184, 0.5);
}

.ql-modal-btn-upload {
    background: linear-gradient(135deg, #7C6FD6 0%, #9B8FE8 100%);
    color: #FFFFFF;
    border: 1px solid rgba(139, 127, 219, 0.5);
}

.ql-modal-btn-upload:hover {
    background: linear-gradient(135deg, #8B7FDB 0%, #AA9EED 100%);
    box-shadow: 0 4px 12px rgba(139, 127, 219, 0.4);
}

.ql-modal-btn-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .ql-dashboard-wrapper {
        padding: 20px 0px;
    }

    .ql-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ql-user-info {
        /*flex-direction: column;*/
        align-items: flex-start;
        gap: 15px;
    }

    .ql-stats-grid {
        grid-template-columns: 1fr;
    }

    .ql-dataset-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }

    .ql-dataset-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ql-dataset-action-btn {
        flex: 1;
        text-align: center;
    }

    .ql-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .ql-user-details h2 {
        font-size: 22px;
    }

    .ql-stat-value {
        font-size: 28px;
    }

    .ql-header-actions {
        width: 100%;
    }

    .ql-btn {
        flex: 1;
    }

    .ql-dataset-info {
        /*flex-direction: column;*/
        align-items: flex-start;
        gap: 8px;
    }
}
