:root {
    --mx: 50%;
    --my: 50%;
    --angle: 180deg;
    --bg-x: 50%;
    --bg-y: 50%;
    --holo-tile: cover;
}
.holo-badge {
  --holo-1: #ff6b9d;
  --holo-2: #ffa64d;
  --holo-3: #ffd94d;
  --holo-4: #69ff94;
  --holo-5: #4dc9ff;
  --holo-6: #b44dff;
  --card-bg: #161619;
  --card-surface: #1c1c20;
  --card-border: rgba(255, 255, 255, 0.06);
  --sect-border: rgba(255, 255, 255, 0.05);
  --card-text: #e4e4e8;
  --card-text-dim: #7a7a84;
  --card-text-faint: #3e3e46;
  --card-accent: #a8ff00;
  --card-pass: #00ff88;
  --card-warn: #ffaa00;
  --shadow-base: 0 4px 40px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 16px 70px rgba(0, 0, 0, 0.8), 0 0 60px rgba(168, 255, 0, 0.04);
  --holo-blend: color-dodge;
  --holo-opacity: 0.08;
  --sparkle-blend: overlay;
  --sparkle-opacity: 0.22;
  --spotlight: rgba(255, 255, 255, 0.06);
  --rainbow-opacity: 0.7;
  --barcode-fg: rgba(255, 255, 255, 0.7);
  --perf-dash: rgba(255, 255, 255, 0.08);
  --qr-fg: #222226;
}
:host([theme="light"]) .holo-badge, .holo-badge.light {
  --card-bg: #d8d8dc;
  --card-surface: #c2c2c8;
  --card-border: rgba(0, 0, 0, 0.12);
  --sect-border: rgba(0, 0, 0, 0.08);
  --card-text: #111114;
  --card-text-dim: #555560;
  --card-text-faint: #8a8a94;
  --card-accent: #3d7a00;
  --card-pass: #00803a;
  --card-warn: #a87000;
  --shadow-base: 0 2px 20px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.2);
  --holo-blend: overlay;
  --holo-opacity: 0.42;
  --sparkle-blend: hard-light;
  --sparkle-opacity: 0.2;
  --spotlight: rgba(255, 255, 255, 0.87);
  --rainbow-opacity: 0;
  --barcode-fg: rgba(0, 0, 0, 0.6);
  --perf-dash: rgba(0, 0, 0, 0.1);
  --qr-fg: #111113;
}

.badge-wrap {
    perspective: 900px;
    cursor: pointer;
    container: badge / inline-size;
    display: flex;
    justify-content: center;
}

.holo-badge, .holo-badge:hover, .holo-badge:visited, .holo-badge:active, .holo-badge:focus {
  display: block;
  position: relative;
  width: min(470px, 100%);
  border-radius: 10px;
  background: var(--card-bg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out, box-shadow 0.3s;
  will-change: transform;
  box-shadow: var(--shadow-base);
  text-decoration: none;
  color: var(--card-text);
}

:host([theme="light"]) .holo-badge::before, .holo-badge.light::before {
    background: radial-gradient( ellipse at var(--mx, 50%) var(--my, 50%), var(--spotlight) 0%, transparent 75% );
}

.holo-badge:hover::before, .holo-badge.shimmer-active::before {
    opacity: 1;
}

:host([theme="light"]) .holo-badge::after, .holo-badge.light::after {
    filter: brightness(0.3) saturate(4);
}

.holo-badge:hover::after, .holo-badge.shimmer-active::after {
    opacity: var(--holo-opacity);
}

.holo-badge::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: 15;
    border-radius: 8px;
    pointer-events: none;
    background: radial-gradient( ellipse at var(--mx, 50%) var(--my, 50%), var(--spotlight) 0%, transparent 55% );
    opacity: 0;
    transition: opacity 0.3s;
}


.holo-badge::after {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: 16;
    border-radius: 8px;
    pointer-events: none;
    background: conic-gradient( from calc(var(--angle, 130deg)) at var(--mx, 50%) var(--my, 50%), var(--holo-1), var(--holo-2), var(--holo-3), var(--holo-4), var(--holo-5), var(--holo-6), var(--holo-1) );
    mix-blend-mode: var(--holo-blend);
    opacity: 0;
    transition: opacity 0.3s;
    filter: brightness(0.45) saturate(1.8);
}


.holo-badge .rainbow-border {
    position: absolute;
    inset: 0px;
    z-index: 1;
    border-radius: 10px;
    pointer-events: none;
    padding: 2px;
    background-size: 300% 300%;
    background-position: var(--bg-x, 50%) var(--bg-y, 50%);
    opacity: var(--rainbow-opacity);
    transition: opacity 0.3s;
    mask-mode: match-source, match-source;
    mask-repeat: repeat, repeat;
    mask-clip: content-box, border-box;
    mask-origin: content-box, border-box;
    mask-position: 0% 0%, 0% 0%;
    mask-size: auto, auto;
    mask-image: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px), linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px);
    mask-composite: exclude;
}
:host([theme="light"]) .holo-badge .rainbow-border, :host([theme="light"]) .holo-badge:hover .rainbow-border, :host([theme="light"]) .holo-badge.shimmer-active .rainbow-border, .holo-badge.light .rainbow-border, .holo-badge.light:hover .rainbow-border, .holo-badge.light.shimmer-active .rainbow-border {
    background: rgb(138, 138, 144);
    opacity: 1;
    animation: none;
}

.holo-texture {
  background-image: url('../images/holo-texture.avif');
}

.holo-badge .holo-texture {
    position: absolute;
    inset: 2px;
    z-index: 14;
    border-radius: 8px;
    pointer-events: none;
    background-size: var(--holo-tile, cover);
    background-repeat: repeat;
    background-position: var(--bg-x, 50%) var(--bg-y, 50%);
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.3s;
    mask-image: radial-gradient( circle 120px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 80% );
}
:host([theme="light"]) .holo-badge .holo-texture, .holo-badge.light .holo-texture {
    mix-blend-mode: hard-light;
    mask-image: radial-gradient( circle 155px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 63% );
}
:host([theme="light"]) .holo-badge:hover .holo-texture, :host([theme="light"]) .holo-badge.gyro-active .holo-texture, :host([theme="light"]) .holo-badge.shimmer-active .holo-texture, .holo-badge.light:hover .holo-texture, .holo-badge.light.gyro-active .holo-texture, .holo-badge.light.shimmer-active .holo-texture {
    opacity: 0.51;
}







/* badge-header */
.holo-badge .badge-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 2px 0px;
    padding: 8px 12px;
    border-radius: 8px 8px 0px 0px;
}
@container badge (max-width: 350px) {
    .holo-badge .badge-header {
    padding: 6px 10px;
    }
}

.holo-badge, .holo-badge *, .holo-badge :hover, .holo-badge :visited, .holo-badge :active {
    text-decoration: none !important;
    color: inherit;
}

.holo-badge, .holo-badge *, .holo-badge ::before, .holo-badge ::after {
    box-sizing: border-box;
}

.holo-badge .badge-header::before {
    content: "";
    position: absolute;
    inset: 0px;
    z-index: 2;
    background: var(--card-surface);
    border-bottom: 1px solid var(--card-border);
    border-radius: inherit;
}

.holo-badge .badge-header-left {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}

.holo-badge .badge-logo {
    width: 24px;
    height: 24px;
    background: rgb(255, 255, 255);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 11px;
    overflow: hidden;
    font-weight: 700;
    color: rgb(17, 17, 17);
}
@container badge (max-width: 350px) {
    .holo-badge .badge-logo {
    width: 20px;
    height: 20px;
    font-size: 9px;
    }
}

.holo-badge .badge-org-wrap {
    display: flex;
    flex-direction: column;
}

.holo-badge .badge-org {
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    color: var(--card-text-dim);
}
@container badge (max-width: 350px) {
    .holo-badge .badge-org {
    font-size: 8px;
    letter-spacing: 1.5px;
    }
}

.holo-badge .badge-org-sub {
    display: block;
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: rgb(71, 85, 105);
}





.holo-badge .badge-header-right {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
}
@container badge (max-width: 350px) {
    .holo-badge .badge-header-right {
    font-size: 7px;
    }
}

.holo-badge .badge-header-right-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.holo-badge .badge-header-code-label {
    font-family: "Space Grotesk", sans-serif;
    font-size: 6px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--card-text-dim);
    line-height: 1;
}
.holo-badge .badge-header-code-sm {
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--card-text);
    line-height: 1.1;
}
.holo-badge .badge-header-status {
    font-family: "Space Grotesk", sans-serif;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--card-accent);
    line-height: 1;
}


.holo-badge .stamp-icon {
    width: 36px;
    height: 36px;
    border: 2px solid var(--card-pass);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.08);
}
.holo-badge .badge-header-right .stamp-icon {
    width: 22px;
    height: 22px;
    border-width: 1.5px;
    border-radius: 5px;
    flex-shrink: 0;
}
@container badge (max-width: 350px) {
    .holo-badge .badge-header-right .stamp-icon {
    width: 18px;
    height: 18px;
    }
}

.holo-badge .stamp-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--card-pass);
    stroke-width: 2.5px;
    fill: none;
}
@container badge (max-width: 350px) {
    .holo-badge .badge-header-right .stamp-icon svg {
    width: 10px;
    height: 10px;
    }
}



/* badge-inner + badge-body */
.holo-badge .badge-inner {
    position: relative;
    padding: 10px 14px;
}
@container badge (max-width: 350px) {
    .holo-badge .badge-inner {
    padding: 10px 12px;
    }
}

.holo-badge .badge-body {
    margin-bottom: 0px;
}

.holo-badge .hero-row {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.holo-badge .hero-row {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.holo-badge .hero-left {
    flex: 1 1 0%;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.holo-badge .field-label {
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--card-text-dim);
    margin-bottom: 2px;
}

.holo-badge .field-value.lg {
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--card-text);
    letter-spacing: -1px;
    line-height: 1.1;
    word-break: break-word;
    overflow-wrap: break-word;
}
@container badge (max-width: 350px) {
    .holo-badge .field-value.lg {
    font-size: 24px;
    }
}


.holo-badge .hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.holo-badge .hero-right-codes {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0px;
    background: rgb(255, 255, 255);
    border-radius: 4px;
    padding: 4px;
}
@container badge (max-width: 350px) {
    .holo-badge .hero-right-codes {
    padding: 3px;
    }
}

.holo-badge .client-logo {
    position: relative;
    z-index: 20;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 0px;
    background: none;
    padding: 0px;
}
@container badge (max-width: 350px) {
    .holo-badge .client-logo {
     width: 38px;
    height: 38px;
    padding: 0px;
    }
}

.holo-badge .client-logo.sample-img {
    object-fit: cover;
    border-radius: 4px;
}


.holo-badge .field {
    position: relative;
    z-index: 20;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.holo-badge .field-value.sub {
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--card-accent);
    letter-spacing: 0.5px;
}
@container badge (max-width: 350px) {
    .holo-badge .field-value.sub {
    font-size: 10px;
    }
}

.holo-badge .fields-row {
    display: flex;
    gap: 8px;
}
:host([size="sm"]) .fields-row, .holo-badge.size-sm .fields-row {
    gap: 4px;
}

.holo-badge .field-box {
    position: relative;
    flex: 1 1 0%;
    padding: 8px 10px;
    border-radius: 6px;
}
:host([size="sm"]) .field-box, .holo-badge.size-sm .field-box {
    padding: 4px 6px;
}
.holo-badge .field-box::before {
    content: "";
    position: absolute;
    inset: 0px;
    z-index: 2;
    background: var(--card-surface);
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

.holo-badge .fb-header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 3px;
}
.holo-badge .fb-label {
    position: relative;
    z-index: 20;
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 7px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--card-text-dim);
    display: block;
}
:host([size="sm"]) .fb-label, .holo-badge.size-sm .fb-label {
    font-size: 5.5px;
    letter-spacing: 0.5px;
}
.holo-badge.responsive-sm .fb-label {
    font-size: 7px;
}

.holo-badge .dot {
    position: relative;
    z-index: 20;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.holo-badge .dot.pass {
    background: var(--card-pass);
    box-shadow: 0 0 8px var(--card-pass);
}
.holo-badge .dot.measured {
    background: var(--card-text);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 8px;
}
:host([size="sm"]) .dot, .holo-badge.size-sm .dot {
    width: 3px;
    height: 3px;
}

.holo-badge .fb-value {
    position: relative;
    z-index: 20;
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--card-text);
    display: block;
    line-height: 1.3;
}
.holo-badge.responsive-sm .fb-value {
  font-size: 12px;/*7|12*/
}


.holo-badge .fb-status {
    position: relative;
    z-index: 20;
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    font-weight: 500;
    margin-top: 1px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.holo-badge .fb-status.pass {
    color: var(--card-accent);
}
.holo-badge .fb-status.measured {
    color: var(--card-text);
    font-weight: 400;
}
.holo-badge.responsive-sm .fb-status {
    font-size: 9px;
}

.sm-date-right {
    position: relative;
    z-index: 20;
    text-align: right;
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    font-weight: 500;
    color: var(--card-text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}



.addon-bar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--card-glass);
    border-radius: 8px;
    border-top: 1px solid var(--card-border);
}
.addon-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Space Grotesk", sans-serif;
}
.addon-bar-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    font-weight: 500;
    color: var(--card-text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.addon-bar-result {
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.addon-bar-result.pass {
    color: var(--card-accent);
}



.holo-badge .barcode-left {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.holo-badge .barcode-svg {
    height: 30px;
    width: auto;
}
@container badge (max-width: 350px) {
    .holo-badge .barcode-svg {
    height: 24px;
    }
}

.holo-badge .barcode-meta {
    font-family: "IBM Plex Mono", "SF Mono", "Consolas", monospace;
    font-size: 7px;
    color: var(--card-text-dim);
    letter-spacing: 1px;
    text-align: right;
    line-height: 1.4;
    margin-left: auto;
    opacity: 0;
}






.holo-badge .badge-barcode {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--perf-dash);
}
:host([size="sm"]) .badge-barcode, .holo-badge.size-sm .badge-barcode {
    padding-top: 6px;
}



.badge-expand-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--card-surface);
    border: 1px solid var(--card-border);
    color: var(--card-text-dim);
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    text-decoration: none;
    pointer-events: auto;
}
.badge-expand-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}