/* Labubu: plush collectible cards, pistachio fabric and lilac ink. */
html[data-theme="labubu"] {
    --brand-50: #f5eefb;
    --brand-100: #eaddf7;
    --brand-200: #d5bdea;
    --brand-300: #c2a0df;
    --brand-400: #9b72bc;
    --brand-500: #795199;
    --brand-600: #694083;
    --brand-700: #5b346f;
    --brand-800: #492957;
    --brand-900: #35233e;
    --surface: #e5edd6;
    --surface-warm: #f5f6e9;
    --surface-card: #fffdf5;
    --text-primary: #35233e;
    --text-secondary: #584362;
    --text-muted: #6b5873;
    --border-light: #dacfe0;
    --border-medium: #ad98b6;
    --glass: #f5f6e9;
    --glass-border: #c6b6d0;
    --ambient-primary: transparent;
    --ambient-secondary: transparent;
    --age-fresh-bg: #e2eecb;
    --age-warning-bg: #ffebcc;
    --age-stale-bg: #f9dce2;
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 22px;
    --radius-xl: 26px;
}

html[data-theme="labubu"] body {
    background: #e5edd6;
    background-image: radial-gradient(#8e9d7538 .9px, transparent .9px);
    background-size: 9px 9px;
    color: var(--text-primary);
}

html[data-theme="labubu"] body::before,
html[data-theme="labubu"] body::after { display: none; }

html[data-theme="labubu"] .app-header {
    background: #f5f6e9;
    border-bottom: 2px solid #44324e;
    box-shadow: 0 4px 0 #44324e14;
    backdrop-filter: none;
}

html[data-theme="labubu"] .logo-mark-bg {
    inset: -4px;
    background: url('../images/labubu.svg') center / contain no-repeat;
    border-radius: 0;
}
html[data-theme="labubu"] .logo-mark-inner { visibility: hidden; }
html[data-theme="labubu"] .logo-title,
html[data-theme="labubu"] .logo-title span { color: #493156; }
html[data-theme="labubu"] .version-badge { background: #eaddf7; border-color: #bba7c7; }

html[data-theme="labubu"] .kpi-grid { gap: 18px; margin-bottom: 32px; }
html[data-theme="labubu"] .kpi-card {
    border: 2px solid #5b4667;
    border-radius: 22px 22px 22px 7px;
    box-shadow: 3px 4px 0 #b4a3bd;
    background: #fffdf5;
    padding: 24px;
}
html[data-theme="labubu"] .kpi-card:nth-child(4n + 2) { background: #eee3f7; }
html[data-theme="labubu"] .kpi-card:nth-child(4n + 3) { background: #f9ebd3; }
html[data-theme="labubu"] .kpi-card:nth-child(4n) { background: #dfeaca; }
html[data-theme="labubu"] .kpi-card::before { inset: auto 12px 9px; height: 0; border-top: 1px dashed #9984a6; background: none; }
html[data-theme="labubu"] .kpi-card::after { content: ''; position: absolute; width: 44px; height: 13px; top: 0; left: 24px; background: #44324e; border-radius: 0 0 7px 7px; }
html[data-theme="labubu"] .kpi-card:hover { transform: translateY(-2px); box-shadow: 3px 6px 0 #b4a3bd; }
html[data-theme="labubu"] .kpi-label { color: #584362; letter-spacing: 0; text-transform: none; font-size: 12px; padding-right: 44px; }
html[data-theme="labubu"] .kpi-value { color: #493156 !important; font-size: 40px; font-weight: 850; }
html[data-theme="labubu"] .kpi-icon { width: 36px; height: 36px; top: 23px; right: 18px; background: #fffdf5 !important; border: 1px solid #ad98b6; border-radius: 50%; }
html[data-theme="labubu"] .kpi-icon :is(i, svg) { color: #694083 !important; }

html[data-theme="labubu"] :is(.branch-card, .cap-tree-card, .login-card, .drop-zone) {
    border: 2px solid #7f688e;
    border-radius: 22px;
    background: #fffdf5;
    box-shadow: 3px 4px 0 #c6b6d0;
    color: #35233e;
}
html[data-theme="labubu"] .branch-header { background: #6b497f; border-bottom: 3px solid #44324e; }
html[data-theme="labubu"] .branch-header :is(h2, h3, .branch-title) { color: #fffdf5; }
html[data-theme="labubu"] .region-label { color: #493156; background: #eaddf7; border: 1px solid #ad98b6; border-radius: 8px; box-shadow: 2px 2px 0 #b4a3bd; }
html[data-theme="labubu"] .region-line { background: #b3a2bc; }
html[data-theme="labubu"] :is(table, .vacancy-table) { background: #fffdf5; color: #35233e; }
html[data-theme="labubu"] thead th { background: #eee7f2 !important; color: #493156 !important; border-color: #c6b6d0 !important; }
html[data-theme="labubu"] tbody tr { border-color: #e0d5e4 !important; }
html[data-theme="labubu"] tbody tr:nth-child(even) { background: #f4f6e9 !important; }
html[data-theme="labubu"] tbody tr:hover { background: #eae0f3 !important; }
html[data-theme="labubu"] td { color: #35233e; border-color: #e0d5e4 !important; }
html[data-theme="labubu"] :is(.manual-note, .stats-card-copy, .upload-desc) { color: #6b5873; }
html[data-theme="labubu"] :is(.btn-upload, .btn-icon, #countryNav, #globalSearch, .manual-select, .login-input, select) { background-color: #fffdf5; border-color: #ad98b6; color: #493156; }
html[data-theme="labubu"] :is(.btn-upload, .btn-icon):hover { background: #eaddf7; color: #493156; border-color: #795199; }
html[data-theme="labubu"] :is(#globalSearch, .login-input)::placeholder { color: #796981; }
html[data-theme="labubu"] #countryNav button { color: #584362; }
html[data-theme="labubu"] #countryNav button.bg-blue-600 { background: #694083; color: #fff; }
html[data-theme="labubu"] .btn-primary-upload { background: #694083; color: #fffdf5; box-shadow: 2px 3px 0 #44324e; }
html[data-theme="labubu"] .phase-dropdown { background: #fffdf5; border-color: #ad98b6; }
html[data-theme="labubu"] :is(#funnelContent, #capUploadZone > div) { background: #fffdf5 !important; }
html[data-theme="labubu"] #loadingOverlay { background: #f5f6e9f5 !important; }
html[data-theme="labubu"] :is(.text-slate-400, .text-slate-500) { color: #6b5873; }
html[data-theme="labubu"] :is(button, input, select):focus-visible { outline: 3px solid #795199; outline-offset: 3px; }

.labubu-field { position: fixed; inset: 0; overflow: hidden; z-index: 3; pointer-events: none; }
.labubu-charm { position: absolute; width: 92px; bottom: 12px; transform-origin: 50% 0; }
.labubu-charm img { width: 100%; height: auto; filter: drop-shadow(2px 4px 0 #35233e24); }
.labubu-charm--left { left: 12px; transform: rotate(-12deg); }
.labubu-charm--right { right: 12px; transform: rotate(12deg); }
.labubu-charm--right img { filter: hue-rotate(155deg) drop-shadow(2px 4px 0 #35233e24); }
.labubu-charm-loop { display: block; width: 22px; height: 28px; border: 4px solid #795199; border-radius: 50%; margin: 0 auto -10px; }
.labubu-spark { position: absolute; width: 13px; height: 13px; background: #795199; clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%); animation: labubuSpark 4s ease-out both; }
@keyframes labubuSpark { 0% { opacity: 0; transform: translateY(10px) rotate(0) scale(.3); } 25% { opacity: .55; } 100% { opacity: 0; transform: translateY(-70px) rotate(var(--spark-turn)) scale(1); } }
@media (max-width: 1510px) { .labubu-charm { display: none; } }

@media (max-width: 480px) {
    html[data-theme="labubu"] .kpi-grid { gap: 12px; }
    html[data-theme="labubu"] .kpi-card { padding: 23px 14px 22px; }
    html[data-theme="labubu"] .kpi-icon { right: 10px; top: 16px; width: 28px; height: 28px; }
    html[data-theme="labubu"] .kpi-label { font-size: 10px; padding-right: 25px; min-height: 28px; margin-bottom: 4px; }
    html[data-theme="labubu"] .kpi-value { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme="labubu"] *, html[data-theme="labubu"] *::before, html[data-theme="labubu"] *::after { animation: none !important; transition: none !important; }
}
