/* 优机队 UJD - 移动端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}
*::-webkit-scrollbar {
    display: none; /* WebKit */
}

html { background: #fff; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #fff;
    color: #333;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* ===== 顶部 Banner ===== */
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Logo 区域 ===== */
.logo-area {
    text-align: center;
    padding: 30px 0 20px;
    background: #fff;
}

.logo-area img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
}

.logo-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 12px;
}

.logo-subtitle {
    font-size: 13px;
    color: #999;
    letter-spacing: 1.5px;
}

/* ===== 表单输入框 ===== */
.form-container {
    padding: 30px 32px 60px;
    background: #fff;
}

.input-group {
    width: 100%;
    height: 52px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 16px;
    margin-bottom: 18px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group:focus {
    border-color: #4a90d9;
}

.input-group::placeholder {
    color: #bbb;
}

select.input-group {
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 16px center;
    cursor: pointer;
}

textarea.input-group {
    height: 80px;
    padding: 12px 16px;
    resize: none;
}

/* ===== 按钮 ===== */
.btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-login {
    background: #4a90d9;
    margin-bottom: 14px;
}

.btn-register {
    background: #2ecc71;
    margin-bottom: 6px;
}

.btn-green {
    background: #2ecc71;
    margin-top: 14px;
}

.btn-blue {
    background: #4a90d9;
}

.btn-purple {
    background: #9b59b6;
}

.btn-gray {
    background: #aaa;
    margin-top: 10px;
}

.btn-link {
    background: none;
    color: #4a90d9;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    display: block;
    margin: 24px auto;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 12px;
    margin: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.card-header .icon {
    margin-right: 6px;
}

.card img.device-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.card .device-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.card .device-serial {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.card .device-accessories {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    float: right;
    margin-top: -20px;
}

.status-in { background: #2ecc71; }
.status-out { background: #f39c12; }
.status-shipping { background: #3498db; }
.status-pending-verify { background: #999; }
.status-refund { background: #e67e22; }

/* ===== 重要提示 ===== */
.tip-card {
    background: #ffcc80;
    border-radius: 12px;
    margin: 16px;
    padding: 20px 20px 70px;
    display: flex;
    flex-direction: column;
}

.tip-card.red {
    background: #f8d7da;
    color: #721c24;
}

.tip-card .tip-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #e65100;
}

.tip-card.red .tip-title {
    color: #721c24;
}

.tip-card p {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 12px;
    flex: 1;
}

.tip-card .underline {
    text-decoration: underline;
}

/* ===== 用户信息条 ===== */
.user-bar {
    background: #f0f0f0;
    margin: 0 16px;
    border-radius: 10px;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    height: 52px;
}

.btn-logout {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 16px;
    cursor: pointer;
}

/* ===== 页面标题 ===== */
.page-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 16px 0 8px;
    background: #fff;
}

.page-subtitle {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding-bottom: 12px;
    background: #fff;
}

/* ===== 费用明细 ===== */
.cost-list {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 16px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.cost-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    margin-top: 6px;
    border-top: 1px solid #ddd;
    font-weight: bold;
    font-size: 16px;
}

.cost-total .amount {
    color: #e74c3c;
}

/* ===== 信息列表 ===== */
.info-list {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: #999;
}

.info-item .value {
    color: #333;
    text-align: right;
    max-width: 60%;
}

/* ===== 支付方式 ===== */
.payment-list {
    padding: 16px;
}

.payment-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.payment-item.selected {
    border-color: #2ecc71;
}

.payment-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 6px;
}

.payment-name {
    flex: 1;
    font-size: 15px;
}

.payment-desc {
    font-size: 12px;
    color: #999;
}

.payment-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    position: relative;
}

.payment-item.selected .payment-radio {
    border-color: #2ecc71;
    background: #2ecc71;
}

.payment-item.selected .payment-radio::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== 支付成功 ===== */
.success-area {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
    color: #fff;
}

.success-title {
    font-size: 24px;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 8px;
}

.success-amount {
    font-size: 14px;
    color: #999;
}

/* ===== 签名板 ===== */
.signature-area {
    background: #f0f0f0;
    height: 300px;
    margin: 16px;
    border-radius: 12px;
    position: relative;
    cursor: crosshair;
}

.signature-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 24px;
    pointer-events: none;
}

.signature-btns {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.signature-btns .btn-primary {
    flex: 1;
}

/* ===== 横向滚动卡片（主页） ===== */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 16px 5vw;
    gap: 16px;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll .card {
    flex: 0 0 85vw;
    scroll-snap-align: center;
    margin: 0;
    padding: 24px 16px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 216px;
}

/* 主页卡片内容撑满 */
.horizontal-scroll .card .device-img {
    max-height: 120px;
    object-fit: contain;
    flex-shrink: 1;
}

.horizontal-scroll .card .device-name {
    font-size: 14px;
    margin-top: 10px;
}

.horizontal-scroll .card .device-accessories {
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.6;
    text-align: center;
    color: #666;
}

/* 设备信息格式化 */
.horizontal-scroll .card .device-info-label {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
    text-align: center;
    line-height: 1.8;
}

/* ===== 竖向列表（设备列表） ===== */
.vertical-list {
    padding: 16px;
}

.vertical-list .card {
    margin: 0 0 16px 0;
}

/* ===== 合同区域 ===== */
.contract-body {
    padding: 6px 8px;
    max-height: calc(50vh - 8px);
    overflow-y: auto;
    background: #fff;
    font-size: 11px;
    line-height: 1.4;
    border-bottom: 1px solid #ddd;
}

.contract-body h3 {
    font-size: 12px;
    margin: 4px 0 2px;
}

.contract-body .highlight {
    color: #e74c3c;
    font-weight: bold;
}

.contract-body p {
    margin-bottom: 8px;
}

/* ===== 复选框 ===== */
.checkbox-group {
    padding: 4px 12px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.4;
}

.checkbox-item input {
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===== 返回导航 ===== */
.nav-back {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.nav-back .arrow {
    font-size: 18px;
    margin-right: 8px;
}

.nav-back .title {
    font-size: 16px;
    font-weight: bold;
}

/* ===== 金额显示 ===== */
.amount-display {
    text-align: center;
    padding: 20px 0;
}

.amount-display .amount {
    font-size: 36px;
    font-weight: bold;
    color: #333;
}

.amount-display .amount::before {
    content: '¥';
    font-size: 24px;
}

.amount-display .desc {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* ===== 底部固定按钮 ===== */
.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 12px 16px 32px;
    background: transparent;
    box-shadow: none;
    z-index: 100;
}

.bottom-actions .btn-primary {
    margin-bottom: 0;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 80%;
    max-width: 360px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 16px;
    margin-bottom: 20px;
    word-break: break-all;
}

/* ===== 提示条 ===== */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ===== 空设备卡片 ===== */
.empty-card .empty-device-img {
    width: 120px;
    height: 120px;
    margin: 20px auto;
    background: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #ccc;
    font-weight: bold;
}

/* ===== 横屏签名页 ===== */
.signature-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (orientation: landscape) {
    body {
        max-width: 100vw;
    }
    
    .page-title {
        font-size: 18px;
        padding: 10px 0 6px;
        flex-shrink: 0;
    }
    
    .signature-area.landscape-mode {
        margin: 10px 16px;
        height: calc(100vh - 160px);
        min-height: 200px;
        flex: 1;
    }
    
    .signature-btns.landscape-btns {
        padding: 10px 16px;
        gap: 16px;
        max-width: 600px;
        margin: 0 auto;
        flex-shrink: 0;
    }
    
    .signature-btns .btn-primary {
        height: 48px;
        font-size: 16px;
    }
}
