:root {
    --primary: #f97316;
    --primary-2: #f43f5e;
    --primary-soft: #fff7ed;
    --success: #10b981;
    --success-soft: #ecfdf5;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --bg: #fbf5ef;
    --card: #ffffff;
    --text: #1e293b;
    --text-2: #64748b;
    --text-3: #94a3b8;
    --border: #e6e8f0;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 32px rgba(249, 115, 22, 0.26);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(1200px 400px at 50% -120px, #ffe9d9 0%, transparent 70%),
        var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 14px 48px;
}

/* 顶部品牌栏 */
.header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 2px 14px;
}
.header .logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
    display: block;
}
.header .brand { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.header .brand-sub { font-size: 12px; color: var(--text-3); }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.h1 { font-size: 20px; font-weight: 700; }
.h2 { font-size: 16px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-2); }
.small { color: var(--text-3); font-size: 13px; }

/* 英雄区 */
.banner {
    background: linear-gradient(135deg, #f97316 0%, #f43f5e 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.banner::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}
.banner .title { font-size: 21px; font-weight: 800; margin-bottom: 5px; letter-spacing: .3px; }
.banner .sub { font-size: 13px; opacity: .88; }

.notice {
    background: var(--warning-soft);
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.field { margin-bottom: 15px; }
.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text);
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field label .opt { color: var(--text-3); font-weight: 400; margin-left: 6px; font-size: 12px; }
.field .hint { display: block; color: var(--text-3); font-size: 12px; margin-top: 5px; }

input[type=text], input[type=password], input[type=number], input[type=tel], textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 15px;
    background: #fafbff;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}
textarea { resize: vertical; min-height: 66px; font-family: inherit; }
input::placeholder, textarea::placeholder { color: #c3c8d4; }

.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-size: 16px;
    font-weight: 650;
    cursor: pointer;
    text-align: center;
    transition: transform .06s, box-shadow .15s, opacity .15s;
    letter-spacing: .3px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}
.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-warn { background: var(--warning); color: #fff; }
.btn + .btn { margin-top: 10px; }

.btn-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 6px;
    object-fit: contain;
}

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.tag-green { background: var(--success-soft); color: #059669; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-red { background: var(--danger-soft); color: #dc2626; }
.tag-orange { background: var(--warning-soft); color: #d97706; }

tr.row-matched { background: #f0fdf4; }
.no-matched {
    background: #bbf7d0;
    color: #065f46;
    font-weight: 650;
    padding: 1px 5px;
    border-radius: 4px;
}

.list-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }

.toast {
    position: fixed;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    background: rgba(17, 24, 39, 0.88);
    color: #fff;
    padding: 13px 22px;
    border-radius: 14px;
    font-size: 14px;
    z-index: 9999;
    max-width: 82%;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    animation: fadein .15s;
}
@keyframes fadein { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.summary-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.summary-item .num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.summary-item .num.warn { color: var(--danger); }
.summary-item .lbl { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 14px;
    background: #fafbff;
    outline: none;
}
.filters .grow { flex: 1; min-width: 130px; }

.scan-box {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 12px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0f172a;
}
.scan-result { text-align: center; padding: 8px 0; }
.scan-result .big { font-size: 20px; font-weight: 750; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 7px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-3); font-weight: 600; white-space: nowrap; font-size: 12px; }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.pagination button {
    border: 1.5px solid var(--border);
    background: #fff;
    border-radius: 10px;
    padding: 7px 16px;
    cursor: pointer;
    color: var(--text);
}
.pagination button:disabled { opacity: .4; }

a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

.pay-img {
    max-width: 200px;
    display: none;
    margin: 0 auto;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 86%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    z-index: 1;
    max-height: 82vh;
    overflow-y: auto;
}
.modal-box .pay-img {
    max-width: 220px;
    margin: 0 auto 12px;
}

.daterange { position: relative; }
.dr-field {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fafbff;
    text-align: left;
    color: var(--text);
    cursor: pointer;
}
.dr-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
    padding: 12px;
    z-index: 20;
}
.dr-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dr-preset {
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
}
.dr-custom { display: flex; align-items: center; gap: 6px; }
.dr-custom input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 13px;
    background: #fafbff;
}


