/**
 * MRT Student App — Simple Learning Home
 * Bright, calm, child-friendly dashboard.
 */

/* ─── Base ──────────────────────────────────────────── */
.mrt-student-app-home {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    background: transparent;
    border: none;
    box-shadow: none;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Kill WP theme wrapper */
.mrt-student-home-shell {
    padding-top: 0 !important;
    background:
        linear-gradient(180deg, #f7fbff 0%, #ffffff 44%),
        #ffffff;
}
.mrt-student-home-shell .entry-content,
.mrt-student-home-shell .page-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ─── Welcome Bar ───────────────────────────────────── */
.mrt-welcome-bar {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e0f7ff 0%, #f0fdf4 52%, #fff7ed 100%) !important;
    color: #0f172a !important;
    padding: 24px 28px !important;
    border-radius: 18px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    border: 1px solid #dbeafe;
    box-shadow: 0 16px 38px rgba(14, 116, 144, 0.08);
}
.mrt-welcome-bar::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 24px;
    width: 92px;
    height: 92px;
    background: rgba(255,255,255,0.58);
    border-radius: 999px;
    pointer-events: none;
}
.mrt-welcome-bar::after {
    content: '';
    position: absolute;
    right: 54px;
    top: 38px;
    width: 38px;
    height: 38px;
    background: #facc15;
    border-radius: 999px;
    pointer-events: none;
}

.mrt-wb-title {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: #0f172a !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    position: relative;
    z-index: 1;
}

.mrt-wb-subtitle {
    margin: 6px 0 0;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.mrt-wb-stats {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.mrt-wb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    min-width: 68px;
    text-align: center;
    color: #f1f5f9;
    transition: all 0.25s ease;
}
.mrt-wb-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}
.mrt-wb-emoji {
    font-size: 0.9rem;
    line-height: 1;
    margin-bottom: 2px;
}
.mrt-wb-card strong {
    font-weight: 800;
    color: #fff;
    font-size: 1.15rem;
    line-height: 1.2;
    display: block;
}
.mrt-wb-card small {
    font-weight: 500;
    font-size: 0.6rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-top: 1px;
}

/* ─── Section Title ─────────────────────────────────── */
.mrt-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 2px;
    letter-spacing: 0;
}

.mrt-section-title-sm {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 0.5rem 0;
}

/* ─── Subject Cards Grid ────────────────────────────── */
.mrt-premium-subject-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.mrt-premium-subject-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5edf5;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 236px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.mrt-premium-subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
    border-color: #bfdbfe;
}

/* Card Cover — gradient top strip */
.mrt-psc-cover {
    height: 88px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    position: relative;
}

.mrt-premium-subject-card--math .mrt-psc-cover {
    background: linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 100%) !important;
    border-bottom: 1px solid #c4b5fd;
}
.mrt-premium-subject-card--coding .mrt-psc-cover {
    background: linear-gradient(135deg, #dbeafe 0%, #ecfeff 100%) !important;
    border-bottom: 1px solid #93c5fd;
}
.mrt-premium-subject-card--robotics .mrt-psc-cover {
    background: linear-gradient(135deg, #ffedd5 0%, #fef3c7 100%) !important;
    border-bottom: 1px solid #fdba74;
}
.mrt-premium-subject-card--typing .mrt-psc-cover {
    background: linear-gradient(135deg, #ccfbf1 0%, #ecfccb 100%) !important;
    border-bottom: 1px solid #5eead4;
}

.mrt-psc-icon {
    font-size: 2rem;
    background: #ffffff;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(15,23,42,0.08);
    transition: transform 0.3s ease;
}
.mrt-premium-subject-card:hover .mrt-psc-icon {
    transform: scale(1.08) rotate(-3deg);
}

.mrt-psc-badges {
    display: flex;
    gap: 4px;
}

.mrt-psc-badge {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    color: #475569;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 99px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.locked-badge {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Card Content */
.mrt-psc-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mrt-psc-title {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: 0;
}

.mrt-psc-desc {
    font-size: 0.86rem;
    color: #64748b;
    margin: 0 0 14px 0;
    line-height: 1.4;
    min-height: 38px;
}

.mrt-psc-stats {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: #64748b;
}
.mrt-psc-stats strong {
    color: #1e293b;
    font-weight: 700;
}

/* Progress Bar */
.mrt-progress-bar-container {
    height: 8px;
    background: #eef4f8;
    border-radius: 99px;
    overflow: hidden;
}

.mrt-progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}
/* Subtle shimmer on progress bars */
.mrt-progress-bar::after { display: none; }

/* Buttons */
.mrt-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff !important;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
.mrt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59,130,246,0.3);
    color: #fff;
}

.mrt-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #ffffff !important;
    padding: 0.72rem 1.25rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid #0f172a;
    cursor: pointer;
}
.mrt-btn-secondary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.mrt-btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8 !important;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
}

/* ─── Bottom Row ────────────────────────────────────── */
.mrt-bottom-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
    max-width: 520px;
}

.mrt-bottom-row--simple {
    margin-left: 0;
}

.mrt-bottom-continue,
.mrt-bottom-alerts {
    min-width: 0;
}

/* Continue Learning Card */
.mrt-premium-continue-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    padding: 18px;
    border-radius: 16px;
    transition: border-color 0.3s ease;
    box-shadow: 0 10px 28px rgba(15,23,42,0.06);
}
.mrt-premium-continue-card:hover {
    border-color: #cbd5e1;
}

.mrt-pcc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mrt-pcc-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mrt-pcc-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.mrt-pcc-course {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.01em;
}

.mrt-pcc-lesson {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}
.mrt-pcc-lesson strong {
    color: #1e293b;
}

.mrt-pcc-progress-wrap {
    margin-bottom: 1rem;
}

.mrt-pcc-action .mrt-btn {
    font-size: 0.9rem;
    padding: 0.75rem;
}

/* ─── Alerts ────────────────────────────────────────── */
.mrt-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mrt-alert-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border-left: 3px solid;
    background: #ffffff;
    font-size: 0.82rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mrt-alert-card:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.mrt-alert-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.mrt-alert-content {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #475569;
}
.mrt-alert-content strong {
    font-weight: 700;
    color: #1e293b;
}

.mrt-alert-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}
.mrt-alert-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.mrt-alert-warning { border-color: #f59e0b; background: #fffbeb; }
.mrt-alert-success { border-color: #10b981; background: #ecfdf5; }
.mrt-alert-info    { border-color: #3b82f6; background: #eff6ff; }

/* ─── Legacy card styles (login gate, lock screen) ──── */
.mrt-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.mrt-home-greeting-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.mrt-home-avatar {
    font-size: 3rem;
    background: #f8fafc;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.mrt-home-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.3rem 0;
}
.mrt-home-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Status badge */
.mrt-status-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.beta-badge {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

/* Locked card */
.mrt-premium-subject-card.is-locked {
    opacity: 0.65;
    filter: grayscale(0.3);
}
.mrt-premium-subject-card.is-locked:hover {
    transform: none;
    box-shadow: none;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
    .mrt-premium-subject-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mrt-welcome-bar {
        flex-direction: column;
        gap: 0.6rem;
        text-align: center;
        padding: 0.875rem 1rem !important;
    }
    .mrt-wb-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    .mrt-premium-subject-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    .mrt-bottom-row {
        grid-template-columns: 1fr;
    }
    .mrt-home-header {
        flex-direction: column;
        align-items: stretch;
    }
    .mrt-home-greeting-area {
        margin-bottom: 1rem;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mrt-student-app-home {
        padding: 0 8px;
    }
    .mrt-wb-title {
        font-size: 1rem !important;
    }
    .mrt-psc-title {
        font-size: 0.95rem;
    }
}
