/* ==========================================================================
   物业点位管理平台 · 核心样式
   基于本地 Bootstrap 3.3.7 做栅格/表单基础，本文件负责整体视觉。
   ========================================================================== */

:root {
  --navy-900: #071a2e;
  --navy-800: #0b2540;
  --navy-700: #113659;
  --navy-600: #17476f;
  --blue-600: #1b5f9e;
  --blue-500: #2a76b8;
  --blue-100: #e8f1fa;
  --gold-500: #d5a23c;
  --gold-400: #e6b955;
  --gold-100: #fdf4e0;
  --ink-900: #12203a;
  --ink-700: #33445f;
  --ink-500: #5f7189;
  --ink-400: #8394aa;
  --line: #e2e8f1;
  --line-strong: #d3dce8;
  --bg: #eef3f9;
  --surface: #ffffff;
  --success: #1b9a68;
  --warning: #dd8f2c;
  --danger: #cf4a4a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 35, 70, .06);
  --shadow: 0 10px 30px rgba(15, 35, 70, .08);
  --shadow-lg: 0 24px 60px rgba(8, 27, 48, .18);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
          system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

/* Bootstrap 3 会给 input[type=file] 设置 display:block，这里确保 hidden 生效 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover, a:focus { color: var(--blue-500); text-decoration: none; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; color: var(--ink-900); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -.2em;
  flex: none;
  color: currentColor;
}

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-400); }
.text-right { text-align: right; }
::selection { background: rgba(27, 95, 158, .18); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c6d2e0; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b8cb; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: linear-gradient(100deg, var(--navy-900) 0%, var(--navy-800) 42%, var(--navy-700) 78%, #17537f 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(7, 26, 46, .28);
}
.app-nav::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), rgba(230, 185, 85, .35) 40%, transparent 78%);
}
.app-nav__inner {
  max-width: 1680px;
  margin: 0 auto;
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: flex; align-items: center; gap: 12px; color: #fff; flex: none; }
.brand:hover, .brand:focus { color: #fff; }
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(230, 185, 85, .95), rgba(213, 162, 60, .75));
  color: var(--navy-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px rgba(213, 162, 60, .28);
}
.brand__mark .ico { width: 22px; height: 22px; }
.brand__mark--lg { width: 52px; height: 52px; border-radius: 15px; }
.brand__mark--lg .ico { width: 28px; height: 28px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand__sub { font-size: 11px; color: rgba(255, 255, 255, .55); letter-spacing: .8px; }

.app-nav__links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.top-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;
}
.top-link .ico { width: 16px; height: 16px; opacity: .85; }
.top-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.top-link.is-active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.top-link.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-400), rgba(230, 185, 85, .2));
}
.top-link--admin {
  border: 1px solid rgba(230, 185, 85, .55);
  color: var(--gold-400);
  padding: 8px 14px;
}
.top-link--admin:hover { background: rgba(230, 185, 85, .14); color: #ffe4a8; }
.top-link--admin.is-active { background: rgba(230, 185, 85, .18); color: #ffe4a8; }
.top-link--admin.is-active::after { display: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  align-items: center; justify-content: center;
}

.nav-user { position: relative; margin-left: auto; flex: none; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.user-chip:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-chip__meta strong { font-size: 13px; font-weight: 600; }
.user-chip__meta small { font-size: 11px; color: rgba(255, 255, 255, .55); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip__caret { width: 14px; height: 14px; opacity: .6; transition: transform .2s ease; }
.nav-user.is-open .user-chip__caret { transform: rotate(180deg); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(140deg, #2f7cbf, #1b5f9e);
  color: #fff;
  font-size: 13px; font-weight: 700;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.avatar--sm { width: 26px; height: 26px; font-size: 11px; }
.avatar--lg { width: 42px; height: 42px; font-size: 16px; }
.avatar--xl { width: 56px; height: 56px; font-size: 22px; }
.avatar--xxl { width: 76px; height: 76px; font-size: 30px; }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 300px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 1000;
}
.nav-user.is-open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel__head { display: flex; gap: 12px; align-items: center; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); }
.dropdown-panel__id { display: flex; flex-direction: column; min-width: 0; }
.dropdown-panel__id strong { font-size: 15px; }
.dropdown-panel__id small { color: var(--ink-400); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-panel__meta { padding: 10px 6px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.dropdown-panel__meta > div { display: flex; justify-content: space-between; font-size: 12px; gap: 12px; }
.dropdown-panel__meta span { color: var(--ink-400); }
.dropdown-panel__meta b { font-weight: 600; color: var(--ink-700); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-panel__actions { padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink-700);
  font-size: 13.5px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dropdown-item:hover { background: #f2f6fb; color: var(--blue-600); }
.dropdown-item .ico { width: 16px; height: 16px; color: var(--ink-400); }
.dropdown-item--danger { color: var(--danger); }
.dropdown-item--danger .ico { color: var(--danger); }
.dropdown-panel__actions form { margin: 0; }

/* ==========================================================================
   提示条 / 弹窗
   ========================================================================== */
.toast-stack {
  position: fixed;
  top: 84px; right: 24px;
  z-index: 1500;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px;
  background: #fff;
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-500);
  animation: toast-in .32s cubic-bezier(.22, 1, .36, 1);
  font-size: 13.5px;
  color: var(--ink-700);
}
.toast.is-hiding { animation: toast-out .28s ease forwards; }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast__icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-600); flex: none; margin-top: 1px; }
.toast--success .toast__icon { background: #e7f6ef; color: var(--success); }
.toast--error .toast__icon { background: #fdecec; color: var(--danger); }
.toast--warning .toast__icon { background: #fdf2e2; color: var(--warning); }
.toast__icon .ico { width: 13px; height: 13px; }
.toast__body { flex: 1; }
.toast__close { border: 0; background: none; color: var(--ink-400); cursor: pointer; padding: 2px; line-height: 1; }
.toast__close:hover { color: var(--ink-900); }
.toast__close .ico { width: 14px; height: 14px; }

@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

.app-modal { position: fixed; inset: 0; z-index: 1600; display: none; align-items: center; justify-content: center; padding: 20px; }
.app-modal.is-open { display: flex; }
.app-modal__mask { position: absolute; inset: 0; background: rgba(7, 26, 46, .48); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
.app-modal__card {
  position: relative;
  width: min(430px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .26s cubic-bezier(.22, 1, .36, 1);
}
.app-modal__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #fdecec; color: var(--danger); margin-bottom: 14px; }
.app-modal__icon .ico { width: 22px; height: 22px; }
.app-modal__title { font-size: 18px; margin-bottom: 8px; }
.app-modal__text { color: var(--ink-500); font-size: 13.5px; line-height: 1.7; }
.app-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink-700);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: none;
  text-shadow: none;
  white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn:hover, .btn:focus { outline: none; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--navy-700));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(23, 71, 111, .22);
}
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #206cb1, #1a4f7d); color: #fff; box-shadow: 0 8px 20px rgba(23, 71, 111, .3); }
.btn-primary:disabled { opacity: .65; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-700); }
.btn-ghost:hover, .btn-ghost:focus { border-color: #b9c8db; background: #f7fafd; color: var(--ink-900); }
.btn-light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-light:hover, .btn-light:focus { background: rgba(255, 255, 255, .24); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #d95959, #bf3f3f); color: #fff; border-color: transparent; }
.btn-danger:hover, .btn-danger:focus { background: linear-gradient(135deg, #c94c4c, #a93636); color: #fff; }
.btn-danger-ghost { background: rgba(207, 74, 74, .08); color: #d95f5f; border-color: rgba(207, 74, 74, .28); }
.btn-danger-ghost:hover, .btn-danger-ghost:focus { background: rgba(207, 74, 74, .16); color: #e57373; border-color: rgba(207, 74, 74, .4); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-sm .ico { width: 14px; height: 14px; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(42, 118, 184, .3); }

.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-500);
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: all .16s ease;
  padding: 0;
  flex: none;
}
.icon-btn:hover { color: var(--blue-600); border-color: #bfd2e6; background: #f5f9fd; }
.icon-btn .ico { width: 15px; height: 15px; }
.icon-btn--sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn--sm .ico { width: 13px; height: 13px; }
.icon-btn--danger:hover { color: var(--danger); border-color: #efc3c3; background: #fdf4f4; }

/* ==========================================================================
   页面容器
   ========================================================================== */
.page { max-width: 1440px; margin: 0 auto; padding: 28px 30px 56px; }
.page--narrow { max-width: 860px; }
.page--form { max-width: 1100px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.3px; }
.page-head p { color: var(--ink-500); font-size: 13.5px; margin-top: 6px; }
.page-head p b { color: var(--ink-900); }
.page-head--form { margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-400); font-size: 12.5px; margin-bottom: 10px; }
.back-link:hover { color: var(--blue-600); }
.back-link .ico { width: 14px; height: 14px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.card__head h2 { font-size: 15.5px; }
.card__hint { color: var(--ink-400); font-size: 12px; }
.card__body { padding: 22px; }
.card__link { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue-600); }
.card__link .ico { width: 13px; height: 13px; }

/* ==========================================================================
   表单
   ========================================================================== */
.form-control {
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 13.5px;
  color: var(--ink-900);
  background: #fff;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(42, 118, 184, .14);
  outline: none;
}
.form-control::placeholder { color: #a9b7c8; }
textarea.form-control { height: auto; min-height: 108px; resize: vertical; line-height: 1.7; }
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  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='%2373849a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid--single { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); display: flex; align-items: center; gap: 3px; }
.req { color: var(--danger); font-weight: 700; }
.field__control { display: flex; flex-direction: column; gap: 5px; }
.field__hint { font-size: 11.5px; color: var(--ink-400); margin: 0; }
.field__error { font-size: 11.5px; color: var(--danger); margin: 0; }
.field.has-error .form-control { border-color: #e39b9b; background: #fffafa; }

.form-section { padding: 24px 26px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: none; }
.form-section__title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.form-section__index {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.form-section__title h2 { font-size: 15px; margin-bottom: 2px; }
.form-section__title p { font-size: 12px; color: var(--ink-400); }

.form-card { padding: 4px 0; }
.form-card--narrow { padding: 26px; }
.form-card--narrow .form-section { padding: 0; border: none; }
.form-card .alert { margin: 22px 26px 0; }
.form-card--narrow .alert { margin: 0 0 18px; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 18px 26px;
  background: #fafcff;
  border-top: 1px solid var(--line);
}
.form-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px;
  padding: 11px 14px;
  background: #f5f9fd;
  border: 1px dashed #d3e2f1;
  border-radius: 10px;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.7;
}
.form-note .ico { width: 15px; height: 15px; color: var(--blue-500); margin-top: 2px; }
.form-note code { background: #fff; padding: 1px 5px; border-radius: 5px; color: var(--blue-600); }

.check-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.check-row--perm { margin-top: 0; gap: 12px 34px; }
.perm-picker {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.perm-picker .check { font-size: 13.5px; font-weight: 600; }
.form-note--plain { margin-top: 12px; background: #fff; border-style: solid; color: var(--ink-400); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--ink-700); position: relative; user-select: none; margin: 0; font-weight: 400; }
.check input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 19px; height: 19px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  display: grid; place-items: center;
  color: transparent;
  transition: all .16s ease;
  flex: none;
}
.check__box .ico { width: 12px; height: 12px; }
.check input:checked + .check__box { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(42, 118, 184, .2); }
.check--sm { font-size: 12.5px; }
.check--sm .check__box { width: 16px; height: 16px; border-radius: 5px; }
.field--check { margin: 0; }

.file-drop {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px;
  border: 1.5px dashed #cfdaea;
  border-radius: 12px;
  background: #fafcff;
  cursor: pointer;
  transition: all .18s ease;
  margin: 0;
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--blue-500); background: #f2f8fe; }
.file-drop__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-100); color: var(--blue-600);
  display: grid; place-items: center;
  flex: none;
}
.file-drop__icon .ico { width: 20px; height: 20px; }
.file-drop__text { display: flex; flex-direction: column; }
.file-drop__text b { font-size: 13.5px; color: var(--ink-900); }
.file-drop__text small { color: var(--ink-400); font-size: 11.5px; }
.file-drop--sm { padding: 14px 16px; }
.file-drop--sm .file-drop__icon { width: 34px; height: 34px; border-radius: 10px; }
.file-drop--sm .file-drop__icon .ico { width: 16px; height: 16px; }
.file-drop--sm .file-drop__text b { font-size: 12.5px; }

.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--ink-600);
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}
.file-chip .ico { width: 14px; height: 14px; color: var(--blue-500); }

.existing-files { margin: 4px 0 16px; }
.existing-files-card { margin-top: 18px; }
.existing-files-card .card__body { padding: 16px 22px; }
.existing-files__label { font-size: 12px; color: var(--ink-400); display: block; margin-bottom: 8px; }
.existing-files__list { display: flex; flex-direction: column; gap: 7px; }
.existing-file {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
}
.existing-file__ext { font-family: var(--mono); font-size: 10.5px; color: var(--blue-600); background: var(--blue-100); padding: 2px 6px; border-radius: 5px; }
.existing-file__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.existing-file__size { color: var(--ink-400); font-size: 11.5px; }
.existing-file form { margin: 0; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.form-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.aside-card { padding: 20px; }
.aside-card__user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.aside-card__user strong { display: block; font-size: 15px; }
.aside-card__user small { color: var(--ink-400); font-size: 12px; }
.aside-meta { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.aside-meta > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.aside-meta dt { color: var(--ink-400); font-weight: 400; }
.aside-meta dd { margin: 0; text-align: right; color: var(--ink-700); font-weight: 600; }
.aside-card--tips h3 { font-size: 13.5px; margin-bottom: 10px; }
.aside-card--tips ul { display: flex; flex-direction: column; gap: 9px; }
.aside-card--tips li { font-size: 12px; color: var(--ink-500); line-height: 1.65; padding-left: 13px; position: relative; }
.aside-card--tips li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500); }
.aside-card--tips b { color: var(--ink-900); }

.user-summary { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.user-summary strong { display: block; font-size: 15px; }
.user-summary small { color: var(--ink-400); font-size: 12px; }

.dept-preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #f6f9fd; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.dept-preview__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; }
.dept-preview__icon .ico { width: 18px; height: 18px; }
.dept-preview strong { display: block; font-size: 13.5px; }
.dept-preview small { color: var(--ink-400); font-size: 11px; }

/* ==========================================================================
   筛选栏 / 表格
   ========================================================================== */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-bar__search { position: relative; flex: 1 1 260px; min-width: 200px; }
.filter-bar__search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 14px 9px 40px;
  font-size: 13.5px;
  color: var(--ink-900);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.filter-bar__search input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(42, 118, 184, .14); }
.filter-bar__search .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-400); }
.filter-select { width: auto; min-width: 148px; height: 42px; }
.filter-date { width: 148px; height: 42px; }
.filter-sep { color: var(--ink-400); font-size: 12px; }

.table-card { overflow: hidden; }
.table-card__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.table-card__hint { font-weight: 400; font-size: 12px; color: var(--ink-400); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table thead th {
  background: #f7fafd;
  color: var(--ink-500);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-align: left;
  padding: 12px 18px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.data-table tbody td { padding: 14px 18px; border-bottom: 1px solid #edf1f7; vertical-align: middle; color: var(--ink-700); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #f9fbfe; }
.data-table tr.is-disabled { opacity: .62; }
.cell-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.point-name { font-weight: 600; color: var(--ink-900); font-size: 13.5px; }
.point-name:hover { color: var(--blue-600); }
.point-sub { font-size: 11.5px; color: var(--ink-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.dept-chip { display: inline-block; background: #f2f7fc; border: 1px solid #e2ecf6; color: var(--ink-600); font-size: 11.5px; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.col-actions { text-align: right; }
.table-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-inline { display: inline-flex; align-items: center; gap: 8px; }
.self-tag { display: inline-block; margin-left: 6px; font-size: 10px; color: var(--blue-600); background: var(--blue-100); padding: 1px 6px; border-radius: 5px; font-weight: 600; vertical-align: 1px; }

.dept-cell { display: flex; align-items: center; gap: 9px; position: relative; }
.dept-cell__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dept-cell__icon { width: 26px; height: 26px; border-radius: 7px; background: #f2f7fc; color: var(--blue-600); display: grid; place-items: center; flex: none; }
.dept-cell__icon .ico { width: 14px; height: 14px; }
.dept-tree__line { position: absolute; left: -14px; top: 50%; width: 12px; height: 1px; background: var(--line-strong); }
.level-pill { font-family: var(--mono); font-size: 10.5px; color: var(--ink-500); background: #f2f5f9; padding: 2px 7px; border-radius: 5px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.badge--gold { background: var(--gold-100); color: #a3771f; }
.badge--blue { background: var(--blue-100); color: var(--blue-600); }
.badge--gray { background: #f1f4f8; color: var(--ink-500); }
.badge--red { background: #fdecec; color: var(--danger); }
.badge--light { background: #f6f8fb; color: var(--ink-500); border: 1px solid var(--line); }
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: #f1f5fa; color: var(--ink-500); font-size: 11px; font-weight: 600; margin-left: 4px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status--active { color: var(--success); background: #eaf7f1; }
.status--warning { color: var(--warning); background: #fdf4e6; }
.status--offline { color: #7c889b; background: #f0f3f7; }
.status--lg { font-size: 12.5px; padding: 5px 12px; }

.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.tag--is-create { background: #eaf7f1; color: var(--success); }
.tag--is-update { background: #eef4fc; color: var(--blue-600); }
.tag--is-delete { background: #fdecec; color: var(--danger); }
.tag--is-attachment { background: var(--gold-100); color: #a3771f; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 5px; }
.pager__num, .pager__btn {
  min-width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-500);
  font-size: 12.5px;
  transition: all .15s ease;
  padding: 0 8px;
}
.pager__num:hover, .pager__btn:hover { border-color: #bdd1e6; color: var(--blue-600); background: #f7fafd; }
.pager__num.is-current { background: var(--blue-600); border-color: var(--blue-600); color: #fff; font-weight: 700; }
.pager__btn.is-disabled { opacity: .4; pointer-events: none; }
.pager__icon { width: 14px; height: 14px; }
.pager__icon--prev { transform: rotate(90deg); }
.pager__ellipsis { color: var(--ink-400); padding: 0 3px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 52px 20px; text-align: center; }
.empty-state__icon { width: 54px; height: 54px; border-radius: 16px; background: #f2f7fc; color: #97aec5; display: grid; place-items: center; margin-bottom: 6px; }
.empty-state__icon .ico { width: 24px; height: 24px; }
.empty-state strong { font-size: 14px; color: var(--ink-700); }
.empty-state p { font-size: 12.5px; color: var(--ink-400); }
.empty-state--sm { padding: 26px 12px; }
.empty-state--sm .empty-state__icon { width: 42px; height: 42px; border-radius: 12px; }
.empty-state--sm .empty-state__icon .ico { width: 19px; height: 19px; }

.notice {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px;
  background: #fdf7e9;
  border: 1px solid #f2e3c2;
  border-radius: 12px;
  color: #8a6d2f;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.notice .ico { width: 16px; height: 16px; color: var(--gold-500); }

/* 日志快照 */
.log-details { margin-top: 6px; }
.log-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--blue-600);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.log-details summary::-webkit-details-marker { display: none; }
.log-details summary::before { content: "▸"; font-size: 10px; transition: transform .15s ease; }
.log-details[open] summary::before { transform: rotate(90deg); }
.log-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; min-width: 420px; }
.log-diff > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.log-diff span { display: block; font-size: 10.5px; color: var(--ink-400); margin-bottom: 4px; }
.log-diff pre { margin: 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.6; color: var(--ink-700); max-height: 190px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.log-table td { vertical-align: top; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-body { background: #eef3f9; }
.login { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); min-height: 100vh; }
.login__brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(1200px 700px at 12% 8%, #1b4f7d 0%, transparent 55%),
              radial-gradient(900px 600px at 88% 92%, rgba(213, 162, 60, .22) 0%, transparent 60%),
              linear-gradient(150deg, #06182a 0%, #0a2540 48%, #103a5f 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px 58px 34px;
}
.login__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 72%);
  pointer-events: none;
}
.login__deco { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.login__deco--one { width: 420px; height: 420px; border: 1px solid rgba(230, 185, 85, .18); right: -140px; top: 60px; }
.login__deco--two { width: 260px; height: 260px; background: radial-gradient(circle, rgba(42, 118, 184, .22), transparent 70%); right: 40px; bottom: 60px; }
.login__brand-inner { position: relative; z-index: 2; max-width: 560px; }
.login__logo { display: flex; align-items: center; gap: 14px; margin-bottom: 64px; }
.login__logo strong { display: block; font-size: 16px; letter-spacing: .6px; }
.login__logo small { font-size: 11.5px; color: rgba(255, 255, 255, .5); letter-spacing: 1px; }
.login__brand h1 {
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(100deg, #ffffff 30%, #ffe7b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login__lead { color: rgba(255, 255, 255, .62); font-size: 14px; line-height: 1.9; max-width: 440px; }
.login__features { display: flex; flex-direction: column; gap: 18px; margin-top: 44px; }
.login__features li { display: flex; gap: 13px; align-items: flex-start; }
.login__feature-ico {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--gold-400);
  display: grid; place-items: center;
  flex: none;
}
.login__feature-ico .ico { width: 17px; height: 17px; }
.login__features b { display: block; font-size: 14px; color: rgba(255, 255, 255, .92); }
.login__features small { font-size: 12px; color: rgba(255, 255, 255, .48); }
.login__stats { display: flex; gap: 46px; margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .1); }
.login__stats b { display: block; font-size: 28px; font-weight: 700; color: var(--gold-400); font-family: var(--mono); }
.login__stats span { font-size: 11.5px; color: rgba(255, 255, 255, .45); letter-spacing: 1px; }
.brand__sub { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login__brand-foot { position: relative; z-index: 2; font-size: 11.5px; color: rgba(255, 255, 255, .34); letter-spacing: .6px; margin-top: 46px; }

.login__panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px;
  background: #f6f9fd;
  position: relative;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 34px 34px 28px;
  box-shadow: 0 24px 70px rgba(12, 34, 60, .12);
  border: 1px solid #e6edf6;
}
.login-card__head { margin-bottom: 24px; }
.login-card__head h2 { font-size: 24px; letter-spacing: -.4px; }
.login-card__head p { font-size: 12.5px; color: var(--ink-400); margin-top: 6px; }
.login-card form .field { margin-bottom: 16px; }
.login-card form .form-control { height: 48px; font-size: 14px; border-radius: 11px; }
.login-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; }
.login-card__hint { font-size: 11.5px; color: var(--ink-400); }
.login-card .btn-lg { height: 48px; border-radius: 11px; font-size: 15px; letter-spacing: 1px; }
.login-card .alert { margin-bottom: 16px; }
.login-card__foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 18px;
  font-size: 11px;
  color: var(--ink-400);
  line-height: 1.6;
}
.login-card__foot .ico { width: 13px; height: 13px; flex: none; color: var(--ink-300); }
.login__copyright { position: absolute; bottom: 24px; font-size: 11px; color: #9aa9bc; }

.alert {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  border: 1px solid transparent;
  margin-bottom: 14px;
}
.alert .ico { width: 16px; height: 16px; flex: none; }
.alert-danger { background: #fdf1f1; border-color: #f6d5d5; color: #b24545; }

/* ==========================================================================
   点位详情
   ========================================================================== */
.page--detail { max-width: 1400px; }
.detail-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #081d33 0%, #0d3055 52%, #17476f 100%);
  box-shadow: 0 20px 50px rgba(10, 30, 55, .22);
  margin-bottom: 22px;
}
.detail-hero__bg {
  position: absolute; inset: 0;
  background: radial-gradient(700px 300px at 88% 0%, rgba(213, 162, 60, .18), transparent 70%),
              radial-gradient(500px 240px at 10% 120%, rgba(42, 118, 184, .35), transparent 70%);
  pointer-events: none;
}
.detail-hero__inner { position: relative; padding: 26px 30px 28px; }
.detail-hero__crumbs { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: rgba(255, 255, 255, .5); margin-bottom: 12px; }
.detail-hero__crumbs a { color: rgba(255, 255, 255, .66); }
.detail-hero__crumbs a:hover { color: #fff; }
.detail-hero__crumbs .ico { width: 12px; height: 12px; opacity: .6; }
.detail-hero__title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-hero__title h1 { color: #fff; font-size: 30px; letter-spacing: -.3px; }
.point-id { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; padding: 2px 7px; }
.detail-hero .status--active { background: rgba(27, 154, 104, .2); color: #6ee7b0; }
.detail-hero .status--warning { background: rgba(221, 143, 44, .2); color: #ffc978; }
.detail-hero .status--offline { background: rgba(255, 255, 255, .12); color: #cfd8e4; }
.detail-hero__addr { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255, 255, 255, .6); margin-top: 10px; }
.detail-hero__addr .ico { width: 15px; height: 15px; color: var(--gold-400); }
.detail-hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.detail-hero__actions form { margin: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 22px; align-items: start; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin: 0; }
.info-grid > div { min-width: 0; }
.info-grid dt { font-size: 11.5px; color: var(--ink-400); font-weight: 400; margin-bottom: 3px; }
.info-grid dd { margin: 0; font-size: 13.5px; color: var(--ink-900); font-weight: 600; word-break: break-word; }
.info-grid__wide { grid-column: 1 / -1; }
.info-desc { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.info-desc h3 { font-size: 13px; color: var(--ink-700); margin-bottom: 8px; }
.info-desc p { font-size: 13px; color: var(--ink-500); line-height: 1.9; }
.breadcrumb-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 500 !important; }
.breadcrumb-chain .ico { width: 12px; height: 12px; color: var(--ink-400); }
.breadcrumb-chain span { color: var(--ink-700); font-size: 12.5px; }

.map-card .mini-map, .mini-map { height: 340px; width: 100%; background: #e3ebf4; }
.attachment-grid { display: flex; flex-direction: column; gap: 10px; }
.attachment { display: flex; align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; transition: border-color .15s ease, background .15s ease; }
.attachment:hover { border-color: #c9dcee; background: #fafcff; }
.attachment__thumb { width: 46px; height: 46px; border-radius: 9px; overflow: hidden; background: #f1f5fa; display: grid; place-items: center; flex: none; }
.attachment__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment__thumb--file { color: var(--blue-600); font-family: var(--mono); font-size: 10px; flex-direction: column; gap: 2px; }
.attachment__thumb--file .ico { width: 13px; height: 13px; color: var(--ink-400); }
.attachment__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.attachment__meta strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment__meta small { font-size: 11px; color: var(--ink-400); }
.attachment__actions { display: flex; gap: 5px; flex: none; }
.attachment__actions form { margin: 0; }
.upload-form { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.upload-form .btn { align-self: stretch; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline__item { position: relative; display: flex; gap: 12px; }
.timeline__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue-500); margin-top: 5px; margin-left: 5px; flex: none; box-shadow: 0 0 0 3px #fff; z-index: 1; }
.timeline__dot.tag--is-create { background: var(--success); }
.timeline__dot.tag--is-update { background: var(--blue-500); }
.timeline__dot.tag--is-delete { background: var(--danger); }
.timeline__dot.tag--is-attachment { background: var(--gold-500); }
.timeline__body { min-width: 0; flex: 1; }
.timeline__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.timeline__head b { font-weight: 600; color: var(--ink-700); }
.timeline__head time { color: var(--ink-400); font-size: 11px; margin-left: auto; font-family: var(--mono); }
.timeline__ip { font-size: 10.5px; color: var(--ink-400); font-family: var(--mono); margin-top: 3px; }

/* ==========================================================================
   个人中心
   ========================================================================== */
.profile-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 22px; align-items: start; }
.profile-card { overflow: hidden; }
.profile-card__hero {
  padding: 28px 26px 22px;
  background: linear-gradient(140deg, #0b2540, #17476f);
  color: #fff;
  display: flex; gap: 16px; align-items: center;
}
.profile-card__hero .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.profile-card__id h2 { color: #fff; font-size: 20px; margin-bottom: 3px; }
.profile-card__id p { color: rgba(255, 255, 255, .55); font-size: 11.5px; margin-bottom: 9px; }
.profile-card__hero .badge--light { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .16); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.profile-stats > div { padding: 18px 14px; text-align: center; border-right: 1px solid var(--line); }
.profile-stats > div:last-child { border-right: none; }
.profile-stats b { display: block; font-size: 20px; font-family: var(--mono); color: var(--ink-900); }
.profile-stats span { font-size: 10.5px; color: var(--ink-400); }
.profile-meta { padding: 18px 26px; display: flex; flex-direction: column; gap: 10px; }
.profile-meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.profile-meta span { color: var(--ink-400); }
.profile-meta b { color: var(--ink-700); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card > .btn { margin: 0 26px 24px; width: calc(100% - 52px); }

/* ==========================================================================
   错误页
   ========================================================================== */
.error-page { min-height: calc(100vh - 67px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.error-page__code {
  font-family: var(--mono);
  font-size: clamp(90px, 14vw, 160px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(140deg, #17476f, #d5a23c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -4px;
}
.error-page h1 { font-size: 24px; margin: 10px 0 8px; }
.error-page p { color: var(--ink-500); font-size: 13.5px; margin-bottom: 24px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1200px) {
  .form-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .profile-layout { grid-template-columns: 340px minmax(0, 1fr); }
}
@media (max-width: 992px) {
  .app-nav__inner { gap: 12px; padding: 0 16px; }
  .brand__sub { display: none; }
  .nav-toggle { display: inline-flex; }
  .app-nav__links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: linear-gradient(180deg, #0b2540, #0f3355);
    flex-direction: column; align-items: stretch;
    padding: 10px 14px 16px; gap: 2px;
    box-shadow: 0 18px 30px rgba(7, 26, 46, .3);
    display: none;
    z-index: 950;
  }
  .app-nav__links.is-open { display: flex; }
  .top-link { padding: 12px 14px; }
  .top-link.is-active::after { display: none; }
  .top-link--admin { border: none; }
  .nav-user { margin-left: auto; }
  .user-chip__meta { display: none; }
  .form-layout, .detail-grid, .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .form-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .form-aside > * { flex: 1 1 280px; }
  .page { padding: 22px 18px 44px; }
  .login { grid-template-columns: 1fr; }
  .login__brand { padding: 38px 30px 30px; }
  .login__logo { margin-bottom: 34px; }
  .login__stats { margin-top: 30px; }
  .login__brand-foot { display: none; }
  .login__panel { padding: 30px 20px 60px; }
  .login__copyright { position: static; margin-top: 24px; }
  .filter-bar { gap: 8px; }
  .filter-select, .filter-date { flex: 1 1 140px; min-width: 0; width: auto; }
}
@media (max-width: 640px) {
  .page-head h1 { font-size: 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .detail-hero__title h1 { font-size: 22px; }
  .detail-hero__inner { padding: 22px 18px 22px; }
  .toast-stack { top: 76px; right: 12px; left: 12px; width: auto; }
  .data-table thead th, .data-table tbody td { padding: 11px 12px; }
  .point-sub { max-width: 200px; }
  .profile-stats b { font-size: 17px; }
  .login__brand h1 { font-size: 30px; }
  .login__features { margin-top: 28px; }
  .login-card { padding: 26px 22px 22px; }
}

/* ==========================================================================
   细节增强
   ========================================================================== */
.field__control { position: relative; }
.pw-toggle {
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border: 0; border-radius: 7px;
  background: transparent;
  color: var(--ink-400);
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.pw-toggle:hover { color: var(--ink-700); background: #f1f5fa; }
.pw-toggle .ico { width: 15px; height: 15px; }
.field__control input[type="password"] { padding-right: 44px; }

.btn.is-loading { opacity: .78; cursor: progress; }
.btn.is-loading::after {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  margin-left: 8px;
  animation: btn-spin .7s linear infinite;
}
.btn-ghost.is-loading::after { border-color: rgba(23, 71, 111, .25); border-top-color: var(--blue-600); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.file-drop.has-file { border-color: var(--blue-500); background: #f2f8fe; }

.map-main:fullscreen { background: #dfe8f2; display: block; }
.map-main:fullscreen .map-canvas { position: absolute; inset: 0; }
