/* ── User Dashboard ── */
.ud-hero {
    background: linear-gradient(135deg, #480048 0%, #C04848 100%);
    padding: 100px 24px 30px;
    color: #fff;
}
.ud-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.ud-avatar-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700;
    border: 3px solid rgba(255,255,255,0.4);
}
.ud-hero-info { flex: 1; min-width: 200px; }
.ud-hero-info h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.ud-hero-info p { opacity: 0.8; margin: 0 0 8px; font-size: 14px; }
.ud-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ud-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    background: rgba(255,255,255,0.15);
    color: #fff; white-space: nowrap;
}
.ud-badge-blue { background: rgba(66,133,244,0.5); }
.ud-badge-green { background: rgba(52,168,83,0.5); }
.ud-badge-orange { background: rgba(251,188,4,0.5); }
.ud-badge-purple { background: rgba(156,39,176,0.5); }
.ud-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ── */
.ud-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 18px; border-radius: 20px;
    font-size: 14px; font-weight: 500;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.2s;
}
.ud-btn-primary { background: #065fd4; color: #fff; }
.ud-btn-primary:hover { background: #0449a8; color: #fff; }
.ud-btn-success { background: #28a745; color: #fff; }
.ud-btn-success:hover { background: #218838; color: #fff; }
.ud-btn-outline { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.ud-btn-outline:hover { background: rgba(255,255,255,0.25); }
.ud-btn-danger { background: rgba(220,53,69,0.8); color: #fff; }
.ud-btn-danger:hover { background: #dc3545; }
.ud-btn-sm { padding: 5px 14px; font-size: 13px; }

/* ── Edit Panel ── */
.ud-edit-panel { background: #f0f4ff; border-bottom: 1px solid #d0d8e8; }
.ud-edit-inner { max-width: 700px; margin: 0 auto; padding: 24px; }
.ud-edit-inner h4 { margin: 0 0 16px; font-size: 18px; }
.ud-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .ud-form-grid { grid-template-columns: 1fr; } }
.ud-form-group label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.ud-input {
    width: 100%; padding: 10px 14px; border: 1px solid #ccc; border-radius: 8px;
    font-size: 14px; background: #fff; box-sizing: border-box;
}
.ud-input:focus { border-color: #065fd4; outline: none; box-shadow: 0 0 0 3px rgba(6,95,212,0.1); }
.ud-error { color: #dc3545; font-size: 12px; display: block; margin-top: 2px; }
.ud-form-actions { display: flex; gap: 10px; margin-top: 18px; }
.ud-alert-success {
    background: #d4edda; color: #155724; padding: 10px 16px; border-radius: 8px;
    margin-bottom: 12px; font-size: 14px;
}

/* ── Container ── */
.ud-container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.ud-section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; border-bottom: 2px solid #e0e0e0; padding-bottom: 12px;
}
.ud-section-head h2 { font-size: 20px; font-weight: 700; margin: 0; }
.ud-muted { font-size: 14px; color: #888; }

/* ── Course Card ── */
.ud-course-card {
    display: flex; gap: 16px;
    background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
    padding: 16px; margin-bottom: 14px;
    transition: box-shadow 0.2s;
}
.ud-course-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ud-course-cover {
    width: 180px; height: 110px; flex-shrink: 0;
    border-radius: 8px; overflow: hidden; position: relative;
    background: #f0f0f0;
}
.ud-course-cover img { width: 100%; height: 100%; object-fit: cover; }
.ud-pass-badge {
    position: absolute; top: 6px; left: 6px;
    background: rgba(40,167,69,0.9); color: #fff;
    padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.ud-course-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ud-course-body h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.ud-course-meta { display: flex; gap: 14px; font-size: 13px; color: #888; margin-bottom: 8px; }
.ud-pbar { height: 6px; background: #e8e8e8; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.ud-pbar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.ud-course-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.ud-pct { font-size: 14px; font-weight: 700; }
.ud-course-actions { display: flex; gap: 8px; }

/* ── Empty ── */
.ud-empty { text-align: center; padding: 60px 20px; color: #999; }
.ud-empty p { font-size: 18px; margin-bottom: 16px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .ud-course-card { flex-direction: column; }
    .ud-course-cover { width: 100%; height: 160px; }
    .ud-hero-inner { flex-direction: column; text-align: center; }
    .ud-hero-badges { justify-content: center; }
    .ud-hero-actions { justify-content: center; }
}
