/**
 * HyDiag · 账单解读
 * 配色跟参数诊断台同一套暗色 / 青铜，交互是上传 + 对话。
 */

.ea-mode-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 22px;
    margin-top: 1.1rem;
}

.ea-mode-switch__label {
    margin: 0 8px 0 0;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(246, 243, 238, 0.4);
}

.ea-mode {
    display: inline-flex;
    align-items: center;
    padding: 4px 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    color: rgba(246, 243, 238, 0.42);
    text-decoration: none;
    box-shadow: inset 0 -1.5px 0 transparent;
}

.ea-mode:hover {
    color: rgba(246, 243, 238, 0.88);
}

.ea-mode.is-active {
    color: #e8c9a0;
    box-shadow: inset 0 -1.5px 0 #d4a574;
    pointer-events: none;
}

body.has-ambient-dark.bill-page #analysis.container {
    max-width: 760px;
    padding-top: calc(70px + 2.8rem + env(safe-area-inset-top, 0px));
}

.bill-page .ea-mode-switch {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.35rem;
}

.bill-notice {
    margin: 0 0 1.5rem;
    padding: 12px 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(246, 243, 238, 0.48);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bill-notice strong {
    color: rgba(232, 201, 160, 0.9);
    font-weight: 600;
}

.bill-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    border: 1px dashed rgba(246, 243, 238, 0.2);
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.bill-upload:hover,
.bill-upload.is-dragover {
    border-color: rgba(212, 165, 116, 0.7);
    background: rgba(212, 165, 116, 0.06);
}

.bill-upload[hidden] {
    display: none !important;
}

.bill-upload__mark {
    display: block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #d4a574;
}

.bill-upload h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f6f3ee;
}

.bill-upload p {
    margin: 0 0 20px;
    max-width: 28em;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(246, 243, 238, 0.48);
}

.bill-upload__btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 22px;
    border: none;
    border-radius: 999px;
    background: #d4a574;
    color: #1a1612;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.bill-upload__btn:hover {
    background: #e0b588;
}

.bill-upload__file {
    display: none;
}

.bill-upload__name {
    margin-top: 14px;
    min-height: 1.2em;
    font-size: 12px;
    color: rgba(246, 243, 238, 0.4);
}

.bill-stage[hidden] {
    display: none !important;
}

.bill-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 10, 12, 0.45);
    scroll-margin-top: 86px;
}

.bill-stage__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bill-stage .bill-chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: min(520px, calc(100vh - 240px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bill-workspace-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(246, 243, 238, 0.42);
}

.bill-chat__title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.bill-chat__thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #111;
}

.bill-chat__meta {
    min-width: 0;
}

.bill-chat__meta strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #f6f3ee;
}

.bill-chat__meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: rgba(246, 243, 238, 0.42);
}

.bill-chat__reset {
    flex-shrink: 0;
    border: none;
    background: none;
    color: rgba(246, 243, 238, 0.5);
    font-size: 13px;
    cursor: pointer;
}

.bill-chat__reset:hover {
    color: #e8c9a0;
}

.bill-chat__log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    overflow-y: auto;
}

.bill-msg {
    max-width: 86%;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
}

.bill-msg.user {
    align-self: flex-end;
    background: rgba(212, 165, 116, 0.16);
    color: #f6f3ee;
}

.bill-msg.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(246, 243, 238, 0.92);
}

.bill-msg.is-error {
    color: #e8b4b4;
    border-color: rgba(180, 96, 96, 0.35);
}

.bill-msg.ai.is-pending {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: rgba(232, 201, 160, 0.88);
}

.bill-thinking {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.bill-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bill-thinking-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d4a574;
    opacity: 0.2;
    animation: bill-thinking-dot 1.1s ease-in-out infinite;
}

.bill-thinking-dots i:nth-child(2) {
    animation-delay: 0.16s;
}

.bill-thinking-dots i:nth-child(3) {
    animation-delay: 0.32s;
}

.bill-followups {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.bill-followups__bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.bill-followups__label {
    font-size: 12px;
    color: rgba(246, 243, 238, 0.42);
}

.bill-followups__more {
    border: none;
    background: none;
    padding: 0;
    color: rgba(246, 243, 238, 0.42);
    font-size: 12px;
    cursor: pointer;
}

.bill-followups__more:hover {
    color: #e8c9a0;
}

.bill-followups__more:disabled {
    opacity: 0.4;
    cursor: default;
}

.bill-followups__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bill-followups__btn {
    appearance: none;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(246, 243, 238, 0.14);
    background: transparent;
    color: rgba(246, 243, 238, 0.78);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.bill-followups__btn:hover {
    color: #e8c9a0;
    border-color: rgba(212, 165, 116, 0.45);
}

.bill-followups__btn:disabled {
    opacity: 0.45;
    cursor: default;
}

@media (max-width: 560px) {
    .bill-followups__grid {
        grid-template-columns: 1fr;
    }
}

.bill-chat__form {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bill-chat__form input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid rgba(246, 243, 238, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f6f3ee;
    font-size: 14px;
    outline: none;
}

.bill-chat__form input::placeholder {
    color: rgba(246, 243, 238, 0.35);
}

.bill-chat__form input:focus {
    border-color: rgba(212, 165, 116, 0.55);
}

.bill-chat__form button {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #d4a574;
    color: #1a1612;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.bill-chat__form button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@keyframes bill-thinking-dot {
    0%, 80%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@media (max-width: 768px) {
    .bill-stage {
        margin-left: -4px;
        margin-right: -4px;
    }
}

/* —— 顶栏打印机，和 HyLab 一样：地区 + 时间 —— */
body.bill-page .navbar {
    overflow: visible !important;
}

.bill-printer-slot {
    position: absolute;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.bill-printer-wrap {
    --printer-color: #3e424a;
    --printer-color-2: #2a2e36;
    --printer-hilite: #6a707c;
    --printer-face: #484d57;
    pointer-events: auto;
    position: relative;
    z-index: 1004;
    display: block;
    width: 248px;
    height: 36px;
    margin: 0;
    overflow: visible;
    user-select: none;
    cursor: pointer;
}

body.bill-page .navbar .logo-container,
body.bill-page .navbar .mobile-menu-toggle {
    z-index: 1005;
}

.bill-printer-wrap:focus-visible {
    outline: 2px solid rgba(212, 165, 116, 0.7);
    outline-offset: 4px;
}

.bill-printer {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0 0 6px 6px;
    background-color: var(--printer-color);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 42%, rgba(0, 0, 0, 0.22) 100%);
    border: 1.5px solid var(--printer-color-2);
    box-shadow:
        0 10px 18px 0 rgba(0, 0, 0, 0.45),
        0 -14px 10px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    z-index: 2;
}

.bill-printer::before {
    content: "";
    position: absolute;
    top: -12px;
    left: -1.5px;
    right: -1.5px;
    height: 28px;
    border-radius: 7px 7px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    background-color: var(--printer-face);
    filter: brightness(1.08);
    box-shadow:
        0 8px 10px -8px rgba(255, 255, 255, 0.18) inset,
        0 -4px 10px -4px rgba(0, 0, 0, 0.4) inset;
    z-index: 2;
    pointer-events: none;
}

.bill-printer::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 12px;
    width: calc(100% - 24px);
    height: 18px;
    border-radius: 0 0 3px 3px;
    background-image: linear-gradient(to top, #1c1e24, 55%, var(--printer-color-2));
    box-shadow:
        0 3px 3px -1px rgba(0, 0, 0, 0.45),
        inset 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

.bill-printer-display {
    position: absolute;
    z-index: 3;
    top: -4px;
    left: 14px;
    right: 14px;
    height: 22px;
    padding: 2px 8px;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #050607;
    background-image: linear-gradient(transparent 0, rgba(255, 255, 255, 0.08) 90%, transparent 100%);
    background-size: 100% 5px;
    border: 1.5px solid var(--printer-hilite);
    box-shadow:
        -1px -1px 1px 0 rgba(255, 255, 255, 0.12) inset,
        1px 1px 3px 1px #000 inset;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bill-printer-clock {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5aff5a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: blur(0);
    pointer-events: none;
    transition:
        opacity 0.32s cubic-bezier(0.05, 0.7, 0.1, 1),
        transform 0.32s cubic-bezier(0.05, 0.7, 0.1, 1),
        filter 0.32s cubic-bezier(0.05, 0.7, 0.1, 1);
}

.bill-printer-clock-date,
.bill-printer-clock-zone {
    flex: 0 0 auto;
    line-height: 1;
}

.bill-printer-clock-zone {
    opacity: 0.9;
    min-width: 0;
    overflow: hidden;
}

.bill-printer-message,
.bill-printer-busy {
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #5aff5a;
    white-space: nowrap;
    line-height: 1;
}

.bill-printer-message {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 9px));
    opacity: 0;
    filter: blur(4px);
    pointer-events: none;
    transition:
        opacity 0.32s cubic-bezier(0.05, 0.7, 0.1, 1),
        transform 0.32s cubic-bezier(0.05, 0.7, 0.1, 1),
        filter 0.32s cubic-bezier(0.05, 0.7, 0.1, 1);
}

.bill-printer-busy {
    display: none;
}

.bill-printer-letters {
    display: none;
}

.bill-printer-wrap:hover .bill-printer-clock,
.bill-printer-wrap:focus-visible .bill-printer-clock {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 9px));
    filter: blur(4px);
}

.bill-printer-wrap:hover .bill-printer-message,
.bill-printer-wrap:focus-visible .bill-printer-message {
    opacity: 1;
    transform: translate(-50%, -50%);
    filter: blur(0);
}

.bill-printer-thinking {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #5aff5a;
    line-height: 1;
}

.bill-printer-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bill-printer-thinking-dots i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #5aff5a;
    opacity: 0.2;
    animation: bill-printer-think-dot 1.1s ease-in-out infinite;
}

.bill-printer-thinking-dots i:nth-child(2) {
    animation-delay: 0.16s;
}

.bill-printer-thinking-dots i:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes bill-printer-think-dot {
    0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

.bill-printer-wrap.is-thinking .bill-printer-clock,
.bill-printer-wrap.is-thinking .bill-printer-message,
.bill-printer-wrap.is-thinking .bill-printer-busy,
.bill-printer-wrap.is-thinking .bill-printer-letters,
.bill-printer-wrap.is-thinking:hover .bill-printer-clock,
.bill-printer-wrap.is-thinking:hover .bill-printer-message {
    display: none !important;
    opacity: 0 !important;
}

.bill-printer-wrap.is-thinking .bill-printer-thinking {
    display: inline-flex !important;
}

.bill-printer-wrap.is-printing .bill-printer-clock,
.bill-printer-wrap.is-printing .bill-printer-message,
.bill-printer-wrap.is-printing .bill-printer-letters,
.bill-printer-wrap.is-printing .bill-printer-thinking {
    display: none !important;
    opacity: 0 !important;
}

.bill-printer-wrap.is-printing .bill-printer-busy {
    display: inline-block !important;
}

@media (max-width: 860px) {
    .bill-printer-wrap {
        width: min(168px, calc(100vw - 148px));
        height: 28px;
    }

    .bill-printer-display {
        left: 8px;
        right: 8px;
        height: 16px;
    }

    .bill-printer-clock,
    .bill-printer-clock-date,
    .bill-printer-clock-zone,
    .bill-printer-message,
    .bill-printer-busy {
        font-size: 9px;
        letter-spacing: 0.01em;
    }
}

body.has-ambient-dark > .bill-receipt-scrim,
.bill-receipt-scrim {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100200 !important;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

body.has-ambient-dark > .bill-receipt-scrim.is-on,
.bill-receipt-scrim.is-on {
    opacity: 1;
    pointer-events: auto;
}

.bill-receipt-wrapper {
    position: absolute;
    top: 100%;
    left: 50%;
    width: calc(100% - 40px);
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.14));
    transform: translateX(-50%) translateY(-100%);
    clip-path: inset(100% -40px -40px -40px);
    pointer-events: none;
    box-sizing: border-box;
}

.bill-receipt-wrapper[hidden] {
    display: none !important;
}

.bill-printer-wrap.is-printing .bill-receipt-wrapper,
.bill-printer-wrap.is-open .bill-receipt-wrapper {
    display: block !important;
    pointer-events: auto;
    width: 260px;
    max-width: min(280px, calc(100vw - 32px));
}

.bill-printer-wrap.is-printing .bill-receipt-wrapper {
    transform-origin: top center;
    animation:
        billPrintSlide 1.15s 1 forwards ease-in,
        billReceiptPop 0.38s 0.9s 1 forwards cubic-bezier(0, 0.63, 0.96, 1.1);
}

.bill-printer-wrap.is-open:not(.is-printing):not(.is-expanded) .bill-receipt-wrapper {
    z-index: 30;
    transform-origin: top center;
    transform: translateX(-50%) translateY(14px) scale(1.02);
    clip-path: inset(-16px -40px -40px -40px);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}

@keyframes billPrintSlide {
    0% {
        transform: translateX(-50%) translateY(-100%);
        clip-path: inset(100% -40px -40px -40px);
    }
    100% {
        transform: translateX(-50%) translateY(8px);
        clip-path: inset(-10% -40px -40px -40px);
    }
}

@keyframes billReceiptPop {
    0% { transform: translateX(-50%) translateY(8px) scale(1); }
    35% { transform: translateX(-50%) translateY(18px) rotate3d(1, 0, 1, -2.5deg) scale(1.02); }
    100% {
        z-index: 30;
        transform: translateX(-50%) translateY(14px) scale(1.02);
        clip-path: inset(-16px -40px -40px -40px);
        filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
    }
}

.bill-receipt-wrapper.bill-receipt-wrapper--morphing {
    z-index: 100210 !important;
    clip-path: none !important;
    animation: none !important;
    overflow: visible !important;
    will-change: left, top, width, height, transform, filter;
    transition:
        left 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        top 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.5s ease;
}

.bill-receipt-wrapper.bill-receipt-wrapper--hero {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    width: min(420px, calc(100vw - 24px)) !important;
    height: auto !important;
    max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100210 !important;
    clip-path: none !important;
    animation: none !important;
    filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.35));
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column;
    overflow: visible;
}

body > .bill-receipt-wrapper.bill-receipt-wrapper--hero,
body > .bill-receipt-wrapper.bill-receipt-wrapper--morphing {
    isolation: isolate;
}

.bill-receipt-wrapper.bill-receipt-wrapper--hero.is-settling {
    animation: billReceiptSettle 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes billReceiptSettle {
    0% { transform: translate(-50%, -50%) scale(0.94) rotate(-0.8deg); }
    55% { transform: translate(-50%, -50%) scale(1.02) rotate(0.4deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.bill-receipt-wrapper.is-closing {
    opacity: 0 !important;
    transform: translate(-50%, -46%) scale(0.88) !important;
    filter: blur(2px) !important;
    transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease !important;
}

.bill-receipt {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55em;
    padding: 12px 10px 10px;
    background: #f5f5f5;
    color: #444;
    font-family: "SF Mono", "Menlo", "Consolas", "Courier New", monospace;
    font-size: 11px;
    line-height: 1.4;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.bill-receipt-wrapper--hero .bill-receipt {
    padding: 16px 16px 12px;
    font-size: 13px;
    gap: 0.7em;
    line-height: 1.45;
    background: #f7f7f5;
    flex: 1 1 auto;
    min-height: 0;
    max-height: inherit;
    overflow: hidden;
}

.bill-receipt-body {
    display: flex;
    flex-direction: column;
    gap: inherit;
    max-height: min(52vh, 420px);
    overflow: auto;
}

.bill-receipt-wrapper--hero .bill-receipt-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.bill-receipt-wrapper--hero .bill-receipt-actions {
    flex: 0 0 auto;
}

.bill-receipt::before,
.bill-receipt::after {
    --angle: 45deg;
    content: "";
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 6px;
    background:
        linear-gradient(calc(var(--angle) * -1), #f5f5f5 3px, transparent 0),
        linear-gradient(var(--angle), #f5f5f5 3px, transparent 0);
    background-size: 6px 6px;
    background-repeat: repeat-x;
    pointer-events: none;
}

.bill-receipt::before {
    top: -6px;
    background-position: 3px 0;
}

.bill-receipt::after {
    bottom: -6px;
    background-position: 0 100%;
    --angle: 225deg;
}

.bill-receipt-header {
    position: relative;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #b9ae98;
}

.bill-receipt-brand {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.bill-receipt-wrapper--hero .bill-receipt-brand {
    font-size: 16px;
}

.bill-receipt-scene,
.bill-receipt-time {
    margin-top: 2px;
    color: #555;
    font-size: 11px;
}

.bill-receipt-logo {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 14px;
    opacity: 0.7;
}

.bill-receipt-subheader {
    text-align: center;
    color: #333;
    font-size: 11px;
    line-height: 1.55;
}

.bill-receipt-table {
    width: 100%;
    border-collapse: collapse;
}

.bill-receipt-table th,
.bill-receipt-table td {
    border-bottom: 1px dotted #cfc5b0;
    padding: 4px 2px;
    text-align: left;
    vertical-align: top;
}

.bill-receipt-table th {
    font-size: 10px;
    color: #666;
    font-weight: 700;
}

.bill-receipt-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bill-receipt-table tr.bill-receipt-total td {
    border-bottom: none;
    border-top: 1px solid #1a1a1a;
    padding-top: 6px;
    font-weight: 800;
}

.bill-receipt-devices {
    margin: 2px 0;
    padding-top: 6px;
    border-top: 1px dashed #b9ae98;
}

.bill-receipt-devices:empty {
    display: none;
}

.bill-receipt-devices-title {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #444;
}

.bill-receipt-dev-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    font-size: 11px;
    padding: 1px 0;
}

.bill-receipt-dev-row .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bill-receipt-message {
    text-align: center;
    font-size: 10px;
    color: #555;
    margin: 4px 0 2px;
}

.bill-receipt-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px dashed #b9ae98;
}

.bill-receipt-ask,
.bill-receipt-close {
    appearance: none;
    border: 1px solid #b9ae98;
    background: #fff;
    color: #222;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
}

.bill-receipt-ask {
    background: #d4a574;
    border-color: #c49663;
    color: #1a1612;
}

.bill-receipt-ask:hover,
.bill-receipt-close:hover {
    filter: brightness(0.97);
}
