/* 拉锯扯锯 报价系统 - 建造·装修·维修 · 橘黄科技风 v2 */

:root {
    --primary: #ff8c1a;
    --primary-dark: #e67300;
    --primary-glow: #ffb55c;
    --accent: #ffb84d;
    --danger: #ff5c5c;
    --success: #35d07f;
    --text: #e8ecf4;
    --text-light: #9aa3b5;
    --bg-0: #070a12;
    --bg-1: #0d1220;
    --card: rgba(19, 26, 46, .72);
    --border: rgba(255, 149, 44, .25);
    --border-soft: rgba(255,255,255,.08);
    --line: rgba(255,149,44,.10);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background: var(--bg-0);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ 科技感背景层 ============ */
/* 背景容器：多层光效 + 网格 + 粒子 + 电路线，全部 CSS 实现 */
.bg-tech {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        /* 主深色底 */
        radial-gradient(120% 80% at 50% -10%, #111a30 0%, var(--bg-0) 55%);
}

/* 橘色发光光晕（多个，错开位置 + 呼吸动画） */
.bg-tech::before,
.bg-tech::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: glowPulse 7s ease-in-out infinite;
}
.bg-tech::before {
    width: 520px; height: 520px;
    left: -180px; top: -120px;
    background: radial-gradient(circle, rgba(255,140,26,.55), transparent 65%);
}
.bg-tech::after {
    width: 480px; height: 480px;
    right: -160px; bottom: -100px;
    background: radial-gradient(circle, rgba(255,110,0,.4), transparent 65%);
    animation-delay: -3.5s;
}

/* 网格线 */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
}

/* 粒子点阵 */
.bg-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,160,60,.5) 1px, transparent 1.3px),
        radial-gradient(rgba(255,160,60,.25) 1px, transparent 1.3px);
    background-size: 120px 120px, 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: .5;
    animation: particleDrift 20s linear infinite;
}

/* 流动扫描线 */
.bg-scan {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,170,70,.7), transparent);
    box-shadow: 0 0 24px 2px rgba(255,150,50,.35);
    animation: scanMove 6s linear infinite;
}

/* 电路节点连线装饰（角部） */
.bg-circuit {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(255,149,44,.12) 50%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(255,149,44,.12) 50%, transparent 50.5%);
    background-size: 200px 200px;
    -webkit-mask-image: radial-gradient(80% 70% at 50% 50%, transparent 40%, #000 100%);
    mask-image: radial-gradient(80% 70% at 50% 50%, transparent 40%, #000 100%);
    opacity: .4;
}

@keyframes glowPulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: .7; transform: scale(1.12); }
}
@keyframes particleDrift {
    0% { background-position: 0 0, 30px 30px; }
    100% { background-position: 120px 120px, 90px 90px; }
}
@keyframes scanMove {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* ============ 应用容器 ============ */
.app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
}

.hidden { display: none !important; }

/* 头部 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(7,10,18,.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header h1 {
    font-size: 17px;
    font-weight: 600;
    background: linear-gradient(90deg, #ffd9a0, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.back { text-decoration: none; color: var(--primary); font-size: 22px; padding: 0 8px; }
.header-link { text-decoration: none; color: var(--primary-glow); font-size: 14px; }

/* 欢迎 / 登录 */
.welcome, .login { padding: 40px 20px 32px; text-align: center; }

/* Logo */
.logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #ffd9a0, var(--primary), #ff9d3f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(255,140,26,.35));
}

.sub { color: var(--text-light); margin-bottom: 26px; font-size: 15px; letter-spacing: 1px; }
.hello { font-size: 17px; margin: 24px 0; }

/* 业务标签（纯文字几何徽章） */
.biz-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 6px 0 28px;
    flex-wrap: wrap;
}
.biz-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    color: #ffd9a0;
    letter-spacing: 2px;
    background: linear-gradient(180deg, rgba(255,140,26,.12), rgba(255,140,26,.03));
    border: 1px solid var(--border);
    border-radius: 4px;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    box-shadow: inset 0 0 14px rgba(255,140,26,.12);
}
/* 标签左上角科技装饰点 */
.biz-tag::before {
    content: "";
    width: 5px; height: 5px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    margin-right: 2px;
}

.login { text-align: left; }
.login .logo, .login .sub { text-align: center; }
.login .biz-tags { justify-content: center; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-light); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background: rgba(20,27,48,.6);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #5a6276; }
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,140,26,.16), 0 0 22px rgba(255,140,26,.18);
}
.form-group textarea { resize: vertical; }

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

.agreement { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 16px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 13px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, opacity .2s;
    text-align: center;
    letter-spacing: 1px;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-block { width: 100%; margin-bottom: 10px; }
.btn-primary {
    background: linear-gradient(135deg, #ffa63d, #ff7a00);
    color: #2a1404;
    font-weight: 600;
    box-shadow: 0 6px 22px rgba(255,122,0,.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255,122,0,.5); }
.btn-ghost {
    background: rgba(255,255,255,.03);
    color: #cfd6e6;
    border: 1px solid var(--border-soft);
}
.btn-code {
    background: rgba(255,140,26,.08);
    color: var(--primary-glow);
    border: 1px solid var(--border);
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-code:disabled { color: #5a6276; border-color: var(--border-soft); cursor: not-allowed; }

/* 步骤 */
.step { padding: 20px 16px; }
.step-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    background: linear-gradient(90deg, rgba(255,140,26,.1), transparent);
    color: #ffd9a0;
}
.loading, .empty { text-align: center; color: var(--text-light); padding: 40px 0; }

/* 服务卡片 */
.service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service-card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 26px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
}
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(220px 120px at 50% 0%, rgba(255,140,26,.2), transparent 70%);
    opacity: 0;
    transition: opacity .2s;
}
.service-card:active {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 0 26px rgba(255,140,26,.28);
}
.service-card:active::before { opacity: 1; }

/* 服务图标（CSS 几何图标，代替 emoji） */
.service-icon {
    width: 54px; height: 54px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,140,26,.14), rgba(255,140,26,.03));
    box-shadow: 0 0 16px rgba(255,140,26,.18) inset;
    position: relative;
}
.service-icon svg { width: 28px; height: 28px; }
.service-name { font-size: 15px; font-weight: 500; color: #f0f3fb; position: relative; }

/* 工作项列表 */
.item-row {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(6px);
}
.item-info { flex: 1; }
.item-name { font-size: 15px; font-weight: 500; }
.item-price { font-size: 13px; color: var(--primary-glow); margin-top: 2px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary-glow);
}
.qty-btn:active { background: rgba(255,140,26,.2); }
.qty-ctrl input {
    width: 60px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(20,27,48,.6);
    color: var(--text);
}

/* 总价栏 */
.total-bar {
    background: linear-gradient(135deg, rgba(255,140,26,.14), rgba(255,120,0,.05));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 0 18px rgba(255,140,26,.12);
}
.total-bar span { font-size: 14px; color: #ffd9a0; }
.total-bar strong { font-size: 22px; color: #ffb055; text-shadow: 0 0 14px rgba(255,140,26,.45); }

.tip { font-size: 12px; color: var(--text-light); margin: 8px 0 16px; }

/* 订单列表 */
.order-list { padding: 16px; }
.order-card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all .2s;
}
.order-card:active { border-color: var(--primary); box-shadow: 0 0 16px rgba(255,140,26,.2); }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-no { font-size: 13px; color: var(--text-light); font-family: monospace; }
.order-body { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.order-service { font-size: 15px; font-weight: 500; }
.order-total { font-size: 17px; color: #ffb055; font-weight: 600; }
.order-time { font-size: 12px; color: var(--text-light); }

/* 状态标签 */
.status { font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.status-pending { background: rgba(255,160,60,.14); color: #ffb055; }
.status-accepted { background: rgba(80,160,255,.14); color: #7ab8ff; }
.status-done { background: rgba(53,208,127,.14); color: #5fe0a0; }
.status-cancel { background: rgba(255,255,255,.06); color: #8b93a6; }

/* 详情 */
.detail-card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    margin: 16px;
}
.detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.detail-row .label { color: var(--text-light); }
.detail-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #ffd9a0; }
.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-soft);
}
.detail-item:last-child { border-bottom: none; }
.di-name { font-size: 14px; font-weight: 500; }
.di-info { font-size: 12px; color: var(--text-light); }
.di-subtotal { font-size: 14px; font-weight: 500; }
.detail-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-soft);
    font-size: 15px;
}
.detail-total strong { font-size: 20px; color: #ffb055; }
.detail-time { text-align: center; font-size: 12px; color: var(--text-light); margin: 0 16px 20px; }

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(16,20,32,.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transition: all .3s;
    z-index: 999;
    max-width: 80%;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { border-color: rgba(255,92,92,.5); }
.toast-success { border-color: rgba(53,208,127,.5); }
