/**
 * CELPIP Pro Modern Dashboard - Advanced UI Styles
 */

/* Dashboard Layout */
.celpip-modern-dashboard {
    min-height: 100vh;
    background: #f7fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Navigation Bar */
.dashboard-navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.navbar-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: #f7fafc;
    color: #2d3748;
}

.nav-item.active {
    background: #edf2f7;
    color: #667eea;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
}

.user-role {
    font-size: 12px;
    color: #718096;
}

.user-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #718096;
}

.user-menu-toggle svg {
    width: 20px;
    height: 20px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 8px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-user:hover .user-dropdown,
.user-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f7fafc;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: #718096;
}

/* Main Content */
.dashboard-main {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px;
}

.welcome-content p {
    font-size: 16px;
    color: #718096;
    margin: 0;
}

.quick-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.4);
}

.btn-action.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

.btn-action svg {
    width: 20px;
    height: 20px;
}

/* Stats Section */
.stats-section {
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.card-gradient-1::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card.card-gradient-2::before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.card-gradient-3::before {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.card-gradient-4::before {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-gradient-1 .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-gradient-2 .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.card-gradient-3 .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.card-gradient-4 .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #718096;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 12px;
    color: #718096;
}

.stat-change.positive {
    color: #48bb78;
}

/* Alert Section */
.alert-section {
    margin-bottom: 32px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    background: white;
    border-left: 4px solid;
}

.alert.alert-warning {
    border-color: #ed8936;
    background: #fffaf0;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #ed8936;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-content h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #2d3748;
}

.alert-content p {
    margin: 0;
    font-size: 14px;
    color: #718096;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

.dashboard-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.section-link {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.section-link:hover {
    color: #5568d3;
}

/* Test Cards */
.tests-carousel {
    display: grid;
    gap: 20px;
}

.test-card-modern {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.test-card-modern:hover {
    border-color: #667eea;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.test-card-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.test-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #edf2f7;
    color: #667eea;
}

.test-favorite {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #cbd5e0;
    transition: color 0.2s;
}

.test-favorite:hover {
    color: #f56565;
}

.test-favorite svg {
    width: 20px;
    height: 20px;
}

.test-card-body {
    padding: 20px;
}

.test-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px;
}

.test-meta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #718096;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.test-progress {
    margin-top: 16px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #718096;
    margin-bottom: 8px;
}

.test-card-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f7fafc;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #edf2f7;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.status-completed {
    background: #c6f6d5;
    color: #22543d;
}

.activity-icon.status-in_progress {
    background: #fed7d7;
    color: #742a2a;
}

.activity-icon svg {
    width: 20px;
    height: 20px;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 4px;
}

.activity-content p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

.activity-score {
    flex-shrink: 0;
}

.score-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-bottom: 16px;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.subscription-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.detail-label {
    font-size: 13px;
    opacity: 0.9;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
}

/* Progress Chart */
.progress-chart {
    padding: 20px;
}

.chart-placeholder {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

.chart-label {
    font-size: 14px;
    color: #718096;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.status-completed {
    background: #bee3f8;
    color: #2c5282;
}

.status-badge.status-in_progress {
    background: #fefcbf;
    color: #744210;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0 0 16px;
    font-size: 14px;
}

/* Buttons */
.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .dashboard-navbar {
        padding: 0 16px;
    }
    
    .navbar-menu {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .dashboard-main {
        padding: 16px;
    }
    
    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        grid-template-columns: 1fr;
    }
}
