:root {
    --k-p1: #FFC148;
    --k-p2: #E04300;
    --k-p3: #333333;
    --k-p4: #555555;
    --k-p5: #777777;
    --k-p6: #DDDDDD;
    --k-p7: #F8F8F8;
    --k-p8: #FFFAF1;
    --k-p9: #FFFFFF;

    --color-success: #13612E;
    --jexhrai-success-bg: rgba(19, 97, 46, 0.08);

    --jexhrai-radius-lg: 28px;
    --jexhrai-radius-md: 20px;
    --transition-curve: cubic-bezier(0.2, 0, 0, 1);
}

/* Container */
.jexhrai-scoring-dashboard {
    width: 100%;
    background: var(--k-p9);
    border-radius: var(--jexhrai-radius-lg);
    border: 1px solid var(--k-p6);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
    box-shadow: none;
    /* Remove old shadows */

}

/* Header Area */
.jexhrai-scoring-header {
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--k-p9);
    position: relative;
}

/* Donut Chart Container */
.jexhrai-donut-chart-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jexhrai-donut-chart-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.jexhrai-donut-bg {
    fill: transparent;
    stroke: var(--k-p6);
    stroke-width: 12;
    opacity: 0.4;
}

.jexhrai-donut-progress {
    fill: transparent;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s var(--transition-curve);
}

/* Score Text inside Donut */
.jexhrai-score-text-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jexhrai-score-number {
    font-size: 3.75rem;
    /* 60px */
    font-weight: 500;
    color: var(--k-p3);
    letter-spacing: -0.05em;
    line-height: 1;
    animation: fadeUp 0.8s ease-out forwards;
}

/* Status Chip */
.jexhrai-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
}

.jexhrai-status-chip svg {
    width: 20px;
    height: 20px;
}

/* Items Container */
.jexhrai-scoring-items {
    background-color: var(--k-p8);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Item Card */
.jexhrai-scoring-item {
    background: var(--k-p9);
    border-radius: var(--jexhrai-radius-md);
    padding: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jexhrai-scoring-item:hover {
    transform: translateY(-4px);
}

/* Hover Tint Overlay */
.jexhrai-item-tint {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.jexhrai-scoring-item:hover .jexhrai-item-tint {
    opacity: 0.08;
}

/* Item Header Layout */
.jexhrai-item-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.jexhrai-item-left {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding-right: 8px;
}

/* Icon Circle */
.jexhrai-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--k-p7);
    color: var(--k-p3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.jexhrai-scoring-item:hover .jexhrai-item-icon {
    transform: scale(1.1) rotate(12deg);
}

.jexhrai-item-icon svg {
    width: 20px;
    height: 20px;
}

/* Text Content */
.jexhrai-item-text {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
}

.jexhrai-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--k-p3);
    line-height: 1;
    margin-bottom: 6px;
}

.jexhrai-item-justification {
    font-size: 0.75rem;
    color: var(--k-p5);
    line-height: 1.5;
}

/* Score Display */
.jexhrai-item-score-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
    padding-left: 8px;
}

.jexhrai-item-score-val {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--k-p3);
    font-feature-settings: "tnum";
}

.jexhrai-item-score-max {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--k-p5);
}

/* Progress Bar */
.jexhrai-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: var(--k-p7);
    border-radius: 999px;
    overflow: hidden;
    z-index: 1;
}

.jexhrai-progress-fill {
    height: 100%;
    border-radius: 999px;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    /* Animated via JS */
    transition: width 1.2s var(--transition-curve);
    overflow: hidden;
}

/* Shimmer Effect */
.jexhrai-shimmer-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

/* Animations */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

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

@keyframes pulseRing {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 0px transparent);
    }

    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 6px currentColor);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ==========================================
   Inline Score Component (MD3)
   ========================================== */

/* Container */
.jexhrai-score-display {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--k-p8);
    border: none;
    border-radius: 25px;
    padding: 12px;
    box-shadow: none;
}

/* Score Badge */
.jexhrai-score-display>span:first-child {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--k-p2);
    color: var(--k-p9);
    font-weight: 900;
    font-size: 1.125rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none;
    flex-shrink: 0;
    /* Animation */
    opacity: 0;
    animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Comment Section */
.jexhrai-score-comment {
    color: var(--k-p4);
    font-size: 0.875rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    padding-top: 2px;
    font-style: normal;
    /* Override italic if inherited */
    margin-left: 0;
    /* Reset margin */
}

/* Feedback Label */
.jexhrai-score-comment::before {
    content: "Jex FEEDBACK";
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--k-p2);
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Pop-in Animation */
@keyframes pop-in {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(10deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}