p.parsley-success {
    color: var(--color-green-7);
    background-color: var(--color-green-1);
    border: 1px solid var(--color-green-3);
    font-size: 0.857rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

p.parsley-error {
    color: var(--color-red-7);
    background-color: var(--color-red-1);
    border: 1px solid var(--color-red-3);
    font-size: 0.857rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

ul.parsley-errors-list {
    list-style: none;
    color: var(--color-red-6);
    padding-left: 0;
    font-size: 0.857rem;
    margin-top: 5px;
}

input.parsley-error,
textarea.parsley-error,
select.parsley-error {
    border: 1px solid var(--color-red-4) !important;
    background-color: var(--color-red-1);
    font-size: 0.857rem;
}

.btn-group .parsley-errors-list {
    display: none;
}

.menu .app-brand {
    height: 80px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.05);
}

.app-brand-link img {
    max-height: 42px !important;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-brand-link:hover img {
    transform: scale(1.03) translateY(-1px);
}


.iti {
    width: 100% !important;
}

.layout-wrapper {
    position: absolute;
}

.file-upload {
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.file-upload input.upload {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    filter: alpha(opacity=0);
}

.crop-box {
    position: relative;
    height: 400px;
    width: 100%;
    background: #fff;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center;
    cursor: move;
}

.crop-box .thumb-box {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    box-sizing: border-box;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
    background: none repeat scroll 0% 0% transparent;
}

.crop-box .spinner {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    text-align: center;
    line-height: 400px;
    background: rgba(0, 0, 0, 0.7);
}

.state-loading {
    position: relative
}

.state-loading::before {
    content: " ";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: -2px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99
}

.state-loading::after {
    display: inline-block;
    font-family: tabler-icons;
    font-kerning: auto;
    line-height: 35px;
    font-size: 35px;
    font-style: normal;
    font-synthesis: weight style;
    font-weight: normal;
    animation: 2s linear 0s normal none infinite running fa-spin;
    color: #fff;
    content: "\eca3";
    left: 50%;
    position: absolute;
    text-align: center;
    top: 50%;
    z-index: 100;
    margin-top: -10px;
    margin-left: -10px
}

.mobile-700 {
    min-width: 100% !important;
}

@media only screen and (max-width: 600px) {
    .mobile-700 {
        min-width: 700px !important;
    }
}

.br-1,
.card {
    border-radius: 0.875rem !important;
}

.donut-bg1 {
    background-color: var(--color-secondary-5);
}

.donut-bg2 {
    background-color: var(--color-green-5);
}

.donut-bg3 {
    background-color: var(--color-orange-4);
}

.donut-bg4 {
    background-color: var(--color-primary-5);
}

.bullet-point {
    height: 1rem;
    width: 1rem;
    display: inline-block;
    margin: 0 0.5rem;
}

.id-card {
    width: 100%;
    max-width: 580px;
    /* optional, control size */

    aspect-ratio: 9 / 16;
    /* 🔥 9:16 ratio */

    background-image: url('../img/icard_bg.png');
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
}

.id-card-new {
    background-image: url('../img/icard_bg_new.png');
}

.table-data-list th,
.table-data-list td {
    white-space: nowrap !important;
}

.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

.table-product td {
    padding: 2px 4px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

.table-product th {
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 4px !important;
    white-space: nowrap;
}

.text-justify {
    text-align: justify;
}

.dashboard-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.dashboard-card .card-body {
    padding: 1.25rem;
}

.dashboard-card h6 {
    font-weight: 600;
    font-size: 0.95rem;
    color: #566a7f;
}

.dashboard-card .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 0;
    background: transparent;
}

.dashboard-card .list-group-item:last-child {
    border-bottom: none;
}

.dashboard-card .badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
}

/* Premium UI Components (Generalized) */
.modal-premium .modal-content {
    border-radius: 1.25rem !important;
    overflow: hidden;
}

.avatar-premium-lg {
    width: 56px;
    height: 56px;
}

.card-stat-modern {
    border-radius: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 1) 100%);
}

.card-stat-premium {
    border-radius: 1rem !important;
    background: linear-gradient(135deg, var(--color-primary-5) 0%, var(--color-primary-6) 100%);
    box-shadow: 0 8px 20px rgba(var(--color-primary-5-rgb), 0.2);
}

.text-spacing-sm {
    letter-spacing: 0.5px;
}

.audit-section-modern {
    border-radius: 1rem !important;
    background-color: #f8f9fa;
    /* Matches bg-light but explicitly defined for sectioning */
}

.text-audit-label {
    font-size: 0.65rem;
    letter-spacing: 0.8px;
}

.text-extra-small {
    font-size: 0.75rem;
}

.font-tabular {
    font-feature-settings: "tnum";
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }
}

/* --- Premium Sidebar & Badge Improvements --- */

/* Menu Link Base Styles */
.menu-vertical .menu-item .menu-link {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    border-radius: 0.5rem;
    margin: 0.15rem 0.75rem;
    line-height: 1.4;
}

.menu-vertical .menu-item .menu-icon {
    flex-shrink: 0;
    margin-top: 0.15rem;
}


/* Hover State */
.menu-vertical .menu-item:not(.active) .menu-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.06);
    color: var(--primary-color);
    transform: translateX(2px);
}

.menu-vertical .menu-item:not(.active) .menu-link:hover i {
    color: var(--primary-color);
}

/* Active State */
.menu-vertical .menu-item.active>.menu-link {
    background: linear-gradient(270deg, var(--color-primary-5) 0%, var(--color-primary-6) 100%) !important;
    box-shadow: 0 4px 12px rgba(var(--color-primary-5-rgb), 0.35);
    color: #fff !important;
}

.menu-vertical .menu-item.active>.menu-link i {
    color: #fff !important;
}

/* Menu Header (Categories) */
.menu-vertical .menu-header {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.menu-vertical .menu-header .menu-header-text {
    font-weight: 700;
    color: #a1acb8;
    letter-spacing: 1px;
    font-size: 0.7rem;
}

/* Premium Notification Badge */
.menu-badge-premium {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    background: var(--color-red-5);
    color: #fff;
    box-shadow: 0 2px 6px rgba(var(--color-red-5-rgb), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-red 2s infinite;
}

/* Active Menu Badge Adjustments */
.menu-item.active .menu-badge-premium {
    background: #fff;
    color: var(--color-primary-5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    animation: none;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--color-red-5-rgb), 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(var(--color-red-5-rgb), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--color-red-5-rgb), 0);
    }
}

/* Sub-menu Item Adjustments */
.menu-vertical .menu-sub .menu-item .menu-link {
    margin-left: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.menu-vertical .menu-sub .menu-item.active .menu-link {
    background: var(--color-primary-1) !important;
    color: var(--color-primary-5) !important;
    box-shadow: none !important;
    font-weight: 600;
}

.menu-vertical .menu-sub .menu-item.active .menu-link::before {
    content: "";
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-primary-5) !important;
    box-shadow: 0 0 8px var(--color-primary-5) !important;
}

/* Toggle Arrow Fix for Flexbox */
.menu-vertical .menu-item .menu-link.menu-toggle::after {
    margin-left: 0.5rem;
}

/* Sidebar scrollbar refinements */
.menu-inner::-webkit-scrollbar {
    width: 4px;
}

.menu-inner::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-color-rgb), 0.2);
    border-radius: 10px;
}

.menu-inner::-webkit-scrollbar-track {
    background: transparent;
}

/* --- Achievements & Level Milestones Visuals --- */

.animate-fade-in {
    animation: anim-fade-in 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes anim-fade-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply cascading animation delays to cards (reusable up to 20 items) */
.animate-fade-in:nth-child(1) {
    animation-delay: 0s;
}

.animate-fade-in:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-fade-in:nth-child(3) {
    animation-delay: 0.2s;
}

.animate-fade-in:nth-child(4) {
    animation-delay: 0.3s;
}

.animate-fade-in:nth-child(5) {
    animation-delay: 0.4s;
}

.animate-fade-in:nth-child(6) {
    animation-delay: 0.5s;
}

.animate-fade-in:nth-child(7) {
    animation-delay: 0.6s;
}

.animate-fade-in:nth-child(8) {
    animation-delay: 0.7s;
}

.animate-fade-in:nth-child(9) {
    animation-delay: 0.8s;
}

.animate-fade-in:nth-child(10) {
    animation-delay: 0.9s;
}

.animate-fade-in:nth-child(11) {
    animation-delay: 1s;
}

.animate-fade-in:nth-child(12) {
    animation-delay: 1.1s;
}

.animate-fade-in:nth-child(13) {
    animation-delay: 1.2s;
}

.animate-fade-in:nth-child(14) {
    animation-delay: 1.3s;
}

.animate-fade-in:nth-child(15) {
    animation-delay: 1.4s;
}

.animate-fade-in:nth-child(16) {
    animation-delay: 1.5s;
}

.animate-fade-in:nth-child(17) {
    animation-delay: 1.6s;
}

.animate-fade-in:nth-child(18) {
    animation-delay: 1.7s;
}

.animate-fade-in:nth-child(19) {
    animation-delay: 1.8s;
}

.animate-fade-in:nth-child(20) {
    animation-delay: 1.9s;
}

.achievement-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(var(--primary-color-rgb), 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(var(--primary-color-rgb), 0.12);
    border-color: rgba(var(--primary-color-rgb), 0.25);
}

.achievement-card.card-achieved {
    border-color: rgba(40, 199, 111, 0.3);
}

.achievement-card.card-achieved:hover {
    box-shadow: 0 20px 40px rgba(40, 199, 111, 0.15);
    border-color: rgba(40, 199, 111, 0.5);
}

.achievement-card.card-in-progress {
    border-color: rgba(255, 159, 67, 0.3);
}

.achievement-card.card-in-progress:hover {
    box-shadow: 0 20px 40px rgba(255, 159, 67, 0.15);
    border-color: rgba(255, 159, 67, 0.5);
}

.achievement-card.card-locked {
    opacity: 0.85;
    border-color: #e6e8eb;
    background-color: #fafbfc;
}

.achievement-card.card-locked:hover {
    opacity: 1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

.level-badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-achieved {
    background-color: rgba(40, 199, 111, 0.1);
    color: #28c76f;
    border: 1px solid rgba(40, 199, 111, 0.2);
}

.badge-progress {
    background-color: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
    border: 1px solid rgba(255, 159, 67, 0.2);
    position: relative;
}

.badge-progress .pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #ff9f43;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-glow-warning 1.5s infinite;
}

.badge-locked {
    background-color: #f1f2f4;
    color: #6e7a8a;
    border: 1px solid #e1e3e6;
}

@keyframes pulse-glow-warning {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 159, 67, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 159, 67, 0);
    }
}

.progress-track-wrapper {
    margin: 18px 0;
}

.leg-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #44546a;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.leg-progress-container {
    height: 10px;
    border-radius: 20px;
    background-color: #f1f2f4;
    overflow: hidden;
    margin-bottom: 12px;
}

.leg-progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-primary {
    background: linear-gradient(90deg, var(--color-primary-5) 0%, var(--color-primary-3) 100%);
    box-shadow: 0 2px 6px rgba(var(--primary-color-rgb), 0.15);
}

.bar-success {
    background: linear-gradient(90deg, #28c76f 0%, #48da89 100%);
    box-shadow: 0 2px 6px rgba(40, 199, 111, 0.15);
}

.bar-warning {
    background: linear-gradient(90deg, #ff9f43 0%, #ffb46c 100%);
    box-shadow: 0 2px 6px rgba(255, 159, 67, 0.15);
}

.reward-panel {
    background: linear-gradient(135deg, var(--color-primary-1) 0%, rgba(var(--primary-color-rgb), 0.03) 100%);
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.08);
    padding: 16px 20px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-achieved .reward-panel {
    background: linear-gradient(135deg, rgba(40, 199, 111, 0.08) 0%, rgba(40, 199, 111, 0.02) 100%);
    border-top: 1px solid rgba(40, 199, 111, 0.12);
}

.card-in-progress .reward-panel {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.08) 0%, rgba(255, 159, 67, 0.02) 100%);
    border-top: 1px solid rgba(255, 159, 67, 0.12);
}

.reward-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.card-achieved .reward-icon-box {
    background-color: rgba(40, 199, 111, 0.1);
    color: #28c76f;
}

.card-in-progress .reward-icon-box {
    background-color: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
}

.achievement-card:hover .reward-icon-box {
    transform: rotate(15deg) scale(1.1);
}


/* Overall Summary Card Header style */
.summary-card {
    border: none;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(var(--primary-color-rgb), 0.05);
    overflow: hidden;
    position: relative;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-5) 0%, var(--color-secondary-5) 100%);
}

.stat-circle-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--primary-color-rgb), 0.02) 100%);
    color: var(--primary-color);
}

.stat-circle-box.right-leg {
    background: linear-gradient(135deg, rgba(var(--secondary-color-rgb), 0.1) 0%, rgba(var(--secondary-color-rgb), 0.02) 100%);
    color: var(--secondary-color);
}

.x-small {
    font-size: 0.72rem;
}


/* News Marquee CSS */
.news-marquee-container {
    display: flex;
    align-items: center;
    background: #fff;
    height: 45px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 18px 0 rgba(15, 20, 34, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    position: relative;
}

.news-marquee-label {
    background: linear-gradient(72.47deg, var(--color-primary-5) 22.16%, rgba(var(--color-primary-5-rgb), 0.7) 76.47%);
    color: #fff;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
    z-index: 10;
    font-size: 0.95rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.news-marquee-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.marquee-inner {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 35s linear infinite;
    will-change: transform;
}

.marquee-inner:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.9rem;
    color: #6f6b7d;
}

.news-bullet {
    margin: 0 15px;
    color: var(--color-primary-5);
    font-size: 1.5rem;
    line-height: 1;
}

.news-info {
    display: inline-flex;
    align-items: center;
}

.news-title {
    color: var(--color-primary-5);
    font-weight: 700;
    margin-right: 8px;
}

.news-desc {
    color: #5d596c;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Learning Hub & Management Module */
.learning-hero {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.15);
    border-radius: 0.875rem;
    position: relative;
    overflow: hidden;
}

.learning-card {
    transition: all 0.3s ease-in-out;
    border-radius: 0.875rem;
    overflow: hidden;
}

.learning-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07) !important;
}

.learning-thumb-wrapper {
    position: relative;
    height: 190px;
    background: rgba(var(--primary-color-rgb), 0.04);
    overflow: hidden;
}

.learning-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.learning-card:hover .learning-thumb {
    transform: scale(1.05);
}

.learning-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 2;
}

.learning-card:hover .learning-play-overlay {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.15);
    color: #fff;
}

.learning-type-btn.active,
.learning-cat-btn.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}