/* 小喻子反馈系统 - 前台样式 */
:root{
  --brand:#0052d9;
  --brand-2:#3b8bff;
  --brand-light:rgba(0,82,217,.08);
  --bg:#f2f4f7;
  --card:#ffffff;
  --text:#1f2329;
  --text-2:#5a6472;
  --sub:#8b95a1;
  --line:#edeff2;
  --radius:12px;
  --shadow:0 2px 12px rgba(20,40,80,.06);
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
  background:var(--bg);color:var(--text);font-size:15px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{color:var(--brand);text-decoration:none}
img{max-width:100%;vertical-align:middle}
input,textarea,button{font-family:inherit;font-size:15px;outline:none}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:#d6dae0;border-radius:3px}

/* ---------- 布局 ---------- */
.app{max-width:720px;margin:0 auto;min-height:100%;background:var(--bg);position:relative;padding-bottom:60px}
.header{
  position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line);
  padding:12px 16px;display:flex;align-items:center;gap:12px;
}
.logo{
  width:40px;height:40px;border-radius:10px;flex-shrink:0;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
}
.logo img{width:100%;height:100%;object-fit:cover;display:block}
.logo .fallback{font-size:18px;font-weight:700;color:var(--brand)}
.hd-txt{min-width:0;flex:1}
.hd-name{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-desc{font-size:12px;color:var(--sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-admin{font-size:12px;color:var(--sub);border:1px solid var(--line);padding:4px 10px;border-radius:20px;flex-shrink:0}
.hd-admin:hover{color:var(--brand);border-color:var(--brand)}

/* 公告 */
.notice{
  margin:10px 12px 0;padding:10px 12px;background:#fff8e6;border:1px solid #ffe7ba;
  border-radius:8px;font-size:13px;color:#8a5a00;display:flex;gap:8px;line-height:1.5;
}
.notice .n-ico{flex-shrink:0}

/* Tab */
.tabs{
  margin:12px 12px 0;background:#fff;border-radius:var(--radius);padding:4px;
  display:flex;box-shadow:var(--shadow);position:relative;
}
.tab{
  flex:1;text-align:center;padding:9px 0;font-size:15px;color:var(--text-2);
  border-radius:9px;cursor:pointer;transition:.18s;position:relative;font-weight:500;
}
.tab.active{color:var(--brand);background:var(--brand-light);font-weight:600}

/* 面板 */
.panel{display:none;padding:0 12px;margin-top:12px}
.panel.active{display:block;animation:fadeUp .22s ease}
@keyframes fadeUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;margin-bottom:12px}
.card-title{font-size:15px;font-weight:600;margin-bottom:4px;display:flex;align-items:center;gap:6px}
.card-title .req{color:#e54545;font-size:13px}
.card-sub{font-size:12px;color:var(--sub);margin-bottom:12px}

/* 类型选择 */
.types{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
.types::-webkit-scrollbar{display:none}
.type{
  flex:1;min-width:88px;border:1px solid var(--line);border-radius:10px;padding:12px 6px 10px;
  text-align:center;cursor:pointer;transition:.18s;background:#fff;position:relative;
}
.type .t-ico{
  width:36px;height:36px;margin:0 auto 6px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:18px;background:#f2f5f9;transition:.18s;overflow:hidden;
}
.type .t-ico img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.type .t-name{font-size:13px;color:var(--text-2);white-space:nowrap}
.type.active{border-color:var(--brand);background:var(--brand-light)}
.type.active .t-name{color:var(--brand);font-weight:600}
.type.active::after{
  content:"";position:absolute;right:-1px;top:-1px;width:16px;height:16px;
  background:var(--brand);border-radius:0 10px 0 10px;
}
.type.active::before{
  content:"✓";position:absolute;right:1px;top:0;z-index:1;color:#fff;font-size:10px;line-height:14px;
}

/* 输入 */
.field{margin-top:14px}
.field:first-child{margin-top:0}
.inp,.txt{
  width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#fafbfc;
  transition:.16s;font-size:15px;color:var(--text);
}
.inp:focus,.txt:focus{border-color:var(--brand);background:#fff;box-shadow:0 0 0 3px rgba(0,82,217,.08)}
.inp::placeholder,.txt::placeholder{color:#b8bfc8}
.txt{min-height:132px;resize:vertical;line-height:1.65;display:block}
.counter{text-align:right;font-size:12px;color:var(--sub);margin-top:6px}
.counter.warn{color:#e54545}

/* 图片上传 */
.up-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:4px}
.up-item{position:relative;padding-top:100%;border-radius:8px;overflow:hidden;background:#f2f5f9}
.up-item img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.up-del{
  position:absolute;right:0;top:0;width:22px;height:22px;background:rgba(0,0,0,.5);color:#fff;
  font-size:14px;line-height:22px;text-align:center;cursor:pointer;border-radius:0 0 0 8px;
}
.up-add{
  position:relative;padding-top:100%;border:1px dashed #d0d6de;border-radius:8px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;background:#fafbfc;transition:.16s;
}
.up-add:active{background:#f0f3f7}
.up-add span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;color:#9aa3ad;font-size:12px}
.up-add .plus{font-size:26px;color:#c4ccd6;line-height:1;display:block;margin-bottom:2px;font-weight:300}

/* 提交按钮 */
.submit{
  width:100%;height:46px;border:none;border-radius:10px;color:#fff;font-size:16px;font-weight:600;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));cursor:pointer;transition:.18s;
  box-shadow:0 6px 16px rgba(0,82,217,.24);
}
.submit:active{transform:translateY(1px)}
.submit[disabled]{background:#c4ccd6;box-shadow:none;cursor:not-allowed}
.tip-line{font-size:12px;color:var(--sub);text-align:center;margin-top:10px}

/* 我的反馈列表 */
.mine-empty{text-align:center;padding:56px 20px;color:var(--sub);font-size:14px}
.mine-empty .ico{font-size:44px;color:#dfe3e8;display:block;margin-bottom:12px}
.mi{
  background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px;margin-bottom:10px;
  cursor:pointer;transition:.16s;
}
.mi:active{transform:scale(.995)}
.mi-top{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.mi-cate{font-size:12px;padding:2px 8px;border-radius:4px;background:var(--brand-light);color:var(--brand)}
.badge{font-size:11px;padding:2px 7px;border-radius:4px;color:#fff;flex-shrink:0}
.badge.s0{background:#ff8800}
.badge.s1{background:#0052d9}
.badge.s2{background:#00a870}
.badge.s3{background:#a0a8b2}
.mi-title{font-size:15px;font-weight:600;margin-bottom:4px;word-break:break-all}
.mi-text{font-size:14px;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.mi-foot{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:12px;color:var(--sub)}
.mi-foot .dot{width:3px;height:3px;border-radius:50%;background:#d0d6de}
.mi-imgs{display:flex;gap:6px;margin-top:8px}
.mi-imgs i{width:44px;height:44px;border-radius:6px;background-size:cover;background-position:center;background-color:#f2f5f9;display:block}

/* 详情弹层 */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:50;display:none;align-items:flex-end;justify-content:center}
.mask.show{display:flex;animation:fadeIn .18s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.sheet{
  background:#fff;width:100%;max-width:720px;border-radius:16px 16px 0 0;max-height:82vh;overflow-y:auto;
  animation:slideUp .24s cubic-bezier(.2,.8,.3,1);padding-bottom:20px;
}
@keyframes slideUp{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
.sheet-hd{
  position:sticky;top:0;background:#fff;padding:14px 16px 10px;border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:8px;z-index:2;
}
.sheet-hd .st{flex:1;font-size:15px;font-weight:600}
.sheet-close{font-size:22px;color:var(--sub);cursor:pointer;line-height:1;padding:0 4px}
.sheet-body{padding:14px 16px}
.dt-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.dt-content{font-size:15px;line-height:1.75;color:var(--text);white-space:pre-wrap;word-break:break-word}
.dt-imgs{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.dt-imgs img{width:88px;height:88px;object-fit:cover;border-radius:8px;cursor:zoom-in}
.reply-box{background:#f4f8ff;border-radius:10px;padding:12px;margin-top:14px}
.reply-item{margin-bottom:12px}
.reply-item:last-child{margin-bottom:0}
.ri-hd{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--sub);margin-bottom:4px}
.ri-tag{background:var(--brand);color:#fff;padding:1px 6px;border-radius:3px;font-size:11px}
.ri-body{font-size:14px;line-height:1.7;color:var(--text);white-space:pre-wrap;word-break:break-word}
.no-reply{background:#f7f9fc;border-radius:10px;padding:14px;text-align:center;font-size:13px;color:var(--sub);margin-top:14px}

/* Toast */
.toast{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.8);color:#fff;
  padding:12px 20px;border-radius:8px;font-size:14px;z-index:99;opacity:0;pointer-events:none;transition:.2s;max-width:80%;text-align:center;
}
.toast.show{opacity:1}
.toast.ok{background:rgba(0,168,112,.92)}
.toast.err{background:rgba(229,69,69,.92)}

/* 成功卡片 */
.done{padding:40px 20px;text-align:center}
.done .ico{
  width:60px;height:60px;border-radius:50%;background:#e8f9f2;color:#00a870;font-size:30px;
  display:flex;align-items:center;justify-content:center;margin:0 auto 16px;
}
.done h3{font-size:17px;margin-bottom:6px}
.done p{font-size:13px;color:var(--sub);margin-bottom:20px}

/* 图片预览层 */
.viewer{position:fixed;inset:0;background:#000;z-index:100;display:none;align-items:center;justify-content:center}
.viewer.show{display:flex}
.viewer img{max-width:100%;max-height:100%}

/* 底部 */
.foot{text-align:center;font-size:12px;color:#b0b7c0;padding:20px 0 8px}
.foot a{color:#b0b7c0}

/* 嵌入模式（iframe 接入时隐藏头尾） */
.embed .header,.embed .foot{display:none}
.embed .app{padding-top:10px}

@media(max-width:400px){
  .up-grid{grid-template-columns:repeat(3,1fr)}
  .type{min-width:78px;padding:10px 4px 8px}
}
