/* ==========================================================================
   门店编辑弹窗（openStoreForm）视觉重构
   --------------------------------------------------------------------------
   背景诊断：
     针对这个弹窗，style.css 里叠了 4 层 :has() 覆盖（≈468 / 469 / 470 / 472 / 626 行），
     每一层都在上一层基础上「再放大一档」，结果是：
       · 输入框 17px / 最小高 48px、字段标签 16px、区块标题 25px、序号方块 56px
         —— 比应用其余部分（输入 13.5px、标签 12.5px、正文 14px）整整大一圈，
            弹窗要拉到 2000px 以上，一屏放不下几个字段。
       · 五个分区各自一种底色（蓝 / 黄 / 紫 / 青 / 粉）＋ 五种序号色，
            与产品主色冲突，像五个产品拼在一起。
       · 上传区用了应用里**任何地方都不存在**的一套蓝（#1769aa / #536ee8 / #d7dee8）。
       · 上传区被藏在一个「＋ 上传营业执照」开关后面，02 区的主操作默认不可见。

   本文件只做覆盖，不改任何 JS：
     1) 字号 / 控件尺寸拉回应用自身体系
     2) 分区统一白底 + 1px 描边，只有序号块保留品牌色
     3) 上传区常显、压缩高度、改用 --brand（minimal.css 已把品牌色定为 #4d67e8）
   加载位置：必须在 style.css 与 minimal.css 之后（已加在 index.html <head> 末尾）
   ========================================================================== */

/* ---------- 1. 弹窗骨架 ---------- */
.modal.wide:has(.store-form-section),
.modal.wide:has(.store-upload-zone){max-width:980px;border-radius:18px}

.modal.wide:has(.store-form-section) .modal-h{padding:15px 22px;border-bottom:1px solid var(--line)}
.modal.wide:has(.store-form-section) .modal-h h3{font-size:15.5px;font-weight:800}

.modal.wide:has(.store-form-section) .modal-b,
.modal.wide:has(.store-upload-zone) .modal-b{padding:16px 18px;background:#f5f6f8;max-height:calc(100vh - 196px)}

.modal.wide:has(.store-form-section) .modal-f{padding:12px 22px;background:var(--panel);border-top:1px solid var(--line)}
.modal.wide:has(.store-form-section) .modal-f .btn{min-width:84px}

/* ---------- 2. 分区：统一白底，去掉五种彩色底 ---------- */
.modal.wide:has(.store-form-section) .store-form-section,
.modal.wide:has(.store-form-section) .store-section-basic,
.modal.wide:has(.store-form-section) .store-section-interview,
.modal.wide:has(.store-form-section) .store-section-docs,
.modal.wide:has(.store-form-section) .store-section-billing,
.modal.wide:has(.store-form-section) .store-section-receiving,
.modal.wide:has(.store-form-section) .store-section-note{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:none;
  padding:16px 18px;
  margin:0 0 10px;
}
.modal.wide:has(.store-form-section) .store-form-section:last-of-type{margin-bottom:0}

/* ---------- 3. 分区标题 ---------- */
.modal.wide:has(.store-form-section) .store-section-head{
  gap:10px;padding-bottom:10px;margin-bottom:13px;border-bottom:1px solid var(--line-2);
}
.modal.wide:has(.store-form-section) .store-section-head>span,
.modal.wide:has(.store-form-section) .store-section-basic .store-section-head>span,
.modal.wide:has(.store-form-section) .store-section-interview .store-section-head>span,
.modal.wide:has(.store-form-section) .store-section-docs .store-section-head>span,
.modal.wide:has(.store-form-section) .store-section-billing .store-section-head>span,
.modal.wide:has(.store-form-section) .store-section-receiving .store-section-head>span{
  width:24px;height:24px;border-radius:6px;
  background:var(--brand);color:#fff;
  box-shadow:none;font-size:11px;font-weight:800;
}
.modal.wide:has(.store-form-section) .store-section-head b{font-size:14.5px;font-weight:800;color:var(--text)}
.modal.wide:has(.store-form-section) .store-section-head small{font-size:11.5px;margin-top:1px;color:var(--text-3)}

/* ---------- 4. 字段与控件：回归应用的字号体系 ---------- */
.modal.wide:has(.store-form-section) .store-form-section>.field,
.modal.wide:has(.store-upload-zone) .store-form-section>.field,
.modal.wide:has(.store-upload-zone) .modal-b>.field{
  background:transparent;border:0;box-shadow:none;padding:0;margin-bottom:11px;
}
.modal.wide:has(.store-form-section) .field>label,
.modal.wide:has(.store-upload-zone) .modal-b>.field>label{
  font-size:12.5px;font-weight:700;color:var(--text-2);margin-bottom:5px;
}
.modal.wide:has(.store-form-section) .field .hint{font-size:11.5px;color:var(--text-3);margin-top:4px}
.modal.wide:has(.store-form-section) .store-form-section>.field:last-child{margin-bottom:0}

.modal.wide:has(.store-form-section) input:not([type=file]),
.modal.wide:has(.store-form-section) textarea,
.modal.wide:has(.store-form-section) select{
  min-height:0;height:36px;font-size:13.5px;padding:7px 11px;border-radius:6px;
}
.modal.wide:has(.store-form-section) textarea{height:auto;min-height:60px;line-height:1.6}
.modal.wide:has(.store-form-section) .grid2{gap:0 12px}

/* ---------- 5. 上传区：常显 + 紧凑 + 回归品牌色 ---------- */
/* 取消「必须先点开关才展开」的隐藏交互，纯 CSS 生效，JS 无需改动 */
.store-upload-collapsible[hidden]{display:block!important}
.store-upload-toggle{display:none!important}
.store-upload-collapsible{margin-top:6px}

.store-upload-zone,
.modal.wide:has(.store-upload-zone) .store-upload-zone{
  min-height:0;margin:0;padding:14px;gap:4px;
  border:1.5px dashed #c9d4f2;border-radius:8px;background:var(--panel-2);
}
.store-upload-zone:hover,.store-upload-zone:focus{
  border-color:var(--brand);background:var(--brand-soft);box-shadow:inset 0 0 0 3px rgba(77,103,232,.09);
}
.store-upload-zone.dragging{border-color:var(--brand);background:var(--brand-soft);transform:none;box-shadow:inset 0 0 0 3px rgba(77,103,232,.12)}
.store-upload-zone.has-files{border-style:solid;border-color:var(--ok);background:var(--ok-soft)}

.store-upload-title{font-size:12.5px;font-weight:800;color:var(--text-2)}
.store-upload-zone b{font-size:12.5px;font-weight:700;color:var(--text-2)}
.store-upload-zone span{font-size:11.5px;color:var(--text-3)}
.store-upload-zone strong{font-size:11.5px;font-weight:700;color:var(--brand)}
.store-upload-zone.has-files strong{color:var(--ok)}

/* 法人身份证：外层只做容器，真正的落点是「正面 / 反面」两个小框，去掉三层嵌套的冗余 */
.store-upload-zone:has(.store-upload-sides){
  padding:0;border:0;background:transparent;box-shadow:none;gap:6px;
}
.store-upload-zone:has(.store-upload-sides):hover{background:transparent;box-shadow:none}
.store-upload-zone:has(.store-upload-sides) .store-upload-title,
.store-upload-zone:has(.store-upload-sides)>b{display:none}

.store-upload-sides{max-width:none;gap:10px}
.store-upload-side{min-height:70px;gap:3px;border:1.5px dashed #d6dded;border-radius:8px;background:var(--panel-2)}
.store-upload-side:hover{border-color:var(--brand);background:var(--brand-soft);box-shadow:none}
.store-upload-side b{font-size:12.5px;color:var(--text-2)}
.store-upload-side span{font-size:11px;color:var(--text-3)}
.store-upload-side::before{width:20px;height:20px;font-size:15px;line-height:1;color:var(--brand);border-color:#c3cdf0}

/* 文件列表：一行一份，右侧操作按钮对齐 */
.modal.wide:has(.store-upload-zone) .store-files{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.store-file-row{
  padding:6px 10px;margin:0;gap:6px;flex-wrap:nowrap;
  border:1px solid var(--line);border-radius:8px;background:var(--panel);
}
.store-file-row>span{
  flex:1;min-width:0;font-size:12px;color:var(--text-2);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.store-file-row .btn{flex:0 0 auto}

/* ---------- 6. 开票信息：空态给到明确的虚线引导 ---------- */
[data-invoice-profiles]:empty::before{
  content:"还没有开票资料，点击下方按钮添加第一组";
  display:block;padding:14px;text-align:center;font-size:12px;color:var(--text-3);
  border:1.5px dashed var(--line);border-radius:8px;background:var(--panel-2);
}
[data-invoice-profile].card{
  margin:0 0 8px;padding:12px;border:1px solid var(--line);
  border-radius:8px;background:var(--panel-2);box-shadow:none;
}
[data-invoice-profile].card:hover{box-shadow:none;transform:none}
.invoice-profile-title-label{display:block;margin:0 0 5px;font-size:12.5px;font-weight:700;color:var(--text-2)}
.invoice-profile-title{
  margin:0 0 10px;padding:7px 11px;height:36px;font-size:13.5px;font-weight:600;
  border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);
}
.invoice-profile-title:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(77,103,232,.12);outline:none}

/* ---------- 7. 窄屏兜底 ---------- */
@media(max-width:860px){
  .modal.wide:has(.store-form-section) .modal-b{padding:12px}
  .modal.wide:has(.store-form-section) .store-form-section{padding:14px 13px}
  .store-file-row{flex-wrap:wrap}
  .store-file-row>span{flex:1 1 100%}
}
