:root {
  --brand-a: #4f46e5;   /* indigo-600 */
  --brand-b: #7c3aed;   /* violet-600 */
  --brand-c: #06b6d4;   /* cyan-500 */
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(124, 58, 237, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(6, 182, 212, .07), transparent 60%),
    #f4f5fb;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ===== 导航栏 ===== */
.navbar {
  background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 100%) !important;
  box-shadow: 0 4px 18px rgba(79, 70, 229, .28);
  padding-top: .45rem;
  padding-bottom: .45rem;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: .35px;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.navbar-brand:hover { color: #fff !important; }
.navbar-brand .brand-logo {
  display: inline-block;
  height: 32px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.navbar .navbar-nav { gap: .2rem; }

.navbar .nav-link {
  position: relative;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .2px;
  padding: .42rem .9rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, .85);
  transition: color .18s ease, background-color .18s ease;
}

.navbar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

.navbar .nav-link.active {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, .24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.navbar .navbar-text {
  color: rgba(255, 255, 255, .92);
  font-weight: 700;
  letter-spacing: .2px;
}

.navbar .btn-outline-light {
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .2px;
  padding: .34rem .72rem;
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
  transition: background-color .18s ease, border-color .18s ease;
}
.navbar .btn-outline-light:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .85);
  color: #fff;
}

/* ===== 卡片 ===== */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(30, 41, 59, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 41, 59, .10);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid #eef0f4;
  font-weight: 700;
  color: #1e293b;
}

/* ===== 按钮 ===== */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .28);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  border: none;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .34);
}

/* ===== 徽章 ===== */
.badge { border-radius: 999px; padding: .45em .85em; font-weight: 600; }
/* 状态徽章自定义配色（让不同状态一眼区分） */
.badge.bg-purple { background-color: #6f42c1; }
.badge.bg-orange { background-color: #e8590c; }

/* ===== 表格 ===== */
.table { --bs-table-hover-bg: #f8fafc; }
.clickable-row { cursor: pointer; }
.table thead th {
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  border-bottom: none;
}
.table td, .table th { vertical-align: middle; }

/* 详情页信息表：字段名（表头）与信息（值）做成两种按钮样式，纯展示不可点击 */
.table-bordered {
  border: none;
  border-collapse: separate;
  border-spacing: 6px 4px;
}
.table-bordered th,
.table-bordered td {
  border-radius: 10px;
  padding: .45rem .9rem;
  cursor: default;      /* 不可点击 */
}
.table-bordered th {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #fff;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .20);
}
.table-bordered td {
  background: #fff;
  color: var(--brand-a);
  border: 1px solid #c7d2fe;
  box-shadow: 0 1px 4px rgba(30, 41, 59, .05);
}
.table-responsive::-webkit-scrollbar { height: 8px; }
.table-responsive::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.table-responsive::-webkit-scrollbar-track { background: #f1f5f9; }

/* ===== 表单 ===== */
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-a);
  box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
}

/* ===== 对接人搜索下拉 ===== */
.fc-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 320px;
  overflow: auto;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(30, 41, 59, .16);
}
.fc-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  background: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.fc-item:last-child { border-bottom: none; }
.fc-item:hover { background: #eef2ff; }
.fc-name { font-weight: 700; color: #1e293b; }
.fc-email { color: var(--brand-a); font-size: .85em; }
.fc-brand { color: #64748b; font-size: .8em; }

/* ===== 内容动画 ===== */
main { animation: fadeUp .4s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ===== 登录页 ===== */
.login-page {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #9333ea 100%);
  min-height: 100vh;
  padding: 24px 12px;
}
.login-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-card {
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.login-card:hover { transform: none; }

/* ===== 移动端优化 ===== */
@media (max-width: 767.98px) {
  main.container-fluid { padding-left: 12px !important; padding-right: 12px !important; }

  h1, h2, h3, h4 { font-size: 1.15rem; }

  .card { border-radius: 14px; }
  .card-body { padding: 14px; }

  /* 页面顶部标题+按钮行：窄屏可换行 */
  .d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }

  /* 表格：更紧凑、触屏横向滑动顺滑 */
  .table { font-size: .82rem; }
  .table td, .table th { padding: .5rem .4rem; }
  .table-responsive { -webkit-overflow-scrolling: touch; }

  /* 表单控件：16px 防止 iOS 聚焦自动放大 */
  .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: 16px; }

  /* 按钮：触屏易点 */
  .btn { padding: .48rem .85rem; }
  .btn-sm { padding: .42rem .72rem; }

  /* 导航折叠菜单 */
  .navbar .navbar-collapse { padding-top: .6rem; }
  .navbar .nav-link { padding: .6rem .9rem; }
  .navbar .navbar-text { margin: .25rem 0 .5rem; }
  .navbar .btn { margin: .25rem .25rem 0 0; }

  /* 表格次要列在手机上隐藏（平板/电脑 ≥768px 正常显示） */
  .hide-mobile { display: none !important; }
}
