/* apply/style.css —— 独立 H5「入驻申请 / 海围认领」
   移动优先，海洋蓝主色；类名统一 ap-（page）/ up-（upload）前缀，与门户页面样式互不干扰。

   视觉规范（2026-10-24 重做）：
   · 顶部 ap-hero 深蓝渐变承载品牌与页面标题，正文卡片向上压 22px 形成层次
   · 输入框统一「浅底 + 透明边」，聚焦时转白底并加主色光环（避免默认灰框的廉价感）
   · 状态用 ap-tag（带圆点的胶囊），主次按钮用 ap-btn / ap-btn--soft / ap-minibtn 三档
   ⚠️ 所有颜色走 CSS 变量；新增页面前先在这里找变量，别写死色值。 */

:root {
  --ap-blue: #1668c4;
  --ap-blue-2: #2a8ce0;
  --ap-blue-deep: #0b3f6b;
  --ap-ink: #0e2a44;
  --ap-sub: #5f7d95;
  --ap-line: #e2ebf3;
  --ap-line-soft: #edf3f9;
  --ap-bg: #f3f8fd;
  --ap-danger: #c8372b;
  --ap-ok: #0f8a56;
  --ap-warn: #a76a06;
  --ap-radius: 18px;
  --ap-shadow: 0 18px 40px -20px rgba(10, 60, 102, 0.38), 0 2px 8px rgba(10, 60, 102, 0.05);
  --ap-ring: 0 0 0 4px rgba(42, 140, 224, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -160px, #dceefb 0%, rgba(220, 238, 251, 0) 72%),
    linear-gradient(180deg, #f4f9fe 0%, #f8fbfe 44%, #ffffff 100%);
  background-attachment: fixed;
  color: var(--ap-ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ap-wrap { max-width: 560px; margin: 0 auto; padding: 14px 0 8px; }

/* ===== 顶部品牌区 ===== */
.ap-hero {
  position: relative; overflow: hidden;
  margin: 0 12px;
  padding: 18px 20px 42px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(142deg, #0a3a62 0%, #11599e 54%, #1d84cb 100%);
  box-shadow: 0 22px 44px -22px rgba(8, 48, 84, 0.75);
}
/* 两团柔光气泡，替代位图装饰（零请求、随主题色走） */
.ap-hero::before, .ap-hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 68%);
}
.ap-hero::before { width: 210px; height: 210px; right: -66px; top: -96px; }
.ap-hero::after { width: 320px; height: 320px; left: -132px; bottom: -252px; opacity: 0.55; }
.ap-hero > * { position: relative; z-index: 1; }

.ap-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.ap-mark {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none; border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}
.ap-mark svg { width: 19px; height: 19px; }
.ap-mark svg path { stroke: #fff; }
.ap-brand b { font-size: 13px; font-weight: 650; letter-spacing: 0.14em; }

.ap-hero h1 {
  margin: 0; font-size: 25px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em;
}
.ap-hero p {
  margin: 8px 0 0; max-width: 84%;
  font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, 0.78);
}
/* hero 右上角的次级动作（返回 / 退出登录） */
.ap-hero .ap-linkbtn {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 12.5px; font-weight: 600;
  transition: background 0.16s;
}
.ap-hero .ap-linkbtn:active { background: rgba(255, 255, 255, 0.26); }
/* 头部里的小信息胶囊（首页的当前账号）：白色半透明，与说明文字同一层级 */
.ap-hero-meta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 13px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.94); font-size: 12px; letter-spacing: 0.02em;
}

/* ===== 卡片 ===== */
.ap-card {
  position: relative; z-index: 2;
  margin: 14px 12px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(226, 235, 243, 0.9);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
}
/* hero 之后的第一块向上压，形成「卡片浮起」的层次 */
.is-lift { margin-top: -22px !important; }
.is-lift > *:first-child { margin-top: 0; }
.ap-card > *:last-child { margin-bottom: 0; }

.ap-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ap-card-title { flex: 1; min-width: 0; }
.ap-card-head h2 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.ap-card-title small { display: block; margin-top: 2px; color: var(--ap-sub); font-size: 12px; }
.ap-badge {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  background: linear-gradient(140deg, #e8f3fd, #d7e9fa);
  color: var(--ap-blue); box-shadow: inset 0 0 0 1px rgba(22, 104, 196, 0.1);
}
.ap-badge svg { width: 20px; height: 20px; }

.ap-desc { margin: 0 0 14px; color: var(--ap-sub); font-size: 13px; line-height: 1.65; }
.ap-empty { margin: 4px 0 0; color: var(--ap-sub); font-size: 13px; }
.ap-state {
  margin: 0; padding: 18px 4px; text-align: center;
  color: var(--ap-sub); font-size: 13.5px;
  animation: ap-breathe 1.5s ease-in-out infinite;
}
@keyframes ap-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.ap-note { margin: 10px 0 0; color: var(--ap-sub); font-size: 12px; line-height: 1.65; }
.ap-hint { margin: 2px 0 0; min-height: 18px; color: var(--ap-danger); font-size: 12.5px; font-weight: 500; }
.ap-sep {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 0 10px; font-size: 13px; font-weight: 650; color: var(--ap-ink);
}
.ap-sep::after { content: ""; flex: 1; height: 1px; background: var(--ap-line-soft); }
.ap-reason {
  margin: 4px 0 12px; padding: 10px 12px;
  background: #fdf3f2; border-left: 3px solid var(--ap-danger);
  border-radius: 6px; color: #9c3025; font-size: 12.5px; line-height: 1.6;
}
/* 登录页底部引导（弱化成卡片内的一条说明） */
.ap-tip {
  margin-top: 14px; padding: 11px 13px;
  border-radius: 12px; background: #f5f9fd;
  color: var(--ap-sub); font-size: 12.5px; line-height: 1.65;
}
.ap-tip b { color: var(--ap-ink); font-weight: 650; }

/* ===== 状态胶囊 ===== */
.ap-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: #eef3f8; color: var(--ap-sub); font-size: 12px; font-weight: 650;
}
.ap-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ap-tag.is-approved { background: #e5f7ee; color: var(--ap-ok); }
.ap-tag.is-pending { background: #fff4e2; color: var(--ap-warn); }
.ap-tag.is-rejected { background: #fdeceb; color: var(--ap-danger); }
.ap-tag.is-suspended, .ap-tag.is-cancelled { background: #eef1f4; color: #5f7284; }

/* ===== 键值表 ===== */
.ap-kv { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--ap-line-soft); }
.ap-kv > div { display: flex; gap: 10px; padding: 5px 0; font-size: 13px; }
.ap-kv dt { width: 58px; flex: none; margin: 0; color: var(--ap-sub); }
.ap-kv dd { flex: 1; margin: 0; word-break: break-all; }

/* ===== 表单 ===== */
.ap-form { display: block; }
.ap-row { display: block; margin: 0 0 14px; color: var(--ap-sub); font-size: 12.5px; font-weight: 600; }
.ap-row > input, .ap-row > select, .ap-row > textarea { margin-top: 7px; font-weight: 400; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* 登录页的「标签 + 组合框」结构（前缀 / 显隐按钮） */
.ap-field { display: block; margin-bottom: 14px; }
.ap-label { display: block; margin-bottom: 7px; color: var(--ap-sub); font-size: 12.5px; font-weight: 600; }
.ap-inputwrap {
  display: flex; align-items: center;
  background: #f4f8fc; border: 1.5px solid var(--ap-line); border-radius: 13px;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.ap-inputwrap:focus-within { background: #fff; border-color: var(--ap-blue-2); box-shadow: var(--ap-ring); }
.ap-prefix {
  flex: none; padding: 0 12px 0 14px; margin-right: 12px;
  border-right: 1px solid #dbe7f2; color: var(--ap-sub); font-size: 14px;
}

.ap-input {
  display: block; width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ap-line); border-radius: 13px;
  background: #f4f8fc; color: var(--ap-ink);
  font-family: inherit; font-size: 15px; line-height: 1.4;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.ap-input::placeholder { color: #9db2c4; }
.ap-input:focus { background: #fff; border-color: var(--ap-blue-2); box-shadow: var(--ap-ring); }
.ap-inputwrap .ap-input {
  flex: 1; width: auto; min-width: 0;
  padding: 12px 14px 12px 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.ap-inputwrap .ap-input:focus { box-shadow: none; }
textarea.ap-input { min-height: 76px; resize: vertical; line-height: 1.6; }
select.ap-input {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235f7d95' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.ap-eye {
  display: flex; align-items: center; justify-content: center;
  width: 46px; align-self: stretch; flex: none;
  border: 0; background: none; color: var(--ap-sub); cursor: pointer;
  border-radius: 0 13px 13px 0;
}
.ap-eye svg { width: 20px; height: 20px; }
.ap-eye[aria-pressed="true"] { color: var(--ap-blue); }

/* ===== 按钮 ===== */
.ap-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 15px 18px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #2280da 0%, #0e5aa6 100%);
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 650; letter-spacing: 0.06em;
  box-shadow: 0 14px 26px -12px rgba(14, 90, 166, 0.72);
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.ap-btn:active { transform: translateY(1px); box-shadow: 0 7px 16px -10px rgba(14, 90, 166, 0.7); }
.ap-btn:disabled { background: #b8cadb; box-shadow: none; cursor: not-allowed; transform: none; }
/* 次要动作：浅底描边，不与主按钮抢视线 */
.ap-btn--soft {
  background: rgba(22, 104, 196, 0.07);
  color: var(--ap-blue);
  box-shadow: inset 0 0 0 1.5px rgba(22, 104, 196, 0.22);
  letter-spacing: 0.02em; font-size: 14.5px; padding: 13px 16px;
}
.ap-btn--soft:active { background: rgba(22, 104, 196, 0.13); box-shadow: inset 0 0 0 1.5px rgba(22, 104, 196, 0.32); }
.ap-btn--soft:disabled { background: #f1f5f9; color: #9db2c4; box-shadow: inset 0 0 0 1.5px var(--ap-line); }
.ap-minibtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 11px; cursor: pointer;
  border: 1.5px solid rgba(22, 104, 196, 0.3);
  background: rgba(22, 104, 196, 0.06);
  color: var(--ap-blue); font-family: inherit; font-size: 13.5px; font-weight: 620;
}
.ap-minibtn:active { background: rgba(22, 104, 196, 0.14); }

/* ===== 列表（认领记录 / 海围搜索结果） ===== */
.ap-list { list-style: none; margin: 12px 0 0; padding: 0; }
.ap-list > li { padding: 11px 0; border-top: 1px solid var(--ap-line-soft); }
.ap-list > li:first-child { border-top: 0; }
.ap-list-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-list-main b { font-size: 14px; font-weight: 620; }
.ap-list .ap-minibtn { margin-top: 8px; }
.ap-results { margin-top: 10px; }
.ap-pickbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; margin: 0; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--ap-line); border-radius: 12px; background: #fbfdff;
  color: var(--ap-ink); font-family: inherit; font-size: 14px;
  transition: background 0.14s, border-color 0.14s;
}
.ap-pickbtn:active { background: #eef6fd; border-color: var(--ap-blue-2); }
.ap-selected {
  margin: 10px 0 18px; padding: 9px 12px; border-radius: 10px;
  background: rgba(22, 104, 196, 0.07); color: var(--ap-blue);
  font-size: 13px; font-weight: 600;
}

/* ===== 上传 ===== */
.up-grid { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.up-tile { position: relative; width: 78px; height: 78px; }
.up-tile img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--ap-line);
}
.up-del {
  position: absolute; right: -6px; top: -6px;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid #fff; background: rgba(14, 42, 68, 0.72);
  color: #fff; font-size: 13px; line-height: 1;
}
.up-add {
  width: 78px; height: 78px; cursor: pointer;
  border: 1.5px dashed #c6d8e8; border-radius: 12px;
  background: #f8fbfe; color: var(--ap-sub); font-size: 24px; font-weight: 300;
  transition: border-color 0.14s, background 0.14s;
}
.up-add:active { border-color: var(--ap-blue-2); background: #eff7fe; }
.up-hint { margin: 7px 0 0; color: var(--ap-sub); font-size: 12px; }

/* ===== 提示气泡 ===== */
.apply-toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 99;
  max-width: 86vw; padding: 11px 18px; border-radius: 12px;
  background: rgba(14, 42, 68, 0.94);
  color: #fff; font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 12px 28px -10px rgba(14, 42, 68, 0.6);
  transform: translateX(-50%);
  animation: ap-toast-in 0.22s ease-out;
}
.apply-toast.is-error { background: rgba(176, 45, 35, 0.95); }
@keyframes ap-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 页脚 ===== */
.ap-foot { max-width: 560px; margin: 0 auto; padding: 18px 24px 30px; }
.ap-foot p { margin: 0; color: #8fa6b8; font-size: 11.5px; line-height: 1.7; text-align: center; }

@media (max-width: 380px) {
  .ap-grid { grid-template-columns: 1fr; }
  .ap-hero h1 { font-size: 22px; }
  .ap-hero p { max-width: 100%; }
}

/* 宽屏（在电脑上打开分享链接）：顶部留白，别让卡片贴着浏览器边缘 */
@media (min-width: 600px) {
  .ap-wrap { padding-top: 44px; }
  .ap-foot { padding-bottom: 40px; }
}

/* 深色模式：只跟随系统，避免白底刺眼 */
@media (prefers-color-scheme: dark) {
  html { color-scheme: light; }
}
