:root {
  --primary: #E8770A;
  --primary-light: rgba(232, 119, 10, .12);
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #86868b;
  --border: rgba(0, 0, 0, .08);
  --ok: #34c759;
  --bad: #ff3b30;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(245,158,11,.14), transparent 62%),
    radial-gradient(850px 480px at -8% -6%, rgba(120,140,235,.12), transparent 60%),
    radial-gradient(760px 500px at 50% 118%, rgba(232,119,10,.10), transparent 58%),
    var(--bg);
  color: var(--text); font-size: 14px; line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── 登录页（同 #79 深色玻璃风）── */
#view-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: #0c0c10 url('brand/hero-bg.avif') center/cover no-repeat;
}
.login-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(10,10,14,.82) 0%, rgba(14,14,20,.55) 55%, rgba(14,14,20,.3) 100%);
}
.login-stage { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding: 0 20px; }
.login-card {
  position: relative; z-index: 1;
  background: rgba(30, 38, 70, .38);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px; padding: 42px 40px 36px;
  width: 384px; max-width: calc(100vw - 40px);
  box-shadow: 0 24px 70px rgba(8, 14, 38, .5), inset 0 1px 0 rgba(255,255,255,.15);
  animation: slideUp .3s ease;
}
.login-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; text-align: center; color: #fff; font-weight: 600; }
.login-sub { text-align: center; color: rgba(255,255,255,.65); font-size: 13px; margin-bottom: 26px; }
.field { position: relative; margin-bottom: 14px; }
.field input {
  width: 100%; padding: 21px 15px 8px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px; font-size: 15px; background: rgba(255,255,255,.10); color: #fff;
  outline: none; transition: .15s; font-family: inherit;
}
.field input:focus { border-color: rgba(245,158,11,.8); background: rgba(255,255,255,.14); box-shadow: 0 0 0 3.5px rgba(232,119,10,.22); }
.field label { position: absolute; left: 16px; top: 15px; font-size: 14.5px; color: rgba(255,255,255,.55); pointer-events: none; transition: .15s ease; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 6px; font-size: 11px; color: #F5B04C; }
.btn-login { padding: 13px; font-size: 15px; border-radius: 13px; margin-top: 6px; letter-spacing: .3em; text-indent: .3em; }
#view-login .err { text-align: center; color: #ffb3ab; }

/* ── 按钮通用 ── */
.btn { padding: 10px 18px; border-radius: 10px; border: none; font-size: 13px; font-weight: 600; transition: .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; padding: 13px; font-size: 14px; margin-top: 6px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--primary-light); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.err { color: var(--bad); font-size: 12px; margin-top: 10px; min-height: 16px; }

/* ── 侧边栏（同 #79）── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 224px; z-index: 20;
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.66); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border-right: 1px solid rgba(255,255,255,.75);
  box-shadow: 1px 0 18px rgba(20,24,40,.05);
  padding: 20px 14px 16px;
}
.side-brand {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 12px; margin: 0 0 16px; border-radius: 16px;
  background: linear-gradient(160deg, #1b2a52 0%, #2c3f6e 55%, #3d5080 100%);
  box-shadow: 0 4px 16px rgba(27,42,82,.22);
}
.side-brand img { position: relative; z-index: 1; }
.side-brand .login-sky { z-index: 0; }
.login-sky { position: absolute; inset: 0; pointer-events: none; }
.login-sky::before {
  content: ''; position: absolute; inset: 0; opacity: .8;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%,  rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 24%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 12%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 30%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 9%, rgba(255,255,255,.9) 50%, transparent 51%);
}
.meteor { position: absolute; width: 46px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,255,255,.9), transparent); transform: rotate(135deg); opacity: 0; animation: shoot 9s linear infinite; }
@keyframes shoot { 0% { opacity: 0; transform: rotate(135deg) translateX(0); } 2% { opacity: .9; } 12% { opacity: 0; transform: rotate(135deg) translateX(160px); } 100% { opacity: 0; } }

.side-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.side-sep { height: 1px; background: rgba(0,0,0,.07); margin: 10px 8px; }
.tab {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  border: none; background: none; padding: 10px 12px; border-radius: 11px;
  font-size: 13.5px; cursor: pointer; color: #555a66; transition: .15s; font-family: inherit;
}
.tab .ni { font-size: 16px; width: 20px; text-align: center; filter: grayscale(.25); }
.tab:hover { background: rgba(0,0,0,.05); color: var(--text); }
.tab.active { background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(232,119,10,.10)); color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(232,119,10,.18); }
.tab.active .ni { filter: none; }

.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid rgba(0,0,0,.07); }
.side-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #F59E0B, #E8770A); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.side-user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.side-user-actions { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.side-user-actions a { color: var(--muted); cursor: pointer; }
.side-user-actions a:hover { color: var(--primary); }

/* ── 主内容区 ── */
.content { margin-left: 224px; max-width: 1200px; padding: 30px 36px 70px; }
.tab-panel { display: none; animation: fadeIn .2s ease; }
.tab-panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.panel-head h2 { font-size: 21px; letter-spacing: -.01em; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.section-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
textarea, select, input[type=text], input[type=password] {
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; outline: none;
}
textarea:focus, select:focus, input:focus { border-color: var(--primary); }
textarea#search-domains { width: 100%; resize: vertical; }

/* ── 查询结果卡片 ── */
.result-block { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; background: var(--card); }
.result-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: linear-gradient(160deg, rgba(232,119,10,.06), transparent); }
.result-head h3 { font-size: 15px; }
.result-head .domain { color: var(--muted); font-size: 12px; margin-top: 2px; }
.result-body { padding: 16px 18px; display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
@media (max-width: 760px) { .result-body { grid-template-columns: 1fr; } }
.kv-grid { display: grid; grid-template-columns: 60px 1fr; row-gap: 9px; column-gap: 10px; font-size: 13px; }
.kv-grid .k { color: var(--muted); }
.company-desc { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.social-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.social-icons a {
  display: inline-flex; align-items: center; gap: 5px; background: var(--bg); color: var(--text);
  padding: 5px 11px 5px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); transition: .15s;
}
.social-icons a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.social-icons .si-ico { font-size: 14px; }

.fav-btn {
  display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; color: var(--text); transition: .15s;
}
.fav-btn:hover { border-color: var(--primary); }
.fav-btn .star { font-size: 15px; color: var(--muted); }
.fav-btn.active { background: var(--primary-light); border-color: rgba(232,119,10,.3); color: var(--primary); }
.fav-btn.active .star { color: var(--primary); }

.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: center;
  padding: 11px 12px; border-radius: 11px; border: 1px solid var(--border); font-size: 13px; background: var(--card);
}
.contact-row.priority { border-color: rgba(232,119,10,.35); background: linear-gradient(90deg, rgba(232,119,10,.06), transparent); }
.contact-row .c-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.contact-row .c-title { color: var(--muted); font-size: 12px; margin-top: 1px; }
.priority-badge { font-size: 10px; background: var(--primary); color: #fff; padding: 1px 6px; border-radius: 999px; font-weight: 600; }
.contact-row .c-tag { font-size: 11px; background: var(--bg); color: var(--muted); padding: 3px 8px; border-radius: 999px; justify-self: start; border: 1px solid var(--border); }
.empty-hint { color: var(--muted); font-size: 13px; padding: 8px 0; }
@media (max-width: 760px) { .contact-row { grid-template-columns: 1fr; } }

/* ── 表格 ── */
table.list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list-table th, table.list-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.list-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.list-table tbody tr { cursor: pointer; }
table.list-table tbody tr:hover td { background: var(--primary-light); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; background: var(--primary-light); color: var(--primary); }

/* ── 弹窗（同 #79 confirmDialog 模式） ── */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; align-items: center; justify-content: center; }
.modal-mask.show { display: flex; }
#modal-confirm { z-index: 300; }
.modal { background: var(--card); border-radius: var(--radius); width: 600px; max-width: 94vw; max-height: 86vh; display: flex; flex-direction: column; animation: slideUp .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }

.form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.status-active { color: var(--ok); } .status-disabled { color: var(--bad); }
.muted { color: var(--muted); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; }
  .side-brand, .side-user { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .content { margin-left: 0; padding: 20px 16px 50px; }
}
