/* ============================================================
   发货通 · 账号后台（fht.ykt.wang）
   ============================================================ */
:root {
  --bg-0: #05080f;
  --bg-1: #070d1c;
  --panel: rgba(16, 25, 44, .72);
  --panel-2: rgba(20, 31, 54, .82);
  --line: rgba(120, 160, 230, .14);
  --line-2: rgba(120, 160, 230, .28);
  --text: #e8eefc;
  --text-2: #9fb0cd;
  --text-3: #64748b;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --radius: 14px;
  --shadow: 0 24px 70px -30px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; font-size: 13px; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 13px; }
.hidden { display: none !important; }
.ta-r { text-align: right; }

/* ============================ 通用按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; color: #dbe6f8;
  background: rgba(255, 255, 255, .05);
  transition: .18s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: rgba(255, 255, 255, .09); }
.btn.sm { height: 31px; padding: 0 12px; font-size: 12px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -12px rgba(79, 70, 229, .9); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; transform: none; cursor: default; }
.btn-ghost { border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { color: #fff; border-color: rgba(120, 160, 230, .5); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-block { width: 100%; height: 42px; font-size: 14px; letter-spacing: 2px; }

/* ============================ 登录 ============================ */
.login {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 48px;
  background:
    radial-gradient(1100px 760px at 12% 16%, #102448 0%, transparent 62%),
    radial-gradient(900px 700px at 88% 84%, #241246 0%, transparent 60%),
    linear-gradient(160deg, #05080f 0%, #070e1e 46%, #04070d 100%);
  color: var(--text);
  overflow: hidden;
}
#bgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }
.grid-bg {
  position: absolute; left: -20%; right: -20%; bottom: -30%; height: 78%;
  background-image: linear-gradient(rgba(90, 150, 255, .12) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(90, 150, 255, .12) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(560px) rotateX(66deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .85), transparent 78%);
  animation: gridMove 12s linear infinite;
}
@keyframes gridMove { to { background-position: 0 64px, 64px 0; } }
.halo { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.halo.h1 { width: 460px; height: 460px; left: -90px; top: -120px; background: #1d4ed8; }
.halo.h2 { width: 520px; height: 520px; right: -140px; bottom: -180px; background: #6d28d9; }

.login-wrap {
  position: relative; z-index: 2;
  width: min(1080px, 100%);
  display: grid; grid-template-columns: 1fr 388px; gap: 72px; align-items: center;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; font-weight: 700; color: #fff;
  background: var(--grad); box-shadow: 0 14px 30px -14px rgba(79, 70, 229, .95);
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.brand-sub { font-size: 9.5px; color: #5f7396; letter-spacing: 3.2px; margin-top: 3px; }

.login-side h1 {
  font-size: 46px; line-height: 1.16; letter-spacing: 2px; margin: 46px 0 0;
  background: linear-gradient(120deg, #ffffff 0%, #b9cdf5 48%, #7fa9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-side .lead { margin-top: 20px; font-size: 13.5px; line-height: 2; color: #8ba0c4; letter-spacing: .4px; }

.feature-list { list-style: none; margin-top: 42px; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .fi {
  width: 26px; height: 26px; border-radius: 8px; flex: none; margin-top: 1px;
  display: grid; place-items: center; font-size: 10px; letter-spacing: .5px;
  color: #8ab4ff; background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .28);
}
.feature-list b { display: block; font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.feature-list i { display: block; margin-top: 5px; font-style: normal; font-size: 11.5px; color: #7488ab; letter-spacing: .2px; }
.side-foot { margin-top: 46px; font-size: 11px; color: #4d5c7a; letter-spacing: 1px; }

.login-card-wrap { display: flex; flex-direction: column; gap: 16px; }
.login-card {
  position: relative; padding: 34px 30px 28px; border-radius: 20px;
  background: linear-gradient(165deg, rgba(23, 34, 58, .92), rgba(12, 19, 34, .94));
  border: 1px solid rgba(120, 160, 230, .18);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
}
.login-card::after {
  content: ''; position: absolute; inset: -1px; border-radius: 20px; pointer-events: none;
  background: linear-gradient(140deg, rgba(59, 130, 246, .35), transparent 42%, transparent 62%, rgba(139, 92, 246, .3));
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.card-kicker { font-size: 9.5px; letter-spacing: 3.4px; color: #5d7bb0; }
.card-title { margin-top: 12px; font-size: 22px; font-weight: 600; letter-spacing: 1px; }
.card-sub { margin-top: 8px; font-size: 12px; color: #7f93b5; }

.field { display: block; margin-top: 20px; }
.field > span { display: block; font-size: 11px; color: #8ba0c4; letter-spacing: 1.2px; margin-bottom: 8px; }
.field input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 10px;
  color: var(--text); background: rgba(8, 14, 26, .78);
  border: 1px solid rgba(120, 160, 230, .2); outline: none; transition: .18s;
}
.field input::placeholder { color: #4a5b78; }
.field input:focus { border-color: rgba(59, 130, 246, .65); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }

.login-card .btn-primary { margin-top: 26px; }
.login-err { min-height: 18px; margin-top: 10px; font-size: 12px; color: #fca5a5; letter-spacing: .2px; }
.card-note {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 16px;
  border-top: 1px solid rgba(120, 160, 230, .1);
  font-size: 11px; line-height: 1.7; color: #6d80a2;
}
.card-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: #4d9fe8; }
.login-foot { text-align: center; font-size: 11px; color: #414f6b; letter-spacing: 1.2px; }

/* ============================ 后台布局 ============================ */
.app { height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(900px 600px at 80% -10%, rgba(37, 99, 235, .18), transparent 60%),
  linear-gradient(180deg, #060b16 0%, #05080f 100%); }

.app-bar {
  height: 62px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 24px; border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 24, .72); backdrop-filter: blur(12px);
}
.bar-brand { display: flex; align-items: center; gap: 11px; }
.bar-title { font-size: 14.5px; font-weight: 600; letter-spacing: .7px; display: flex; align-items: center; gap: 8px; }
.bar-tag {
  font-size: 10px; font-weight: 400; letter-spacing: 1px; color: #9ecbff;
  padding: 2px 7px; border-radius: 6px; background: rgba(59, 130, 246, .16);
  border: 1px solid rgba(59, 130, 246, .3);
}
.bar-sub { font-size: 9px; letter-spacing: 2.6px; color: #4f6285; margin-top: 3px; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.bar-hint { font-size: 11px; color: #56698c; letter-spacing: .3px; }
.bar-user { display: flex; align-items: center; gap: 9px; padding-left: 16px; border-left: 1px solid var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #cfe0ff;
  background: linear-gradient(140deg, rgba(59, 130, 246, .35), rgba(139, 92, 246, .3));
  border: 1px solid rgba(120, 160, 230, .3);
}
.bu-name { font-size: 12.5px; font-weight: 500; }
.bu-role { font-size: 10px; color: #6b7fa3; margin-top: 2px; }

.main { flex: 1; min-height: 0; overflow: auto; padding: 28px 30px 40px; }
.page-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.page-head h2 { font-size: 20px; font-weight: 600; letter-spacing: .8px; }
.page-head p { margin-top: 8px; font-size: 12px; line-height: 1.8; color: #7c8fb2; max-width: 720px; }
.page-head .btn { margin-left: auto; flex: none; }

/* ============================ 统计卡 ============================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  position: relative; padding: 18px 18px 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(21, 32, 54, .82), rgba(12, 19, 33, .82));
  border: 1px solid var(--line); overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: var(--grad); opacity: .9;
}
.stat .s-label { font-size: 11px; color: #7f93b5; letter-spacing: .8px; }
.stat .s-value { margin-top: 10px; font-size: 26px; font-weight: 600; letter-spacing: 1px; }
.stat .s-sub { margin-top: 6px; font-size: 10.5px; color: #56698c; }
.stat.teal .s-value { color: #67e8f9; }
.stat.violet .s-value { color: #c4b5fd; }
.stat.amber .s-value { color: #fcd34d; }
.stat.muted .s-value { color: #94a3b8; }

/* ============================ 面板 / 表格 ============================ */
.panel {
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(170deg, rgba(17, 26, 45, .86), rgba(9, 15, 27, .9));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 13px; font-weight: 600; letter-spacing: .6px; display: flex; align-items: center; gap: 8px; }
.count {
  font-size: 10.5px; font-weight: 400; color: #8ab4ff; padding: 2px 8px; border-radius: 20px;
  background: rgba(59, 130, 246, .14); border: 1px solid rgba(59, 130, 246, .26);
}
.panel-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; width: 14px; height: 14px; color: #5b6f92; pointer-events: none; }
.search input {
  width: 250px; height: 32px; padding: 0 12px 0 32px; border-radius: 9px;
  color: var(--text); background: rgba(6, 11, 21, .8);
  border: 1px solid rgba(120, 160, 230, .18); outline: none; transition: .18s;
}
.search input::placeholder { color: #4a5b78; }
.search input:focus { border-color: rgba(59, 130, 246, .55); }
.seg { display: flex; padding: 3px; border-radius: 9px; background: rgba(6, 11, 21, .8); border: 1px solid rgba(120, 160, 230, .16); }
.seg button { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 11.5px; color: #8296b8; transition: .16s; }
.seg button:hover { color: #dbe6f8; }
.seg button.on { color: #fff; background: rgba(59, 130, 246, .26); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .38); }

.table-wrap { overflow: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
table.grid th {
  padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 500;
  color: #7b8eb0; letter-spacing: 1px; background: rgba(9, 15, 27, .7);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.grid td { padding: 13px 16px; border-bottom: 1px solid rgba(120, 160, 230, .08); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr { transition: .16s; }
table.grid tbody tr:hover { background: rgba(59, 130, 246, .06); }
td .u-name { font-size: 13px; font-weight: 500; color: #eaf1ff; }
td .u-sub { margin-top: 4px; font-size: 10.5px; color: #5f7294; }
td .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #b6c8e6; letter-spacing: .3px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11px; }
.pill.admin { color: #c4b5fd; background: rgba(139, 92, 246, .16); border: 1px solid rgba(139, 92, 246, .3); }
.pill.carrier { color: #7dd3fc; background: rgba(14, 165, 233, .14); border: 1px solid rgba(14, 165, 233, .3); }
.pill.on { color: #6ee7b7; background: rgba(16, 185, 129, .14); border: 1px solid rgba(16, 185, 129, .3); }
.pill.off { color: #fca5a5; background: rgba(248, 113, 113, .13); border: 1px solid rgba(248, 113, 113, .3); }
td .comp { font-size: 12px; color: #a9bcd8; }
td .time { font-size: 11.5px; color: #6d80a2; }

.row-acts { display: flex; justify-content: flex-end; gap: 4px; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #8ba0c4; border: 1px solid transparent; transition: .16s;
}
.icon-btn svg { width: 14.5px; height: 14.5px; }
.icon-btn:hover { color: #dbeafe; background: rgba(59, 130, 246, .16); border-color: rgba(59, 130, 246, .3); }
.icon-btn.danger:hover { color: #fecaca; background: rgba(248, 113, 113, .16); border-color: rgba(248, 113, 113, .32); }

.empty { padding: 64px 0; text-align: center; font-size: 12.5px; color: #56698c; letter-spacing: .5px; }
.page-foot { margin-top: 16px; font-size: 11px; color: #4d5c7a; letter-spacing: .3px; }

/* ============================ 模态弹窗 ============================ */
#modalRoot { position: relative; z-index: 80; }
.modal-layer {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 28px;
  background: rgba(3, 6, 13, .62);
  animation: layerIn .16s ease-out both;
}
@keyframes layerIn { from { opacity: .6; } to { opacity: 1; } }
.modal-layer.closing { animation: layerOut .15s ease-in both; }
@keyframes layerOut { to { opacity: 0; } }

.modal {
  width: 560px; max-width: 100%; max-height: calc(100vh - 56px); display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(168deg, #121c31 0%, #0a1220 100%);
  border: 1px solid rgba(120, 160, 230, .22);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: modalIn .2s cubic-bezier(.2, .9, .3, 1.05) both;
}
.modal.w-sm { width: 440px; }
.modal.w-md { width: 560px; }
@keyframes modalIn { from { transform: translateY(14px) scale(.98); } to { transform: none; } }

.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.mh-body h3 { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.mh-body p { margin-top: 7px; font-size: 11.5px; line-height: 1.7; color: #7c8fb2; }
.modal-x {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #7c8fb2; transition: .16s;
}
.modal-x svg { width: 15px; height: 15px; }
.modal-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: rgba(6, 11, 21, .5); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-field { display: block; }
.form-field.span2 { grid-column: span 2; }
.form-field > label { display: block; font-size: 11px; color: #8ba0c4; letter-spacing: 1px; margin-bottom: 7px; }
.form-field > label .req { color: #f87171; margin-left: 3px; }
.form-field input, .form-field select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  color: var(--text); background: rgba(6, 11, 21, .82);
  border: 1px solid rgba(120, 160, 230, .2); outline: none; transition: .18s;
}
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7c8fb2 50%), linear-gradient(135deg, #7c8fb2 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-field input::placeholder { color: #4a5b78; }
.form-field input:focus, .form-field select:focus { border-color: rgba(59, 130, 246, .6); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.form-field input:disabled { color: #64748b; background: rgba(6, 11, 21, .5); }
.form-hint { margin-top: 6px; font-size: 10.5px; line-height: 1.6; color: #5f7294; }

.confirm-body { display: flex; gap: 14px; align-items: flex-start; }
.confirm-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: #93c5fd; background: rgba(59, 130, 246, .14); border: 1px solid rgba(59, 130, 246, .3);
}
.confirm-icon.danger { color: #fca5a5; background: rgba(248, 113, 113, .13); border-color: rgba(248, 113, 113, .32); }
.confirm-icon svg { width: 18px; height: 18px; }
.confirm-text { font-size: 12.5px; line-height: 1.85; color: #b6c8e6; }
.confirm-text b { color: #fff; font-weight: 600; }

.invite { border-radius: 12px; overflow: hidden; border: 1px solid rgba(120, 160, 230, .22); background: rgba(6, 11, 21, .7); }
.invite-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(120, 160, 230, .1); font-size: 12.5px; }
.invite-row:last-child { border-bottom: none; }
.invite-row .k { width: 74px; flex: none; color: #6d80a2; letter-spacing: .5px; }
.invite-row .v { color: #e8eefc; word-break: break-all; }
.invite-row .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .6px; }
.invite-tip { margin-top: 12px; font-size: 11px; line-height: 1.75; color: #6d80a2; }

/* ============================ Toast ============================ */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  display: flex; gap: 10px; align-items: flex-start; min-width: 250px; max-width: 360px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(22, 33, 55, .98), rgba(11, 18, 32, .98));
  border: 1px solid rgba(120, 160, 230, .24);
  box-shadow: 0 20px 46px -20px rgba(0, 0, 0, .9);
  animation: toastIn .22s ease-out both;
}
.toast.out { animation: toastOut .2s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
.toast-icon {
  width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #93c5fd; background: rgba(59, 130, 246, .16);
}
.toast.success .toast-icon { color: #6ee7b7; background: rgba(16, 185, 129, .16); }
.toast.error .toast-icon { color: #fca5a5; background: rgba(248, 113, 113, .16); }
.toast-title { font-size: 12.5px; font-weight: 500; }
.toast-body { margin-top: 3px; font-size: 11px; line-height: 1.6; color: #8ba0c4; }

@media (max-width: 1060px) {
  .login-wrap { grid-template-columns: 1fr; gap: 34px; }
  .login-side .feature-list, .login-side .side-foot { display: none; }
  .login-side h1 { font-size: 32px; margin-top: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .search input { width: 170px; }
}
