/* 皮老细助手 - 主样式表 */
/* 分离自 layout.php + 各页面内联样式 */

/* Reset & Base */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-font-smoothing:antialiased}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:#e5e7eb;color:#1f2937;line-height:1.6;min-height:100vh}
a{color:#2563eb;text-decoration:none}
a:hover{color:#1d4ed8}

/* Header */
.header{background:#1e3a5f;border-bottom:3px solid #2563eb}
.header-top{max-width:420px;margin:0 auto;padding:0 14px;display:flex;align-items:center;height:48px;justify-content:space-between}
.logo{font-size:18px;font-weight:700;color:#fff;display:flex;align-items:center;gap:6px}
.logo span{color:#60a5fa}

.nav-row{background:#15294a;padding:8px 0}
.nav-inner{max-width:420px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr 1fr 1fr;padding:0 14px;gap:6px}@media(min-width:480px){.nav-inner{padding:0 20px}}
.nav-inner a{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 2px;font-size:11px;font-weight:500;color:#94a3b8;background:#1e3a5f;border:1px solid rgba(255,255,255,.06);border-radius:8px;transition:all .18s;text-align:center;gap:3px;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.nav-inner a .nav-icon{font-size:18px;line-height:1}
.nav-inner a:hover{color:#fff;border-color:rgba(96,165,250,.3);background:#1e4978;transform:translateY(-1px)}
.nav-inner a.active{color:#fff;border-color:#60a5fa;background:#2563eb;font-weight:600;box-shadow:0 0 0 1px rgba(96,165,250,.4);transform:translateY(-1px)}
.nav-right{display:flex;align-items:center;gap:12px;font-size:12px}
.nav-right a{color:#bfdbfe}

/* Content */
.container{max-width:420px;margin:0 auto;padding:14px}@media(min-width:480px){.container{padding:14px 20px}}

/* Card */
.card{background:#fff;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.06);margin-bottom:12px}

/* Grid */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:4px}
input,select,textarea{width:100%;padding:9px 11px;border:1.5px solid #d1d5db;border-radius:7px;font-size:14px;outline:none;transition:all .12s;font-family:inherit;background:#fff;color:#1f2937;-webkit-appearance:none}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;padding-right:30px;cursor:pointer}
input:focus,select:focus,textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.06)}

/* Buttons */
.btn{display:inline-block;padding:7px 14px;border-radius:7px;font-size:13px;font-weight:500;border:none;cursor:pointer;transition:all .12s}
.btn-primary{background:#2563eb;color:#fff}
.btn-primary:hover{background:#1d4ed8}
.btn-outline{background:#fff;color:#2563eb;border:1.5px solid #2563eb}
.btn-outline:hover{background:#eff6ff}
.btn-success{background:#16a34a;color:#fff}
.btn-danger{background:#dc2626;color:#fff}
.btn-block{width:100%;text-align:center}
.btn-sm{padding:4px 10px;font-size:11px}

/* Tags */
.tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:500}
.tag-blue{background:#eff6ff;color:#2563eb}
.tag-green{background:#f0fdf4;color:#15803d}
.tag-orange{background:#fff7ed;color:#c2410c}
.tag-red{background:#fef2f2;color:#b91c1c}

/* Result Item (搜索列表项) */
.result-item{padding:10px 12px;border:1.5px solid #e5e7eb;border-radius:8px;margin-bottom:8px;cursor:pointer;transition:all .12s}
.result-item:hover{border-color:#93c5fd;background:#fafbff}
.result-brand{font-size:11px;color:#6b7280;margin-bottom:3px}
.result-symptom{font-size:14px;font-weight:500;color:#1f2937}
.result-stats{margin-top:3px;font-size:12px;color:#9ca3af}

/* Detail Sections */
.detail-section{margin-bottom:14px}
.detail-section h3{font-size:14px;font-weight:600;margin-bottom:8px;color:#111827}
.cause-item{padding:8px 12px;background:#fffbeb;border-left:3px solid #f59e0b;margin-bottom:4px;border-radius:0 6px 6px 0;font-size:13px;color:#451a03}
.solution-item{padding:8px 12px;background:#f0fdf4;border-left:3px solid #22c55e;margin-bottom:4px;border-radius:0 6px 6px 0;font-size:13px;color:#14532d}
.feedback-box{text-align:center;padding:18px;background:#f9fafb;border-radius:8px;margin-top:14px;border:1.5px dashed #d1d5db}

/* Footer */
.page-footer{background:#1e3a5f;color:#94a3b8;padding:28px 0 24px;margin-top:20px;border-top:1px solid #15294a}
.ft-inner{max-width:420px;margin:0 auto;padding:0 14px;text-align:center}@media(min-width:480px){.ft-inner{padding:0 20px}}
.page-footer .brand{color:#e2e8f0;font-size:14px;font-weight:600}
.page-footer .friend-link{font-size:11px;color:#64748b;margin:8px 0}
.page-footer .friend-link a{color:#94a3b8}
.page-footer .friend-link a:hover{color:#e2e8f0}

/* Loading */
.loading{display:inline-block;width:16px;height:16px;border:2.5px solid #e5e7eb;border-top-color:#2563eb;border-radius:50%;animation:spin .6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* Utils */
.hidden{display:none}
.text-center{text-align:center}

/* ============================ */
/* 故障码详情页专用 */
/* ============================ */

/* 官方记录合并卡片 */
.merged-sub-badge{display:inline-block;padding:1px 7px;border-radius:3px;font-size:10px;background:#e0e7ff;color:#3730a3;margin-left:6px;font-weight:500}

/* 子事件折叠 */
.sub-event-toggle{padding:6px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;margin-top:6px;cursor:pointer;font-size:12px;color:#64748b;display:flex;align-items:center;gap:4px;transition:all .1s}
.sub-event-toggle:hover{background:#eef2ff;color:#3730a3}
.sub-event-toggle.active{background:#eef2ff;border-color:#a5b4fc;color:#3730a3}
.sub-event-list{padding:8px 10px 4px;background:#fafbfc;border:1px dashed #e2e8f0;border-radius:6px;margin-top:4px}
.sub-event-item{font-size:12px;color:#475569;padding:3px 0;border-bottom:1px solid #f1f5f9}
.sub-event-item:last-child{border-bottom:none}

/* 悬赏提示条 */
.bounty-bar{background:linear-gradient(135deg,#fef9c3,#fef3c7);border:1px solid #fde68a;border-radius:8px;padding:10px 14px;margin-bottom:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bounty-bar .bounty-title{font-size:13px;font-weight:600;color:#92400e}
.bounty-bar .bounty-item{font-size:11px;color:#b45309;background:#fffbeb;padding:2px 8px;border-radius:4px;border:1px solid #fde68a}

/* 非空提示工具 */
.empty-state{text-align:center;padding:28px 20px}
