/* coupons/index.html - 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; min-height: 100vh; padding-bottom: 70px; }
button { outline: none; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background: none; padding: 0; margin: 0; cursor: pointer; }
button:focus, button:focus-visible, button:active { outline: none; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; text-decoration: none; }
input { -webkit-appearance: none; appearance: none; outline: none; border: none; }

.logo-container { background: #005136; padding: 12px 20px; display: flex; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 100; }
.logo-container img { height: 20px; width: auto; }

.header-content { background: linear-gradient(135deg, #006241 0%, #00704A 100%); color: white; padding: 24px 20px 30px; border-radius: 0 0 24px 24px; margin-bottom: 18px; }
.page-title { font-size: 26px; font-weight: bold; margin-bottom: 6px; }
.page-subtitle { font-size: 14px; opacity: 0.9; line-height: 1.5; }

.stack-section { margin: 0 15px 18px; }
.stack-title { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.stack-count { background: #006241; color: white; font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* 状态卡片：进度 + CTA */
.status-card { background: white; border-radius: 14px; padding: 18px 20px; margin: 0 15px 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.status-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.status-num { font-size: 42px; font-weight: 800; color: #006241; line-height: 1; }
.status-num-total { font-size: 22px; color: #999; font-weight: 600; }
.status-info { flex: 1; }
.status-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 2px; }
.status-desc { font-size: 12px; color: #666; line-height: 1.4; }
.status-progress { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.status-progress-fill { height: 100%; background: linear-gradient(90deg, #006241 0%, #4caf50 100%); border-radius: 4px; transition: width 0.4s ease; }
.status-cta { display: block; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px; background: #006241; color: white; }
.status-cta.disabled { background: #e0e0e0; color: #999; pointer-events: none; }

/* 通用 section */
.section { margin: 0 15px 18px; }
.section-title { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 12px; }

/* 紧凑券项 */
.coupon-list { display: flex; flex-direction: column; gap: 10px; }

.coupon-item { position: relative; display: flex; align-items: stretch; background: white; border-radius: 14px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); overflow: hidden; }
.coupon-item.unused { background: linear-gradient(135deg, #006241 0%, #00704A 100%); color: white; }
.coupon-item.used { background: #f0f0f0; color: #999; }
.coupon-item.expired { background: #f0f0f0; color: #999; }
.coupon-item-left { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 86px; padding-right: 14px; }
.coupon-item-discount { font-size: 32px; font-weight: 800; line-height: 1; }
.coupon-item-off { font-size: 12px; font-weight: 600; margin-top: 2px; opacity: 0.9; }
.coupon-item-divider { width: 1px; background: rgba(0,0,0,0.08); margin: 0 4px; position: relative; }
.coupon-item.unused .coupon-item-divider { background: rgba(255,255,255,0.3); }
.coupon-item-divider::before, .coupon-item-divider::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #f5f5f5; border-radius: 50%; }
.coupon-item.unused .coupon-item-divider::before, .coupon-item.unused .coupon-item-divider::after { background: #f5f5f5; }
.coupon-item-divider::before { top: -6px; }
.coupon-item-divider::after { bottom: -6px; }
.coupon-item-right { flex: 1; padding-left: 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.coupon-item-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.coupon-item-desc { font-size: 12px; opacity: 0.85; line-height: 1.5; }
.coupon-item-code { font-size: 11px; margin-top: 6px; opacity: 0.7; font-family: monospace; }
.coupon-item-source { display: inline-block; font-size: 10px; padding: 1px 6px; background: rgba(255,255,255,0.2); border-radius: 6px; margin-top: 6px; align-self: flex-start; }
.coupon-item.used .coupon-item-source, .coupon-item.expired .coupon-item-source { background: rgba(0,0,0,0.08); }
.coupon-item.used .coupon-item-discount, .coupon-item.used .coupon-item-off, .coupon-item.used .coupon-item-title, .coupon-item.used .coupon-item-desc, .coupon-item.used .coupon-item-code { text-decoration: line-through; opacity: 0.6; }
.coupon-item.used::after, .coupon-item.expired::after { content: 'USED'; position: absolute; top: 50%; right: 16px; transform: translateY(-50%) rotate(-12deg); font-size: 22px; font-weight: 800; color: rgba(0,0,0,0.12); border: 3px solid rgba(0,0,0,0.12); padding: 4px 10px; border-radius: 6px; }

.empty-state { background: white; border-radius: 14px; padding: 40px 20px; text-align: center; color: #999; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

.howto-section { background: white; border-radius: 14px; padding: 20px; margin: 0 15px 18px; }
.howto-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.howto-step { display: flex; gap: 12px; padding: 10px 0; }
.howto-num { width: 26px; height: 26px; background: #006241; color: white; border-radius: 50%; text-align: center; line-height: 26px; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.howto-content { flex: 1; }
.howto-step-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 2px; }
.howto-step-desc { font-size: 12px; color: #666; line-height: 1.5; }

.stack-tip { background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%); border-radius: 12px; padding: 14px 16px; margin: 0 15px 18px; display: flex; gap: 10px; align-items: flex-start; border-left: 4px solid #ff9800; }
.stack-tip-icon { font-size: 22px; }
.stack-tip-text { flex: 1; font-size: 13px; color: #5d4037; line-height: 1.6; }
.stack-tip-text b { color: #e65100; }

.wa-card { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); color: white; border-radius: 14px; padding: 20px; margin: 0 15px 18px; }
.wa-card-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.wa-card-title .wa-icon { flex-shrink: 0; }
.wa-card-desc { font-size: 13px; opacity: 0.95; line-height: 1.5; margin-bottom: 14px; }
.wa-card-steps { background: rgba(255,255,255,0.15); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 12px; line-height: 1.7; }
.wa-card-steps b { display: block; margin-bottom: 4px; font-size: 13px; }
.wa-btn { display: block; background: white; color: #128C7E; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.wa-verify-row { display: flex; gap: 8px; }
.wa-verify-input { flex: 1; padding: 11px 12px; border-radius: 8px; background: rgba(255,255,255,0.95); color: #333; font-size: 14px; text-align: center; font-weight: 600; letter-spacing: 1px; }
.wa-verify-input::placeholder { color: #999; opacity: 1; font-weight: 500; letter-spacing: 0.5px; transition: color 0.15s, opacity 0.15s; }
.wa-verify-input:focus::placeholder { color: transparent; opacity: 0; }
.wa-verify-btn { padding: 11px 18px; background: rgba(255,255,255,0.25); color: white; border-radius: 8px; font-weight: 700; font-size: 14px; }

.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.85); color: white; padding: 14px 22px; border-radius: 10px; font-size: 14px; z-index: 9999; display: none; }
.toast.show { display: block; }

.login-tip { background: white; border-radius: 14px; padding: 30px 20px; text-align: center; margin: 0 15px 18px; }
.login-tip-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 8px; }
.login-tip-desc { font-size: 13px; color: #666; margin-bottom: 16px; }
.login-btn { display: inline-block; background: #006241; color: white; padding: 10px 30px; border-radius: 22px; font-weight: 600; font-size: 14px; }
