/* ============================================================
   DRW Skin — Shared Render Styles
   Dipakai oleh: main app & admin dashboard
   Berisi: score hero (gauge+kategori+chart), condition card +
   thumb area, area zoom modal.
   ============================================================ */

/* ============================================================
   SCORE HERO — gauge circular + kategori internasional + tren
   ============================================================ */
.score-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    border: 1px solid rgba(244, 114, 182, 0.18);
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

@media (max-width: 380px) {
    .score-hero { gap: 0.75rem; padding: 0.875rem; }
}

.score-gauge {
    position: relative;
    flex-shrink: 0;
    width: 108px;
    height: 108px;
}

@media (max-width: 380px) {
    .score-gauge { width: 92px; height: 92px; }
}

.score-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.score-gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 7;
}

.score-gauge-fill {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(0.32, 0.72, 0, 1),
                stroke 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.score-gauge-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.score-gauge-num {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

@media (max-width: 380px) {
    .score-gauge-num { font-size: 1.7rem; }
}

.score-gauge-unit {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.score-hero-info {
    flex: 1;
    min-width: 0;
}

.score-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.01em;
    margin-bottom: 0.4rem;
}

.score-cat-desc {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.score-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.35rem;
}

.score-trend-up     { background: #dcfce7; color: #166534; }
.score-trend-down   { background: #fee2e2; color: #991b1b; }
.score-trend-stable { background: #f1f5f9; color: #475569; }
.score-trend-new    { background: #fce7f3; color: #be185d; }

.score-trend i { font-size: 0.7rem; }

.score-target {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.score-target i { color: #ec4899; font-size: 0.65rem; }
.score-target strong { color: #be185d; font-weight: 700; }

/* ===== Skin type strip (compact horizontal) ===== */
.skin-type-strip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid rgba(244, 114, 182, 0.14);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.skin-type-strip-emoji {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.skin-type-strip-text { flex: 1; min-width: 0; }

.skin-type-strip-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}

.skin-type-strip-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin: 0;
}

.skin-type-strip-desc {
    font-weight: 500;
    color: #64748b;
    font-size: 0.85em;
}

/* ===== Score trend chart (SVG sparkline) ===== */
.score-trend-chart {
    background: #fff;
    border: 1px solid rgba(244, 114, 182, 0.14);
    border-radius: 12px;
    padding: 0.75rem 0.9rem 0.65rem;
    margin-bottom: 0.75rem;
}

.score-trend-chart-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.score-trend-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.score-trend-chart-svg .chart-target-line {
    stroke: rgba(22, 163, 74, 0.55);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.score-trend-chart-svg .chart-target-label {
    fill: rgba(22, 163, 74, 0.75);
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.score-trend-chart-svg .chart-value-label {
    fill: #94a3b8;
    font-size: 8.5px;
    font-weight: 700;
    font-family: inherit;
}

.score-trend-chart-svg .chart-value-label.is-current {
    fill: #be185d;
    font-size: 10px;
}

.score-trend-chart-x {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    padding: 0 0.15rem;
    font-size: 0.62rem;
    color: #94a3b8;
    font-weight: 600;
}

.score-trend-chart-x span {
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-trend-chart-x span:first-child { text-align: left; }
.score-trend-chart-x span:last-child  { text-align: right; }

.score-trend-chart-x span.is-current {
    color: #be185d;
    font-weight: 700;
}

/* ===== Score scale reference (standard kategori) ===== */
.score-scale {
    background: #fff;
    border: 1px solid rgba(244, 114, 182, 0.14);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
}

.score-scale-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.score-scale-ref {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.92em;
}

.score-scale-rows {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.score-scale-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.74rem;
    transition: background 0.2s ease;
}

.score-scale-row.is-current {
    background: #fce7f3;
    font-weight: 700;
}

.score-scale-range {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 48px;
}

.score-scale-label {
    flex: 1;
    color: #475569;
}

.score-scale-row.is-current .score-scale-label { color: #1f2937; }

.score-scale-tag {
    font-size: 0.6rem;
    font-weight: 700;
    color: #be185d;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================================
   CONDITION CARD — kondisi terdeteksi dgn thumb area pada foto wajah
   ============================================================ */
.condition-card {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
    background: #fdf2f8;
    border: 1px solid rgba(244, 114, 182, 0.18);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}

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

.condition-thumb,
.condition-thumb-empty {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 9px;
    border: 1.5px solid rgba(244, 114, 182, 0.28);
    background-color: #fce7f3;
    background-repeat: no-repeat;
    align-self: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* sembunyikan broken image icon kalau token expired / foto tidak ada */
    color: transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.condition-thumb[role="button"] {
    cursor: zoom-in;
}
.condition-thumb[role="button"]:hover {
    transform: scale(1.06);
    border-color: #ec4899;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35),
                inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.condition-thumb[role="button"]:active {
    transform: scale(0.98);
}
.condition-thumb[role="button"]:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

.condition-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9a8d4;
    font-size: 1.1rem;
    background-color: #fce7f3;
    background-image: linear-gradient(135deg, #fdf2f8, #fce7f3);
}

@media (max-width: 380px) {
    .condition-thumb,
    .condition-thumb-empty { width: 56px; height: 56px; }
}


/* ============================================================
   AREA ZOOM MODAL — klik thumb kondisi → foto full dgn highlight region
   ============================================================ */
.area-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: az-fade 0.18s ease;
}

@keyframes az-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.area-zoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.area-zoom-content {
    position: relative;
    background: #fff;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: az-pop 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes az-pop {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.area-zoom-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3;
    transition: background 0.2s ease, transform 0.15s ease;
}
.area-zoom-close:hover  { background: rgba(236, 72, 153, 0.85); }
.area-zoom-close:active { transform: scale(0.92); }

.area-zoom-image-wrap {
    position: relative;
    background: #0f172a;
    overflow: hidden;
}

.area-zoom-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

/* Spotlight effect: cincin pink + flashlight gelap di luar area */
.area-zoom-highlight {
    position: absolute;
    border: 3px solid #ec4899;
    border-radius: 14px;
    pointer-events: none;
    box-shadow:
        0 0 0 9999px rgba(15, 23, 42, 0.55),
        0 0 22px rgba(236, 72, 153, 0.7),
        inset 0 0 0 1px rgba(0, 0, 0, 0.4);
    animation: az-pulse 1.8s ease-in-out infinite;
    transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease;
}

@keyframes az-pulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55),
                    0 0 22px rgba(236, 72, 153, 0.7),
                    inset 0 0 0 1px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55),
                    0 0 34px rgba(236, 72, 153, 1),
                    inset 0 0 0 1px rgba(0, 0, 0, 0.4);
    }
}

.area-zoom-info {
    padding: 0.95rem 1.1rem 1.15rem;
}

.area-zoom-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.area-zoom-area-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #be185d;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: #fce7f3;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.area-zoom-desc {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

