/* ===================== AIDA212 v2 - DETAILED ANALYSIS STYLES ===================== */

/* --- Search Container --- */
.da-search-container {
    max-width: 1100px;
    margin: 0 auto;
    animation: daFadeIn 0.3s ease;
}

@keyframes daFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.da-search-header {
    text-align: center;
    margin-bottom: 32px;
}

.da-search-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.da-search-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Search Box --- */
.da-search-box {
    position: relative;
    margin-bottom: 32px;
}

.da-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.da-search-input {
    width: 100%;
    padding: 16px 48px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
    box-sizing: border-box;
}

.da-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.da-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.da-search-hint {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 8px;
    padding-left: 4px;
}

/* --- Students Grid --- */
.da-students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* --- Student Card --- */
.da-student-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.da-student-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.da-student-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.da-student-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.da-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 20px;
}

.da-student-card-info {
    flex: 1;
    min-width: 0;
}

.da-student-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.da-student-nickname {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.da-student-score {
    text-align: right;
    flex-shrink: 0;
}

.da-score-value {
    font-size: 26px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.da-score-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Student Card Meta --- */
.da-student-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.da-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.da-meta-item i {
    font-size: 11px;
}

/* --- Student Card Bottom --- */
.da-student-card-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.da-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.da-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.da-tag-strength {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.da-tag-weakness {
    background: rgba(239, 68, 68, 0.06);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.da-analyze-btn {
    padding: 8px 16px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.da-analyze-btn:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

/* --- Empty State --- */
.da-empty-state {
    text-align: center;
    padding: 60px 20px;
}

/* --- Analysis Container --- */
.da-analysis-container {
    max-width: 1100px;
    margin: 0 auto;
    animation: daFadeIn 0.35s ease;
}

/* --- Analysis Header --- */
.da-analysis-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.da-back-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}

.da-back-btn:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.da-analysis-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.da-analysis-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.da-analysis-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.da-analysis-header-stats {
    display: flex;
    gap: 24px;
}

.da-header-stat {
    text-align: center;
}

.da-header-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.da-header-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Sections --- */
.da-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
}

.da-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.da-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    background: var(--accent-gradient);
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* --- Metrics Grid --- */
.da-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.da-metric-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.da-metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.da-metric-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.da-metric-value {
    font-weight: 700;
    font-size: 14px;
}

.da-metric-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.da-metric-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* --- Emotional Profile --- */
.da-emotional-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.da-emotional-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.da-emotional-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.da-emotional-header span:last-child {
    margin-left: auto;
}

.da-emotional-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.da-emotional-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* --- Analyses Timeline --- */
.da-analyses-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.da-analyses-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    border-radius: 1px;
}

/* --- Analysis Card --- */
.da-analysis-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    margin-left: 44px;
    transition: border-color 0.2s;
}

.da-analysis-card:hover {
    border-color: var(--border-color);
}

.da-analysis-card::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.da-analysis-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 12px;
}

.da-analysis-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.da-analysis-date {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.da-analysis-sessions {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 8px;
}

.da-analysis-score {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

.da-score-big {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.da-score-delta {
    font-size: 13px;
    font-weight: 700;
}

.da-analysis-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.da-summary,
.da-strengths,
.da-weaknesses,
.da-behavior,
.da-recommendations {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.da-summary {
    background: rgba(67, 97, 238, 0.03);
    border-left: 3px solid var(--accent-primary);
}

.da-summary h4,
.da-strengths h4,
.da-weaknesses h4,
.da-behavior h4,
.da-recommendations h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.da-analysis-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.da-analysis-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.da-analysis-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.da-strengths {
    background: rgba(34, 197, 94, 0.03);
    border-left: 3px solid #22c55e;
}

.da-weaknesses {
    background: rgba(239, 68, 68, 0.03);
    border-left: 3px solid #ef4444;
}

.da-behavior {
    background: rgba(139, 92, 246, 0.03);
    border-left: 3px solid #8b5cf6;
}

.da-recommendations {
    background: rgba(245, 158, 11, 0.04);
    border-left: 3px solid #f59e0b;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .da-students-grid {
        grid-template-columns: 1fr;
    }

    .da-analysis-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .da-analysis-header-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .da-analysis-header-stats {
        width: 100%;
        justify-content: space-around;
    }

    .da-analysis-two-col {
        grid-template-columns: 1fr;
    }

    .da-emotional-grid {
        grid-template-columns: 1fr;
    }

    .da-analysis-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .da-analysis-card {
        margin-left: 32px;
    }

    .da-analysis-card::before {
        left: -26px;
        width: 10px;
        height: 10px;
    }

    .da-analyses-timeline::before {
        left: 10px;
    }
}