/* ===== Mobile First Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===== Container (Mobile First) ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    padding: 16px 20px 30px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 30px 40px;
        margin: 20px auto;
        min-height: auto;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    }
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.25;
}
/* 主色调改为 #059FE8 (rgb(5,159,232)) */
h1 { font-size: 1.8rem; color: #059FE8; }
h2 { font-size: 1.4rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ===== Header & Footer ===== */
.header {
    text-align: center;
    padding: 10px 0 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}
.header .logo {
    /* 自适应：最大宽度100%，高度自动，限制最大尺寸 */
    max-width: 100%;
    height: auto;
    /* max-width: 180px;  控制最大宽度，防止过大 */
    margin-bottom: 4px;
}
.header h1 {
    font-size: 1.6rem;
    letter-spacing: 1px;
}
.header p {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer {
    text-align: center;
    padding: 20px 0 10px;
    margin-top: auto;
    color: #aaa;
    font-size: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #444;
}
.form-group label .required {
    color: #059FE8;
    margin-left: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    transition: border-color 0.2s;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #059FE8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 159, 232, 0.1);
}
.form-group input:read-only {
    background: #f0f0f0;
    color: #666;
}

/* ===== Buttons ===== */
.btn-primary {
    background: #059FE8;
    color: #fff;
    border: none;
    padding: 14px 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
}
.btn-primary:active {
    transform: scale(0.98);
    background: #0483c4;
}
.btn-primary:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
    border: none;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
.btn-secondary:active {
    background: #dde0e3;
}

.btn-success {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
.btn-success:active {
    background: #218838;
}

.btn-sms {
    background: #C8102E;
    color: #fff;
    border: none;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-sms:active {
    background: #a00d24;
}
.btn-sms:disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* 行内按钮组合（验证码） */
.sms-row {
    display: flex;
    gap: 10px;
}
.sms-row input {
    flex: 1;
}

/* ===== 新增：登录页提示文字 ===== */
.notice {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    border-left: 4px solid #C8102E;
}
.notice p {
    margin-bottom: 4px;
}
.notice strong {
    color: #059FE8;
}

/* ===== Utility / Helpers ===== */
.text-center { text-align: center; }
.text-muted { color: #888; font-size: 0.85rem; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.hint {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
}
.warning {
    color: #059FE8;
    font-weight: 500;
}
.hidden { display: none !important; }

/* 列表项通用 */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.list-item .item-info {
    flex: 1;
    min-width: 120px;
}
.list-item .item-price {
    font-weight: 700;
    color: #059FE8;
}
.list-item .btn-del {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}
.list-item .btn-del:active {
    color: #059FE8;
}

/* 状态标签 */
.status-paid {
    color: #28a745;
    font-weight: 600;
    font-size: 0.85rem;
}
.status-unpaid {
    color: #ffc107;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== Modal 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-box .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.modal-box .btn-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.modal-box .btn-row .btn-primary,
.modal-box .btn-row .btn-secondary {
    flex: 1;
    padding: 10px 0;
    font-size: 0.95rem;
}

/* ===== Search Results ===== */
.search-results {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    margin-top: 6px;
}
.result-item {
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.1s;
}
.result-item:active {
    background: #f0f0f0;
}
.result-item:last-child {
    border-bottom: none;
}
.result-item strong {
    color: #222;
}

/* ===== Tabs (汇总页) ===== */
.tabs {
    display: flex;
    gap: 0;
    background: #f1f3f5;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    padding: 4px;
    margin-bottom: 0;
}

.tab-content{
    border: #f1f3f5 solid 2px;
    border-bottom-right-radius:10px;
    border-bottom-left-radius:10px;
    padding: 10px;

}

.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.tab-btn.active {
    background: #fff;
    color: #059FE8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tab-btn:active {
    opacity: 0.7;
}

/* ===== 二维码弹窗图片 ===== */
.qr-image-container {
    text-align: center;
    padding: 10px 0;
}
.qr-image-container img {
    width: 180px;
    height: 180px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}