.cp-personal-dashboard {
    --cp-dash-blue: #2457d6;
    --cp-dash-blue-dark: #173f9f;
    --cp-dash-ink: #13203a;
    --cp-dash-muted: #667085;
    --cp-dash-border: #dbe4f0;
    --cp-dash-surface: #ffffff;
    --cp-dash-soft: #f5f8fd;
    --cp-dash-green: #157347;
    width: min(1380px, 100%);
    margin-inline: auto;
    color: var(--cp-dash-ink);
}

.cp-personal-dashboard *,
.cp-personal-dashboard *::before,
.cp-personal-dashboard *::after { box-sizing: border-box; }

.cp-dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid var(--cp-dash-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 7% 10%, rgba(36, 87, 214, .13), transparent 32%),
        radial-gradient(circle at 96% 96%, rgba(23, 63, 159, .09), transparent 34%),
        linear-gradient(135deg, #fff, #f3f7fd);
    box-shadow: 0 20px 58px rgba(23, 32, 51, .09);
}

.cp-dashboard-hero h2 {
    margin: 4px 0 10px;
    color: #061d33;
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-size: clamp(32px, 4.2vw, 54px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.04;
}

.cp-dashboard-hero p:not(.cp-campus-eyebrow) {
    max-width: 760px;
    margin: 0;
    color: #526078;
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.7;
}

.cp-dashboard-roles {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cp-dashboard-roles span,
.cp-dashboard-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(36, 87, 214, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    color: var(--cp-dash-blue-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.cp-dashboard-notifications,
.cp-dashboard-role-section {
    margin-top: 28px;
    padding: clamp(24px, 3.6vw, 38px);
    border: 1px solid var(--cp-dash-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(23, 32, 51, .07);
}

.cp-dashboard-notifications {
    border-top:4px solid #c49a3a;
    background:radial-gradient(circle at 96% 5%,rgba(36,87,214,.07),transparent 25%),linear-gradient(180deg,#ffffff,#fbfcff);
    box-shadow:0 19px 52px rgba(23,63,159,.09);
}

.cp-dashboard-section-heading,
.cp-dashboard-subheading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cp-dashboard-section-heading h3,
.cp-dashboard-subheading h4 {
    margin: 3px 0 0;
    color: var(--cp-dash-ink);
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-weight: 900;
    line-height: 1.2;
}

.cp-dashboard-section-heading h3 { font-size: clamp(24px, 3vw, 34px); }
.cp-dashboard-subheading h4 { font-size: 20px; }
.cp-dashboard-subheading > span { color: var(--cp-dash-muted); font-size: 13px; }

.cp-dashboard-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cp-dashboard-unread-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--cp-dash-blue-dark);
    font-size: 13px;
    font-weight: 800;
}

.cp-dashboard-link-button,
.cp-dashboard-notification__actions button,
.cp-dashboard-notification__actions a,
.cp-dashboard-material__actions button,
.cp-dashboard-material__actions a,
.cp-dashboard-secondary-link,
.cp-dashboard-list-panel li > a {
    border: 0;
    background: transparent;
    color: var(--cp-dash-blue-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.cp-dashboard-link-button:hover,
.cp-dashboard-notification__actions button:hover,
.cp-dashboard-notification__actions a:hover,
.cp-dashboard-material__actions button:hover,
.cp-dashboard-material__actions a:hover,
.cp-dashboard-secondary-link:hover,
.cp-dashboard-list-panel li > a:hover { text-decoration: underline; }

.cp-dashboard-notification-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.cp-dashboard-notification {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid var(--cp-dash-border);
    border-radius: 15px;
    background: #fff;
    transition: opacity .16s ease, background .16s ease, border-color .16s ease;
}

.cp-dashboard-notification.is-unread {
    border-color: rgba(36, 87, 214, .30);
    background: #f7f9ff;
}

.cp-dashboard-notification.is-read { opacity: .72; }
.cp-dashboard-notification.is-dismissed { border-style:dashed; background:#f7f9fc; opacity:.82; }

.cp-dashboard-notification__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #edf3ff;
    color: var(--cp-dash-blue);
    font-size: 22px;
}

.cp-dashboard-notification h4,
.cp-dashboard-notification p { margin: 0; }
.cp-dashboard-notification h4 { font-size: 15px; font-weight: 900; }
.cp-dashboard-notification p { margin-top: 3px; color: var(--cp-dash-muted); font-size: 14px; line-height: 1.45; }
.cp-dashboard-notification small { display: block; margin-top: 5px; color: #7a869b; }
.cp-dashboard-notification__actions { display: flex; align-items: center; gap: 10px; }
.cp-dashboard-hidden-badge { display:inline-flex; align-items:center; min-height:25px; padding:4px 8px; border:1px solid #d2dcea; border-radius:999px; background:#eef2f7; color:#526078; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.cp-dashboard-notification__close {
    position:relative;
    display:inline-flex !important;
    width:30px;
    height:30px;
    min-width:30px;
    min-height:30px;
    align-items:center;
    justify-content:center;
    padding:0 !important;
    border:1px solid #d6dfec !important;
    border-radius:999px;
    background:#fff !important;
    color:#526078 !important;
    font-size:0 !important;
    line-height:0 !important;
    text-indent:0 !important;
    text-decoration:none !important;
}
.cp-dashboard-notification__close svg { position:absolute !important; top:50% !important; left:50% !important; display:block !important; width:13px !important; height:13px !important; margin:0 !important; overflow:visible; transform:translate(-50%,-50%) !important; }
.cp-dashboard-notification__close svg path { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.cp-dashboard-notification__close:hover { border-color:#2457d6 !important; color:#173f9f !important; }
.cp-dashboard-notification__close[hidden] { display:none !important; }
.cp-dashboard-priority-content { margin-top:28px; }
.cp-dashboard-priority-content .cp-questions { margin-top:0; }
.cp-dashboard-priority-content .cp-questions__hero { border-top:4px solid #2457d6; box-shadow:0 19px 52px rgba(23,63,159,.09); }

.cp-dashboard-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 15px;
    background: #f2faf5;
    color: var(--cp-dash-green);
}
.cp-dashboard-empty p { margin: 0; }
.cp-dashboard-empty .dashicons { width: 27px; height: 27px; font-size: 27px; }
.cp-dashboard-live { min-height: 1px; margin: 8px 0 0; color: var(--cp-dash-green); font-size: 13px; }

.cp-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.cp-dashboard-metrics article {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--cp-dash-border);
    border-radius: 16px;
    background: var(--cp-dash-soft);
}

.cp-dashboard-metrics article > span {
    color: var(--cp-dash-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cp-dashboard-metrics strong {
    color: var(--cp-dash-ink);
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.cp-dashboard-metrics small { color: var(--cp-dash-muted); line-height: 1.45; }

.cp-dashboard-progress {
    width: 100%;
    height: 11px;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf6;
}

.cp-dashboard-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2d68e7, #173f9f);
    transition: width .2s ease;
}

.cp-dashboard-focus-grid,
.cp-dashboard-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.cp-dashboard-focus-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--cp-dash-border);
    border-radius: 17px;
    background: linear-gradient(145deg, #fff, #f6f9fe);
}

.cp-dashboard-focus-card > .dashicons {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #2d68e7, #173f9f);
    color: #fff;
    font-size: 25px;
}

.cp-dashboard-focus-card h4 { margin: 3px 0 8px; font-size: 21px; font-weight: 900; }
.cp-dashboard-focus-card p:not(.cp-campus-eyebrow) { margin: 0; color: var(--cp-dash-muted); line-height: 1.55; }
.cp-dashboard-inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 15px; }

.cp-dashboard-subsection { margin-top: 30px; }
.cp-dashboard-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 14px;
    margin-top: 15px;
}

.cp-dashboard-material {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--cp-dash-border);
    border-radius: 16px;
    background: #fff;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cp-dashboard-material:hover { transform: translateY(-2px); border-color: rgba(36, 87, 214, .30); box-shadow: 0 13px 30px rgba(23, 63, 159, .09); }
.cp-dashboard-material__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.cp-dashboard-material__top .cp-dashboard-chip {
    justify-self: start;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.cp-dashboard-material h4 { min-width: 0; margin: 0; font-size: 17px; font-weight: 900; line-height: 1.35; overflow-wrap: anywhere; }
.cp-dashboard-material p { min-width: 0; margin: 0; color: var(--cp-dash-muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.cp-dashboard-material small { min-width: 0; color: #7a869b; overflow-wrap: anywhere; }
.cp-dashboard-favorite {
    position:relative;
    display:inline-flex !important;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items:center;
    justify-content:center;
    padding:0 !important;
    border: 1px solid var(--cp-dash-border);
    border-radius: 999px;
    background: #fff;
    color: #8a96aa;
    font-size:0 !important;
    line-height:0 !important;
    cursor: pointer;
}
.cp-dashboard-favorite > span { position:absolute; top:50%; left:50%; display:block !important; width:18px; height:18px; margin:0 !important; line-height:0 !important; transform:translate(-50%,-50%); }
.cp-dashboard-favorite svg { display:block !important; width:100% !important; height:100% !important; margin:0 !important; overflow:visible; }
.cp-dashboard-favorite svg path { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.cp-dashboard-favorite.is-active svg path { fill:currentColor; }
.cp-dashboard-favorite.is-active { border-color: #e0a51d; background: #fff9e8; color: #c48600; }
.cp-dashboard-material__footer {
    display: grid;
    grid-template-columns: minmax(125px, 145px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding-top: 11px;
    border-top: 1px solid #edf0f5;
}
.cp-dashboard-material__footer label {
    display: block;
    min-width: 0;
    max-width: 100%;
}
.cp-dashboard-material__footer select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #ccd6e5;
    border-radius: 9px;
    background: #fff;
    color: var(--cp-dash-ink);
    font-size: 13px;
}
.cp-dashboard-material__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}
.cp-dashboard-material__actions :is(a, button) {
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
}

.cp-dashboard-list-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--cp-dash-border);
    border-radius: 17px;
    background: #fbfcff;
}
.cp-dashboard-list-panel ul { display: grid; gap: 0; margin: 13px 0 0; padding: 0; list-style: none; }
.cp-dashboard-list-panel li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid #e6ebf3; }
.cp-dashboard-list-panel li:first-child { border-top: 0; }
.cp-dashboard-list-panel li > div { display: grid; gap: 4px; min-width: 0; }
.cp-dashboard-list-panel li strong { overflow-wrap: anywhere; }
.cp-dashboard-list-panel li small { color: var(--cp-dash-muted); }
.cp-dashboard-list-panel > p { margin: 14px 0 0; }

.cp-dashboard-role-section--tutor { border-top: 4px solid #5b5bd6; }
.cp-dashboard-role-section--teacher { border-top: 4px solid #157347; }
.cp-dashboard-role-section--opponent { border-top: 4px solid var(--cp-dash-blue); }

.cp-dashboard-teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}
.cp-dashboard-teacher-grid article {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 14px;
    padding: 19px;
    border: 1px solid var(--cp-dash-border);
    border-radius: 16px;
    background: #f8fcfa;
}
.cp-dashboard-teacher-grid .dashicons { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 12px; background: #e3f5e9; color: var(--cp-dash-green); font-size: 23px; }
.cp-dashboard-teacher-grid h4 { margin: 1px 0 6px; font-size: 16px; font-weight: 900; }
.cp-dashboard-teacher-grid p { margin: 0; color: var(--cp-dash-muted); font-size: 13px; line-height: 1.5; }

.cp-dashboard-video-modal {
    width: min(960px, calc(100% - 32px));
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #08172b;
    color: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}
.cp-dashboard-video-modal::backdrop { background: rgba(5, 13, 27, .72); }
.cp-dashboard-video-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; }
.cp-dashboard-video-modal__header button { border: 0; background: transparent; color: #fff; font-size: 28px; cursor: pointer; }
.cp-dashboard-video-modal__frame { position: relative; padding-top: 56.25%; }
.cp-dashboard-video-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cp-dashboard-material.is-updating { opacity: .62; pointer-events: none; }
.cp-dashboard-notification.is-updating { opacity: .55; pointer-events: none; }

@media (max-width: 1120px) {
    .cp-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-dashboard-teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .cp-dashboard-hero,
    .cp-dashboard-section-heading,
    .cp-dashboard-subheading { flex-direction: column; }
    .cp-dashboard-roles { justify-content: flex-start; }
    .cp-dashboard-heading-actions { justify-content: flex-start; }
    .cp-dashboard-metrics,
    .cp-dashboard-focus-grid,
    .cp-dashboard-two-columns,
    .cp-dashboard-teacher-grid { grid-template-columns: 1fr; }
    .cp-dashboard-notification { grid-template-columns: 40px minmax(0, 1fr); }
    .cp-dashboard-notification__actions { grid-column: 2; justify-content: flex-start; }
    .cp-dashboard-material__footer { grid-template-columns: 1fr; align-items: start; }
    .cp-dashboard-material__actions { justify-content: flex-start; }
    .cp-dashboard-section-heading > .cp-campus-button { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .cp-dashboard-hero,
    .cp-dashboard-notifications,
    .cp-dashboard-role-section { padding: 22px 17px; border-radius: 18px; }
    .cp-dashboard-focus-card { grid-template-columns: 1fr; }
    .cp-dashboard-list-panel li { align-items: flex-start; flex-direction: column; }
    .cp-dashboard-notification { grid-template-columns: 1fr; }
    .cp-dashboard-notification__actions { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-dashboard-material,
    .cp-dashboard-progress span,
    .cp-dashboard-notification { transition: none; }
}
