/* Notifications overlay */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--success);
    color: white;
}

.notification-error {
    background: var(--error);
    color: white;
}

.notification-warning {
    background: var(--warning);
    color: white;
}

.notification-info {
    background: var(--info);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: var(--spacing-lg);
}

.loading-overlay .spinner {
    border-color: var(--gray-300);
    border-top-color: var(--primary);
}

/* Score circle */
.score-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 10;
}

.score-circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.score-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Tabs */
.tabs {
    border-bottom: none;
    margin-bottom: 0;
}

.tabs-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tabs-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    overflow-x: visible;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 12px;
    justify-content: center;
}

.tabs-item {
    padding: 0.875rem 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    border-bottom: none;
    margin-bottom: 0;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
}

.tabs-item i {
    font-size: 1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.tabs-item:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.tabs-item:hover i {
    opacity: 1;
}

.tabs-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.tabs-item.active i {
    opacity: 1;
}

.tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--gray-50);
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.empty-state-text {
    margin-bottom: var(--spacing-lg);
}

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Status indicator */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
}

.status-dot.success {
    background: var(--success);
}

.status-dot.error {
    background: var(--error);
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.info {
    background: var(--info);
}

/* Grid layouts */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }
    
    /* Tabs responsive - Mobile */
    .tabs-sticky {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .tabs-list {
        gap: 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.375rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .tabs-list::-webkit-scrollbar {
        display: none;
    }
    
    .tabs-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        flex-shrink: 0;
        border-radius: 8px;
    }
    
    .tabs-item i {
        font-size: 0.875rem;
    }
    
    .tabs-item.active {
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    }
    
    /* Scores section header mobile */
    .scores-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .scores-section-title {
        font-size: 1rem;
    }
    
    .scores-section-subtitle {
        font-size: 0.75rem;
    }
    
    /* Table responsive */
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table th,
    .table td {
        padding: var(--spacing-sm);
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    /* Modal responsive */
    .modal-content {
        width: 95%;
        max-height: 85vh;
        margin: var(--spacing-md);
    }
    
    .modal-header {
        padding: var(--spacing-md);
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: var(--spacing-md);
    }
    
    .modal-footer {
        padding: var(--spacing-md);
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Score circle responsive */
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-circle-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .grid {
        gap: var(--spacing-md);
    }
    
    .tabs-sticky {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .tabs-list {
        padding: 0.25rem;
    }
    
    .tabs-item {
        font-size: 0.6875rem;
        padding: 0.5rem 0.625rem;
        gap: 0.375rem;
    }
    
    .tabs-item i {
        font-size: 0.75rem;
    }
}

