/* ===== CriSTEAM — Talaba interfeysi ===== */

.student-hub {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* --- Hero --- */
.student-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem 2.25rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 45%, #fdf4ff 100%);
    border: 1px solid rgb(99 102 241 / 0.14);
    box-shadow: var(--shadow-glow);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.student-hero::after {
    content: "🚀";
    position: absolute;
    right: 1.5rem;
    bottom: 1rem;
    font-size: 4rem;
    opacity: 0.12;
    pointer-events: none;
}

.student-hero__main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 240px;
}

.student-hero__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 1.85rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgb(99 102 241 / 0.35);
    flex-shrink: 0;
    animation: pulse-soft 3s ease-in-out infinite;
}

.student-hero__greet {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.2rem;
}

.student-hero__title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 900;
    color: var(--text-main);
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.student-hero__meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: center;
}

.student-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.student-hero__stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

/* XP ring */
.xp-ring-wrap {
    position: relative;
    width: 88px;
    height: 88px;
}

.xp-ring-wrap svg {
    transform: rotate(-90deg);
    width: 88px;
    height: 88px;
}

.xp-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 6;
}

.xp-ring-fill {
    fill: none;
    stroke: url(#xpGradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.xp-ring-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.xp-ring-label {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.level-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.85rem;
    border: 1.5px solid;
    text-align: center;
}

.level-pill__icon {
    font-size: 1.5rem;
}

/* --- Quick actions --- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.15rem 0.75rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.88rem;
    border: 1.5px solid transparent;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-align: center;
}

.quick-action:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.quick-action__icon {
    font-size: 1.85rem;
    line-height: 1;
}

.quick-action small {
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.75;
}

.quick-action--blue {
    background: linear-gradient(145deg, #eef2ff, #dbeafe);
    color: #4338ca;
    border-color: rgb(99 102 241 / 0.2);
}

.quick-action--cyan {
    background: linear-gradient(145deg, #ecfeff, #cffafe);
    color: #0e7490;
    border-color: rgb(6 182 212 / 0.25);
}

.quick-action--green {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    color: #047857;
    border-color: rgb(16 185 129 / 0.25);
}

.quick-action--purple {
    background: linear-gradient(145deg, #f5f3ff, #ede9fe);
    color: #6d28d9;
    border-color: rgb(124 58 237 / 0.25);
}

.quick-action--amber {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    color: #b45309;
    border-color: rgb(245 158 11 / 0.3);
}

/* --- Next activity CTA --- */
.next-quest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 12px 32px rgb(99 102 241 / 0.35);
    position: relative;
    overflow: hidden;
}

.next-quest::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.next-quest__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.22);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.45rem;
}

.next-quest__title {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
    position: relative;
}

.next-quest__desc {
    font-size: 0.88rem;
    opacity: 0.92;
    margin: 0.3rem 0 0;
    position: relative;
}

.next-quest .btn {
    width: auto;
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.15);
    position: relative;
    font-weight: 800;
}

.next-quest .btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* --- Section blocks --- */
.student-section {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgb(99 102 241 / 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.student-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.student-section__title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.student-section__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0;
}

/* --- Learning journey (diagnostics path) --- */
.journey-path {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 0.5rem;
}

.journey-step {
    display: flex;
    gap: 1.15rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.journey-step:last-child {
    padding-bottom: 0;
}

.journey-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 42px;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), #e2e8f0);
    border-radius: 3px;
}

.journey-step__dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    z-index: 1;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

.journey-step--done .journey-step__dot {
    background: var(--success-bg);
    border-color: var(--success);
}

.journey-step--active .journey-step__dot {
    background: var(--primary-light);
    border-color: var(--primary-color);
    animation: pulse-soft 2s ease-in-out infinite;
}

.journey-step--pending .journey-step__dot {
    background: var(--warning-bg);
    border-color: var(--warning);
}

.journey-step--locked .journey-step__dot {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.journey-step__body {
    flex: 1;
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    transition: box-shadow var(--transition-fast);
}

.journey-step--active .journey-step__body {
    border-color: rgb(99 102 241 / 0.3);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.08);
}

.journey-step--done .journey-step__body {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.journey-step__label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.journey-step__name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0.15rem 0;
}

.journey-step__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.65rem;
    line-height: 1.5;
}

.journey-step__result {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.65rem;
}

.journey-step__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.journey-step__actions .btn {
    width: auto;
}

/* --- Progress stat cards --- */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    padding: 1.1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1.5px solid;
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.stat-card__label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.stat-card__value {
    font-size: 1.4rem;
    font-weight: 900;
    margin-top: 0.15rem;
}

.stat-card--blue { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.stat-card--cyan { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.stat-card--green { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.stat-card--purple { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }

/* --- Overall progress bar --- */
.progress-track {
    margin-bottom: 1.25rem;
}

.progress-track__head {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.progress-track__bar {
    height: 14px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-track__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Badges row --- */
.badges-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.badge-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.badge-chip:hover {
    transform: scale(1.03);
}

.badge-chip__icon {
    font-size: 1.4rem;
}

.badge-chip__name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
}

.badge-chip__date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
}

.skill-card {
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.skill-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.skill-card__name {
    font-weight: 800;
    font-size: 0.88rem;
}

.skill-card__score {
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.skill-card__bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.skill-card__fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 999px;
    transition: width 0.8s ease;
}

.insight-box {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid;
}

.insight-box--strength {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.insight-box--growth {
    background: #fffbeb;
    border-color: #fde68a;
}

.insight-box__title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}

.insight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.insight-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.insight-box--strength .insight-tag {
    background: #dcfce7;
    color: #166534;
}

.insight-box--growth .insight-tag {
    background: #fef3c7;
    color: #92400e;
}

/* --- Collapsible profile --- */
.profile-toggle {
    border: none;
    background: var(--primary-light);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.profile-toggle:hover {
    background: #dbeafe;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.profile-details.is-open {
    max-height: 400px;
    opacity: 1;
}

.profile-detail {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.profile-detail__label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.profile-detail__value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Task timeline --- */
.task-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.task-item:hover {
    border-color: rgb(99 102 241 / 0.25);
}

.task-item__title {
    font-weight: 800;
    font-size: 0.92rem;
}

.task-item__date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-item__score {
    font-weight: 900;
    color: var(--primary-color);
}

.status-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.status-pill--done { background: #dcfce7; color: #166534; }
.status-pill--review { background: #fef3c7; color: #92400e; }
.status-pill--progress { background: #dbeafe; color: #1e40af; }
.status-pill--other { background: #fee2e2; color: #991b1b; }

/* --- Alert banner --- */
.student-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.student-alert--warning {
    background: #fffbeb;
    border: 1.5px dashed #f59e0b;
    color: #92400e;
}

.student-alert--info {
    background: var(--primary-light);
    border: 1.5px dashed #93c5fd;
    color: #1e40af;
    text-align: center;
    justify-content: center;
}

.student-alert__icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* --- Onboarding pages --- */
.onboard-card {
    text-align: center;
}

.onboard-success-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--success);
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-shadow: 0 8px 24px rgb(16 185 129 / 0.25);
}

.onboard-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.onboard-confetti span {
    position: absolute;
    font-size: 1.2rem;
    animation: confettiFall 2.5s ease-in-out infinite;
    opacity: 0.7;
}

.onboard-confetti span:nth-child(1) { left: 10%; animation-delay: 0s; }
.onboard-confetti span:nth-child(2) { left: 30%; animation-delay: 0.4s; }
.onboard-confetti span:nth-child(3) { left: 50%; animation-delay: 0.8s; }
.onboard-confetti span:nth-child(4) { left: 70%; animation-delay: 0.2s; }
.onboard-confetti span:nth-child(5) { left: 90%; animation-delay: 0.6s; }

@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}

@media (max-width: 640px) {
    .student-hero {
        padding: 1.5rem;
    }

    .student-hero__stats {
        width: 100%;
        justify-content: center;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .next-quest {
        flex-direction: column;
        text-align: center;
    }

    .next-quest .btn {
        width: 100%;
    }
}
