* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== 功能面板: 施工图纸 + 3D状态 + 相机机位 ===== */
.aihome-func-panels {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.func-panel {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.func-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    user-select: none;
}
.func-panel-header:hover { background: #f0f0f0; }
.func-badge {
    background: var(--accent);
    color: #333;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.func-refresh-btn {
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}
.func-refresh-btn:hover { background: #eee; }
.func-panel-body {
    padding: 12px 16px;
    max-height: 400px;
    overflow-y: auto;
}

/* 图纸列表 */
.drawing-group { margin-bottom: 12px; }
.drawing-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    padding: 4px 0 6px;
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
}
.drawing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
}
.drawing-item:hover { background: #f9f9f9; }
.drawing-name { font-size: 13px; color: #333; }
.drawing-meta { font-size: 11px; color: #999; }
.drawing-dl-btn {
    padding: 3px 10px;
    border: 1px solid var(--accent-dark);
    border-radius: 4px;
    background: #fff;
    color: var(--accent-dark);
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
}
.drawing-dl-btn:hover { background: var(--accent-dark); color: #fff; }

/* 相机机位网格 */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}
.camera-card {
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
}
.camera-card-name { font-weight: 700; color: #222; margin-bottom: 4px; }
.camera-card-desc { color: #666; font-size: 11px; margin-bottom: 4px; }
.camera-card-meta { color: #999; font-size: 10px; }

/* GPU 状态网格 */
.gpu-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.gpu-status-item {
    background: #f9fafb;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}
.gpu-status-label { font-size: 11px; color: #999; margin-bottom: 4px; }
.gpu-status-value { font-size: 14px; font-weight: 700; }
.gpu-status-ok { color: #22c55e; }
.gpu-status-no { color: #ef4444; }

:root {
    --bg-dark: #f5f5f5;
    --bg-panel: #ffffff;
    --bg-card: #fff9e6;
    --bg-hover: #fff3cc;
    --bg-active: #ffecb3;
    --accent: #FFD100;
    --accent-dark: #F5A623;
    --accent-glow: rgba(255,209,0,0.15);
    --success: #4caf50;
    --warning: #FF3B30;
    --danger: #FF3B30;
    --text: #222222;
    --text-sec: #666666;
    --text-dim: #999999;
    --border: #f0e0b0;
    --border-light: #f5eacc;
    --canvas-bg: #fffdf5;
    --topbar-h: 48px;
    --red: #FF3B30;
    --orange: #FF9500;
    --pink: #FF2D55;
    --blue: #007AFF;
    --purple: #AF52DE;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

/* ===== LOGIN ===== */
.login-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: linear-gradient(135deg, #FFD100, #F5A623);
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    width: 400px; background: #fff; border-radius: 16px;
    padding: 40px 32px; border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.brand-logo {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px;
    background: linear-gradient(135deg, #FFD100, #F5A623);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: bold; color: #fff;
}
.login-brand h1 { font-size: 18px; color: #222; margin-bottom: 4px; }
.login-brand p { font-size: 12px; color: var(--text-sec); }
.login-tabs { display: flex; gap: 0; margin-bottom: 20px; background: #f5f5f5; border-radius: 8px; padding: 3px; }
.ltab {
    flex: 1; text-align: center; padding: 8px; border-radius: 6px;
    color: var(--text-sec); cursor: pointer; font-size: 13px; transition: all .2s;
}
.ltab.active { background: #FFD100; color: #222; font-weight: 600; }
.login-panel { display: none; }
.login-panel.active { display: block; }
.lfield { margin-bottom: 14px; position: relative; }
.lfield label { display: block; margin-bottom: 4px; color: var(--text-sec); font-size: 12px; }
.lfield input, .lfield select {
    width: 100%; padding: 10px 12px 10px 36px; border: 1px solid #e0e0e0;
    border-radius: 8px; font-size: 13px; background: #fafafa; color: var(--text);
    transition: border-color .2s;
}
.lfield input:focus, .lfield select:focus { outline: none; border-color: #FFD100; box-shadow: 0 0 0 2px rgba(255,209,0,0.2); }
.licon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.lfield label ~ .licon { top: calc(50% + 12px); }
.lfield-sms { display: flex; gap: 8px; }
.lfield-sms input { flex: 1; }
.sms-btn {
    white-space: nowrap; padding: 8px 12px; background: #FFD100; color: #222;
    border: none; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 600;
}
.sms-btn:disabled { opacity: .5; cursor: not-allowed; }
.lbtn {
    width: 100%; padding: 11px; background: linear-gradient(135deg, #FFD100, #F5A623);
    color: #222; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: opacity .2s; margin-top: 6px;
}
.lbtn:hover { opacity: .9; }
.login-foot { text-align: center; margin-top: 16px; }
.login-foot a { color: #F5A623; text-decoration: none; font-size: 12px; }

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-h); background: linear-gradient(90deg, #FFD100, #F5A623); border-bottom: none;
    display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
    position: relative; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.topbar-logo {
    font-size: 15px; font-weight: bold; color: #222;
    letter-spacing: 1px; white-space: nowrap;
}
.topbar-nav { display: flex; gap: 2px; }
.tnav {
    padding: 6px 16px; border-radius: 20px; color: #555;
    cursor: pointer; font-size: 13px; transition: all .15s; text-decoration: none;
}
.tnav:hover { color: #222; background: rgba(255,255,255,0.3); }
.tnav.active { color: #222; background: rgba(255,255,255,0.5); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { color: #333; cursor: pointer; font-size: 13px; }
.topbar-user:hover { color: #222; }
.topbar-logout {
    padding: 4px 12px; background: rgba(255,255,255,0.3); color: #333; border: none;
    border-radius: 20px; cursor: pointer; font-size: 12px;
}
.topbar-logout:hover { color: var(--danger); background: rgba(255,255,255,0.5); }

/* ===== WORKSPACE ===== */
.workspace { height: calc(100vh - var(--topbar-h)); overflow: visible; background: var(--bg-dark); }
.view { display: none; height: 100%; }
.view.active { display: block; }

/* ===== HOME VIEW ===== */
.home-dashboard { padding: 24px 32px; overflow-y: auto; height: 100%; }
.dash-welcome { margin-bottom: 28px; }
.dash-welcome h2 { font-size: 22px; color: #222; margin-bottom: 6px; }
.dash-welcome p { color: var(--text-sec); font-size: 14px; }
.dash-section { margin-bottom: 28px; }
.dash-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dash-title h3 { font-size: 15px; color: #222; }
.dash-title a { color: #F5A623; text-decoration: none; font-size: 12px; }
.pkg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pkg-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 18px; cursor: pointer; transition: all .2s;
}
.pkg-card:hover { border-color: #FFD100; box-shadow: 0 4px 16px rgba(255,209,0,0.2); transform: translateY(-2px); }
.pkg-card .pk-name { font-size: 14px; font-weight: 600; color: #222; margin-bottom: 4px; }
.pkg-card .pk-desc { font-size: 11px; color: var(--text-sec); margin-bottom: 10px; }
.pkg-card .pk-price { font-size: 20px; color: var(--red); font-weight: bold; }
.pkg-card .pk-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.pkg-card .pk-tag { background: rgba(255,209,0,0.15); color: #F5A623; padding: 2px 8px; border-radius: 3px; font-size: 10px; }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tpl-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 0; cursor: pointer; transition: all .2s; overflow: hidden;
}
.tpl-card:hover { border-color: #FFD100; box-shadow: 0 4px 16px rgba(255,209,0,0.2); transform: translateY(-2px); }
.tpl-preview {
    height: 80px; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.tpl-preview .tpl-ico { font-size: 36px; }
.tpl-colors {
    position: absolute; bottom: 6px; right: 8px; display: flex; gap: 3px;
}
.tpl-colors span { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.tpl-card .tpl-name { font-size: 13px; font-weight: 600; color: #222; padding: 8px 10px 2px; }
.tpl-card .tpl-desc { font-size: 10px; color: var(--text-sec); padding: 0 10px 4px; line-height: 1.4; }
.tpl-card .tpl-tags { padding: 2px 10px; display: flex; gap: 3px; flex-wrap: wrap; }
.tpl-card .tpl-tag { background: rgba(255,209,0,0.15); color: #F5A623; padding: 1px 6px; border-radius: 3px; font-size: 9px; }
.tpl-card .tpl-scene { font-size: 9px; color: var(--text-dim); padding: 2px 10px 8px; }
.ai-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ai-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 18px 14px; cursor: pointer; transition: all .2s;
}
.ai-card:hover { border-color: #FFD100; box-shadow: 0 4px 16px rgba(255,209,0,0.2); }
.ai-ico { font-size: 28px; margin-bottom: 8px; }
.ai-label { font-size: 13px; font-weight: 600; color: #222; margin-bottom: 4px; }
.ai-desc { font-size: 11px; color: var(--text-sec); }

/* ===== DESIGN VIEW ===== */
.design-layout { display: flex; height: 100%; position: relative; }

.design-left {
    width: 320px; background: #fff; border-right: 1px solid #eee;
    display: flex; flex-direction: column; flex-shrink: 0; z-index: 5;
    transition: width 0.3s, margin-left 0.3s;
}
.design-left.collapsed { width: 0; margin-left: -320px; overflow: hidden; }
.dl-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #eee; background: #fffdf5;
}
.dl-header h3 { font-size: 15px; color: #222; }
.dl-toggle {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid #eee;
    background: #fff; cursor: pointer; font-size: 12px; color: #999;
    display: flex; align-items: center; justify-content: center;
}
.dl-toggle:hover { border-color: #FFD100; color: #F5A623; }
.dl-body { flex: 1; overflow-y: auto; padding: 0; }
.dl-section { border-bottom: 1px solid #f0f0f0; }
.dl-section-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; font-size: 13px; font-weight: 600; color: #222;
    cursor: pointer; background: #fafafa; user-select: none;
}
.dl-section-title:hover { background: #fffdf5; }
.dl-section-title span { font-size: 10px; color: #999; transition: transform 0.2s; }
.dl-section.collapsed .dl-section-title span { transform: rotate(-90deg); }
.dl-section.collapsed .dl-section-body { display: none; }
.dl-section-body { padding: 12px 16px; }
.dl-field { margin-bottom: 12px; }
.dl-field label { display: block; font-size: 12px; color: #666; margin-bottom: 6px; }
.dl-field select {
    width: 100%; padding: 8px 10px; border: 1px solid #eee; border-radius: 8px;
    background: #fafafa; font-size: 12px; color: #222; cursor: pointer;
}
.dl-field select:focus { outline: none; border-color: #FFD100; }
.dl-size-row { display: flex; align-items: center; gap: 8px; }
.dl-size-input {
    flex: 1; display: flex; align-items: center; gap: 4px;
    border: 1px solid #eee; border-radius: 8px; padding: 0 8px; background: #fafafa;
}
.dl-size-input span { font-size: 11px; color: #999; white-space: nowrap; }
.dl-size-input input {
    flex: 1; width: 100%; padding: 8px 0; border: none; background: transparent;
    font-size: 13px; color: #222; text-align: center;
}
.dl-size-input input:focus { outline: none; }
.dl-size-x { font-size: 13px; color: #ccc; }
.dl-opening-row { display: flex; gap: 6px; }
.dl-open-btn {
    flex: 1; padding: 8px 0; border: 1px solid #eee; border-radius: 8px;
    background: #fafafa; font-size: 11px; color: #666; cursor: pointer; text-align: center;
}
.dl-open-btn:hover { border-color: #FFD100; }
.dl-open-btn.active { background: #FFD100; border-color: #F5A623; color: #222; font-weight: 600; }
.dl-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dl-style-item {
    padding: 8px 4px; border: 1px solid #eee; border-radius: 8px;
    text-align: center; cursor: pointer; font-size: 11px; transition: all 0.15s;
}
.dl-style-item:hover { border-color: #FFD100; }
.dl-style-item.active { border-color: #FFD100; background: rgba(255,209,0,0.1); color: #F5A623; font-weight: 600; }
.dl-style-icon { font-size: 20px; margin-bottom: 4px; }
.dl-style-name { font-size: 10px; }
.dl-mat-cat { margin-bottom: 10px; }
.dl-mat-cat-title { font-size: 11px; color: #999; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #f0f0f0; }
.dl-mat-options { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-mat-opt {
    padding: 4px 10px; border: 1px solid #eee; border-radius: 12px;
    font-size: 11px; cursor: pointer; background: #fafafa; color: #666;
}
.dl-mat-opt:hover { border-color: #FFD100; }
.dl-mat-opt.active { border-color: #FFD100; background: rgba(255,209,0,0.1); color: #F5A623; font-weight: 600; }
.dl-acc-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.dl-acc-item:last-child { border-bottom: none; }
.dl-acc-name { font-size: 12px; font-weight: 600; color: #222; }
.dl-acc-cat { font-size: 10px; color: #999; }
.dl-acc-qty { display: flex; align-items: center; gap: 6px; }
.dl-acc-qty button {
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid #eee;
    background: #fafafa; cursor: pointer; font-size: 14px; color: #666;
    display: flex; align-items: center; justify-content: center;
}
.dl-acc-qty button:hover { border-color: #FFD100; color: #F5A623; }
.dl-acc-qty span { font-size: 13px; min-width: 20px; text-align: center; font-weight: 600; }
.dl-acc-levels { display: flex; gap: 4px; margin-top: 4px; }
.dl-acc-lvl {
    padding: 2px 8px; border: 1px solid #eee; border-radius: 10px;
    font-size: 10px; cursor: pointer; background: #fafafa; color: #666;
}
.dl-acc-lvl:hover { border-color: #FFD100; }
.dl-acc-lvl.active { background: #FFD100; border-color: #F5A623; color: #222; font-weight: 600; }

.design-center { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dc-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 12px; background: #fff; border-bottom: 1px solid #eee;
}
.dc-toolbar-left { display: flex; gap: 4px; }
.dc-toolbar-right { display: flex; gap: 6px; }
.dc-tab {
    padding: 6px 14px; border: 1px solid #eee; border-radius: 20px;
    background: #fafafa; font-size: 12px; color: #666; cursor: pointer;
}
.dc-tab:hover { border-color: #FFD100; color: #F5A623; }
.dc-tab.active { background: #FFD100; border-color: #F5A623; color: #222; font-weight: 600; }
.dc-btn {
    padding: 6px 12px; border: 1px solid #eee; border-radius: 20px;
    background: #fafafa; font-size: 11px; color: #666; cursor: pointer;
}
.dc-btn:hover { border-color: #FFD100; color: #F5A623; }
.dc-content { flex: 1; position: relative; overflow: hidden; }
.dc-view { position: absolute; inset: 0; display: none; }
.dc-view.active { display: block; }
#dc-3d { width: 100%; height: 100%; }
#dc-3d iframe { width: 100%; height: 100%; border: none; display: block; }
.dc-2d-container { width: 100%; height: 100%; position: relative; background: #f8f8f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#design-2d-canvas { width: 100%; height: 100%; display: block; }
.dc-2d-empty, .dc-preview-empty {
    text-align: center; color: #999;
}
.dc-2d-empty h3, .dc-preview-empty h3 { font-size: 16px; color: #222; margin: 8px 0 4px; }
.dc-2d-empty p, .dc-preview-empty p { font-size: 13px; }
.dc-preview-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    padding: 16px; width: 100%; height: 100%; overflow-y: auto; align-content: start;
}
.dc-preview-card {
    border: 1px solid #eee; border-radius: 10px; overflow: hidden; cursor: pointer;
}
.dc-preview-card img { width: 100%; height: 160px; object-fit: cover; }
.dc-preview-card .dc-preview-name { padding: 8px 10px; font-size: 12px; font-weight: 600; color: #222; }

.design-right {
    width: 300px; background: #fff; border-left: 1px solid #eee;
    display: flex; flex-direction: column; flex-shrink: 0; z-index: 5;
    transition: width 0.3s, margin-right 0.3s;
}
.design-right.collapsed { width: 0; margin-right: -300px; overflow: hidden; }
.dr-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #eee; background: #fffdf5;
}
.dr-header h3 { font-size: 15px; color: #222; }
.dr-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.dr-config-summary { margin-bottom: 12px; }
.dr-summary-item {
    display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px;
}
.dr-summary-item span { color: #999; }
.dr-summary-item strong { color: #222; }
.dr-price-section { margin-bottom: 12px; }
.dr-price-title {
    font-size: 12px; font-weight: 600; color: #222; padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 6px;
}
.dr-price-list { font-size: 11px; }
.dr-price-row {
    display: flex; justify-content: space-between; padding: 3px 0; color: #666;
}
.dr-price-row .dr-price-val { color: #222; font-weight: 500; }
.dr-price-subtotal {
    display: flex; justify-content: space-between; padding: 6px 0;
    font-size: 12px; border-top: 1px dashed #eee; margin-top: 4px;
}
.dr-price-subtotal strong { color: #F5A623; }
.dr-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-top: 2px solid #FFD100; margin-top: 8px;
}
.dr-total span { font-size: 14px; font-weight: 600; color: #222; }
.dr-total-price { color: #FF3B30; font-weight: 700; }
.dr-total-price span { font-size: 14px; color: #FF3B30; }
.dr-total-price strong { font-size: 28px; }
.dr-actions { display: flex; gap: 8px; margin-top: 8px; }
.dr-actions .prop-btn { flex: 1; margin-top: 0; }

.prop-btn {
    display: block; width: 100%; padding: 8px; margin-top: 6px; border: 1px solid #eee;
    border-radius: 8px; background: #fafafa; color: #666; cursor: pointer;
    font-size: 12px; text-align: center; transition: all .15s;
}
.prop-btn:hover { border-color: #FFD100; color: #F5A623; }
.prop-btn-primary { background: #FFD100; border-color: #FFD100; color: #222; font-weight: 600; }
.prop-btn-primary:hover { background: #F5A623; }
.empty-hint { font-size: 11px; color: var(--text-dim); text-align: center; padding: 8px; }

/* ===== QUOTE VIEW ===== */
.quote-layout { padding: 24px 32px; overflow-y: auto; height: 100%; }
.quote-empty { text-align: center; padding: 60px 20px; }
.qe-icon { font-size: 48px; margin-bottom: 12px; }
.quote-empty h3 { color: #222; margin-bottom: 6px; }
.quote-empty p { color: var(--text-sec); font-size: 13px; margin-bottom: 16px; }
.q-section {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 18px; margin-bottom: 14px;
}
.q-section h3 { font-size: 14px; color: #222; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.q-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.q-table th { background: #fff9e6; padding: 7px 8px; text-align: left; font-weight: 600; color: var(--text-sec); }
.q-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }
.q-table .r { text-align: right; }
.q-total {
    background: linear-gradient(135deg, #FFD100, #F5A623);
    border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 14px;
}
.q-total .qt-label { font-size: 13px; color: rgba(0,0,0,.5); }
.q-total .qt-price { font-size: 36px; font-weight: bold; color: #222; }
.q-actions { display: flex; gap: 10px; margin-top: 16px; }
.q-actions .prop-btn { flex: 1; }

/* ===== ORDERS VIEW ===== */
.orders-layout { padding: 24px 32px; overflow-y: auto; height: 100%; }
.orders-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.orders-header h3 { font-size: 16px; color: #222; }
.order-filters { display: flex; gap: 4px; }
.ofbtn {
    padding: 5px 14px; background: #fff; border: 1px solid #eee;
    border-radius: 20px; color: var(--text-sec); cursor: pointer; font-size: 12px;
}
.ofbtn.active { background: #FFD100; border-color: #FFD100; color: #222; font-weight: 600; }
.ord-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 16px; margin-bottom: 10px;
}
.ord-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.ord-id { font-size: 12px; color: var(--text-dim); }
.ord-status { font-size: 11px; padding: 2px 8px; border-radius: 12px; }
.ord-status.pending { background: rgba(255,149,0,.1); color: var(--orange); }
.ord-status.confirmed { background: rgba(76,175,80,.1); color: var(--success); }
.ord-status.completed { background: rgba(255,209,0,.1); color: #F5A623; }
.ord-info { font-size: 12px; color: var(--text-sec); margin-bottom: 6px; }
.ord-price { font-size: 18px; color: var(--red); font-weight: bold; }
.ord-time { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.ord-unread { background: #fffdf5; }

/* ===== PROFILE VIEW ===== */
.profile-layout { padding: 24px 32px; max-width: 600px; }
.profile-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 24px; display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.pc-avatar { font-size: 40px; }
.pc-info h3 { font-size: 16px; color: #222; }
.pc-info p { font-size: 12px; color: var(--text-sec); }
.profile-menu { display: flex; flex-direction: column; gap: 4px; }
.pm-item {
    padding: 12px 16px; background: #fff; border: 1px solid #f0e0b0;
    border-radius: 12px; cursor: pointer; font-size: 13px; transition: all .15s;
}
.pm-item:hover { border-color: #FFD100; color: #F5A623; }
.pm-item span { margin-right: 10px; }
.pm-logout { color: var(--danger); }
.pm-logout:hover { border-color: var(--danger); }

.tnav-admin { background: rgba(255,255,255,0.5); color: #222 !important; border-radius: 20px; font-weight: 600; }

.admin-layout { display: flex; height: 100%; }
.admin-sidebar {
    width: 200px; background: #fff; border-right: 1px solid #eee;
    padding: 20px 12px; flex-shrink: 0; overflow-y: auto; max-height: 100vh;
}
.admin-sidebar h3 { font-size: 14px; color: #222; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.anav {
    padding: 8px 12px; border-radius: 8px; color: var(--text-sec); cursor: pointer;
    font-size: 13px; transition: all .15s; text-decoration: none;
}
.anav:hover { background: #fff9e6; color: #222; }
.anav.active { background: #FFD100; color: #222; font-weight: 600; }
.admin-main { flex: 1; overflow-y: auto; padding: 20px; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    padding: 16px; text-align: center;
}
.stat-card .sc-val { font-size: 28px; font-weight: bold; color: #F5A623; }
.stat-card .sc-label { font-size: 12px; color: var(--text-sec); margin-top: 4px; }

.adm-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
.adm-table th { background: #fff9e6; padding: 8px 10px; text-align: left; color: var(--text-sec); font-weight: 600; }
.adm-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.adm-table tr:hover td { background: #fffdf5; }

.adm-btn {
    padding: 4px 10px; border-radius: 20px; border: 1px solid #eee;
    background: #fafafa; color: var(--text-sec); cursor: pointer; font-size: 11px;
    margin: 0 2px;
}
.adm-btn:hover { border-color: #FFD100; color: #F5A623; }
.adm-btn-danger { color: var(--danger); }
.adm-btn-danger:hover { border-color: var(--danger); }
.adm-btn-primary { background: #FFD100; border-color: #FFD100; color: #222; font-weight: 600; }
.adm-btn-primary:hover { background: #F5A623; }

.adm-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.adm-toolbar h4 { font-size: 14px; color: #222; }

.adm-form { background: #fff; border: 1px solid #f0e0b0; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.adm-form h5 { font-size: 13px; color: #F5A623; margin-bottom: 10px; }
.adm-row { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.adm-field { flex: 1; min-width: 150px; }
.adm-field label { display: block; font-size: 11px; color: var(--text-sec); margin-bottom: 3px; }
.adm-field input, .adm-field select, .adm-field textarea {
    width: 100%; padding: 6px 10px; border: 1px solid #eee; border-radius: 8px;
    background: #fafafa; color: var(--text); font-size: 12px;
}
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus { outline: none; border-color: #FFD100; }

.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.price-card {
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px; padding: 14px;
}
.price-card h5 { font-size: 13px; color: #F5A623; margin-bottom: 8px; }
.price-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.price-item:last-child { border-bottom: none; }
.price-item input { width: 80px; padding: 3px 6px; border: 1px solid #eee; border-radius: 6px; background: #fafafa; color: var(--text); font-size: 11px; text-align: right; }
.price-item input:focus { outline: none; border-color: #FFD100; }
.style-pdpill {
    padding: 4px 10px; border: 1px solid #eee; border-radius: 16px;
    background: #fff; color: #555; font-size: 11px; cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.style-pdpill:hover { border-color: #F5A623; color: #F5A623; background: rgba(245,166,35,0.05); }
.style-pdpill-more { border-style: dashed; color: #F5A623; }

.act-grid { display: flex; flex-direction: column; gap: 10px; }
.act-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: #fff; border: 1px solid #f0e0b0; border-radius: 12px;
    cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.act-card:hover { border-color: #FFD100; transform: translateX(4px); }
.act-hot { border-left: 3px solid var(--red); }
.act-group { border-left: 3px solid var(--orange); }
.act-new { border-left: 3px solid var(--success); }
.act-badge {
    position: absolute; top: 0; right: 0; padding: 2px 10px; font-size: 10px;
    color: #fff; border-radius: 0 0 0 8px;
}
.act-hot .act-badge { background: var(--red); }
.act-group .act-badge { background: var(--orange); }
.act-new .act-badge { background: var(--success); }
.act-ico { font-size: 28px; }
.act-info { flex: 1; }
.act-title { font-size: 14px; font-weight: 600; color: #222; }
.act-desc { font-size: 11px; color: var(--text-sec); }
.act-arrow { color: var(--text-dim); font-size: 16px; }

.pay-layout { padding: 24px 32px; max-width: 600px; margin: 0 auto; overflow-y: auto; height: 100%; }
.pay-empty { text-align: center; padding: 60px 20px; }
.pay-empty .qe-icon { font-size: 48px; margin-bottom: 12px; }
.pay-empty h3 { color: #222; margin-bottom: 6px; }
.pay-empty p { color: var(--text-sec); font-size: 13px; margin-bottom: 16px; }
.pay-card { background: #fff; border: 1px solid #f0e0b0; border-radius: 12px; padding: 24px; }
.pay-amount { text-align: center; padding: 20px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.pay-label { font-size: 13px; color: var(--text-sec); margin-bottom: 6px; }
.pay-price { font-size: 36px; font-weight: bold; color: var(--red); }
.pay-order-id { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.pay-methods h4 { font-size: 14px; color: #222; margin-bottom: 12px; }
.pay-option {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    border: 1px solid #eee; border-radius: 12px; margin-bottom: 8px;
    cursor: pointer; transition: all .15s;
}
.pay-option:hover { border-color: #FFD100; }
.pay-option.selected { border-color: #FFD100; background: rgba(255,209,0,0.05); }
.pay-opt-icon { font-size: 24px; }
.pay-opt-info { flex: 1; }
.pay-opt-name { font-size: 14px; font-weight: 600; color: #222; }
.pay-opt-desc { font-size: 11px; color: var(--text-sec); }
.pay-opt-check { color: #FFD100; font-size: 16px; font-weight: bold; }
.pay-option:not(.selected) .pay-opt-check { display: none; }
.pay-confirm-btn { margin-top: 20px; padding: 14px; font-size: 16px; }
.pay-footer { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 12px; }
.pay-success { text-align: center; padding: 60px 20px; }
.pay-success-icon { font-size: 60px; margin-bottom: 16px; }
.pay-success h3 { font-size: 20px; color: #222; margin-bottom: 8px; }
.pay-success-order { font-size: 13px; color: var(--text-sec); }
.pay-success-hint { font-size: 13px; color: var(--text-dim); margin: 8px 0 20px; }
.pay-success-actions { display: flex; gap: 10px; justify-content: center; }
.pay-success-actions .prop-btn { width: auto; padding: 10px 24px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 5000;
    display: flex; align-items: center; justify-content: center;
}
.modal-box {
    width: 420px; background: #fff; border: none;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid #f0f0f0; background: #fafafa;
}
.modal-head h3 { font-size: 14px; color: #222; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; }
.modal-body { padding: 18px; }

/* 图片放大预览 */
.preview-zoom-container {
    position: relative; overflow: hidden; display: flex;
    align-items: center; justify-content: center;
    cursor: zoom-in; max-height: 75vh;
}
.preview-zoom-container.zoomed {
    overflow: auto; cursor: zoom-out;
    justify-content: flex-start; align-items: flex-start;
    max-height: 85vh;
}
.preview-zoom-container img {
    transition: transform 0.2s ease;
    max-width: 100%; max-height: 75vh; object-fit: contain;
}
.preview-zoom-container.zoomed img {
    max-width: none; max-height: none;
    transform-origin: 0 0;
}
.preview-zoom-hint {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: #fff; padding: 4px 12px;
    border-radius: 12px; font-size: 12px; pointer-events: none;
    opacity: 0; transition: opacity 0.3s;
}
.preview-zoom-container:not(.zoomed):hover .preview-zoom-hint { opacity: 1; }

/* 预览弹窗左右切换 */
.preview-nav-arrows {
    position: absolute; top: 50%; left: 0; right: 0;
    transform: translateY(-50%); pointer-events: none; z-index: 10;
}
.preview-nav-btn {
    pointer-events: all;
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 60px; border: none;
    background: rgba(0,0,0,0.4); color: #fff;
    font-size: 20px; cursor: pointer; border-radius: 6px;
    transition: background 0.2s;
}
.preview-nav-btn:hover { background: rgba(0,0,0,0.7); }
.preview-nav-prev { left: -48px; }
.preview-nav-next { right: -48px; }
.preview-nav-count {
    position: absolute; bottom: -28px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5); color: #fff;
    padding: 2px 10px; border-radius: 10px; font-size: 12px;
    pointer-events: none;
}

.mfield { margin-bottom: 12px; }
.mfield label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-sec); }
.mfield input, .mfield textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #eee; border-radius: 8px;
    background: #fafafa; color: var(--text); font-size: 13px;
}
.mfield input:focus, .mfield textarea:focus { outline: none; border-color: #FFD100; }

/* ===== TOAST ===== */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: rgba(0,0,0,.75); color: #fff; padding: 10px 24px; border-radius: 20px;
    z-index: 10002; font-size: 13px; max-width: 80%; text-align: center;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e0d5b0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c0b080; }

/* ===== AI 全屋设计 VIEW ===== */
.aihome-layout { display: flex; height: 100%; }
.aihome-sidebar {
    width: 600px; background: #fff; border-right: 1px solid #eee;
    padding: 20px; flex-shrink: 0; overflow-y: auto; min-height: 0;
}
.aihome-sidebar > * { margin-bottom: 12px; }
.aihome-sidebar > *:last-child { margin-bottom: 0; }
.aihome-sidebar h3 { font-size: 18px; color: #222; margin-bottom: 0; }
.aihome-hint { font-size: 12px; color: var(--text-sec); margin-bottom: 0; }
.aihome-section { margin-bottom: 4px; }

/* 白模展台尺寸区域 */
.booth-input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.booth-input-group { flex: 1; }
.booth-input-group label { display: block; font-size: 11px; color: #999; margin-bottom: 3px; }
.booth-input-group input {
    width: 100%; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px;
    background: #fafafa; color: #222; font-size: 13px; text-align: center;
    box-sizing: border-box;
}
.booth-opening-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.booth-label { font-size: 11px; color: #999; }
.booth-opening-btn {
    padding: 5px 10px; border: 1px solid #ddd; border-radius: 6px;
    background: #fafafa; color: #666; font-size: 11px; cursor: pointer;
    transition: all .15s;
}
.booth-opening-btn:hover { border-color: #FFD100; color: #FFD100; }
.booth-opening-btn.active { border-color: #FFD100; background: rgba(255,209,0,0.15); color: #FFD100; }
.aihome-section-title {
    font-size: 13px; font-weight: 600; color: #F5A623;
    margin-bottom: 8px; padding-bottom: 4px;
    border-bottom: 1px solid #f0e0b0;
}
.aihome-upload {
    border: 2px dashed #e0d5b0; border-radius: 12px;
    padding: 20px 12px; text-align: center; cursor: pointer;
    transition: all .2s; background: #fffdf5;
    min-height: 120px; display: flex; align-items: center; justify-content: center;
}
.aihome-upload:hover { border-color: #FFD100; background: rgba(255,209,0,0.05); }
.aihome-upload-icon { font-size: 32px; margin-bottom: 6px; }
.aihome-upload-text { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.aihome-upload-hint { font-size: 11px; color: var(--text-dim); }
.aihome-style-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.aihome-style-item {
    padding: 8px 6px; border: 1px solid #eee; border-radius: 8px;
    cursor: pointer; transition: all .15s; text-align: center;
}
.aihome-style-item:hover { border-color: #FFD100; }
.aihome-style-item.active { border-color: #FFD100; background: rgba(255,209,0,0.1); }
.aihome-style-name { font-size: 12px; font-weight: 600; color: #222; }
.aihome-style-item.active .aihome-style-name { color: #F5A623; }
.aihome-style-desc { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.aihome-style-more {
    padding: 8px 6px; border: 1px dashed #ccc; border-radius: 8px;
    cursor: pointer; transition: all .15s; text-align: center;
    background: #fafafa; display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 2px;
}
.aihome-style-more:hover { border-color: #FFD100; background: rgba(255,209,0,0.05); }
.aihome-style-more-name { font-size: 12px; font-weight: 600; color: #F5A623; }
.aihome-style-more-desc { font-size: 10px; color: var(--text-dim); }
.aihome-style-dropdown {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    margin-top: 6px; padding: 8px; background: #fafafa;
    border-radius: 8px; border: 1px solid #f0e0b0;
    max-height: 280px; overflow-y: auto;
}
.aihome-textarea {
    width: 100%; min-height: 60px; padding: 8px 10px;
    border: 1px solid #eee; border-radius: 8px;
    background: #fafafa; color: var(--text); font-size: 12px;
    resize: vertical; font-family: inherit;
}
.aihome-textarea:focus { outline: none; border-color: #FFD100; }
.aihome-quota {
    padding: 8px 12px; background: #fffdf5; border-radius: 8px;
    font-size: 12px; color: var(--text-sec); text-align: center;
    border: 1px solid #f0e0b0;
}
.aihome-quota strong { color: var(--red); font-size: 16px; }
.aihome-gen-btn {
    width: 100%; padding: 12px; border: none; border-radius: 20px;
    background: linear-gradient(135deg, #FFD100, #F5A623);
    color: #222; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all .2s;
}
.aihome-gen-btn:hover { opacity: .9; transform: translateY(-1px); }
.aihome-gen-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.aihome-step-btn {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px;
    background: #fafafa; color: #222; font-size: 13px; cursor: pointer;
    transition: all .2s; text-align: left;
}
.aihome-step-btn:hover { border-color: #FFD100; color: #F5A623; background: #fffdf5; }
.aihome-step-cad { border-left: 3px solid #4fc3f7; }
.aihome-step-cad:hover { border-left-color: #FFD100; }
.aihome-step-grok {
    border-left: 3px solid #ff6b6b !important;
    background: linear-gradient(135deg, #fff0f0 0%, #fffdf5 100%) !important;
    animation: grokPulse 2s ease-in-out infinite;
}
.aihome-step-grok:hover {
    border-left-color: #FFD100 !important;
    background: linear-gradient(135deg, #ffe0e0 0%, #fff9e6 100%) !important;
}
@keyframes grokPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255,107,107,0.3); }
    50% { box-shadow: 0 0 12px rgba(255,107,107,0.6); }
}
.aihome-main { flex: 1; overflow-y: auto; min-height: 0; position: relative; background: var(--bg-dark); }

/* �?aihome 页面内容撑开高度，body 自然滚动到底 */
#view-aihome { height: auto !important; min-height: 100%; }
#view-aihome .aihome-layout { height: auto; min-height: calc(100vh - var(--topbar-h)); }
#view-aihome .aihome-sidebar { overflow-y: visible; }
.aihome-results { padding: 24px; min-height: 100%; }
.aihome-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 60vh; text-align: center; padding: 40px;
}
.aihome-empty-icon { font-size: 64px; margin-bottom: 16px; }
.aihome-empty h3 { font-size: 22px; color: #222; margin-bottom: 8px; }
.aihome-empty p { font-size: 14px; color: var(--text-sec); margin-bottom: 20px; }
.aihome-feature-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    max-width: 500px; margin: 0 auto;
}
.aihome-feature-item {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; background: #fff; border: 1px solid #f0e0b0;
    border-radius: 10px; font-size: 13px; color: var(--text);
    transition: all .2s;
}
.aihome-feature-item:hover { border-color: #FFD100; }
.aihome-feature-item span { font-size: 18px; }
.aihome-progress-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.85);
    display: flex; align-items: center; justify-content: center; z-index: 100;
}
.aihome-progress-box {
    background: #fff; border: 1px solid #f0e0b0;
    border-radius: 16px; padding: 40px 48px; text-align: center;
    min-width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.aihome-progress-spinner {
    width: 48px; height: 48px; border: 4px solid #f0e0b0;
    border-top-color: #FFD100; border-radius: 50%;
    animation: ai-spin 1s linear infinite; margin: 0 auto 16px;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.aihome-progress-title { font-size: 16px; font-weight: 600; color: #222; margin-bottom: 8px; }
.aihome-progress-detail { font-size: 13px; color: #F5A623; margin-bottom: 16px; }
.aihome-progress-bar-wrap {
    width: 100%; height: 6px; background: #f0f0f0;
    border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.aihome-progress-bar {
    height: 100%; background: linear-gradient(90deg, #FFD100, #F5A623);
    border-radius: 3px; transition: width .4s;
}
.aihome-progress-pct { font-size: 14px; color: var(--text-sec); }
.aihome-result-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #eee;
}
.aihome-result-header h3 { font-size: 16px; color: #222; }
.aihome-result-actions { display: flex; align-items: center; gap: 8px; }
.aihome-result-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.aihome-result-card {
    background: #fff; border: 1px solid #f0e0b0;
    border-radius: 12px; overflow: hidden; cursor: pointer;
    transition: all .2s;
}
.aihome-result-card:hover { border-color: #FFD100; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(255,209,0,0.15); }
.aihome-result-card.tripo-selected {
    border: 2px solid #2e7d32 !important;
    box-shadow: 0 0 12px rgba(46,125,50,0.35);
}
.aihome-result-thumb {
    height: 200px; overflow: hidden; background: #fafafa;
    display: flex; align-items: center; justify-content: center;
}
.aihome-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aihome-result-info {
    padding: 10px 12px; display: flex; align-items: center; gap: 8px;
}
.aihome-result-icon { font-size: 18px; }
.aihome-result-name { font-size: 13px; font-weight: 600; color: #222; }
.aihome-result-dl {
    padding: 0 12px 10px; text-align: right;
}
.aihome-result-dl a {
    color: #F5A623; text-decoration: none; font-size: 16px;
    transition: color .15s;
}
.aihome-result-dl a:hover { color: #222; }
.aihome-result-fail {
    margin-top: 16px; padding: 14px; background: rgba(255,59,48,.05);
    border: 1px solid rgba(255,59,48,.15); border-radius: 8px;
}
.aihome-result-fail h4 { font-size: 13px; color: var(--danger); margin-bottom: 8px; }
.aihome-fail-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 12px; color: var(--text-sec);
}

/* ===== AI 生成历史 VIEW ===== */
.aihistory-layout { padding: 24px 32px; overflow-y: auto; height: 100%; }
.aihistory-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #eee;
}
.aihistory-header h3 { font-size: 18px; color: #222; }
.aihistory-list { display: flex; flex-direction: column; gap: 14px; }
.aihistory-card {
    background: #fff; border: 1px solid #f0e0b0;
    border-radius: 12px; padding: 16px; transition: all .2s;
}
.aihistory-card:hover { border-color: #FFD100; }
.aihistory-card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.aihistory-style {
    font-size: 14px; font-weight: 600; color: #F5A623;
    background: rgba(255,209,0,0.1); padding: 3px 10px; border-radius: 12px;
}
.aihistory-time { font-size: 11px; color: var(--text-dim); }
.aihistory-card-thumbs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.aihistory-thumb-wrap {
    position: relative; width: 80px; height: 60px; cursor: pointer;
    border-radius: 8px; overflow: hidden;
}
.aihistory-thumb {
    width: 100%; height: 100%; border-radius: 8px; object-fit: cover;
    border: 1px solid #eee; transition: all .15s;
}
.aihistory-thumb-wrap:hover .aihistory-thumb { border-color: #FFD100; transform: scale(1.05); }
.aihistory-thumb-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.65); color: #fff; font-size: 10px;
    text-align: center; padding: 2px 4px; border-radius: 0 0 8px 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aihistory-card-info { font-size: 12px; color: var(--text-sec); margin-bottom: 10px; }
.aihistory-card-actions { display: flex; gap: 8px; }

/* ===== AI 首页 Banner ===== */
.aihome-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; background: linear-gradient(135deg, #FFD100, #F5A623);
    border-radius: 12px; cursor: pointer; transition: all .2s;
    border: none;
}
.aihome-banner:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,209,0,0.3); }
.aihome-banner-left { flex: 1; }
.aihome-banner-title { font-size: 18px; font-weight: bold; color: #222; margin-bottom: 6px; }
.aihome-banner-desc { font-size: 13px; color: rgba(0,0,0,.5); }
.aihome-banner-right {
    padding: 10px 20px; background: rgba(255,255,255,.3); border-radius: 20px;
    color: #222; font-weight: 600; font-size: 14px; white-space: nowrap;
}

/* ===== Image Preview Modal ===== */
.img-preview-box {
    width: 80vw; max-width: 900px; max-height: 90vh;
    background: #fff; border: none;
    border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.img-preview-body {
    flex: 1; overflow: auto; display: flex; align-items: center;
    justify-content: center; padding: 16px; background: #fafafa;
    min-height: 400px;
}
.img-preview-body img {
    max-width: 100%; max-height: 75vh; border-radius: 8px;
}

/* ===== AI Nav Tab ===== */
.tnav-ai { color: #222 !important; font-weight: 600; }
.tnav-ai.active { background: rgba(255,255,255,0.5); color: #222 !important; }

/* ===== AI Assistant Panel ===== */
/* ===== DIY ===== */
.diy-filter-bar {
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}
.diy-filter-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.diy-filter-tab {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 14px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.diy-filter-tab.active {
    background: #FFD100;
    color: #333;
    font-weight: 600;
}
.diy-filter-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
}
.diy-filter-label {
    font-size: 11px;
    color: #999;
    min-width: 44px;
}
.diy-filter-btn {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 12px;
    background: #f8f8f8;
    border: 1px solid #eee;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.diy-filter-btn.active {
    background: #FFD100;
    border-color: #e6c000;
    color: #333;
    font-weight: 600;
}

/* Product Cards */
.diy-product-list {
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    padding: 2px 0;
}
.diy-card {
    display: flex;
    gap: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.diy-card:hover { border-color: #FFD100; }
.diy-card.selected {
    border-color: #FFD100;
    background: #FFFDF0;
    box-shadow: 0 2px 8px rgba(255,209,0,0.15);
}
.diy-card-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.diy-card-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    padding: 2px 6px;
    background: #FF3B30;
    color: #fff;
    font-size: 10px;
    border-radius: 4px;
}
.diy-card-info { flex: 1; min-width: 0; }
.diy-card-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 2px; }
.diy-card-spec { font-size: 11px; color: #999; margin-bottom: 4px; }
.diy-card-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.diy-card-price-num { font-size: 16px; font-weight: 700; color: #FF3B30; }
.diy-card-original { font-size: 11px; color: #bbb; text-decoration: line-through; }
.diy-card-discount {
    padding: 1px 5px;
    background: #FF3B30;
    color: #fff;
    font-size: 10px;
    border-radius: 3px;
}
.diy-card-sales { font-size: 10px; color: #999; margin-bottom: 3px; }
.diy-card-tags { display: flex; gap: 4px; }
.diy-card-tag {
    padding: 1px 6px;
    background: #FFF3E0;
    color: #E65100;
    font-size: 10px;
    border-radius: 3px;
}
.diy-empty-hint {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
    font-size: 13px;
}

/* Right Panel - Detail */
.diy-detail-panel {
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 48px);
}
.diy-detail-header {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.diy-detail-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; }
.diy-detail-price-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.diy-detail-price { font-size: 22px; font-weight: 700; color: #FF3B30; }
.diy-detail-original { font-size: 12px; color: #bbb; text-decoration: line-through; }
.diy-detail-discount-tag {
    padding: 2px 6px;
    background: #FF3B30;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
}
.diy-detail-sales { font-size: 11px; color: #999; margin-left: auto; }
.diy-detail-section { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.diy-detail-sec-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px; }
.diy-detail-include {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px dashed #f5f5f5;
}
.diy-inc-name { color: #555; }
.diy-inc-spec { color: #999; }

/* Accessories in right panel */
.diy-acc-group { margin-bottom: 8px; }
.diy-acc-group-title { font-size: 11px; color: #999; margin-bottom: 4px; padding-left: 2px; }
.diy-acc-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.diy-acc-item:hover { border-color: #FFD100; }
.diy-acc-item.selected { 
    border-color: #FFD100; 
    background: #FFFDF0;
}
.diy-acc-icon { font-size: 18px; width: 24px; text-align: center; }
.diy-acc-info { flex: 1; }
.diy-acc-name { display: block; font-size: 12px; color: #333; }
.diy-acc-price { font-size: 11px; color: #999; }
.diy-acc-check { font-size: 14px; color: #bbb; }
.diy-acc-item.selected .diy-acc-check { color: #FFD100; font-weight: 700; }

/* Cart items */
.diy-cart-empty { text-align: center; padding: 15px; color: #bbb; font-size: 12px; }
.diy-cart-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 6px;
}
.diy-cart-item-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.diy-cart-item-name { font-size: 12px; font-weight: 600; color: #333; }
.diy-cart-item-price { font-size: 12px; font-weight: 600; color: #FF3B30; }
.diy-cart-item-bottom { display: flex; justify-content: space-between; align-items: center; }
.diy-cart-qty, .diy-cart-spec { display: flex; align-items: center; gap: 4px; }
.diy-cart-qty span, .diy-cart-spec span { font-size: 12px; color: #555; min-width: 20px; text-align: center; }
.diy-cart-qty-btn, .diy-cart-spec-btn {
    width: 22px; height: 22px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* Action buttons */
.diy-detail-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.diy-action-btn {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.15s;
}
.diy-action-primary { background: #FFD100; color: #333; }
.diy-action-primary:hover { background: #f0c400; }
.diy-action-outline { background: #fff; color: #333; border: 1px solid #ddd; }
.diy-action-outline:hover { border-color: #FFD100; }
.diy-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #bbb;
    font-size: 14px;
}

/* Keep old diy-panel styles for backward compatibility */
.diy-panel { padding: 0 4px; overflow-y: auto; max-height: calc(100vh - 180px); }

.tool-ai-assist { padding: 8px 14px; border-top: 1px solid #eee; }
.ai-assist-btn {
    width: 100%; padding: 8px; border: 1px solid #FFD100; border-radius: 20px;
    background: rgba(255,209,0,0.1); color: #F5A623; cursor: pointer; font-size: 12px;
    font-weight: 600; transition: all .2s;
}
.ai-assist-btn:hover { background: #FFD100; color: #222; }
.ai-assist-panel {
    position: absolute; bottom: 0; left: 260px; width: 340px; height: 420px;
    background: #fff; border: 1px solid #eee; border-radius: 12px 0 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08); z-index: 50;
    display: flex; flex-direction: column; overflow: hidden;
}
.ai-assist-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: linear-gradient(90deg, #FFD100, #F5A623);
    font-size: 13px; font-weight: 600; color: #222;
}
.ai-assist-hint { padding: 6px 14px; font-size: 10px; color: var(--text-sec); background: #fffdf5; }
.ai-assist-messages { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { display: flex; }
.ai-msg.ai-user { justify-content: flex-end; }
.ai-msg.ai-bot { justify-content: flex-start; }
.ai-msg-content {
    max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 12px;
    line-height: 1.5; word-break: break-word;
}
.ai-msg.ai-user .ai-msg-content { background: #FFD100; color: #222; border-bottom-right-radius: 2px; }
.ai-msg.ai-bot .ai-msg-content { background: #f5f5f5; color: #222; border-bottom-left-radius: 2px; }
.ai-parsed-config { margin-top: 8px; padding: 8px; background: #fffdf5; border: 1px solid #f0e0b0; border-radius: 6px; }
.ai-parsed-item { font-size: 11px; color: var(--text-sec); padding: 2px 0; }
.ai-apply-btn {
    margin-top: 8px; padding: 6px 12px; background: #FFD100; border: none;
    border-radius: 20px; color: #222; cursor: pointer; font-size: 11px; font-weight: 600;
}
.ai-apply-btn:hover { background: #F5A623; }
.ai-assist-input {
    display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eee; background: #fafafa;
}
.ai-assist-input input {
    flex: 1; padding: 8px 12px; border: 1px solid #eee; border-radius: 20px;
    background: #fff; color: var(--text); font-size: 12px;
}
.ai-assist-input input:focus { outline: none; border-color: #FFD100; }
.ai-assist-input button {
    padding: 8px 16px; background: #FFD100; border: none; border-radius: 20px;
    color: #222; cursor: pointer; font-size: 12px; font-weight: 600;
}
.ai-assist-input button:hover { background: #F5A623; }

.shop-cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.shop-cat-item { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border-light); cursor: pointer; transition: all .2s; }
.shop-cat-item:hover { background: var(--bg-hover); border-color: var(--accent-dark); }
.shop-cat-item .cat-icon { font-size: 24px; margin-bottom: 6px; }
.shop-cat-item .cat-name { font-size: 12px; color: var(--text); font-weight: 600; }
.shop-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shop-product-card { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-light); cursor: pointer; transition: all .2s; }
.shop-product-card:hover { border-color: var(--accent-dark); box-shadow: 0 2px 12px rgba(255,209,0,0.1); }
.shop-product-img { width: 100%; height: 160px; overflow: hidden; background: var(--bg-card); display: flex; align-items: center; justify-content: center; }
.shop-product-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-product-img .img-ph { font-size: 40px; }
.shop-product-info { padding: 10px 12px; }
.shop-product-name { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.shop-product-desc { font-size: 11px; color: var(--text-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.shop-product-bottom { display: flex; align-items: center; justify-content: space-between; }
.shop-product-price { display: flex; align-items: baseline; }
.shop-product-price .sym { font-size: 11px; color: var(--accent-dark); font-weight: 700; }
.shop-product-price .val { font-size: 18px; color: var(--accent-dark); font-weight: 800; }
.shop-product-price .orig { font-size: 10px; color: var(--text-dim); text-decoration: line-through; margin-left: 4px; }
.shop-product-sales { font-size: 10px; color: var(--text-dim); }

.shop-product-detail-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.shop-product-detail { background: #fff; border-radius: 16px; width: 600px; max-height: 80vh; overflow-y: auto; }
.spd-img { width: 100%; height: 300px; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--bg-card); display: flex; align-items: center; justify-content: center; }
.spd-img img { width: 100%; height: 100%; object-fit: cover; }
.spd-img .img-ph { font-size: 60px; }
.spd-price { padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.spd-price .sym { font-size: 14px; color: var(--accent-dark); font-weight: 700; }
.spd-price .val { font-size: 28px; color: var(--accent-dark); font-weight: 800; }
.spd-price .orig { font-size: 12px; color: var(--text-dim); text-decoration: line-through; margin-left: 8px; }
.spd-name { padding: 16px 20px; }
.spd-name h2 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.spd-name p { font-size: 13px; color: var(--text-sec); }
.spd-spec { padding: 12px 20px; }
.spd-spec h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.spd-spec-group { margin-bottom: 10px; }
.spd-spec-label { font-size: 11px; color: var(--text-sec); margin-bottom: 6px; }
.spd-spec-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.spd-spec-opt { padding: 4px 12px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 6px; font-size: 12px; color: var(--text); cursor: pointer; }
.spd-spec-opt.active { background: linear-gradient(135deg, #FFD100, #F5A623); border-color: #F5A623; font-weight: 600; }
.spd-attr { padding: 12px 20px; }
.spd-attr h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.spd-attr-row { display: flex; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.spd-attr-key { width: 80px; font-size: 12px; color: var(--text-sec); flex-shrink: 0; }
.spd-attr-val { flex: 1; font-size: 12px; color: var(--text); }
.spd-detail { padding: 12px 20px; }
.spd-detail h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.spd-detail p { font-size: 13px; color: var(--text-sec); line-height: 1.8; }
.spd-actions { padding: 16px 20px; display: flex; gap: 12px; border-top: 1px solid var(--border-light); }
.spd-actions .btn-cart { flex: 1; padding: 10px; background: #fff; border: 2px solid var(--accent-dark); border-radius: 20px; color: var(--accent-dark); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; }
.spd-actions .btn-buy { flex: 1; padding: 10px; background: linear-gradient(135deg, #FFD100, #F5A623); border: none; border-radius: 20px; color: #222; font-size: 13px; font-weight: 700; cursor: pointer; text-align: center; }
.spd-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; background: rgba(0,0,0,0.3); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; border: none; }

/* ===== 设计工具面板 (design tool panels) ===== */
.tool-section { margin-bottom: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tool-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tool-opt { padding: 8px; border: 1px solid var(--border-light); border-radius: 8px; cursor: pointer; text-align: center; transition: all .15s; background: var(--bg-card); }
.tool-opt:hover { border-color: #FFD100; }
.tool-opt.active { border-color: #F5A623; background: rgba(255,209,0,0.08); }
.opt-name { font-size: 12px; font-weight: 600; color: var(--text); }
.opt-desc { font-size: 10px; color: var(--text-sec); margin-top: 2px; }
.tool-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tool-input-wrap { display: flex; align-items: center; gap: 4px; }
.tool-input { width: 60px; padding: 4px 8px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 13px; text-align: center; }
.tool-tip { font-size: 11px; color: var(--text-sec); margin-top: 2px; }
.mat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mat-card { padding: 8px; border: 1px solid var(--border-light); border-radius: 8px; cursor: pointer; transition: all .15s; background: var(--bg-card); }
.mat-card:hover { border-color: #FFD100; }
.mat-card.active { border-color: #F5A623; background: rgba(255,209,0,0.08); }
.mat-texture { width: 40px; height: 40px; border-radius: 4px; margin: 0 auto 4px; }
.mat-info { text-align: center; }
.mat-name { font-size: 11px; font-weight: 600; color: var(--text); }
.mat-price { font-size: 10px; color: var(--text-sec); }
.acc-item { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.acc-top { display: flex; justify-content: space-between; align-items: center; }
.acc-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.acc-name { font-size: 12px; font-weight: 600; color: var(--text); }
.acc-price { font-size: 12px; color: #F5A623; font-weight: 600; }
.acc-qty { display: flex; align-items: center; gap: 4px; }
.acc-lvl-btn { padding: 2px 8px; border: 1px solid var(--border-light); border-radius: 4px; font-size: 11px; cursor: pointer; background: #fff; }
.acc-lvl-btn.active { background: #F5A623; color: #fff; border-color: #F5A623; }
.acc-level-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.acc-levels { display: flex; gap: 4px; }
.acc-selected { border-color: #F5A623; background: rgba(255,209,0,0.05); }
.style-opt { padding: 8px; border: 1px solid var(--border-light); border-radius: 8px; cursor: pointer; text-align: center; transition: all .15s; }
.style-opt:hover { border-color: #FFD100; }
.style-opt.active { border-color: #F5A623; background: rgba(255,209,0,0.08); }
.style-preview-bar { display: flex; height: 10px; border-radius: 5px; margin-bottom: 4px; overflow: hidden; }
.canvas-toolbar { display: flex; gap: 6px; padding: 8px; background: #fafafa; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 8px; }
.cbtn { padding: 6px 12px; background: #fff; color: #222; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; cursor: pointer; }
.cbtn:hover { border-color: #FFD100; color: #F5A623; }
.canvas-area { position: relative; overflow: hidden; border-radius: 8px; background: #fafafa; border: 1px solid #eee; }
.booth-canvas { width: 100%; display: block; }
.canvas-wrapper { position: relative; }
.canvas-info { padding: 8px; text-align: center; font-size: 11px; color: var(--text-sec); }
.render-display { padding: 16px; }
.render-content { text-align: center; }
.view-angle-bar { display: flex; gap: 4px; margin-top: 8px; justify-content: center; }
.va-item { padding: 4px 10px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 11px; cursor: pointer; background: var(--bg-card); }
.va-item:hover { border-color: #FFD100; }
.va-item.active { border-color: #F5A623; background: rgba(255,209,0,0.1); }
.stepper-bar { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 12px; }
.step-item { width: 28px; height: 28px; border-radius: 50%; background: #eee; color: #999; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; transition: all .2s; }
.step-item.active { background: #F5A623; color: #fff; }
.step-line { width: 20px; height: 2px; background: #eee; }
.tool-nav-buttons { display: flex; gap: 8px; }
.btn-prev-step, .btn-next-step { flex: 1; padding: 6px; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); font-size: 12px; cursor: pointer; }
.btn-next-step { border-color: #F5A623; color: #F5A623; }
.prop-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.prop-accessories { margin-top: 8px; }

/* ===== AIHOME V2 Layout ===== */
.aihome-layout-v2 { 
    display: flex; height: calc(100vh - 120px); position: relative;
    background: var(--bg-dark); overflow: hidden;
}
.aihome-sidebar-v2 {
    width: 340px; flex-shrink: 0; overflow-y: auto; 
    padding: 16px; background: #fff; border-right: 1px solid #eee;
}
.aihome-sidebar-v2 h3 { font-size: 16px; color: #222; margin: 0 0 2px 0; }
.aihome-sidebar-v2 .aihome-hint { font-size: 10px; color: var(--text-sec); margin-bottom: 12px; }

.aihome-module {
    margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 1px solid #f0e0b0;
}
.aihome-module:last-child { border-bottom: none; }
.aihome-module-title {
    font-size: 12px; font-weight: 600; color: #F5A623;
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.aihome-module-title.collapsible { cursor: pointer; }
.aihome-module-subtitle { font-size: 10px; color: var(--text-dim); margin-bottom: 6px; }

.aihome-required { font-size: 9px; background: #f44336; color: #fff; padding: 1px 5px; border-radius: 3px; }
.aihome-optional { font-size: 9px; background: #eee; color: #999; padding: 1px 5px; border-radius: 3px; }

.aihome-check-label {
    display: flex !important; align-items: center; gap: 4px;
    font-size: 11px; color: var(--text); cursor: pointer; padding: 3px 0;
}
.aihome-check-label input[type="checkbox"] {
    accent-color: #FFD100; width: 14px; height: 14px; cursor: pointer;
    flex-shrink: 0;
}

.aihome-config-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px;
}
.aihome-constraint-list { display: flex; flex-direction: column; gap: 2px; }

/* V2 Main Area */
.aihome-main-v2 {
    flex: 1; overflow-y: auto; min-height: 0; position: relative;
    background: #fff; display: flex; flex-direction: column;
}

/* Tabs */
.aihome-tabs {
    display: flex; align-items: center; gap: 2px;
    padding: 8px 16px; background: #fff; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 10;
}
.aihome-tab {
    padding: 6px 16px; border: none; border-radius: 6px 6px 0 0;
    background: transparent; color: var(--text-sec); font-size: 12px; cursor: pointer;
    transition: all .15s;
}
.aihome-tab:hover { color: #222; background: #f5f5f5; }
.aihome-tab.active { color: #F5A623; background: #fffdf5; }
.aihome-tab-actions { margin-left: auto; display: flex; gap: 6px; }
.aihome-tab-action {
    padding: 3px 10px; border: 1px solid #ddd; border-radius: 4px;
    background: transparent; color: var(--text-sec); font-size: 11px; cursor: pointer;
    transition: all .15s;
}
.aihome-tab-action:hover { border-color: #FFD100; color: #F5A623; }

/* Right Panel */
.aihome-right-panel {
    width: 260px; flex-shrink: 0; overflow-y: auto;
    padding: 12px; background: #fff; border-left: 1px solid #eee;
    font-size: 12px;
}
.aihome-right-panel.collapsed { display: none; }

.aihome-ctrl-block {
    margin-bottom: 12px; padding: 8px; background: #fafafa;
    border: 1px solid #eee; border-radius: 6px;
}
.aihome-ctrl-title {
    font-size: 10px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600;
}

/* Results V2 */
.aihome-results-v2 { padding: 16px; flex: 1; }
.aihome-results-v2 .aihome-empty { min-height: 40vh; }

/* Bottom Bar */
.aihome-bottom-bar {
    display: flex; gap: 8px; padding: 10px 16px;
    background: #fff; border-top: 1px solid #eee;
    position: sticky; bottom: 0; z-index: 10;
}
.aihome-gen-btn-v2 {
    flex: 1; padding: 10px 16px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #FFD100, #F5A623);
    color: #222; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .2s;
}
.aihome-gen-btn-v2:hover { opacity: .9; transform: translateY(-1px); }
.aihome-gen-btn-v2:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.aihome-gen-btn-secondary {
    flex: 0.6; background: #fafafa; color: var(--text-sec); border: 1px solid #ddd;
}
.aihome-gen-btn-secondary:hover { border-color: #FFD100; color: #222; }

/* Compliance Result */
.aihome-compliance-result {
    padding: 12px; border-radius: 8px; margin: 0 16px 8px;
    font-size: 12px;
}
.aihome-compliance-result.pass { background: rgba(76,175,80,0.08); border: 1px solid #4caf50; color: #2e7d32; }
.aihome-compliance-result.fail { background: rgba(244,67,54,0.08); border: 1px solid #f44336; color: #c62828; }

/* Compare Panel */
#aihome-compare-panel { margin: 12px 16px; }

/* Range slider styling */
input[type="range"]#aihome-temperature {
    -webkit-appearance: none; height: 4px; background: #ddd; border-radius: 2px; outline: none;
}
input[type="range"]#aihome-temperature::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
    background: #FFD100; cursor: pointer;
}

/* Responsive - hide right panel on small screens */
@media (max-width: 1200px) {
    .aihome-right-panel { display: none; }
    .aihome-sidebar-v2 { width: 300px; }
}
@media (max-width: 800px) {
    .aihome-layout-v2 { flex-direction: column; height: auto; }
    .aihome-sidebar-v2 { width: 100%; max-height: 50vh; }
    .aihome-bottom-bar { flex-wrap: wrap; }
    .aihome-gen-btn-v2 { flex: 1 1 45%; }
}

/* ===== 商城中心 ===== */
.mall-container { display: flex; flex-direction: column; height: 100%; background: #f5f5f5; }
.mall-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #fff; border-bottom: 1px solid #eee; flex-shrink: 0; }
.mall-header h2 { font-size: 18px; color: #222; margin: 0; }
.mall-search { display: flex; gap: 4px; }
.mall-search input { padding: 6px 12px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; width: 200px; outline: none; }
.mall-search input:focus { border-color: #F5A623; }
.mall-search button { padding: 6px 12px; border: none; background: #F5A623; color: #fff; border-radius: 20px; cursor: pointer; font-size: 13px; }
.mall-layout { display: flex; flex: 1; overflow: hidden; }
.mall-sidebar { width: 180px; background: #fff; border-right: 1px solid #eee; overflow-y: auto; padding: 12px 0; flex-shrink: 0; }
.mall-sidebar h4 { font-size: 12px; color: #999; padding: 0 16px 8px; text-transform: uppercase; }
.mall-cat-list { display: flex; flex-direction: column; }
.mall-cat-item { padding: 10px 16px; cursor: pointer; font-size: 13px; color: #444; display: flex; align-items: center; gap: 8px; transition: background .15s; }
.mall-cat-item:hover { background: #FFD10020; }
.mall-cat-item.active { background: #FFD10030; color: #F5A623; font-weight: 600; }
.mall-cat-icon { font-size: 16px; }
.mall-main { flex: 1; overflow-y: auto; padding: 16px; }
.mall-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mall-title { font-size: 16px; font-weight: 600; color: #222; }
.mall-clear-btn { padding: 4px 12px; border: 1px solid #ddd; background: #fff; border-radius: 14px; cursor: pointer; font-size: 12px; color: #666; }
.mall-clear-btn:hover { border-color: #F5A623; color: #F5A623; }
.mall-empty { text-align: center; padding: 60px 20px; color: #aaa; font-size: 16px; }
.mall-empty small { display: block; margin-top: 8px; font-size: 13px; color: #ccc; }
@media (max-width: 768px) {
    .mall-layout { flex-direction: column; }
    .mall-sidebar { width: 100%; max-height: 120px; border-right: none; border-bottom: 1px solid #eee; }
    .mall-cat-list { flex-direction: row; flex-wrap: wrap; padding: 8px; gap: 4px; }
    .mall-cat-item { padding: 6px 12px; white-space: nowrap; font-size: 12px; }
}
