/* ============================================================
   entertainment-expense-deduction-calc.css · 业务招待费税前扣除计算器
   设计语言：票据底稿 —— 墨紫底 + 收据黄 + 锯齿票边 + 调增印章
   作用域：.eed-page（必须与 Blade 根元素 class 一致）
   ============================================================ */

.eed-page {
    --neo-accent: #4a2c5a;
    --neo-accent-2: #b8860b;
    --neo-grad: linear-gradient(135deg, #1d1026 0%, #4a2c5a 54%, #b8860b 140%);

    --eed-plum: #4a2c5a;
    --eed-plum-soft: rgba(74, 44, 90, .09);
    --eed-amber: #a97a12;
    --eed-amber-soft: rgba(201, 162, 39, .14);
    --eed-line: rgba(74, 44, 90, .16);
    --eed-paper: #fdfaf0;
    --eed-good: #157a56;
    --eed-warn: #b45309;
    --eed-bad: #b3261e;
    --eed-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

[data-theme="dark"] .eed-page {
    --neo-accent: #e6c25a;
    --neo-accent-2: #f0d68a;
    --neo-grad: linear-gradient(135deg, #120a19 0%, #2f1c3c 50%, #8a6410 132%);

    --eed-plum: #c9a6e0;
    --eed-plum-soft: rgba(201, 166, 224, .12);
    --eed-amber: #e6c25a;
    --eed-amber-soft: rgba(230, 194, 90, .13);
    --eed-line: rgba(230, 194, 90, .22);
    --eed-paper: rgba(255, 255, 255, .035);
    --eed-good: #4ade80;
    --eed-warn: #fbbf24;
    --eed-bad: #f87171;
}

/* ============================================================
   首屏
   ============================================================ */
.eed-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 28px 30px 16px;
    margin-bottom: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(230, 194, 90, .22), transparent 46%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 30px),
        linear-gradient(118deg, #1a0f22 0%, #3a2247 46%, #4a2c5a 68%, #6d4d10 120%);
    box-shadow: 0 26px 60px -28px rgba(18, 8, 24, .72);
    border: 1px solid rgba(230, 194, 90, .22);
}
.eed-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 26px;
    align-items: start;
}
.eed-kicker {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2.6px;
    font-weight: 700;
    color: #f0d68a;
    border-bottom: 1px solid rgba(240, 214, 138, .45);
    padding-bottom: 5px;
    margin-bottom: 12px;
}
.eed-hero h1 {
    margin: 0 0 10px;
    font-size: 27px;
    line-height: 1.3;
    letter-spacing: .5px;
    color: #fff;
}
.eed-lead {
    margin: 0;
    max-width: 650px;
    font-size: 14px;
    line-height: 1.85;
    color: rgba(255, 255, 255, .87);
}
.eed-lead b { color: #f7dfa2; font-weight: 700; }
.eed-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.eed-chips li {
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 3px;
    color: rgba(255, 255, 255, .84);
    background: rgba(255, 255, 255, .07);
    border-bottom: 2px solid rgba(230, 194, 90, .55);
}
.eed-hero-foot {
    margin: 13px 0 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .52);
}
.eed-hero-note {
    position: relative;
    z-index: 1;
    margin: 14px 0 0;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, .18);
    font-size: 11.5px;
    color: rgba(255, 255, 255, .58);
    font-family: var(--eed-mono);
}

/* 结算小票 */
.eed-ticket {
    position: relative;
    padding: 14px 16px 15px;
    border-radius: 10px;
    color: #241a08;
    background: linear-gradient(172deg, #fff8e2, #f4e6bf);
    box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .55);
    background-image:
        radial-gradient(circle at 0 12px, transparent 5px, #fff8e2 5.5px),
        radial-gradient(circle at 100% 12px, transparent 5px, #fff8e2 5.5px);
}
.eed-ticket::before,
.eed-ticket::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(90, 60, 10, .35) 0 5px, transparent 5px 10px);
}
.eed-ticket::before { top: 46px; }
.eed-ticket::after { bottom: 52px; }
.eed-ticket-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #5a3c0a;
    padding-bottom: 8px;
}
.eed-ticket-head em {
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 3px;
    color: #fff8e2;
    background: #4a2c5a;
    white-space: nowrap;
}
.eed-ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    font-size: 12px;
    color: #6b5220;
    border-bottom: 1px dotted rgba(90, 60, 10, .22);
}
.eed-ticket-row b {
    font-size: 16px;
    font-weight: 800;
    color: #2a1a04;
    font-variant-numeric: tabular-nums;
}
.eed-ticket-row--tax { border-bottom: 0; padding-top: 9px; }
.eed-ticket-row--tax b { color: #a3241c; font-size: 19px; }
.eed-stamp-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    min-height: 22px;
}
.eed-stamp {
    display: inline-block;
    padding: 3px 10px;
    border: 2px solid rgba(178, 38, 30, .7);
    border-radius: 6px;
    color: rgba(178, 38, 30, .85);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    transform: rotate(-3deg);
    opacity: 0;
    transition: opacity .3s;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(178, 38, 30, .35);
}
.eed-stamp.is-on { opacity: 1; }
.eed-cta {
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 7px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff8e2;
    background: linear-gradient(120deg, #4a2c5a, #6b4423);
    text-decoration: none;
    transition: transform .16s, box-shadow .16s;
}
.eed-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(74, 44, 90, .9); }

/* ============================================================
   主题微调
   ============================================================ */
.eed-page .neo-card-title .neo-ic {
    background: var(--eed-amber-soft);
    color: var(--eed-amber);
    border: 1px solid var(--eed-line);
}
.eed-page .neo-input:focus,
.eed-page .neo-select:focus {
    border-color: var(--eed-amber);
    box-shadow: 0 0 0 4px var(--eed-amber-soft);
}
.eed-page .neo-btn {
    background: linear-gradient(135deg, #3a2247, #4a2c5a 58%, #a97a12 132%);
    box-shadow: 0 10px 22px -12px rgba(74, 44, 90, .8);
}
.eed-hint {
    display: block;
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--neo-text-faint);
}

/* 部门表 */
.eed-dhead,
.eed-drow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px 84px 52px 20px;
    gap: 5px;
    align-items: center;
}
.eed-dhead {
    font-size: 10px;
    color: var(--neo-text-faint);
    padding: 0 2px 5px;
    text-align: center;
}
.eed-dhead span:first-child { text-align: left; }
.eed-depts { display: flex; flex-direction: column; gap: 6px; }
.eed-drow input {
    width: 100%;
    padding: 6px 7px;
    font-family: inherit;
    font-size: 12px;
    color: var(--neo-text);
    background: var(--neo-surface-solid);
    border: 1.5px solid var(--neo-card-bd);
    border-radius: 7px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .16s, box-shadow .16s;
}
[data-theme="dark"] .eed-drow input { background: rgba(255, 255, 255, .045); }
.eed-drow input:focus { border-color: var(--eed-amber); box-shadow: 0 0 0 3px var(--eed-amber-soft); }
.eed-drow input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.eed-drow input[type="number"]::-webkit-outer-spin-button,
.eed-drow input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eed-drow input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.eed-drow .eed-d-name { font-weight: 600; }
.eed-d-del {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--eed-bad);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}
.eed-d-del:hover { background: color-mix(in srgb, var(--eed-bad) 13%, transparent); }
.eed-editor-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }

.eed-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.eed-preset {
    border: 1px solid var(--eed-line);
    background: var(--eed-paper);
    color: var(--neo-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .16s;
}
.eed-preset:hover { border-color: var(--eed-amber); color: var(--eed-amber); transform: translateY(-1px); }
.eed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eed-err {
    margin-top: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--eed-bad);
    background: color-mix(in srgb, var(--eed-bad) 10%, transparent);
    border-left: 3px solid var(--eed-bad);
}

/* ============================================================
   结果
   ============================================================ */
.eed-bottleneck {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--eed-line);
    background: linear-gradient(120deg, var(--eed-plum-soft), var(--eed-amber-soft));
    margin-bottom: 13px;
}
.eed-bn-k { font-size: 10.5px; color: var(--neo-text-faint); letter-spacing: .5px; }
.eed-bottleneck strong { font-size: 15px; font-weight: 800; color: var(--neo-text); }
.eed-bottleneck em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--neo-text-soft);
    line-height: 1.6;
}

/* 双卡口 */
.eed-caps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 5px; }
.eed-cap { display: flex; flex-direction: column; gap: 4px; }
.eed-cap-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 11.5px;
    color: var(--neo-text-soft);
}
.eed-cap-top b { font-variant-numeric: tabular-nums; color: var(--neo-text); font-size: 13px; }
.eed-cap-top i { font-style: normal; font-size: 10.5px; color: var(--neo-text-faint); }
.eed-cap-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--eed-plum-soft);
    overflow: hidden;
}
.eed-cap-track i {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
}
.eed-cap-track i.is-60 { background: linear-gradient(90deg, #6b4423, #b8860b); }
.eed-cap-track i.is-5 { background: linear-gradient(90deg, #3a2247, #7b4f92); }
[data-theme="dark"] .eed-cap-track i.is-60 { background: linear-gradient(90deg, #a97a12, #e6c25a); }
[data-theme="dark"] .eed-cap-track i.is-5 { background: linear-gradient(90deg, #7b4f92, #c9a6e0); }
.eed-cap.is-bottle .eed-cap-top b { color: var(--eed-bad); }
.eed-cap.is-bottle .eed-cap-track { box-shadow: 0 0 0 2px color-mix(in srgb, var(--eed-bad) 30%, transparent); }
.eed-cap-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    background: var(--eed-bad);
    vertical-align: 1px;
}

.eed-page .neo-hero-num { margin-top: 14px; }
.eed-page .neo-hero-num .v {
    background: linear-gradient(120deg, #4a2c5a 0%, #7b4f92 45%, #b8860b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .eed-page .neo-hero-num .v {
    background: linear-gradient(120deg, #f0d68a 0%, #e6c25a 45%, #c9a6e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.eed-page .neo-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.eed-page .neo-metric { padding: 11px 12px; }
.eed-page .neo-metric .k { display: block; font-size: 11.5px; margin-bottom: 4px; white-space: nowrap; }
.eed-page .neo-metric .v {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}
.eed-subhead {
    margin: 20px 0 9px;
    padding-left: 9px;
    font-size: 13.5px;
    font-weight: 700;
    border-left: 3px solid var(--eed-amber);
    line-height: 1.4;
}

/* 发生额拆分 */
.eed-split-bar {
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--eed-line);
}
.eed-split-bar i {
    display: block;
    height: 100%;
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
    min-width: 0;
}
.eed-split-bar i.s-deduct { background: linear-gradient(90deg, #157a56, #3fae7f); }
.eed-split-bar i.s-add { background: repeating-linear-gradient(135deg, #b3261e 0 6px, #8f1e17 6px 12px); }
.eed-split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--neo-text-soft);
}
.eed-split-legend span { display: inline-flex; align-items: center; gap: 5px; }
.eed-split-legend i { width: 10px; height: 10px; border-radius: 2px; }
.eed-split-legend i.s-deduct { background: #157a56; }
.eed-split-legend i.s-add { background: #b3261e; }
.eed-split-legend b { color: var(--neo-text); font-variant-numeric: tabular-nums; }

/* 人均刻度 */
.eed-head-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: var(--eed-plum-soft);
    border: 1px solid var(--eed-line);
}
.eed-head-line {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #4a2c5a, #b8860b);
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
    max-width: 100%;
}
.eed-head-red {
    position: absolute;
    top: -5px;
    width: 2px;
    height: 22px;
    background: #b3261e;
    transition: left .45s;
}
.eed-head-mark {
    position: absolute;
    top: -8px;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--neo-text);
    margin-left: -5px;
    transition: left .45s;
}
.eed-head-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    font-size: 10.5px;
    color: var(--neo-text-faint);
    font-variant-numeric: tabular-nums;
}
.eed-head-note {
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--neo-text-soft);
}

/* 表格 */
.eed-table-wrap { overflow-x: auto; border-radius: 11px; }
.eed-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.eed-table th, .eed-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--neo-card-bd);
    white-space: nowrap;
}
.eed-table th {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--neo-text-faint);
    background: var(--eed-amber-soft);
}
.eed-table tbody tr:hover { background: color-mix(in srgb, var(--eed-plum) 6%, transparent); }
.eed-table .is-num { text-align: right; font-family: var(--eed-mono); }
.eed-table .is-good { color: var(--eed-good); font-weight: 700; }
.eed-table .is-bad { color: var(--eed-bad); font-weight: 700; }
.eed-table .is-now { background: var(--eed-amber-soft); font-weight: 700; }
.eed-empty { text-align: center; color: var(--neo-text-faint); padding: 16px 10px !important; }

/* 结论 */
.eed-facts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.eed-fact {
    padding: 10px 13px;
    border-radius: 9px;
    font-size: 12.8px;
    line-height: 1.78;
    color: var(--neo-text-soft);
    background: var(--neo-surface-solid);
    border: 1px solid var(--neo-card-bd);
    border-left: 3px solid var(--eed-plum);
}
[data-theme="dark"] .eed-fact { background: rgba(255, 255, 255, .035); }
.eed-fact b { color: var(--neo-text); }
.eed-fact.f-good { border-left-color: var(--eed-good); }
.eed-fact.f-warn { border-left-color: var(--eed-warn); }
.eed-fact.f-bad { border-left-color: var(--eed-bad); }
.eed-fact.f-info { border-left-color: var(--eed-amber); }

.eed-tips { display: flex; flex-direction: column; gap: 9px; }
.eed-tips p {
    margin: 0;
    font-size: 12.8px;
    line-height: 1.85;
    color: var(--neo-text-soft);
    padding: 9px 12px;
    border-radius: 9px;
    background: var(--eed-paper);
    border: 1px dashed var(--eed-line);
}
[data-theme="dark"] .eed-tips p { background: rgba(255, 255, 255, .03); }
.eed-tips b { color: var(--neo-text); }
.eed-summary {
    margin-top: 11px;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px dashed var(--eed-line);
    background: var(--eed-amber-soft);
    font-size: 12.5px;
    line-height: 1.95;
    color: var(--neo-text-soft);
    white-space: pre-wrap;
    font-family: var(--eed-mono);
}

/* ============================================================
   区块
   ============================================================ */
.eed-block { margin-top: 20px; }
.eed-block-lead {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--neo-text-soft);
}
.eed-cmp-empty {
    margin-top: 12px;
    padding: 20px 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--neo-text-faint);
    border: 1.5px dashed var(--neo-card-bd);
    border-radius: 11px;
}
.eed-cmp td, .eed-cmp th { white-space: normal; }
.eed-cmp .cmp-name { font-weight: 700; color: var(--neo-text-soft); }
.eed-cmp .cmp-del {
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--eed-bad);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 5px;
}
.eed-cmp .cmp-del:hover { background: color-mix(in srgb, var(--eed-bad) 12%, transparent); }

.eed-note-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eed-note-table th, .eed-note-table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    line-height: 1.8;
    border-bottom: 1px solid var(--neo-card-bd);
}
.eed-note-table th { width: 104px; white-space: nowrap; font-weight: 700; color: var(--neo-text); }
.eed-note-table td { color: var(--neo-text-soft); }
.eed-note-table tr:last-child th, .eed-note-table tr:last-child td { border-bottom: 0; }
.eed-note-table td b { color: var(--neo-text); }

.eed-steps { padding-left: 20px; margin: 0; }
.eed-steps li { margin-bottom: 8px; }

#eedCalc { scroll-margin-top: 92px; }

/* ============================================================
   A4 底稿
   ============================================================ */
.eed-sheet { display: none; }

@media print {
    @page { margin: 14mm; }
    body > *:not(#eedSheet) { display: none !important; }
    html, body { height: auto !important; background: #fff !important; }
    .eed-sheet {
        display: block !important;
        position: static !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #000 !important;
        background: #fff !important;
        font-size: 12px;
        line-height: 1.7;
    }
    .eed-sheet h1 { font-size: 19px; margin: 0 0 4px; }
    .eed-sheet .meta { font-size: 10.5px; color: #444; margin-bottom: 10px; }
    .eed-sheet h2 { font-size: 13.5px; margin: 14px 0 6px; }
    .eed-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
    .eed-sheet th, .eed-sheet td { border: 1px solid #999; padding: 4px 7px; text-align: left; }
    .eed-sheet th { background: #eee; }
    .eed-sheet .num { text-align: right; }
    .eed-sheet .foot { font-size: 10px; color: #555; border-top: 1px solid #999; padding-top: 7px; margin-top: 8px; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
    .eed-hero-grid { grid-template-columns: 1fr; }
    .eed-ticket { max-width: 360px; }
}
@media (max-width: 900px) {
    .eed-hero { padding: 22px 18px 14px; }
    .eed-hero h1 { font-size: 22px; }
    .eed-note-table th { width: 84px; font-size: 12.5px; }
}
@media (max-width: 560px) {
    .eed-ticket { max-width: none; }
    .eed-page .neo-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .eed-dhead, .eed-drow { grid-template-columns: minmax(0, 1fr) 64px 72px 46px 18px; gap: 4px; }
    .eed-drow input { font-size: 11.5px; padding: 6px 5px; }
    .eed-note-table th { display: block; width: auto; border-bottom: 0; }
    .eed-note-table td { display: block; padding-top: 0; }
}
