/* ============================================
   广东中旅·爱上邮轮 — 明德AI OS 全链路系统
   共用样式：深空蓝 + 邮轮金 + 海洋蓝
   ============================================ */

:root {
  /* 品牌主色 */
  --c-deep-blue: #0f1e4d;      /* 深空蓝（明德OS主色） */
  --c-deep-blue-2: #1a2b6b;
  --c-blue: #2952ff;            /* 主蓝 */
  --c-blue-light: #4a73ff;
  --c-ocean: #0ea5e9;           /* 海洋蓝（邮轮品牌色） */
  --c-ocean-light: #38bdf8;
  --c-gold: #f59e0b;            /* 邮轮金（高端感） */
  --c-gold-light: #fbbf24;

  /* 中性色 */
  --c-bg: #f5f7fb;
  --c-bg-2: #eef2f9;
  --c-card: #ffffff;
  --c-border: #e5e9f2;
  --c-text: #1a2540;
  --c-text-2: #4a5578;
  --c-text-3: #8b95b1;

  /* 状态色 */
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-info: #3b82f6;

  /* 尺寸 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15,30,77,0.06);
  --shadow: 0 4px 14px rgba(15,30,77,0.08);
  --shadow-lg: 0 12px 32px rgba(15,30,77,0.12);
}

* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================================
   全局导航条
   ============================================ */
.topbar {
  background: linear-gradient(90deg, var(--c-deep-blue) 0%, var(--c-blue) 100%);
  color: #fff;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 18px;
}
.topbar .brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--c-ocean) 0%, var(--c-gold) 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.topbar .brand-text small {
  display: block; font-size: 11px; opacity: .7; font-weight: 400; letter-spacing: 1px;
}
.topbar .nav {
  display: flex; gap: 4px; margin-left: 16px;
}
.topbar .nav a {
  padding: 8px 16px; border-radius: 6px;
  font-size: 14px; opacity: .85; transition: .2s;
}
.topbar .nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.topbar .nav a.active { background: rgba(255,255,255,.18); opacity: 1; font-weight: 600; }
.topbar .search {
  flex: 1; max-width: 420px; margin: 0 auto;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  padding: 0 16px; height: 38px;
  display: flex; align-items: center; gap: 8px;
  color: #fff;
}
.topbar .search input {
  background: none; border: 0; outline: 0; color: #fff;
  width: 100%; font-size: 13px;
}
.topbar .search input::placeholder { color: rgba(255,255,255,.6); }
.topbar .user {
  display: flex; align-items: center; gap: 12px;
}
.topbar .user .ai-btn {
  padding: 6px 14px; border-radius: 18px;
  background: linear-gradient(135deg, var(--c-gold) 0%, #f97316 100%);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.topbar .user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-ocean);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.topbar .user .uname { font-size: 13px; }
.topbar .user .urole { font-size: 11px; opacity: .7; }

/* ============================================
   主内容区
   ============================================ */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 32px 48px; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header .crumb { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }
.page-header .crumb a { color: var(--c-blue); }
.page-header .actions { display: flex; gap: 8px; }

/* ============================================
   通用组件
   ============================================ */
.btn {
  height: 36px; padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: .2s;
}
.btn-primary { background: var(--c-blue); color: #fff; }
.btn-primary:hover { background: var(--c-blue-light); }
.btn-default { background: #fff; color: var(--c-text); border: 1px solid var(--c-border); }
.btn-default:hover { border-color: var(--c-blue); color: var(--c-blue); }
.btn-gold { background: linear-gradient(135deg, var(--c-gold) 0%, #f97316 100%); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-blue); }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 28px; font-size: 15px; }

.card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .more { font-size: 12px; color: var(--c-text-3); }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 500;
}
.tag-blue { background: #e6efff; color: var(--c-blue); }
.tag-ocean { background: #e0f4ff; color: var(--c-ocean); }
.tag-gold { background: #fef3c7; color: #b45309; }
.tag-green { background: #d1fae5; color: var(--c-success); }
.tag-red { background: #fee2e2; color: var(--c-danger); }
.tag-gray { background: #f1f5f9; color: var(--c-text-2); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
.dot-green { background: var(--c-success); }
.dot-red { background: var(--c-danger); }
.dot-gold { background: var(--c-gold); }
.dot-blue { background: var(--c-blue); }

/* ============================================
   KPI 卡片
   ============================================ */
.kpi-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}
.kpi {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-blue) 0%, var(--c-ocean) 100%);
}
.kpi.kpi-gold::before { background: linear-gradient(90deg, var(--c-gold) 0%, #f97316 100%); }
.kpi.kpi-ocean::before { background: linear-gradient(90deg, var(--c-ocean) 0%, var(--c-ocean-light) 100%); }
.kpi.kpi-red::before { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); }
.kpi-label { font-size: 12px; color: var(--c-text-2); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 28px; font-weight: 800; margin: 6px 0; letter-spacing: -.5px; }
.kpi-value small { font-size: 14px; font-weight: 500; color: var(--c-text-3); margin-left: 4px; }
.kpi-trend { font-size: 11px; display: flex; align-items: center; gap: 8px; }
.kpi-trend .up { color: var(--c-success); }
.kpi-trend .down { color: var(--c-danger); }
.kpi-trend .meta { color: var(--c-text-3); }
.kpi-spark { position: absolute; right: 12px; top: 14px; opacity: .35; }

/* ============================================
   网格布局
   ============================================ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 2fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }

/* ============================================
   流程条 / 步骤条
   ============================================ */
.flow {
  display: flex; align-items: stretch; gap: 0;
  background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--c-border);
}
.flow-step {
  flex: 1; text-align: center; padding: 8px 6px;
  position: relative;
}
.flow-step:not(:last-child)::after {
  content: '→'; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%); color: var(--c-blue); font-size: 16px; font-weight: 700;
}
.flow-step .ico {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c-blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 6px;
}
.flow-step.active .ico { background: var(--c-blue); color: #fff; }
.flow-step.done .ico { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.flow-step .lbl { font-size: 12px; font-weight: 600; }
.flow-step .num { font-size: 10px; color: var(--c-text-3); }
.flow-step .rate { font-size: 11px; color: var(--c-success); margin-top: 2px; }
.flow-step .bar {
  height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden;
  margin-top: 4px;
}
.flow-step .bar i { display: block; height: 100%; background: var(--c-blue); }

/* ============================================
   关系图
   ============================================ */
.relation-graph {
  background: radial-gradient(ellipse at center, #fafbff 0%, #eef2f9 100%);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 280px;
  position: relative;
  border: 1px solid var(--c-border);
}
.relation-graph svg { width: 100%; height: 100%; }

/* ============================================
   表格
   ============================================ */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 12px;
  background: #f8fafc; color: var(--c-text-2);
  font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--c-border);
}
td {
  padding: 12px;
  border-bottom: 1px solid #f0f3f8;
  color: var(--c-text);
}
tr:hover td { background: #fafbff; }
tr:last-child td { border-bottom: 0; }

/* ============================================
   进度条 / 进度环
   ============================================ */
.bar-h {
  display: flex; align-items: center; gap: 6px;
  height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden;
}
.bar-h i { display: block; height: 100%; background: var(--c-blue); border-radius: 3px; }
.bar-h.gold i { background: var(--c-gold); }
.bar-h.ocean i { background: var(--c-ocean); }
.bar-h.success i { background: var(--c-success); }
.bar-h.danger i { background: var(--c-danger); }

/* ============================================
   图片占位符（图片优先原则）
   ============================================ */
.img-ph {
  background: linear-gradient(135deg, #f0f4ff 0%, #e6efff 100%);
  border: 1px dashed var(--c-blue);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--c-blue);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.img-ph::before {
  content: '📷'; font-size: 22px; margin-bottom: 4px;
}
.img-ph .img-desc { font-weight: 600; }
.img-ph .img-meta { color: var(--c-text-3); font-size: 10px; margin-top: 2px; }
.img-ph.r-16x9 { aspect-ratio: 16/9; }
.img-ph.r-4x3 { aspect-ratio: 4/3; }
.img-ph.r-1x1 { aspect-ratio: 1/1; }
.img-ph.r-3x4 { aspect-ratio: 3/4; }
.img-ph.ocean { background: linear-gradient(135deg, #e0f4ff 0%, #c7ecff 100%); border-color: var(--c-ocean); color: var(--c-ocean); }
.img-ph.gold { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-color: var(--c-gold); color: #b45309; }

/* ============================================
   时间轴 / Feed
   ============================================ */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed #f0f3f8;
  font-size: 13px;
}
.feed-item:last-child { border-bottom: 0; }
.feed-item .ico {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: #f0f4ff; color: var(--c-blue);
}
.feed-item .ico.warn { background: #fff7ed; color: var(--c-warning); }
.feed-item .ico.danger { background: #fee2e2; color: var(--c-danger); }
.feed-item .ico.success { background: #d1fae5; color: var(--c-success); }
.feed-item .body { flex: 1; }
.feed-item .body .title { color: var(--c-text); margin-bottom: 2px; }
.feed-item .body .title b { color: var(--c-blue); }
.feed-item .body .sub { font-size: 11px; color: var(--c-text-3); }
.feed-item .time { font-size: 11px; color: var(--c-text-3); white-space: nowrap; }

/* ============================================
   待办
   ============================================ */
.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px dashed #f0f3f8; font-size: 13px;
}
.todo-item:last-child { border-bottom: 0; }
.todo-item input[type=checkbox] { accent-color: var(--c-blue); }
.todo-item .label { flex: 1; }
.todo-item .deadline { font-size: 11px; color: var(--c-text-3); }
.todo-item .prio {
  font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600;
}
.prio-high { background: #fee2e2; color: var(--c-danger); }
.prio-mid { background: #fef3c7; color: #b45309; }
.prio-low { background: #e0f4ff; color: var(--c-ocean); }

/* ============================================
   头像
   ============================================ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-ocean) 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.avatar.gold { background: linear-gradient(135deg, var(--c-gold) 0%, #f97316 100%); }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }

/* ============================================
   警告条
   ============================================ */
.alert {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 12px; display: flex; align-items: center; gap: 8px;
  border-left: 3px solid;
}
.alert.danger { background: #fef2f2; border-color: var(--c-danger); color: #991b1b; }
.alert.warn { background: #fffbeb; border-color: var(--c-warning); color: #92400e; }
.alert.info { background: #eff6ff; border-color: var(--c-blue); color: #1e40af; }
.alert.success { background: #f0fdf4; border-color: var(--c-success); color: #166534; }

/* ============================================
   AI 助手浮动按钮
   ============================================ */
.ai-fab {
  position: fixed; right: 24px; bottom: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-ocean) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 8px 24px rgba(41,82,255,.35);
  z-index: 99; cursor: pointer;
  transition: .2s;
}
.ai-fab:hover { transform: scale(1.06); }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 16px; }
  .topbar .nav { display: none; }
  .page { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
