/* =========================================================================
   Quindi · Barcode Reader — UI theme
   Translucent surfaces (Liquid Glass) over the official Quindi brand palette
   (#050505 / #0bce88 / #dcff69, fonts Hanken Grotesk + Space Grotesk +
   Inconsolata) sourced from www.quindi.ai.
   ========================================================================= */

/* -------- Brand tokens (sourced from www.quindi.ai) -------- */

:root {
    color-scheme: dark;

    /* Brand palette */
    --bg-0:         #050505;        /* quindi.ai background */
    --bg-1:         #0c0c0c;
    --bg-2:         #141414;

    --c-primary:    #0bce88;        /* quindi-green */
    --c-primary-hi: #1cd685;        /* medium-spring-green hover */
    --c-accent:     #dcff69;        /* green-yellow CTA / numeri */
    --c-violet:     #985eef;        /* medium-purple */
    --c-violet-dk:  #371499;        /* dark-purple */
    --c-teal:       #128b87;        /* gradient teal base */
    --c-warning:    #ff4800;        /* orange-red */
    --c-error:      #fc9898;

    /* Text */
    --t-strong:     #ffffff;
    --t:            rgba(255,255,255,0.72);    /* --text */
    --t-soft:       rgba(255,255,255,0.55);
    --t-mute:       rgba(255,255,255,0.36);    /* --text-light */

    /* Liquid Glass tuning */
    --lg-tint:      rgba(255,255,255,0.06);
    --lg-tint-hi:   rgba(255,255,255,0.10);
    --lg-blur:      22px;
    --lg-edge:      rgba(255,255,255,0.18);
    --lg-radius:    20px;

    /* Spacing scale */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 22px;
    --s-6: 30px;

    /* Typography */
    --font-ui:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
    --font-display: "Space Grotesk", "Hanken Grotesk", sans-serif;
    --font-mono:  "Inconsolata", "SF Mono", "JetBrains Mono", ui-monospace, monospace;

    /* Motion */
    --ease-out:    cubic-bezier(.2,.7,.2,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* -------- Reset / globals -------- */

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

html, body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-0);
    color: var(--t);
    font-family: var(--font-ui);
    font-feature-settings: "ss01","cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--bg-0);
}

button { font: inherit; color: inherit; }

#app, .app-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* -------- Liquid Glass primitive -------- */

.liquid-glass {
    position: relative;
    background: var(--lg-tint);
    backdrop-filter: blur(var(--lg-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(180%);
    border-radius: var(--lg-radius);
    box-shadow:
        inset 0 1px 0 oklch(100% 0 0 / 0.35),
        inset 0 -1px 0 oklch(0% 0 0 / 0.20),
        0 18px 40px oklch(0% 0 0 / 0.35),
        0 1px 3px  oklch(0% 0 0 / 0.20);
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
    will-change: backdrop-filter;
}

.liquid-glass::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(120% 80% at var(--mx, 30%) var(--my, 20%),
        oklch(100% 0 0 / 0.30), transparent 60%);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: background .15s var(--ease-out);
}

.liquid-glass::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--lg-edge), transparent 40%, var(--lg-edge));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@media (prefers-reduced-transparency: reduce) {
    .liquid-glass { background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .liquid-glass::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .liquid-glass::before { display: none; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@supports not (backdrop-filter: blur(1px)) {
    .liquid-glass { background: var(--bg-2); }
}

/* -------- App shell / layout -------- */

.scanner-shell {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: max(env(safe-area-inset-top, 14px), 14px) var(--s-4) 0 var(--s-4);
    height: 100dvh;
    max-width: 740px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* -------- Header -------- */

.app-header {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 2px 4px;
}

.app-brand-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
    text-decoration: none;
    color: inherit;
}

.app-brand-logo {
    height: 22px;
    width: auto;
    display: block;
    /* Logo SVG ships with white fills; subtle mint glow ties it to the app accent */
    filter: drop-shadow(0 0 10px rgba(11, 206, 136, 0.35));
}

.app-build {
    font-size: 10px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
    font-variant-numeric: tabular-nums;
    user-select: text;
}

.icon-button-badge-wrap {
    position: relative;
    display: inline-flex;
}
.icon-button-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--c-warning);
    color: #050505;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-0);
    pointer-events: none;
}

.app-meta { margin-left: auto; }

.app-offline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-warning);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 72, 0, 0.10);
    border: 1px solid rgba(255, 72, 0, 0.32);
}

/* -------- Viewfinder -------- */

.viewfinder {
    position: relative;
    --scan-roi-width: 76%;
    --scan-roi-height: 62%;
    width: 90vw;
    max-width: 90vw;
    align-self: center;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    padding: 0 !important;
}

.viewfinder-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Animate the collapse so the log lifts up smoothly */
    transition: max-height .35s var(--ease-out), opacity .25s var(--ease-out), margin .35s var(--ease-out);
    max-height: 80vh;
    opacity: 1;
}
.viewfinder-wrapper.is-hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.viewfinder-toolbar {
    display: flex;
    justify-content: center;
    gap: var(--s-3);
    margin-top: -4px;
}

.viewfinder-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    background: #000;
}

.viewfinder-overlay {
    position: absolute; inset: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewfinder-target {
    position: relative;
    width: var(--scan-roi-width);
    height: var(--scan-roi-height);
    border: 1px solid rgba(11, 206, 136, 0.72);
    border-radius: 16px;
    box-shadow:
        0 0 0 999px rgba(0, 0, 0, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        0 0 24px rgba(11, 206, 136, 0.18);
    overflow: hidden;
}

.viewfinder-line {
    position: absolute;
    top: 14%; left: 10%; right: 10%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-primary), transparent);
    box-shadow: 0 0 14px var(--c-primary);
    animation: scan-sweep 2.6s var(--ease-out) infinite alternate;
}

.viewfinder-status {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    padding: var(--s-5);
    text-align: center;
    color: var(--t-strong);
    background: rgba(0, 0, 0, 0.62);
}

.viewfinder-status p {
    max-width: 28rem;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    color: var(--t);
}

.viewfinder-spinner {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: var(--c-primary);
    animation: spinner-rotate .8s linear infinite;
}

.viewfinder-retry {
    appearance: none;
    border: 1px solid rgba(11, 206, 136, 0.45);
    background: rgba(11, 206, 136, 0.14);
    color: var(--t-strong);
    border-radius: 12px;
    padding: 8px 14px;
    min-height: 38px;
    font-weight: 600;
    cursor: pointer;
}

.viewfinder-retry:active {
    transform: scale(0.97);
}

.viewfinder-retry:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

@keyframes scan-sweep {
    0%   { top: 14%; opacity: 0.40; }
    100% { top: 86%; opacity: 0.95; }
}

.viewfinder-topbar {
    position: absolute;
    top: var(--s-3); left: var(--s-3); right: var(--s-3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.viewfinder-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

/* -------- Status chip -------- */

/* -------- Icon button -------- */

.icon-button {
    appearance: none;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--t-strong);
    width: 40px; height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s var(--ease-out), background .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.icon-button:hover {
    background: rgba(11, 206, 136, 0.12);
    border-color: rgba(11, 206, 136, 0.36);
    color: var(--c-primary);
}
.icon-button:active { transform: scale(0.92); }
.icon-button:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.icon-button:disabled { opacity: 0.4; cursor: not-allowed; }

/* -------- Log -------- */

.log-section {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom, 14px);
}

.log-header {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: 0 4px;
}

.log-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-soft);
}

.log-count {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-primary);
    background: rgba(11, 206, 136, 0.14);
    border: 1px solid rgba(11, 206, 136, 0.32);
    padding: 2px 10px;
    border-radius: 999px;
}
.log-count[data-empty="True"] {
    color: var(--t-mute);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

.log-spacer { flex: 1; }

.log-clear {
    width: 36px !important; height: 36px !important;
    border-radius: 12px !important;
}

.log-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.20) transparent;
}

/* Item — flat row with hairline divider */

.log-item {
    appearance: none;
    width: 100%;
    text-align: left;
    padding: var(--s-3) 4px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    color: var(--t-strong);
    transition: background .15s var(--ease-out), color .15s var(--ease-out);
    animation: item-in .25s var(--ease-out) both;
}
.log-item:hover  { background: rgba(255, 255, 255, 0.03); }
.log-item:active { background: rgba(255, 255, 255, 0.05); }
.log-item.is-copied {
    color: var(--c-primary);
}
.log-item:focus-visible {
    outline: 1px solid var(--c-primary);
    outline-offset: -1px;
}

@keyframes item-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.log-item-row {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.log-item-glyph { color: var(--c-primary); flex-shrink: 0; }

.log-item-symbology {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--c-primary);
}

.log-item-time {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--t-mute);
    font-variant-numeric: tabular-nums;
}

.log-item-action {
    margin-left: auto;
    color: var(--t-mute);
    transition: color .15s var(--ease-out);
}
.log-item.is-copied .log-item-action { color: var(--c-primary); }

.log-item-value {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--t-strong);
    word-break: break-all;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.log-empty {
    text-align: center;
    padding: var(--s-6) var(--s-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
    color: var(--t-soft);
}
.log-empty-icon { color: var(--t-mute); }
.log-empty-title { margin: 4px 0 0; font-size: 15px; font-weight: 500; color: var(--t-soft); }
.log-empty-sub   { margin: 0; font-size: 13px; color: var(--t-mute); }

/* -------- Toast -------- */

.toast {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 14px;
    border-radius: 999px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    min-width: min(420px, calc(100vw - 32px));
    max-width: min(560px, calc(100vw - 32px));
}
.toast.is-entering {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity .22s var(--ease-out), transform .26s var(--ease-spring);
}
.toast.is-exit {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
    transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-symbology {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    color: var(--c-primary);
    text-transform: uppercase;
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(11, 206, 136, 0.14);
    border: 1px solid rgba(11, 206, 136, 0.32);
}
.toast-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--t-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------- Settings sheet -------- */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1100;
    animation: backdrop-in .22s var(--ease-out);
}

@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(540px, 100vw);
    z-index: 1101;
    padding: var(--s-4) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom, 0));
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    animation: sheet-in .28s var(--ease-spring);
    max-height: 78dvh;
    overflow-y: auto;
}

.sheet.liquid-glass::before,
.sheet.liquid-glass::after { display: none; }

@keyframes sheet-in {
    from { transform: translate(-50%, 100%); }
    to   { transform: translate(-50%, 0);    }
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-3);
}
.sheet-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--t-strong);
}

.sheet-section + .sheet-section { margin-top: var(--s-5); }

.sheet-section-title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--t-soft);
}
.sheet-section-sub {
    margin: 0 0 var(--s-3);
    font-size: 13px;
    color: var(--t-mute);
}

.sheet-options { list-style: none; margin: 0; padding: 0; }

/* Segmented control */
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.segmented-item {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--t-soft);
    padding: 8px 6px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.segmented-item:hover { color: var(--t-strong); }
.segmented-item.is-active {
    background: var(--c-primary);
    color: #050505;
}
.segmented-meta {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: inherit;
    opacity: 0.7;
}
.segmented-item.is-active .segmented-meta { opacity: 0.75; }

.sheet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}
.sheet-options li:last-child .sheet-row { border-bottom: none; }
.sheet-row-label { font-size: 15px; color: var(--t-strong); }

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px; height: 26px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    transition: background .2s var(--ease-out);
    flex-shrink: 0;
}
.switch input {
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}
.switch-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .22s var(--ease-spring);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.switch.is-on { background: var(--c-primary); }
.switch.is-on .switch-thumb { transform: translateX(18px); }

/* -------- Icon base -------- */

.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* -------- Blazor scaffold overrides -------- */

#blazor-error-ui {
    color-scheme: dark only;
    background: var(--c-warning);
    color: #fff;
    bottom: 0; left: 0;
    box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.5);
    display: none;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.loading-progress {
    position: absolute;
    display: block;
    width: 7rem; height: 7rem;
    inset: 24vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 0.4rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--c-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.7), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
    filter: drop-shadow(0 0 6px var(--c-primary));
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 500;
    inset: calc(24vh + 3rem) 0 auto 0;
    color: var(--t-soft);
    font-size: 13px;
    letter-spacing: 0.04em;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Caricamento…"); }

/* -------- Error log sheet -------- */

.error-sheet-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
}
.error-sheet-clear {
    appearance: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--t-soft);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.error-sheet-clear:hover { color: var(--t-strong); background: rgba(255, 255, 255, 0.10); }

.error-sheet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: var(--s-5) var(--s-3);
    color: var(--t-mute);
    font-size: 14px;
    text-align: center;
}

.error-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.error-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}
.error-item.is-open { background: rgba(255, 255, 255, 0.06); }

.error-item-head {
    width: 100%;
    appearance: none;
    background: transparent;
    border: none;
    color: inherit;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    column-gap: 10px;
    cursor: pointer;
    text-align: left;
}

.error-item-source {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-primary);
    background: rgba(11, 206, 136, 0.10);
    padding: 3px 7px;
    border-radius: 999px;
}
.error-item-time {
    font-size: 11px;
    color: var(--t-mute);
    font-variant-numeric: tabular-nums;
}
.error-item-summary {
    font-size: 13px;
    color: var(--t-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.error-item-chevron {
    color: var(--t-mute);
    transition: transform .18s var(--ease-out);
}
.error-item.is-open .error-item-chevron { transform: rotate(90deg); }

.error-item-body {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.error-item-trace {
    margin: 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 45dvh;
    overflow: auto;
}
.error-item-copy {
    align-self: flex-start;
    appearance: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--t-soft);
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.error-item-copy:hover { color: var(--t-strong); background: rgba(255, 255, 255, 0.10); }
