﻿/* ══════════════════════════════════════════
   Invoice 設計 Token
   standalone：base.css 先載入，這裡補 invoice 專屬值
   整合到官網（ASPX）：本區塊即完整基底，無需 base.css
══════════════════════════════════════════ */
:root {
    /* ── Brand Scale ── */
    --brand-950: #2b3345;
    --brand-900: #3c4560;
    --brand-800: #4a5469;
    --brand-700: #5e687f;
    --brand-600: #6b7590;
    --brand-500: #7886a3;
    --brand-400: #9ba4b8;
    --brand-300: #afb7ca;
    --brand-200: #cdd2db;
    --brand-100: #d6dbe4;
    --brand-50: #eceef2;
    --brand-0: #ffffff;
    /* ── Neutral Gray ── */
    --gray-50: #f9fafb;
    /* ── Semantic Text ── */
    --text-primary: #2b3345;
    --text-secondary: #4a5469;
    --text-muted: #7886a3;
    /* ── Surface / Border ── */
    --bg: #f4f6f9;
    --surface: #ffffff;
    --border: #d6dbe4;
    --border-mid: #afb7ca;
    --border-light: rgba(94, 104, 127, 0.15);
    --accent: #5e687f;
    --accent-light: #eaecf2;
    --accent-subtle: #f2f4f8;
    /* ── Highlight / Warn ── */
    --highlight: #ff8b2b;
    --highlight-light: #ffe2cc;
    --warn: #c0392b;
    --warn-light: #fdf3f2;
    /* ── Shadow ── */
    --shadow-sm: 0 1px 4px rgba(74, 84, 105, 0.08);
    --shadow-md: 0 4px 16px rgba(74, 84, 105, 0.12);
    --shadow-lg: 0 12px 40px rgba(74, 84, 105, 0.18);
    --shadow-xl: 0 20px 48px rgba(74, 84, 105, 0.22);
    /* ── Radius ── */
    --radius-md: 0.5rem;
    --radius-xl: 1rem;
    /* ── Invoice 專屬別名 ── */
    --b1: var(--brand-100);
    --b2: var(--brand-300);
    --b3: var(--brand-500);
    --b4: var(--brand-700);
    --b5: var(--brand-800);
    --third: var(--highlight);
    --third-light: var(--highlight-light);
    --radius: var(--radius-xl);
    --radius-sm: var(--radius-md);
}

/* ── 防衛性 Reset：確保父層 CSS 不干擾 ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* !important 覆蓋父層 SiteNew.css 的 body { font-size:.80em } */
html {
    font-size: 16px !important;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ────────── BRAND FONT ────────── */
.brand-font {
    font-family: 'Orbitron', 'Noto Sans TC', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ────────── HERO ────────── */
.hero-section {
    background: linear-gradient(160deg, var(--b1) 0%, var(--brand-200) 50%, var(--brand-50) 100%);
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(94,104,127,0.14), transparent);
        pointer-events: none;
    }

.hero {
    padding: 80px 32px 72px;
    text-align: center;
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--b4);
    margin-bottom: 28px;
    position: relative;
}

    .hero-badge::before,
    .hero-badge::after {
        content: '';
        flex: 0 0 80px;
        height: 1px;
        background: var(--b4);
    }

.hero h1 {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    color: var(--b5);
}

.hero-accent {
    background: linear-gradient(135deg, var(--b4) 0%, var(--b3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.chip {
    background: white;
    border: 1px solid var(--b1);
    color: var(--b4);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
}

/* ────────── LAYOUT ────────── */
.section-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

.sec-num {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--b2);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.sec-title {
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    color: var(--b5);
}

.sec-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 700px;
    line-height: 1.75;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 68px 0;
}


/* ────────── TYPE CARDS ────────── */
.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.type-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    transition: box-shadow .2s;
}

    .type-card:hover {
        box-shadow: 0 8px 32px rgba(74,84,105,.1);
    }

    .type-card.featured {
        border-color: var(--b4);
    }

.rec-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--b5);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 13px;
    border-radius: 100px;
}

.type-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    background: var(--accent-subtle);
}

.type-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--b5);
}

.type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 14px;
}

    .type-tag.dark-tag {
        background: var(--accent-light);
        color: var(--b4);
    }

    .type-tag.mid-tag {
        background: var(--third-light);
        color: var(--third);
    }

.type-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.72;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .feature-list li {
        font-size: 13px;
        color: var(--text-secondary);
        padding-left: 18px;
        position: relative;
        line-height: 1.5;
    }

        .feature-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: var(--b4);
            font-weight: 700;
        }

    .feature-list.blue li::before {
        color: var(--third);
    }

/* ────────── MACHINE CALLOUT ────────── */
.machine-callout {
    background: var(--surface);
    border: 1.5px solid var(--b3);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 32px 0;
}

    .machine-callout .icon-big {
        font-size: 36px;
        flex-shrink: 0;
    }

    .machine-callout h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 8px;
        color: var(--b5);
    }

    .machine-callout p {
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.72;
    }

    .machine-callout strong {
        color: var(--b4);
    }

/* ────────── COMPARE TABLE ────────── */

.th-sub {
    font-weight: 400;
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: 0;
}

.cell-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.fee-line {
    line-height: 1.4;
}

    .fee-line + .fee-line {
        margin-top: 4px;
    }

.cell-sub-inline {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 4px;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 16px;
}

    /* ────────── THEAD ────────── */

    .compare-table thead th {
        padding: 14px 20px;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-align: center;
        vertical-align: middle;
        background: var(--b4);
        color: #fff;
    }

        /* 左上角標題：靠左 + 垂直置中 */
        .compare-table thead th:first-child {
            background: var(--b4);
            color: #fff;
            text-align: left;
            vertical-align: middle;
            width: 18%;
        }

        .compare-table thead th.col-a {
            background: var(--b4);
            color: #fff;
            border-left: 1px solid rgba(255,255,255,0.2);
        }

        .compare-table thead th.col-b {
            background: var(--b4);
            color: #fff;
            border-left: 1px solid rgba(255,255,255,0.2);
        }

    /* ────────── TBODY ────────── */

    /* 全部內容統一水平＋垂直置中 */
    .compare-table tbody td {
        padding: 13px 20px;
        font-size: 14px;
        line-height: 1.4;
        color: var(--text-secondary);
        border-top: 1px solid var(--border);
        text-align: center;
        vertical-align: middle;
    }

/* 01 區塊表格：內文靠左對齊（標題不受影響） */
.type-compare-table tbody td {
    text-align: left;
}

/* 第一欄：靠左 + 垂直置中 */
.compare-table tbody td:first-child {
    background: var(--accent-subtle);
    font-weight: 600;
    color: var(--b5);
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

/* 第二欄開始加分隔線 */
.compare-table tbody td + td {
    border-left: 1px solid var(--border);
}

/* hover */
.compare-table tbody tr:hover td {
    background: var(--gray-50);
}

    .compare-table tbody tr:hover td:first-child {
        background: var(--accent-light);
    }

/* ────────── THIRD PARTY STYLE ────────── */

.third-cost {
    color: var(--third);
    font-weight: 600;
    font-size: 14px;
}

.third-note {
    font-size: 12px;
    color: var(--third);
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* ────────── TAG ────────── */

.tag-rec,
.tag-ext {
    display: inline-block;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 6px;
}

/* ────────── BANNER ────────── */

.third-banner {
    background: var(--b1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 0;
}

.third-banner-icon {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: var(--b3);
    flex-shrink: 0;
    align-self: center;
    line-height: 1;
}

.third-banner p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    text-align: left;
}

.third-banner strong {
    color: var(--b5);
}

/* ────────── INVOICE SAMPLE ────────── */
.invoice-sample {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.sample-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--b3);
    text-transform: uppercase;
}

.sample-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 100px;
    background: var(--accent-subtle);
    border: 1.5px dashed var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 16px;
}

    .sample-placeholder span {
        font-size: 28px;
    }

    .sample-placeholder p {
        font-size: 12px;
        color: var(--text-muted);
        text-align: center;
        line-height: 1.6;
        margin: 0;
    }

.sample-row td {
    vertical-align: top;
}

.sample-img-wrap {
    width: 130px;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 2px solid var(--b2);
    box-shadow: var(--shadow-lg);
}

.sample-img {
    width: 100%;
    height: auto;
    display: block;
    padding: 0px;
}

/* ────────── APPLY STEPS ────────── */
.apply-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.apply-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--b4);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

    .step-num.blue-num {
        background: var(--third-light);
        color: var(--third);
    }

.apply-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--b5);
}

.apply-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.72;
    margin-bottom: 12px;
}

.apply-card .inner-note {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    line-height: 1.65;
}

    .apply-card .inner-note a {
        color: var(--third);
    }

/* ────────── FAQ ────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-q {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 700;
    color: var(--b5);
    background: var(--accent-subtle);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .15s;
}

    .faq-q::-webkit-details-marker {
        display: none;
    }

.faq-item[open] > .faq-q {
    background: var(--accent-light);
    border-bottom: 1px solid var(--border);
}

.faq-q:hover {
    background: var(--accent-light);
}

.faq-q > span:nth-child(2) {
    flex: 1;
}

.faq-chevron {
    margin-left: auto;
    color: var(--b3);
    font-size: 12px;
    transition: transform .2s;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 22px;
}

    .faq-a > div {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: 1;
    }

.faq-badge {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--b4);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

    .faq-badge.question {
        background: var(--accent-light);
        color: var(--b4);
    }

    .faq-badge.answer {
        font-size: 14px;
        font-weight: 700;
        background: var(--accent-light);
        color: var(--b4);
    }

.faq-a p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
}

.faq-contrast {
    margin-top: 4px;
}

.faq-compare {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.faq-compare-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.col-receipt {
    flex: 0 0 130px;
}

.col-handwritten {
    flex: 1;
}

.faq-compare-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
}

.tag-yes {
    background: var(--accent-light);
    color: var(--b4);
}

.tag-no {
    background: var(--warn-light);
    color: var(--warn);
}

/* 直向收銀機發票：固定寬度，完整等比顯示 */
.faq-compare-img-receipt {
    width: 130px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--b2);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

    .faq-compare-img-receipt img {
        width: 100%;
        height: auto;
        display: block;
    }

/* 橫向手開發票：全寬等比顯示 */
.faq-compare-img-handwritten {
    width: 80%;
    border-radius: var(--radius-sm);
    border: 2px solid var(--b2);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

    .faq-compare-img-handwritten img {
        width: 100%;
        height: auto;
        display: block;
    }

.faq-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--b4);
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    text-decoration: none;
    transition: background .2s, color .2s;
    align-self: flex-start;
}

    .faq-link i {
        font-size: 13px;
        line-height: 1;
    }

    .faq-link:hover {
        background: var(--accent);
        color: #fff;
    }

/* ────────── MANUAL LINKS ────────── */
.manual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.manual-link {
    display: flex;
    align-items: center;
    gap: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 15px 17px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

    .manual-link:hover {
        border-color: var(--b3);
        box-shadow: 0 4px 16px rgba(74,84,105,.1);
        transform: translateY(-1px);
    }

.ml-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ml-num {
    font-size: 10px;
    font-weight: 700;
    color: var(--b2);
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.ml-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--b5);
    line-height: 1.4;
}

.ml-arrow {
    margin-left: auto;
    color: var(--b2);
    font-size: 13px;
    flex-shrink: 0;
}

/* ────────── TABLE SCROLL WRAPPER ────────── */
.table-scroll-wrap {
    margin-bottom: 16px;
}

.table-scroll-hint {
    display: none;
    font-size: 14px;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 6px;
    gap: 5px;
}

    .table-scroll-hint i {
        font-size: 11px;
    }

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

    .table-scroll .compare-table {
        min-width: 560px;
        margin-bottom: 0;
    }

/* ────────── UTILITIES ────────── */
.text-fw-bold {
    font-weight: 700;
}

.text-highlight {
    color: var(--highlight);
}

/* ────────── RESPONSIVE ────────── */

/* ── Tablet ≤ 860px ── */
@media (max-width: 860px) {
    .faq-compare {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .col-receipt {
        flex: unset;
        width: 140px;
    }

    .col-handwritten {
        flex: unset;
        width: 100%;
        max-width: 480px;
    }
}

/* ── Mobile ≤ 600px ── */
@media (max-width: 600px) {
    .table-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        padding: 44px 18px 36px;
    }

        .hero h1 {
            font-size: 26px;
        }

    .hero-sub {
        font-size: 14px;
    }

    .section-wrap {
        padding: 36px 16px 48px;
    }

    .divider {
        margin: 44px 0;
    }

    /* grids */
    .apply-grid {
        grid-template-columns: 1fr;
    }

    /* sample images in table */
    .sample-img-wrap {
        width: 110px;
    }

    /* FAQ */
    .faq-q {
        padding: 13px 15px;
        font-size: 14px;
        gap: 10px;
    }

    .faq-a {
        padding: 15px 15px;
        gap: 10px;
    }

        .faq-a p {
            font-size: 13px;
        }

    .faq-compare {
        gap: 16px;
    }

    .col-receipt {
        width: 120px;
    }

    .col-handwritten {
        max-width: 100%;
    }

    /* apply cards */
    .apply-card {
        padding: 20px 18px;
    }

    /* compare table fee cell: stack sub text under main text */
    .cell-sub-inline {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* ── Small mobile ≤ 400px ── */
@media (max-width: 400px) {
    .hero {
        padding: 36px 14px 28px;
    }

        .hero h1 {
            font-size: 26px;
        }

    .hero-sub {
        font-size: 13px;
    }

    .section-wrap {
        padding: 36px 12px 40px;
    }

    .hero-chips {
        gap: 6px;
    }

    .chip {
        font-size: 11px;
        padding: 5px 12px;
    }

    .faq-q {
        font-size: 13px;
    }

    .sample-img-wrap {
        width: 90px;
    }
}
