/* Student Dashboard — Mobile First */

.student-dashboard {
    --sd-primary: #4f46e5;
    --sd-success: #10b981;
    --sd-warning: #f59e0b;
    --sd-danger: #ef4444;
    --sd-info: #06b6d4;
    --sd-border: #e2e8f0;
    --sd-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --sd-radius: 12px;
}

/* Motivasi Harian */
.sd-motivasi {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: var(--sd-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.sd-motivasi::before {
    content: '\201C';
    position: absolute;
    top: -0.25rem;
    right: 1rem;
    font-size: 4rem;
    opacity: 0.15;
    line-height: 1;
}

.sd-motivasi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.sd-motivasi-text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

/* Dashboard Card */
.sd-dash-card {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1rem;
    box-shadow: var(--sd-shadow);
    margin-bottom: 1rem;
}

.sd-dash-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sd-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sd-primary), #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.sd-dash-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    color: #1e293b;
}

.sd-dash-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.sd-dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sd-border);
}

.sd-dash-stat {
    text-align: center;
}

.sd-dash-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sd-primary);
    line-height: 1.2;
}

.sd-dash-stat-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Feature Cards (Nilai / Absen) */
.sd-feature-card {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1rem;
    box-shadow: var(--sd-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sd-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
}

.sd-feature-card-static {
    cursor: default;
}

.sd-feature-card-static:hover {
    transform: none;
    box-shadow: var(--sd-shadow);
}

.sd-feature-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sd-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sd-feature-icon.primary { background: rgba(79, 70, 229, 0.1); color: var(--sd-primary); }
.sd-feature-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--sd-success); }

.sd-feature-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.sd-feature-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.sd-feature-value.primary { color: var(--sd-primary); }
.sd-feature-value.success { color: var(--sd-success); }

.sd-feature-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.sd-feature-link {
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--sd-primary);
    font-weight: 500;
}

/* Pengumuman */
.sd-pengumuman {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1rem;
    box-shadow: var(--sd-shadow);
}

.sd-pengumuman-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sd-pengumuman-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--sd-info);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-pengumuman-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.sd-pengumuman-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #334155;
}

.sd-pengumuman-empty {
    color: #94a3b8;
    font-style: italic;
}

/* Progress Kehadiran */
.sd-progress-section {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1rem;
    box-shadow: var(--sd-shadow);
    margin-bottom: 1rem;
}

.sd-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sd-section-title i {
    color: var(--sd-primary);
}

.sd-progress-bar-wrap {
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.75rem;
}

.sd-progress-seg {
    height: 100%;
    transition: width 0.6s ease;
}

.sd-progress-seg.hadir { background: var(--sd-success); }
.sd-progress-seg.sakit { background: var(--sd-warning); }
.sd-progress-seg.izin { background: var(--sd-info); }
.sd-progress-seg.alfa { background: var(--sd-danger); }

.sd-progress-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.sd-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

.sd-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sd-progress-pct {
    text-align: center;
    margin-bottom: 0.75rem;
}

.sd-progress-pct-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sd-success);
    line-height: 1;
}

.sd-progress-pct-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* Perkembangan Saya */
.sd-trend-card {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1rem;
    box-shadow: var(--sd-shadow);
    margin-bottom: 1rem;
}

.sd-trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sd-trend-indicator.up { background: rgba(16, 185, 129, 0.1); color: var(--sd-success); }
.sd-trend-indicator.down { background: rgba(239, 68, 68, 0.1); color: var(--sd-danger); }
.sd-trend-indicator.stable { background: rgba(100, 116, 139, 0.1); color: #64748b; }

.sd-trend-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    margin-top: 0.75rem;
}

.sd-trend-bar {
    flex: 1;
    background: linear-gradient(to top, var(--sd-primary), #818cf8);
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: height 0.4s ease;
}

/* Perkembangan Saya — subject summary list */
.sd-subject-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sd-subject-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--sd-border);
}

.sd-subject-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-subject-score {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.sd-subject-score.good { background: rgba(16, 185, 129, 0.1); color: var(--sd-success); }
.sd-subject-score.mid { background: rgba(245, 158, 11, 0.1); color: var(--sd-warning); }
.sd-subject-score.low { background: rgba(239, 68, 68, 0.1); color: var(--sd-danger); }

.sd-subject-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.sd-subject-detail-item {
    text-align: center;
    padding: 0.4rem;
    background: #f8fafc;
    border-radius: 6px;
}

.sd-subject-detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.sd-subject-detail-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Stat mini cards mobile-first */
.sd-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.sd-stat-mini {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 0.75rem;
    text-align: center;
    box-shadow: var(--sd-shadow);
}

.sd-stat-mini-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.sd-stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.sd-stat-mini-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Desktop enhancements */
@media (min-width: 768px) {
    .sd-motivasi {
        padding: 1.25rem 1.5rem;
    }

    .sd-motivasi-text {
        font-size: 1.05rem;
    }

    .sd-dash-card {
        padding: 1.25rem;
    }

    .sd-avatar {
        width: 56px;
        height: 56px;
    }

    .sd-progress-legend {
        grid-template-columns: repeat(4, 1fr);
    }

    .sd-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sd-subject-detail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .sd-dash-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .sd-hide-mobile {
        display: none !important;
    }

    .sd-feature-value {
        font-size: 1.5rem;
    }

    .sd-progress-pct-value {
        font-size: 1.75rem;
    }
}
