/* لیست دانش‌آموزان مشاور */

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

.students-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--purple-700);
}

.students-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.students-count-badge {
    background: linear-gradient(135deg, var(--purple-600), #0891b2);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.student-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent, var(--purple-500));
    border-radius: 0 4px 4px 0;
}

.student-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 148, 136, 0.3);
}

.student-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--card-accent, var(--purple-500)), var(--purple-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.student-card-body {
    flex: 1;
    min-width: 0;
}

.student-card-body strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-card-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.student-card-code {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.72rem;
    background: var(--purple-50);
    color: var(--purple-700);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.student-card-arrow {
    color: var(--purple-400);
    font-size: 1.2rem;
    font-weight: 700;
}

.students-empty {
    text-align: center;
    padding: 60px 24px;
    background: var(--glass);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius);
}

.students-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.students-empty h2 {
    font-size: 1.2rem;
    color: var(--purple-700);
    margin-bottom: 8px;
}

.students-empty p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.students-error,
.student-error {
    text-align: center;
    padding: 40px;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: var(--radius);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--purple-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--purple-500);
}

/* ── Student detail ── */
.student-profile-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 28px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.student-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--purple-600), #0891b2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
}

.student-profile-info h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--purple-700);
    margin-bottom: 16px;
}

.student-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.student-info-item {
    background: var(--purple-50);
    padding: 10px 14px;
    border-radius: 12px;
}

.student-info-item label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.student-info-item span {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.actions-section h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--purple-700);
    margin-bottom: 6px;
}

.actions-section > p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    width: 100%;
}

.action-card:not(.soon):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(13, 148, 136, 0.35);
}

a.action-card {
    text-decoration: none;
    color: inherit;
}

.action-card.soon {
    opacity: 0.72;
    cursor: default;
}

.action-icon {
    font-size: 1.6rem;
}

.action-card strong {
    font-size: 0.95rem;
    color: var(--text);
}

.action-card small {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.action-soon {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--accent-warm-soft, #fef3c7);
    color: #b45309;
    padding: 3px 10px;
    border-radius: 12px;
}

.dash-activity-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 12px 0 18px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(100, 116, 139, 0.16);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.dash-activity-bar.is-live {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.98));
}

.dash-activity-bar.is-live[data-kind="study"] {
    border-color: rgba(79, 70, 229, 0.2);
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.dash-activity-bar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.dash-activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    background: rgba(100, 116, 139, 0.1);
    flex-shrink: 0;
}

.dash-activity-bar.is-live .dash-activity-icon { background: rgba(239, 68, 68, 0.1); }
.dash-activity-bar.is-live[data-kind="study"] .dash-activity-icon { background: rgba(79, 70, 229, 0.1); }

.dash-activity-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.dash-activity-text strong {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
}

.dash-activity-text span {
    font-size: 0.76rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity-timer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 7px 10px;
    border-radius: 11px;
    background: rgba(15, 23, 42, 0.04);
}

.dash-activity-timer strong {
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.dash-activity-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: student-live-pulse 1.4s infinite;
}

.dash-activity-live-dot[hidden] { display: none !important; }

@keyframes student-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 768px) {
    .student-profile-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .student-profile-avatar {
        margin: 0 auto;
    }

    .dash-activity-text { text-align: center; }
}
