/* ==========================================================================
   Student portal
   Shared styling for the student dashboard, courses, certificates,
   community and the course learning experience.
   ========================================================================== */

.sp-hero {
    padding: 28px 0 0;
    background: #f4f7fb;
}

.sp-hero-card {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: 26px;
    background: linear-gradient(120deg, #0b1226 0%, #12284a 55%, #0b3b32 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(13, 17, 40, .18);
}

.sp-hero-card::before {
    content: "";
    position: absolute;
    top: -130px;
    right: -70px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 166, 81, .38), transparent 68%);
    pointer-events: none;
}

.sp-hero-card::after {
    content: "";
    position: absolute;
    bottom: -170px;
    left: 26%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(35, 76, 154, .4), transparent 68%);
    pointer-events: none;
}

.sp-hero-grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.sp-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.sp-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    background: linear-gradient(135deg, #00a651, #2dd4bf);
    color: #06281c;
    font-size: 24px;
    font-weight: 700;
}

.sp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-eyebrow,
.sp-kicker {
    display: inline-block;
    color: #008f46;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.sp-hero .sp-eyebrow {
    color: #7dd3a8;
}

.sp-hero-copy h1 {
    margin: 6px 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.15;
}

.sp-hero-copy p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

.sp-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-stat {
    display: block;
    min-width: 92px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-align: center;
    text-decoration: none !important;
    transition: all .2s ease;
}

.sp-stat:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    transform: translateY(-2px);
}

.sp-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.sp-stat-label {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .65);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sp-shell {
    padding: 24px 0 80px;
    background: #f4f7fb;
}

/* Portal tabs */
.sp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid #e6ecf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 17, 40, .05);
}

.sp-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 11px;
    color: #5b6577;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all .2s ease;
}

.sp-tab i {
    font-size: 16px;
}

.sp-tab:hover {
    background: #f1f5f9;
    color: #0d1128;
}

.sp-tab.active {
    background: #0d1128;
    color: #fff;
    box-shadow: 0 6px 16px rgba(13, 17, 40, .18);
}

/* Page headings */
.sp-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.sp-page-head h2 {
    margin: 4px 0;
    color: #0d1128;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
}

.sp-page-head p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Cards */
.sp-card {
    border: 1px solid #e6ecf4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(13, 17, 40, .05);
}

.sp-card-body {
    padding: 24px;
}

/* Quick links */
.sp-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sp-quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e6ecf4;
    border-radius: 16px;
    background: #fff;
    color: #0d1128;
    text-decoration: none !important;
    transition: all .2s ease;
}

.sp-quick-card:hover {
    color: #0d1128;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(13, 17, 40, .08);
}

.sp-quick-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eafaf1;
    color: #008f46;
    font-size: 20px;
}

.sp-quick-card.blue .sp-quick-icon {
    background: #eef3ff;
    color: #234c9a;
}

.sp-quick-card.amber .sp-quick-icon {
    background: #fff5df;
    color: #b45309;
}

.sp-quick-card strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.sp-quick-card span {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

/* Course grid */
.sp-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.sp-course-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e6ecf4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(13, 17, 40, .05);
    transition: all .25s ease;
}

.sp-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(13, 17, 40, .11);
}

.sp-course-cover {
    position: relative;
    height: 168px;
    overflow: hidden;
    background: linear-gradient(120deg, #122a4d, #0b6b4b);
}

.sp-course-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-course-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 17, 40, 0) 40%, rgba(13, 17, 40, .55));
}

.sp-course-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .34);
    font-size: 54px;
}

.sp-course-badge {
    position: absolute;
    z-index: 1;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #0d1128;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.sp-course-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.sp-course-body h3 {
    margin-bottom: 12px;
    color: #0d1128;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.sp-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.sp-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 8px;
    background: #f5f7fb;
    color: #5b6577;
    font-size: 12px;
}

.sp-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.sp-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.sp-status.ok {
    color: #008f46;
}

.sp-status.pending {
    color: #b45309;
}

.sp-status.muted {
    color: #6b7280;
}

/* Buttons */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .2s ease;
}

.sp-btn-dark {
    background: #0d1128;
    color: #fff;
}

.sp-btn-dark:hover {
    background: #00a651;
    color: #06281c;
}

.sp-btn-green {
    background: #00a651;
    color: #fff;
}

.sp-btn-green:hover {
    background: #008f46;
    color: #fff;
}

.sp-btn-light {
    border-color: #dfe6ef;
    background: #fff;
    color: #0d1128;
}

.sp-btn-light:hover {
    background: #f5f7fb;
    color: #0d1128;
}

.sp-btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* Empty state */
.sp-empty {
    padding: 60px 24px;
    border: 1px solid #e6ecf4;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}

.sp-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eef3ff;
    color: #234c9a;
    font-size: 32px;
}

.sp-empty h3 {
    color: #0d1128;
    font-size: 20px;
    font-weight: 700;
}

.sp-empty p {
    max-width: 460px;
    margin: 6px auto 18px;
    color: #6b7280;
}

/* Profile */
.sp-profile-summary {
    padding: 26px;
    text-align: center;
}

.sp-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #00a651, #2dd4bf);
    color: #06281c;
    font-size: 32px;
    font-weight: 700;
}

.sp-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-profile-summary h3 {
    margin-bottom: 4px;
    color: #0d1128;
    font-size: 20px;
    font-weight: 700;
}

.sp-profile-email {
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 13px;
    word-break: break-all;
}

.sp-profile-list {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
    text-align: left;
}

.sp-profile-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.sp-profile-list span {
    color: #6b7280;
}

.sp-profile-list strong {
    color: #0d1128;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.sp-profile-about {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #f7f9fc;
    color: #4b5563;
    font-size: 13px;
    text-align: left;
}

.sp-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
    border-bottom: 1px solid #eef2f7;
}

.sp-editor-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5b6577;
    font-size: 13px;
    font-weight: 600;
}

.sp-editor-tabs .nav-link:hover {
    background: #f5f7fb;
    color: #0d1128;
}

.sp-editor-tabs .nav-link.active {
    background: #0d1128;
    color: #fff;
}

.sp-form {
    padding: 24px;
}

.sp-form .form-label {
    margin-bottom: 6px;
    color: #0d1128;
    font-size: 13px;
    font-weight: 600;
}

.sp-form .form-control,
.sp-form .form-select {
    padding: 11px 13px;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    color: #0d1128;
    font-size: 14px;
    box-shadow: none;
}

.sp-form .form-control:focus,
.sp-form .form-select:focus {
    border-color: #00a651;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, .12);
}

.sp-form .form-check-input:checked {
    border-color: #00a651;
    background-color: #00a651;
}

.sp-help-card {
    padding: 22px;
}

.sp-help-card h3 {
    margin-bottom: 6px;
    color: #0d1128;
    font-size: 16px;
    font-weight: 700;
}

.sp-help-card p {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 13px;
}

/* Certificate cards */
.sp-cert-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
}

.sp-cert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #fff7e6;
    color: #b45309;
    font-size: 24px;
}

.sp-cert-card h3 {
    margin: 0;
    color: #0d1128;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.sp-cert-meta {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 12px;
    background: #f7f9fc;
    color: #4b5563;
    font-size: 13px;
}

/* Payment status shown on certificate cards */
.sp-cert-payment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 10px 12px;
    border: 1px solid #e6ecf4;
    border-radius: 12px;
    background: #fbfcfe;
}

.sp-cert-payment.is-paid {
    border-color: #ccebd9;
    background: #f2fbf6;
}

.sp-cert-payment.is-due {
    border-color: #f7dcb0;
    background: #fffaf0;
}

.sp-cert-payment-amount {
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
}

.sp-cert-payment-amount strong {
    color: #b45309;
    font-weight: 700;
}

/* Payment note on the certificate detail page */
.sp-cert-payment-note {
    align-items: flex-start;
    margin-bottom: 18px;
}

.sp-cert-payment-note.ok {
    border-color: #ccebd9;
    background: #f2fbf6;
    color: #0f6b3d;
}

.sp-cert-payment-note.warn {
    border-color: #f7dcb0;
    background: #fffaf0;
    color: #8a5a12;
}

.sp-cert-payment-note strong {
    font-weight: 700;
}

/* Learning page */
.sp-learning-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-learning-shell {
    padding: 26px 0 80px;
    background: #f4f7fb;
}

.sp-learning-sidebar {
    position: sticky;
    top: 88px;
}

.sp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
}

.sp-panel-head h2 {
    margin: 0;
    color: #0d1128;
    font-size: 16px;
    font-weight: 700;
}

.sp-panel-head span {
    color: #6b7280;
    font-size: 12px;
}

.sp-module-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 560px;
    padding: 10px;
    overflow-y: auto;
}

.sp-module-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 1px solid #e6ecf4;
    border-radius: 12px;
    background: #fff;
    color: #0d1128;
    text-align: left;
    transition: all .2s ease;
}

.sp-module-item:hover {
    border-color: #c9d6e6;
    background: #f8fbff;
}

.sp-module-item.active {
    border-color: #0d1128;
    background: #0d1128;
    color: #fff;
    box-shadow: 0 10px 20px rgba(13, 17, 40, .15);
}

.sp-module-number {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #5b6577;
    font-size: 12px;
    font-weight: 700;
}

.sp-module-item.active .sp-module-number {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.sp-module-copy {
    min-width: 0;
}

.sp-module-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.sp-module-copy small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 11px;
}

.sp-module-item.active .sp-module-copy small {
    color: rgba(255, 255, 255, .65);
}

.sp-module-badge {
    flex-shrink: 0;
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 6px;
    background: #eef3ff;
    color: #234c9a;
    font-size: 10px;
    font-weight: 600;
}

.sp-module-item.active .sp-module-badge {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.sp-feedback-toggle {
    margin: 0 10px 10px;
    width: calc(100% - 20px);
}

/* Document viewer */
.sp-viewer {
    overflow: hidden;
    border: 1px solid #e6ecf4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(13, 17, 40, .07);
}

.sp-viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
}

.sp-viewer-title span {
    display: block;
    color: #008f46;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sp-viewer-title strong {
    display: block;
    color: #0d1128;
    font-size: 15px;
    font-weight: 600;
}

.sp-viewer-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sp-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dfe6ef;
    border-radius: 9px;
    background: #fff;
    color: #374151;
    text-decoration: none !important;
    transition: all .2s ease;
}

.sp-tool-btn:hover {
    border-color: #0d1128;
    background: #0d1128;
    color: #fff;
}

.sp-tool-btn:disabled {
    pointer-events: none;
    opacity: .45;
}

.sp-zoom-label {
    min-width: 42px;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
}

.sp-tool-divider {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: #e6ecf4;
}

.sp-viewer-body {
    position: relative;
    min-height: 560px;
    max-height: 78vh;
    padding: 22px;
    overflow: auto;
    background: #ffffff;
}

.sp-pdf-pages {
    display: block;
}

.sp-pdf-pages iframe {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 6px;
    background: #fff;
}

.sp-pdf-page-number {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(13, 17, 40, .72);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    opacity: 0;
    transition: opacity .2s ease;
}

.sp-pdf-page-wrap:hover .sp-pdf-page-number {
    opacity: 1;
}

.sp-viewer:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.sp-viewer:fullscreen .sp-viewer-body {
    flex: 1;
    max-height: none;
    min-height: 0;
}

.sp-pdf-page-wrap {
    width: max-content;
    max-width: none;
    margin: 0 auto 18px;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 17, 40, .15);
}

.sp-pdf-page-wrap:last-child {
    margin-bottom: 0;
}

.sp-pdf-page-wrap canvas {
    display: block;
    max-width: none;
    height: auto;
}

.sp-viewer-loading,
.sp-viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 420px;
    padding: 30px;
    color: #6b7280;
    text-align: center;
}

.sp-viewer-loading .spinner-border {
    color: #00a651;
}

.sp-viewer-error i {
    color: #b45309;
    font-size: 42px;
}

.sp-pdf-progress {
    color: #6b7280;
    font-size: 12px;
}

.sp-viewer-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}

.sp-viewer-footer .sp-muted {
    color: #6b7280;
    font-size: 12px;
}

/* Feedback panels */
.sp-result {
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
}

.sp-result.ok {
    border: 1px solid #c9efdb;
    background: #f0fbf5;
}

.sp-result.pending {
    border: 1px solid #f5e2b8;
    background: #fffaf0;
}

.sp-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 32px;
}

.sp-result.ok .sp-result-icon {
    background: #d7f7e5;
    color: #008f46;
}

.sp-result.pending .sp-result-icon {
    background: #fff1cc;
    color: #b45309;
}

.sp-result h3 {
    margin-bottom: 8px;
    color: #0d1128;
    font-size: 22px;
    font-weight: 700;
}

.sp-result p {
    margin: 0 auto 16px;
    max-width: 560px;
    color: #4b5563;
}

.sp-result .sp-cert-meta {
    display: inline-grid;
    min-width: 280px;
    text-align: left;
}

.sp-info-note {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #d7e6ff;
    border-radius: 12px;
    background: #f3f8ff;
    color: #315a96;
    font-size: 13px;
}

.sp-info-note i {
    flex-shrink: 0;
    font-size: 18px;
}

.sp-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.sp-stars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sp-star {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #e6ecf4;
    border-radius: 12px;
    background: #fbfcfe;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 0;
    transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.sp-star:hover {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(245, 158, 11, .18);
}

.sp-star:focus-within {
    outline: none;
    border-color: #00a651;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, .16);
}

.sp-star.is-active {
    border-color: #fde3a9;
    background: #fff8e6;
    color: #f59e0b;
}

.sp-star-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
    pointer-events: none;
    transition: fill .15s ease;
}

.sp-star-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.sp-rating-text {
    min-height: 22px;
    min-width: 110px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.sp-rating-text.is-placeholder {
    color: #9ca3af;
    font-weight: 500;
}

/* Feedback form */
.sp-feedback-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 20px 22px;
    border: 1px solid #dcefe4;
    border-radius: 18px;
    background: linear-gradient(135deg, #f4fbf7, #eef6ff);
}

.sp-feedback-intro-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #0d1128;
    color: #fff;
    font-size: 20px;
}

.sp-feedback-copy {
    flex: 1;
    min-width: 220px;
}

.sp-feedback-copy h3 {
    margin: 0 0 4px;
    color: #0d1128;
    font-size: 17px;
    font-weight: 700;
}

.sp-feedback-copy p {
    margin: 0;
    color: #5b6577;
    font-size: 13px;
}

.sp-feedback-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #e6ecf4;
    border-radius: 999px;
    background: #fff;
    color: #5b6577;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.sp-feedback-list {
    display: grid;
    gap: 16px;
}

.sp-feedback-question {
    min-width: 0;
    margin: 0;
    padding: 20px;
    border: 1px solid #e6ecf4;
    border-radius: 16px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.sp-feedback-question:focus-within {
    border-color: #bfe6d1;
    box-shadow: 0 10px 30px rgba(13, 17, 40, .06);
}

.sp-feedback-question.has-error {
    border-color: #f3b5b5;
    background: #fffafa;
}

.sp-feedback-legend {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    color: #0d1128;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.sp-question-index {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #eef3ff;
    color: #234c9a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}

.sp-required {
    color: #dc2626;
}

.sp-feedback-input {
    padding: 12px 14px;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #fbfcfe;
    color: #0d1128;
    font-size: 14px;
    box-shadow: none;
}

.sp-feedback-input:focus {
    border-color: #00a651;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, .12);
}

textarea.sp-feedback-input {
    min-height: 110px;
    resize: vertical;
}

.sp-option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid #e6ecf4;
    border-radius: 11px;
    background: #fbfcfe;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.sp-option:hover {
    border-color: #bfe6d1;
    background: #f4fbf7;
}

.sp-option.is-selected {
    border-color: #00a651;
    background: #f0fbf5;
    color: #0d1128;
}

.sp-option-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.sp-option-dot {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transition: border-color .2s ease;
}

.sp-option-input:checked + .sp-option-dot {
    border-color: #00a651;
}

.sp-option-input:checked + .sp-option-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #00a651;
}

.sp-option-input:focus-visible + .sp-option-dot {
    box-shadow: 0 0 0 3px rgba(0, 166, 81, .16);
}

.sp-feedback-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

.sp-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

.sp-feedback-actions-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 12.5px;
}

.sp-feedback-actions-note i {
    color: #00a651;
}

.sp-feedback-submit {
    justify-content: center;
    min-width: 190px;
}

.sp-info-note-warn {
    border-color: #f5e2b8;
    background: #fffaf0;
    color: #8a5a12;
}

@media (max-width: 575.98px) {
    .sp-feedback-intro {
        padding: 18px;
    }

    .sp-feedback-time {
        width: 100%;
        justify-content: center;
    }

    .sp-feedback-question {
        padding: 16px;
    }

    .sp-star {
        width: 42px;
        height: 42px;
    }

    .sp-star-icon {
        width: 25px;
        height: 25px;
    }

    .sp-rating {
        gap: 10px;
    }

    .sp-rating-text {
        min-width: 100%;
    }

    .sp-feedback-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-feedback-submit {
        width: 100%;
    }
}

.sp-star-static-row {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0 4px;
    vertical-align: -3px;
}

.sp-star-static {
    width: 16px;
    height: 16px;
    fill: #d1d5db;
}

.sp-star-static.is-filled {
    fill: #f59e0b;
}

/* Community */
.sp-community-banner {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border-radius: 20px;
    background: linear-gradient(120deg, #0d1128, #123d33);
    color: #fff;
}

.sp-community-banner h2 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

.sp-community-banner p {
    max-width: 560px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .75);
}

.sp-community-points {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}

.sp-community-points i {
    color: #7dd3a8;
    margin-right: 4px;
}

.sp-community-map {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #e6ecf4;
    background: #fff;
}

.sp-community-map img {
    display: block;
    width: 100%;
    height: auto;
}

/* Payments */
.sp-payment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sp-payment-stat {
    padding: 18px 20px;
    border: 1px solid #e6ecf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 17, 40, .04);
}

.sp-payment-stat-label {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sp-payment-stat strong {
    display: block;
    margin-top: 4px;
    color: #0d1128;
    font-size: 20px;
    font-weight: 700;
}

.sp-payment-stat-ok {
    color: #008f46 !important;
}

.sp-payment-stat-warn {
    color: #b45309 !important;
}

/* Submit payment modal */
.sp-modal .modal-content {
    overflow: hidden;
    border: 1px solid #e6ecf4;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(13, 17, 40, .18);
}

.sp-modal .modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid #eef2f7;
    align-items: flex-start;
}

.sp-modal .modal-title {
    color: #0d1128;
    font-size: 17px;
    font-weight: 700;
}

.sp-modal .modal-title i {
    color: #00a651;
}

.sp-modal .modal-header p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.sp-modal .modal-body {
    padding: 0;
}

.sp-modal-form {
    padding: 24px;
}

.sp-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.sp-payment-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid #eef2f7;
}

.sp-payment-card-head h3 {
    margin: 0 0 4px;
    color: #0d1128;
    font-size: 17px;
    font-weight: 700;
}

.sp-payment-card-head p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.sp-table-wrap {
    padding: 4px 24px 24px;
    overflow-x: auto;
}

.sp-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-table th {
    padding: 12px 10px;
    border-bottom: 1px solid #eef2f7;
    color: #6b7280;
    font-size: 11px;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.sp-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: 13px;
    vertical-align: top;
}

.sp-table tr:last-child td {
    border-bottom: 0;
}

.sp-table td strong {
    display: block;
    color: #0d1128;
    font-weight: 600;
}

.sp-table td small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.sp-payment-note {
    max-width: 190px;
    color: #9a3412 !important;
}

.sp-status.rejected {
    color: #b91c1c;
}

.sp-empty-compact {
    margin: 0 24px 24px;
    padding: 40px 20px;
}

.sp-empty-compact .sp-empty-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    font-size: 24px;
}

.sp-empty-compact p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sp-learning-sidebar {
        position: static;
    }

    .sp-quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .sp-hero {
        padding-top: 18px;
    }
    .sp-hero-card {
        padding: 24px;
        border-radius: 20px;
    }

    .sp-hero-main {
        align-items: flex-start;
    }

    .sp-hero-stats {
        width: 100%;
    }

    .sp-stat {
        flex: 1;
    }

    .sp-shell {
        padding-bottom: 56px;
    }

    .sp-course-grid {
        grid-template-columns: 1fr;
    }

    .sp-payment-summary {
        grid-template-columns: 1fr;
    }

    .sp-payment-card-head {
        padding: 18px;
    }

    .sp-modal-actions {
        flex-direction: column-reverse;
    }

    .sp-modal-actions .sp-btn {
        width: 100%;
    }

    .sp-table-wrap {
        padding: 0 16px 16px;
    }

    .sp-table thead {
        display: none;
    }

    .sp-table,
    .sp-table tbody,
    .sp-table tr,
    .sp-table td {
        display: block;
        width: 100%;
    }

    .sp-table tr {
        padding: 12px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .sp-table tr:last-child {
        border-bottom: 0;
    }

    .sp-table td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 5px 0;
        border: 0;
        text-align: right;
    }

    .sp-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        color: #6b7280;
        font-size: 12px;
        font-weight: 600;
        text-align: left;
    }

    .sp-table td strong,
    .sp-table td small {
        text-align: right;
    }

    .sp-viewer-body {
        min-height: 420px;
        padding: 12px;
    }
}
