/* -----------------------------------------------
   Normal content
----------------------------------------------- */
p.wp-block-paragraph {
    font-size: 14px;
}
h2.wp-block-heading {
    font-size: 16px;
}
h3.wp-block-heading {
    font-size: 14px;
}
/* -----------------------------------------------
   Loading state
----------------------------------------------- */
.de-loading {
    opacity: .6;
    pointer-events: none;
}

.de-loading button {
    cursor: not-allowed;
}

/* -----------------------------------------------
   Module header
----------------------------------------------- */
.de-module-header h1 {
    font-size: 1.5rem;
}

/* -----------------------------------------------
   Toolbar: search + per-page
----------------------------------------------- */
.de-list-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 14px;
}

.de-search-form .input-group {
    min-width: 240px;
}

/* -----------------------------------------------
   Result info text
----------------------------------------------- */
.de-result-info {
    font-size: 0.85rem;
    color: #6c757d;
}

/* -----------------------------------------------
   Pagination
----------------------------------------------- */
.de-pagination .pagination {
    margin-bottom: 0;
}

.de-pagination .page-link {
    min-width: 36px;
    text-align: center;
    border-radius: 4px !important;
    font-size: 0.875rem;
}

.de-pagination .page-item.active .page-link {
    z-index: 1;
}

.de-pagination .page-item.disabled .page-link {
    color: #adb5bd;
}

/* -----------------------------------------------
   Landing splash
----------------------------------------------- */
.de-landing-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 100%;
    background: #fff;
    padding: 24px 16px;
}

.de-landing-logo {
    width: 180px;
    max-width: 60vw;
    height: auto;
    object-fit: contain;
}

.de-landing-subtitle {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 400;
    color: #6c757d;
}

.de-landing-cta {
    background: #49715f;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.de-landing-cta:hover,
.de-landing-cta:focus {
    background: #3d5f4f;
    color: #fff;
}

@keyframes de-landing-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.de-landing-fade-in {
    opacity: 0;
    animation: de-landing-fade-in 0.7s ease-out forwards;
}

.de-landing-logo.de-landing-fade-in {
    animation-delay: 0s;
}

.de-landing-subtitle.de-landing-fade-in {
    animation-delay: 0.15s;
}

.de-landing-cta.de-landing-fade-in {
    animation-delay: 0.3s;
}

/* -----------------------------------------------
   Home screen
----------------------------------------------- */
.de-home {
    background: #fff;
}

.de-home-greeting {
    font-size: 1.25rem;
    font-weight: 600;
}

.de-home-notify {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid #e9ecef;
    text-decoration: none;
    flex-shrink: 0;
}

.de-home-notify-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.de-category-scroll {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
}

.de-category-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 88px;
    height: 88px;
    border-radius: 16px;
    text-decoration: none;
    color: #212529;
    border: 1px solid #e9ecef;
    transition: transform 0.15s ease;
}

.de-category-card:active {
    transform: scale(0.96);
}

.de-category-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.de-category-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.de-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.de-featured-video {
    display: block;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.de-video-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.de-featured-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
}

.de-featured-grid .de-featured-play {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.de-featured-grid .de-featured-body {
    padding: 10px 4px 0;
}

.de-featured-grid .de-featured-title {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-featured-grid .de-featured-meta {
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-featured-play {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #49715f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    padding-left: 4px;
}

.de-featured-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.de-featured-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #49715f;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.de-featured-body {
    padding: 14px 16px;
}

.de-featured-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.de-featured-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.de-course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.de-home .de-course-body {
    margin-top: 0;
    padding: 0;
}

.de-home .de-course-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: visible;
}

.de-home .de-course-card.course-card {
    overflow: visible;
}

.de-course-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-course-icon {
    font-size: 1.5rem;
}

.de-course-body {
    flex: 1;
    min-width: 0;
}

.de-home .de-course-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
    word-break: break-word;
}

.de-course-lessons {
    font-size: 0.8rem;
    color: #6c757d;
}

.de-home .de-course-badge {
    flex: 0 0 auto;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* -----------------------------------------------
   Pull to refresh
----------------------------------------------- */
.de-ptr {
    position: relative;
    overflow: visible;
}

.de-ptr-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    transition: height 0.2s ease;
    z-index: 10;
}

.de-ptr-indicator.is-pulling,
.de-ptr-indicator.is-refreshing {
    height: 56px;
}

.de-ptr-spinner {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border: 3px solid #e9ecef;
    border-top-color: #49715f;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.de-ptr-indicator.is-pulling .de-ptr-spinner,
.de-ptr-indicator.is-refreshing .de-ptr-spinner {
    opacity: 1;
    transform: scale(1);
}

.de-ptr-indicator.is-refreshing .de-ptr-spinner {
    animation: de-ptr-spin 0.8s linear infinite;
}

@keyframes de-ptr-spin {
    to {
        transform: rotate(360deg);
    }
}

.de-ptr-content {
    transition: transform 0.2s ease;
    will-change: transform;
}

/* -----------------------------------------------
   Course detail
----------------------------------------------- */
.de-course-attendance-box {
    margin: 0 0 20px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.de-course-attendance-box-title {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.de-course-attendance-stats {
    margin-bottom: 14px;
}

.de-course-attendance-box .de-attendance-stats {
    margin-bottom: 14px;
    background: #f8f9fa;
}

.de-course-attendance-list {
    margin-top: 4px;
}

.de-course-attendance-box .de-attendance-record-item {
    background: #f8f9fa;
    border-color: #eef1f3;
}

.de-course-attendance-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #868e96;
}

.de-course-detail {
    margin: 0 -16px 0;
    background: #fff;
}

.de-course-body {
    position: relative;
    margin-top: 0;
    padding: 8px 16px 24px;
    z-index: 1;
}

.de-course-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.de-course-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-course-detail .de-course-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    white-space: normal;
    flex: 1;
    min-width: 0;
}

.de-course-coach {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 16px;
}

.de-course-enrolled-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.de-course-enrolled-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.de-course-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.de-course-stat {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px;
}

.de-course-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.de-course-stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

.de-course-section {
    margin-bottom: 24px;
}

.de-course-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

.de-course-enroll-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.de-course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.de-enroll-confirm{
    display: block;
    width: 100%;
}

.de-course-detail .de-course-enroll-btn {
    background: #49715f;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: 600;
    white-space: nowrap;
}

.de-course-detail .de-course-enroll-btn:hover,
.de-course-detail .de-course-enroll-btn:focus {
    background: #3d5f4f;
    color: #fff;
}

.de-course-enrolled-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
}

.de-discussion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.de-discussion-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px;
}

.de-discussion-reply {
    background: #fff;
    border-color: #eef1f4;
    padding: 12px;
}

.de-discussion-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid #e9ecef;
}

.de-discussion-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
}

.de-discussion-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #6c757d;
    cursor: pointer;
    flex-shrink: 0;
}

.de-discussion-action-btn:hover,
.de-discussion-action-btn:focus {
    background: rgba(73, 113, 95, 0.08);
    color: #49715f;
    outline: none;
}

.de-discussion-reply-btn {
    color: #49715f;
}

.de-discussion-report-btn {
    color: #49715f;
}

.de-discussion-delete-btn:hover,
.de-discussion-delete-btn:focus {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.de-discussion-delete-btn {
    color: #dc3545;
}

.de-discussion-reply-form {
    margin-top: 10px;
}

.de-discussion-reply-form.is-hidden {
    display: none;
}

.de-discussion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.de-discussion-user {
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    word-break: break-word;
}

.de-discussion-time {
    font-size: 0.75rem;
    color: #adb5bd;
    flex-shrink: 0;
    white-space: nowrap;
}

.de-discussion-text {
    font-size: 0.9rem;
    color: #495057;
    margin: 0;
    line-height: 1.5;
}

.de-discussion-empty {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    padding: 8px 0;
}

.de-discussion-login {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.de-discussion-login a {
    font-weight: 600;
    text-decoration: none;
}

.de-discussion-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.de-discussion-input .form-control {
    flex: 1;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
}

.de-discussion-submit {
    flex-shrink: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.de-discussion-form.de-loading .de-discussion-submit {
    opacity: 0.7;
    pointer-events: none;
}

.de-report-sheet {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}

.de-report-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.de-report-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.de-report-sheet.is-open .de-report-sheet-backdrop {
    opacity: 1;
}

.de-report-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px 24px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

.de-report-sheet.is-open .de-report-sheet-panel {
    transform: translateY(0);
}

.de-report-sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.de-report-sheet-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0 0 12px;
}

.de-report-sheet textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px;
    font-size: 0.9rem;
    resize: vertical;
}

.de-report-sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.de-report-sheet-actions .btn {
    flex: 1;
}

body.de-report-sheet-open {
    overflow: hidden;
}

.de-report-detail-panel {
    margin-bottom: 12px;
}

.de-report-meta-list {
    margin: 0;
}

.de-report-meta-list dt {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 12px;
}

.de-report-meta-list dt:first-child {
    margin-top: 0;
}

.de-report-meta-list dd {
    margin: 4px 0 0;
    font-size: 0.92rem;
    color: #212529;
}

.de-report-comment-body {
    white-space: pre-wrap;
}

.de-report-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 24px;
}

.de-student-account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 24px;
}

.de-student-account-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.de-manage-chip.is-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #b58100;
}

/* Enrollment modal — slide up from bottom */
.de-enroll-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%) !important;
    transition: transform 0.3s ease-out;
}

.de-enroll-modal.show .modal-dialog,
.de-enroll-modal.modal.show .modal-dialog {
    transform: translateY(0) !important;
}

.de-enroll-modal .modal-content {
    border: none;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(16px + var(--safe-bottom));
}

.de-enroll-form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.de-enroll-form .form-control {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.de-enroll-form .form-control:focus {
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-enroll-form .form-control.is-invalid {
    border-color: #dc3545;
}

.de-enroll-modal .modal-footer {
    gap: 10px;
}

/* -----------------------------------------------
   Video library
----------------------------------------------- */
.de-video-page {
    background: #fff;
}

.de-video-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.de-video-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-video-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.de-video-filters {
    margin-bottom: 20px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
}

.de-video-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.de-video-chip.active {
    background: #49715f;
    border-color: #49715f;
    color: #fff;
}

.de-video-grid.is-hidden,
.de-video-skeleton-grid.is-hidden,
.de-video-empty.is-hidden {
    display: none;
}

.de-video-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.de-video-skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.de-video-skeleton-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-video-skeleton-text {
    height: 14px;
    width: 80%;
    margin-left: 4px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-video-skeleton-text-sm {
    height: 12px;
    width: 55%;
}

@keyframes de-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.de-video-empty {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 32px 16px;
}

/* -----------------------------------------------
   Video detail
----------------------------------------------- */
.de-video-detail {
    margin: calc(-16px - var(--safe-top)) -16px 0;
    background: #fff;
}

.de-video-player-wrap {
    position: relative;
}

.de-video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.de-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.de-video-player-thumb {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #212529;
}

.de-video-player-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 4px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.de-video-detail-back {
    position: absolute;
    top: calc(12px + var(--safe-top));
    left: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.de-video-detail-body {
    padding: 20px 16px 24px;
}

.de-video-detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.de-video-detail-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.de-video-detail-badge-sport {
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
}

.de-video-detail-badge-difficulty {
    color: #495057;
    background: #f1f3f5;
}

.de-video-detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.de-video-detail-coach {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.de-video-detail-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.de-video-detail-meta-dot {
    margin: 0 6px;
}

.de-video-detail-section {
    margin-bottom: 24px;
}

.de-video-detail-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

/* -----------------------------------------------
   Shop
----------------------------------------------- */
.de-shop-page {
    background: #fff;
}

.de-shop-header {
    margin-bottom: 20px;
}

.de-shop-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.de-shop-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.de-shop-categories {
    margin-bottom: 20px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
}

.de-shop-category {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 88px;
    height: 88px;
    border-radius: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    color: #212529;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.de-shop-category.active {
    border-color: #49715f;
}

.de-shop-category:active {
    transform: scale(0.96);
}

.de-shop-category-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.de-shop-category-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.de-shop-grid,
.de-shop-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.de-shop-grid.is-hidden,
.de-shop-skeleton-grid.is-hidden,
.de-shop-empty.is-hidden {
    display: none;
}

.de-shop-product {
    text-decoration: none;
    color: inherit;
    overflow: visible;
}

.de-shop-product.product-card {
    border-radius: 16px;
    border: 1px solid #e9ecef;
    padding: 10px;
    background: #fff;
    overflow: visible;
}

.de-shop-product-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    margin-bottom: 10px;
}

.de-shop-product-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.de-shop-product-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-shop-product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.de-shop-skeleton-card {
    border-radius: 16px;
    border: 1px solid #e9ecef;
    padding: 10px;
}

.de-shop-skeleton-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-shop-skeleton-text {
    height: 12px;
    width: 85%;
    border-radius: 6px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-shop-skeleton-price {
    height: 14px;
    width: 45%;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-shop-empty {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 32px 16px;
}

/* -----------------------------------------------
   Product detail
----------------------------------------------- */
.de-product-detail {
    margin: calc(-16px - var(--safe-top)) -16px 0;
    background: #fff;
}

.de-product-hero {
    position: relative;
    height: 272px;
}

.de-product-back {
    position: absolute;
    top: calc(12px + var(--safe-top));
    left: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.de-product-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, #fff 100%);
}

.de-product-body {
    position: relative;
    margin-top: -32px;
    padding: 0 16px 24px;
    z-index: 1;
}

.de-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.de-product-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.de-product-badge-category {
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
}

.de-product-badge-stock {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.de-product-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.de-product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #49715f;
    margin-bottom: 20px;
}

.de-product-section {
    margin-bottom: 24px;
}

.de-product-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

.de-product-buy-btn {
    display: block;
    width: 100%;
    background: #49715f;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.de-product-buy-btn:hover,
.de-product-buy-btn:focus {
    background: #3d5f4f;
    color: #fff;
}

.de-product-buy-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Order modal — slide up from bottom */
.de-order-modal.modal {
    overflow: visible;
}

.de-order-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    max-height: 92vh;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%) !important;
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.de-order-modal.show .modal-dialog,
.de-order-modal.modal.show .modal-dialog {
    transform: translateY(0) !important;
}

.de-order-modal .modal-content {
    border: none;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.de-order-modal .modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    background: #fff;
    border-radius: 20px 20px 0 0;
}

.de-order-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0;
}

.de-order-modal .modal-footer {
    flex-shrink: 0;
    padding-bottom: calc(16px + var(--safe-bottom));
    background: #fff;
}

.de-order-form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.de-order-form .form-control {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.de-order-form .form-control:focus {
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-order-form .form-control.is-invalid {
    border-color: #dc3545;
}

/* -----------------------------------------------
   Profile page
----------------------------------------------- */
.de-profile-page {
    background: #fff;
    padding-bottom: 16px;
}

.de-profile-header {
    text-align: center;
    padding: 24px 16px 20px;
}

.de-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #49715f 0%, #355646 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.de-profile-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.de-profile-email {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.de-profile-stats {
    display: flex;
    margin: 0 16px 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
}

.de-profile-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border-right: 1px solid #e9ecef;
}

.de-profile-stat:last-child {
    border-right: none;
}

.de-profile-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.de-profile-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
}

.de-profile-menu {
    margin: 0 16px 24px;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
}

.de-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.de-profile-menu-item:last-child {
    border-bottom: none;
}

.de-profile-menu-item:active {
    background: #f8f9fa;
}

.de-profile-menu-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.de-profile-menu-label {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.de-profile-menu-chevron {
    color: #adb5bd;
    font-size: 1.25rem;
    line-height: 1;
}

.de-profile-orders {
    margin: 0 16px 24px;
}

.de-profile-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.de-profile-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
}

.de-profile-order-body {
    flex: 1;
    min-width: 0;
}

.de-profile-order-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.de-profile-order-price {
    font-size: 0.8rem;
    color: #6c757d;
}

.de-profile-order-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.de-profile-order-badge-delivered {
    color: #198754;
    background: rgba(25, 135, 84, 0.12);
}

.de-profile-order-badge-processing {
    color: #fd7e14;
    background: rgba(253, 126, 20, 0.12);
}

.de-profile-order-badge-shipped {
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
}

.de-profile-signout-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.de-profile-signout-btn:hover,
.de-profile-signout-btn:focus {
    background: #c82333;
    color: #fff;
}

.de-profile-guest {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.de-profile-guest-card {
    text-align: center;
    max-width: 320px;
}

.de-profile-guest-avatar {
    font-size: 3.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.de-profile-guest-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.de-profile-guest-text {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 24px;
}

.de-profile-signin-btn {
    display: inline-block;
    background: #212b49;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}

.de-profile-signin-btn:hover,
.de-profile-signin-btn:focus {
    background: #212b49;
    color: #fff;
}

/* -----------------------------------------------
   Profile edit
----------------------------------------------- */
.de-profile-edit {
    background: #fff;
    padding-bottom: 24px;
}

.de-profile-edit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.de-profile-edit-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-profile-edit-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.de-profile-edit-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #49715f 0%, #355646 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.de-profile-edit-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.de-profile-edit-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 14px;
}

.de-profile-edit-form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.de-profile-edit-form .form-control {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #fff;
}

.de-profile-edit-form .form-control:focus {
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-profile-edit-save {
    display: block;
    width: 100%;
    background: #49715f;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 8px;
}

.de-profile-edit-save:hover,
.de-profile-edit-save:focus {
    background: #3d5f4f;
    color: #fff;
}

.de-profile-edit-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.de-profile-delete-wrap {
    margin-top: 28px;
    text-align: center;
}

.de-profile-delete-account {
    background: none;
    border: 0;
    padding: 8px 12px;
    color: #dc3545;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: underline;
}

/* -----------------------------------------------
   Courses browse
----------------------------------------------- */
.de-courses-page {
    background: #fff;
}

.de-courses-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.de-courses-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-courses-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.de-courses-search {
    margin-bottom: 16px;
}

.de-courses-search .form-control {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
}

.de-courses-search .form-control:focus {
    background: #fff;
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-courses-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
}

.de-courses-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.de-courses-tab.active {
    background: #49715f;
    color: #fff;
    font-weight: 600;
}

.de-courses-filters {
    margin-bottom: 20px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
}

.de-courses-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.de-courses-chip.active {
    background: #49715f;
    border-color: #49715f;
    color: #fff;
}

.de-courses-list,
.de-courses-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.de-courses-list.is-hidden,
.de-courses-skeleton-list.is-hidden,
.de-courses-empty.is-hidden {
    display: none;
}

.de-courses-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: visible;
}

.de-courses-card.course-card {
    border-radius: 16px;
    border: 1px solid #e9ecef;
    background: #fff;
    overflow: visible;
}

.de-courses-card-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-courses-card-icon {
    font-size: 1.75rem;
}

.de-courses-card-body {
    flex: 1;
    min-width: 0;
}

.de-courses-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
    white-space: normal;
}

.de-courses-card-center {
    font-size: 0.8rem;
    color: #49715f;
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-courses-card-coach {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0 0 8px;
}

.de-courses-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.de-courses-card-lessons,
.de-courses-card-difficulty,
.de-courses-card-price {
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
    background: #f1f3f5;
    padding: 3px 8px;
    border-radius: 999px;
}

.de-courses-card-enrolled {
    flex: 0 0 auto;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.de-courses-card-enrolled.is-primary {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
}

.de-courses-card-enrolled.is-success {
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
}

.de-courses-skeleton-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e9ecef;
    border-radius: 16px;
}

.de-courses-skeleton-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-courses-skeleton-body {
    flex: 1;
}

.de-courses-skeleton-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: de-skeleton-shimmer 1.4s ease-in-out infinite;
}

.de-courses-skeleton-line.short {
    width: 60%;
    margin-bottom: 0;
}

.de-courses-empty {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 32px 16px;
}

/*
|--------------------------------------------------------------------------
| Toastr (override Bootstrap 5 .toast — shared class names)
|--------------------------------------------------------------------------
*/

#toast-container {
    z-index: 999999;
}

#toast-container > div.toast {
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 15px 15px 15px 50px;
    color: #fff;
    opacity: 0.92;
    border: none;
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
    background-image: none;
    background-clip: border-box;
    --bs-toast-bg: transparent;
    --bs-toast-border-color: transparent;
    --bs-toast-box-shadow: none;
}

#toast-container > div.toast.toast-success {
    background-color: #51a351;
}

#toast-container > div.toast.toast-error {
    background-color: #bd362f;
}

#toast-container > div.toast.toast-warning {
    background-color: #f89406;
}

#toast-container > div.toast.toast-info {
    background-color: #2f96b4;
}

#toast-container > div.toast .toast-title,
#toast-container > div.toast .toast-message {
    color: #fff;
}

#toast-container > div.toast .toast-close-button {
    color: #fff;
    text-shadow: none;
    opacity: 0.8;
}

/*
|--------------------------------------------------------------------------
| Attendance
|--------------------------------------------------------------------------
*/

.de-attendance-page {
    background: #fff;
    padding-bottom: 16px;
}

.de-attendance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.de-attendance-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-attendance-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.de-attendance-filters {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.de-attendance-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.de-attendance-page .form-control.de-attendance-date {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    font-size: 17px;
    line-height: 1.45;
    min-height: 56px;
    box-sizing: border-box;
}

.de-attendance-page .form-control.de-attendance-date:focus {
    background: #fff;
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-attendance-picker {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.de-attendance-picker-toggle {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8f9fa;
    font-size: 17px;
    line-height: 1.45;
    min-height: 56px;
    color: #212529;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.de-attendance-picker.is-disabled .de-attendance-picker-toggle,
.de-attendance-picker-toggle:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.de-attendance-picker-toggle svg {
    flex-shrink: 0;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.de-attendance-picker.is-open .de-attendance-picker-toggle {
    background: #fff;
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-attendance-picker.is-open .de-attendance-picker-toggle svg {
    transform: rotate(180deg);
}

.de-attendance-picker-label {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
}

.de-attendance-picker-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 240px;
    overflow-y: auto;
}

.de-attendance-picker.is-open .de-attendance-picker-menu {
    display: block;
}

.de-attendance-picker-option {
    padding: 14px 16px;
    font-size: 17px;
    line-height: 1.45;
    min-height: 52px;
    color: #212529;
    border-radius: 10px;
    cursor: pointer;
    white-space: normal;
    word-break: break-word;
}

.de-attendance-picker-option:hover,
.de-attendance-picker-option.is-selected {
    background: #f0f9fc;
    color: #355646;
}

.de-attendance-stats {
    display: flex;
    margin-bottom: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
}

.de-attendance-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px;
    border-right: 1px solid #e9ecef;
}

.de-attendance-stat:last-child {
    border-right: none;
}

.de-attendance-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.de-attendance-stat-present .de-attendance-stat-value {
    color: #198754;
}

.de-attendance-stat-excused .de-attendance-stat-value {
    color: #d39e00;
}

.de-attendance-stat-unexcused .de-attendance-stat-value,
.de-attendance-stat-absent .de-attendance-stat-value {
    color: #dc3545;
}

.de-attendance-stat-label {
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.de-attendance-empty {
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed #dee2e6;
    border-radius: 16px;
    background: #f8f9fa;
}

.de-attendance-empty-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.de-attendance-empty-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #212529;
}

.de-attendance-empty-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.de-attendance-student-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.de-attendance-student-item {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
}

.de-attendance-student-body {
    flex: 1;
    min-width: 0;
}

.de-attendance-toggle-group-3 {
    width: 100%;
    max-width: none;
    justify-content: stretch;
}

.de-attendance-toggle-group-3 .de-attendance-toggle {
    flex: 1;
    min-height: 40px;
    font-size: 0.75rem;
}

.de-attendance-student-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #49715f 0%, #355646 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.de-attendance-student-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 2px;
    color: #212529;
}

.de-attendance-student-phone {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.de-attendance-student-meta {
    margin: 2px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #49715f;
}

.de-attendance-toggle-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.de-attendance-toggle {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.de-attendance-toggle.is-disabled,
.de-attendance-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.de-attendance-toggle-present.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.de-attendance-toggle-excused.active {
    background: #d39e00;
    border-color: #d39e00;
    color: #fff;
}

.de-attendance-toggle-unexcused.active,
.de-attendance-toggle-absent.active {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.de-attendance-record-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.de-attendance-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
}

.de-attendance-record-date {
    font-size: 0.95rem;
    font-weight: 500;
    color: #212529;
}

.de-attendance-record-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}

.de-attendance-record-badge-present {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.de-attendance-record-badge-excused {
    background: rgba(211, 158, 0, 0.14);
    color: #9a7600;
}

.de-attendance-record-badge-unexcused,
.de-attendance-record-badge-absent {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.de-attendance-stats.is-hidden,
.de-attendance-student-list.is-hidden,
.de-attendance-empty.is-hidden,
.de-diem-danh-actions.is-hidden {
    display: none;
}

.de-diem-danh-actions {
    margin-top: 16px;
}

.de-diem-danh-actions .btn {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
}

.de-diem-danh-student-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    accent-color: #49715f;
    cursor: pointer;
}

.de-attendance-field {
    width: 100%;
    min-width: 0;
}

.de-diem-danh-filter .form-select[aria-disabled="true"] {
    opacity: 0.65;
    cursor: not-allowed;
}

.de-diem-danh-filter {
    margin-bottom: 20px;
}

.de-diem-danh-filter .btn {
    border-radius: 14px;
    padding: 14px 16px;
    min-height: 56px;
    font-size: 17px;
    font-weight: 600;
}

.de-attendance-student-item:has(.de-diem-danh-student-check:checked) .de-diem-danh-absence-reason {
    display: none;
}

.de-diem-danh-absence-reason {
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    line-height: 1.4;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.de-diem-danh-absence-reason:focus {
    border-color: #49715f;
    box-shadow: 0 0 0 2px rgba(73, 113, 95, 0.12);
    outline: none;
}

.de-diem-danh-absence-reason.is-hidden {
    display: none;
}

.de-attendance-student-item:has(.de-diem-danh-student-check:checked) {
    border-color: rgba(73, 113, 95, 0.45);
    background: rgba(73, 113, 95, 0.06);
}

/*
|--------------------------------------------------------------------------
| Notifications & Messages
|--------------------------------------------------------------------------
*/

.de-notification-page,
.de-message-page {
    background: #fff;
    padding-bottom: 16px;
}

.de-notification-header,
.de-message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.de-notification-back,
.de-message-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-notification-title,
.de-message-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.de-notification-unread-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: #355646;
    background: rgba(73, 113, 95, 0.12);
    padding: 5px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.de-notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.de-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.de-notification-item:active {
    background: #f8f9fa;
}

.de-notification-item.is-unread {
    background: #f0f9fc;
    border-color: rgba(73, 113, 95, 0.25);
}

.de-notification-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.de-notification-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.de-notification-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.de-notification-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
}

.de-notification-item.is-unread .de-notification-item-title {
    font-weight: 700;
}

.de-notification-item-time {
    font-size: 0.75rem;
    color: #6c757d;
    flex-shrink: 0;
}

.de-notification-item-preview {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-notification-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #49715f;
    flex-shrink: 0;
    margin-top: 6px;
}

.de-notification-empty {
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed #dee2e6;
    border-radius: 16px;
    background: #f8f9fa;
}

.de-notification-empty-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.de-notification-empty-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #212529;
}

.de-notification-empty-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 16px;
}

.de-notification-signin {
    margin-top: 8px;
}

.de-message-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.de-message-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 0;
}

.de-message-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.de-message-meta {
    flex: 1;
    min-width: 0;
}

.de-message-subject {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #212529;
}

.de-message-from {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.de-message-body {
    padding: 16px 18px 20px;
}

.de-message-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin: 0 0 12px;
}

.de-message-body p:last-child {
    margin-bottom: 0;
}

.de-message-actions {
    padding: 0 18px 18px;
}

.de-message-actions .btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
}

/* -----------------------------------------------
   CRUD admin views — responsive (mobile / tablet / desktop)
----------------------------------------------- */
.de-crud {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.de-crud-page {
    max-width: 100%;
}

.de-crud-title {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.de-crud-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.de-crud-header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.de-crud-create-btn,
.de-crud-back-btn {
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: nowrap;
    margin-bottom: 0 !important;
}

.de-crud-create-btn {
    white-space: nowrap;
    margin-left: auto;
}

.de-crud-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: transparent;
    background-color: transparent;
}

.de-crud-table.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: transparent;
}

.de-crud-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
}

.de-crud-table {
    min-width: 640px;
    margin-bottom: 0;
}

.de-crud-table th,
.de-crud-table td {
    vertical-align: middle;
}

.de-crud-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.de-crud-pagination .pagination {
    margin-bottom: 0;
    gap: 0.25rem;
}

.de-crud-pagination .page-link {
    min-width: 2.25rem;
    text-align: center;
}

.de-crud-card .card-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.de-crud-card .card-header h4 {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    line-height: 1.35;
    word-break: break-word;
}

.de-crud-card,
.de-crud-card .card-body,
.de-crud-card .card-header,
.de-crud-card form {
    overflow: visible;
}

/* -----------------------------------------------
   Form selects — full width / touch-friendly
----------------------------------------------- */
select.form-select,
.form-select:not(button),
select.form-control,
select.de-status-select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    padding: 12px 40px 12px 16px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    background-color: #f8f9fa !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2349715f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

select.form-select:focus,
.form-select:not(button):focus,
select.form-control:focus,
select.de-status-select:focus {
    background-color: #fff !important;
    border-color: #49715f !important;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15) !important;
    outline: 0;
}

.de-status-select {
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
}

.de-status-selectbox {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.de-status-selectbox-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #212529;
    text-align: left;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2349715f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 12px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.de-status-selectbox.is-open .de-status-selectbox-toggle,
.de-status-selectbox-toggle:focus {
    background-color: #fff;
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
    outline: 0;
}

.de-status-selectbox-text {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.de-status-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.de-status-selectbox-menu {
    position: fixed;
    z-index: 10050;
    display: none;
    min-width: 200px;
    max-height: min(16rem, calc(100vh - 1rem));
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    -webkit-overflow-scrolling: touch;
}

.de-status-selectbox-menu.is-open {
    display: block;
}

.de-status-selectbox-option {
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    cursor: pointer;
}

.de-status-selectbox-option:hover,
.de-status-selectbox-option:focus {
    background: #e9ecef;
    outline: none;
}

.de-status-selectbox-option.is-selected {
    background: #49715f;
    color: #fff;
}

@media (max-width: 767.98px) {
    .form-select,
    select.form-control,
    select.de-status-select,
    .de-status-selectbox-toggle,
    .de-attendance-picker-toggle,
    .de-attendance-page .form-control.de-attendance-date {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 56px;
        font-size: 17px !important;
    }

    .de-attendance-picker-label,
    .de-attendance-picker-option {
        font-size: 17px !important;
    }

    .de-attendance-picker-option {
        min-height: 52px;
    }

    .de-status-selectbox-menu.is-open {
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: calc(100vw - 32px);
    }
}

.de-crud-card .card-footer .btn,
.de-crud-card .card-body .btn-primary[type="submit"] {
    min-height: auto;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

.de-crud-detail-table th {
    font-weight: 600;
}

.de-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .de-crud-header {
        gap: 0.5rem;
    }

    .de-crud-header-actions {
        gap: 0.5rem;
    }

    .de-crud-card .card-footer {
        gap: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .de-crud-table thead {
        display: none;
    }

    .de-crud-table,
    .de-crud-table tbody,
    .de-crud-table tr,
    .de-crud-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .de-crud-table tr {
        margin-bottom: 0.875rem;
        padding: 0.875rem;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        background: #fff;
    }

    .de-crud-table tr:last-child {
        margin-bottom: 0;
    }

    .de-crud-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.4rem 0;
        border: 0;
        text-align: right;
        word-break: break-word;
    }

    .de-crud-table td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        max-width: 42%;
        font-size: 0.75rem;
        font-weight: 600;
        color: #6c757d;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        line-height: 1.4;
    }

    .de-crud-table td.de-crud-actions {
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.75rem;
        margin-top: 0.35rem;
        border-top: 1px solid #eee;
    }

    .de-crud-table td.de-crud-actions::before {
        display: none;
    }

    .de-crud-action-group {
        flex-direction: column;
    }

    .de-crud-action-group .btn {
        width: 100%;
        justify-content: center;
    }

    .de-crud-table-wrap {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }

    .de-crud-detail-table tr {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
    }

    .de-crud-detail-table tr:last-child {
        border-bottom: 0;
    }

    .de-crud-detail-table th,
    .de-crud-detail-table td {
        display: block;
        width: 100% !important;
        padding: 0.15rem 0;
        border: 0;
        text-align: left !important;
    }

    .de-crud-detail-table th {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #6c757d;
        margin-bottom: 0.15rem;
    }

    .de-crud-detail-table td {
        font-size: 0.95rem;
        word-break: break-word;
        margin-bottom: 0.35rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .de-crud-table {
        min-width: 720px;
    }
}

/* -----------------------------------------------
   Mobile manage pages (courses / users / dang ky)
----------------------------------------------- */
.de-manage-page {
    background: #fff;
    padding-bottom: 120px;
}

.de-manage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.de-manage-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.de-manage-title {
    flex: 1;
    min-width: 0;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.de-manage-count {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #49715f;
    background: rgba(73, 113, 95, 0.12);
    border-radius: 999px;
    padding: 6px 10px;
}

.de-manage-add {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #49715f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
}

.de-manage-add:hover,
.de-manage-add:focus {
    color: #fff;
    background: #3d5f50;
    text-decoration: none;
}

.de-manage-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    margin: 0 -16px 14px;
    padding: 0 16px 4px;
}

.de-manage-tabs::-webkit-scrollbar {
    display: none;
}

.de-manage-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    color: #495057;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.de-manage-tab:hover,
.de-manage-tab:focus {
    color: #49715f;
    border-color: rgba(73, 113, 95, 0.35);
    text-decoration: none;
}

.de-manage-tab.is-active {
    background: #49715f;
    border-color: #49715f;
    color: #fff;
}

.de-manage-tab.is-active:hover,
.de-manage-tab.is-active:focus {
    color: #fff;
    background: #3d5f50;
    border-color: #3d5f50;
}

button.de-manage-tab {
    font-family: inherit;
    cursor: pointer;
}

.de-manage-search {
    margin-bottom: 14px;
}

.de-manage-search .form-control {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    font-size: 16px;
}

.de-manage-search .form-control:focus {
    background: #fff;
    border-color: #49715f;
    box-shadow: 0 0 0 3px rgba(73, 113, 95, 0.15);
}

.de-manage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.de-manage-card {
    display: block;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

a.de-manage-card {
    color: inherit;
    text-decoration: none;
}

a.de-manage-card:hover,
a.de-manage-card:focus {
    color: inherit;
    text-decoration: none;
    border-color: rgba(73, 113, 95, 0.45);
}

a.de-manage-card:hover .de-manage-card-title,
a.de-manage-card:focus .de-manage-card-title,
.de-manage-card.is-linked:hover .de-manage-card-title {
    color: #49715f;
}

.de-manage-card.is-linked {
    position: relative;
}

.de-manage-card.is-linked:hover {
    border-color: rgba(73, 113, 95, 0.45);
}

.de-manage-card-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.de-manage-card.is-linked .de-manage-actions,
.de-manage-card.is-linked .de-manage-actions .btn {
    position: relative;
    z-index: 2;
}

.de-manage-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.de-manage-card-top:last-child {
    margin-bottom: 0;
}

.de-manage-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #49715f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.de-manage-avatar.is-course {
    background: linear-gradient(135deg, #49715f 0%, #6b9480 100%);
    font-size: 1.1rem;
}

.de-manage-card-main {
    flex: 1;
    min-width: 0;
}

.de-manage-card-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #212529;
    word-break: break-word;
}

.de-manage-card-title a {
    color: inherit;
    text-decoration: none;
}

.de-manage-card-title a:hover,
.de-manage-card-title a:focus {
    color: #49715f;
    text-decoration: none;
}

.de-manage-card-sub {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    word-break: break-word;
}

.de-manage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.de-manage-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
}

.de-manage-chip.is-primary {
    background: rgba(73, 113, 95, 0.12);
    color: #49715f;
}

.de-manage-chip.is-price {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.de-manage-chip.is-lessons {
    background: rgba(73, 113, 95, 0.12);
    color: #49715f;
}

.de-manage-chip.is-present {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.de-manage-chip.is-excused {
    background: rgba(211, 158, 0, 0.16);
    color: #9a7400;
}

.de-manage-chip.is-unexcused {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.de-manage-meta .de-status-label,
.de-manage-meta .badge {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: 999px;
}

.de-manage-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.de-manage-info-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 8px 10px;
}

.de-manage-info-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.de-manage-info-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

.de-manage-courses {
    margin-bottom: 12px;
}

.de-manage-courses .de-manage-info-label {
    margin-bottom: 8px;
}

.de-manage-course-row {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.de-manage-course-row:last-child {
    margin-bottom: 0;
}

.de-manage-course-title {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.35;
}

.de-manage-course-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.de-manage-course-empty-text {
    margin: 0;
    font-size: 0.88rem;
    color: #868e96;
}

.de-manage-courses-empty {
    margin-bottom: 12px;
}

.de-course-teacher-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
}

.de-course-teacher-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
}

.de-course-teacher-item input {
    margin-top: 3px;
    flex-shrink: 0;
}

.de-course-teacher-item span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.de-course-teacher-item small {
    font-weight: 400;
    color: #868e96;
}

.de-course-workspace-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 14px;
}

.de-course-workspace-panel + .de-course-workspace-panel {
    margin-top: 12px;
}

.de-course-workspace-panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
}

.de-course-workspace-note {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #6c757d;
}

.de-manage-page[data-manage-page="course-workspace"],
.de-manage-page[data-manage-page="course-create"],
.de-manage-page[data-manage-page="student-workspace"],
.de-manage-page[data-manage-page="teacher-workspace"],
.de-manage-page[data-manage-page="enrollment-workspace"],
.de-manage-page[data-manage-page="video-workspace"],
.de-manage-page[data-manage-page="sport-workspace"] {
    padding-bottom: 140px;
}

.de-course-workspace-panel .btn-primary {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
    background: #49715f;
    border-color: #49715f;
}

.de-course-workspace-panel .btn-primary:hover,
.de-course-workspace-panel .btn-primary:focus {
    background: #3d5f50;
    border-color: #3d5f50;
}

.de-course-workspace-panel .btn-success {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
}

.de-manage-attendance {
    margin-bottom: 12px;
}

.de-manage-attendance.de-attendance-stats {
    margin-bottom: 12px;
}

.de-manage-attendance .de-attendance-stat {
    padding: 10px 6px;
}

.de-manage-attendance .de-attendance-stat-value {
    font-size: 1.05rem;
}

.de-manage-attendance .de-attendance-stat-label {
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.25;
}

.de-manage-actions {
    display: flex;
    gap: 8px;
}

.de-manage-actions .btn {
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.de-manage-actions .btn-outline-secondary {
    border-color: #dee2e6;
    color: #495057;
    background: #fff;
}

.de-manage-actions .btn-primary {
    background: #49715f;
    border-color: #49715f;
}

.de-manage-actions .btn-success {
    background: #198754;
    border-color: #198754;
}

.de-manage-actions .btn-success:hover,
.de-manage-actions .btn-success:focus {
    background: #157347;
    border-color: #146c43;
}

.de-manage-empty {
    text-align: center;
    padding: 40px 20px;
    border: 1px dashed #dee2e6;
    border-radius: 16px;
    background: #f8f9fa;
}

.de-manage-empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.de-manage-empty-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.de-manage-empty-text {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.de-attendance-sheet-wrap {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.de-attendance-sheet {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.de-attendance-sheet th,
.de-attendance-sheet td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.de-attendance-sheet th {
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 700;
}

.de-attendance-sheet td {
    font-size: 0.95rem;
    color: #212529;
}

.de-attendance-sheet tbody tr:last-child td {
    border-bottom: 0;
}

.de-attendance-sheet th:last-child,
.de-attendance-sheet td:last-child {
    text-align: right;
    width: 42%;
}

.de-attendance-sheet td a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.de-attendance-sheet td a:hover,
.de-attendance-sheet td a:focus {
    color: #49715f;
    text-decoration: none;
}

.de-manage-card.is-hidden,
.de-attendance-sheet tbody tr.is-hidden,
.de-attendance-sheet-wrap.is-hidden,
.de-manage-empty.is-hidden {
    display: none !important;
}

.de-manage-fab {
    position: fixed;
    right: 16px;
    /* Cách footer bar (~72px) thêm ~16px */
    bottom: calc(88px + var(--safe-bottom, 0px));
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #49715f;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(73, 113, 95, 0.35);
}

.de-manage-fab:hover,
.de-manage-fab:focus {
    background: #3d5f4f;
    color: #fff !important;
}

.de-manage-fab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.de-manage-pagination {
    margin-top: 16px;
}

.de-manage-pagination .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.de-manage-pagination .page-link {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border-color: #e9ecef;
    color: #495057;
}

.de-manage-pagination .page-item.active .page-link {
    background: #49715f;
    border-color: #49715f;
}

/* Mobile confirm sheet */
.de-confirm-sheet {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}

.de-confirm-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.de-confirm-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.de-confirm-sheet.is-open .de-confirm-sheet-backdrop {
    opacity: 1;
}

.de-confirm-sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(20px + var(--safe-bottom, 0px));
    box-shadow: 0 -8px 28px rgba(16, 24, 40, 0.18);
    transform: translateY(100%);
    transition: transform 0.28s ease;
}

.de-confirm-sheet.is-open .de-confirm-sheet-panel {
    transform: translateY(0);
}

.de-confirm-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #dee2e6;
    margin: 0 auto 14px;
}

.de-confirm-sheet-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    text-align: center;
}

.de-confirm-sheet-message {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #6c757d;
    text-align: center;
}

.de-confirm-sheet-actions {
    display: flex;
    gap: 10px;
}

.de-confirm-sheet-actions .btn {
    flex: 1;
    min-height: 48px;
    border-radius: 14px;
    font-weight: 700;
}

.de-confirm-sheet-actions .btn-outline-secondary {
    border-color: #dee2e6;
    color: #495057;
    background: #fff;
}

body.de-confirm-sheet-open {
    overflow: hidden;
}

