/* ========== 全局基础风格 ========== */
body {
  background-color: #f4f6f9;
  font-family: "Segoe UI", "Roboto", "Helvetica Neue",
               "Microsoft YaHei", "PingFang SC";
  color: #2c3e50;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.2px;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 0 !important;
  padding-top: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container,
.container-fluid,
main,
.content,
.content-wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ====== 表格数字对齐 & 字体权重优化 ====== */
.table td,
.table th {
  font-feature-settings: "tnum";
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.3px;
}

/* ====== 标题和按钮统一加重、拉宽字距 ====== */
h1, h2, h3, h4,
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ====== 小段文本更清晰（如 label, alert 等）====== */
.alert,
label,
.form-control {
  letter-spacing: 0.3px;
}



/* ========== 通用按钮美化 ========== */

.btn {
  border-radius: 0.6rem;
  font-weight: 500;
  padding: 0.45rem 1.25rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
  will-change: transform;
}

/* 悬停效果*/
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  opacity: 0.97;
}

/* 点击反馈：轻微压下+内阴影 */
.btn:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* 主按钮主色调 */
.btn-primary {
  background-image: linear-gradient(135deg, #3f51b5, #9c27b0) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(63, 81, 181, 0.3);
}
/* 悬停状态：渐变另一组颜色 */
.btn-primary:hover {
  background-image: linear-gradient(135deg, #303f9f, #d500f9)!important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(63, 81, 181, 0.5);
}

.btn-secondary {
  background-image: linear-gradient(135deg, #7e8a97, #4a525a) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(63, 81, 181, 0.3);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
  will-change: transform;
}

.btn-secondary:hover {
  background-image: linear-gradient(135deg, #b0b7bd, #6c757d) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  opacity: 0.97;
}

/* 点击反馈：轻微压下+内阴影 */
.btn-secondary:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}


.btn-warning {
  background-image: linear-gradient(135deg, #f57c00, #e65100) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(251, 192, 45, 0.4);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.btn-warning:hover {
  background-image: linear-gradient(135deg, #ef6c00, #fbc02d) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
  color: #fff !important;
  opacity: 0.97;
}

/* 点击反馈：轻微压下+内阴影 */
.btn-warning:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background-image: linear-gradient(135deg, #e53935, #b71c1c) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(229, 57, 53, 0.4);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.btn-danger:hover {
  background-image: linear-gradient(135deg, #d32f2f, #7f0000) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(183, 28, 28, 0.4);
  opacity: 0.97;
}

.btn-danger:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Route view action: use a green tone while matching the filled action buttons. */
.btn-route-view {
  background-image: linear-gradient(135deg, #43a047, #1b5e20) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(46, 125, 50, 0.4);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.btn-route-view:hover {
  background-image: linear-gradient(135deg, #2e7d32, #66bb6a) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
  opacity: 0.97;
}

.btn-route-view:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
  background-image: linear-gradient(135deg, #2e7d32, #66bb6a) !important;
  background-color: unset !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(46, 125, 50, 0.3);
  transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
  font-weight: 600;
}

.btn-success:hover {
  background-image: linear-gradient(135deg, #1b5e20, #81c784) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(56, 142, 60, 0.35);
  opacity: 0.97;
}

.btn-success:active {
  transform: scale(0.96);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.1);
}


/* ========== 卡片立体效果 ========== */
.card {
  border-radius: 1rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}


/* ========== 表格美化升级 ========== */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* 表头样式 */
.table thead {
  background: linear-gradient(to top, #eef1f5, #d4dbe6); /* 浅灰蓝 ➜ 深蓝灰 */
  color: #2c3e50;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.table thead th {
  padding: 14px 16px;
  font-size: 14px;
  background: transparent;
}

/* 表格内容行 */
.table tbody tr {
  transition: all 0.2s ease-in-out;
  border-bottom: 1px solid #e5e9f2;
}

.table tbody td {
  padding: 12px 16px;
  color: #34495e;
  vertical-align: middle;
  background-color: #ffffff;
  border-top: 0.2px solid #e6e6e6;
  border-bottom: 0.2px solid #e6e6e6;
}


/* 悬浮动画 */
.table-hover tbody tr:hover {
  background-color: #f5faff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  z-index: 2;
  position: relative;
}

/* 圆角只作用在最外层 */

.table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 0.75rem;
}
.table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 0.75rem;
}


/* ========== 模态框优化 ========== */
.modal-content {
  border-radius: 1.2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: none;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-footer {
  border-top: none;
  padding-top: 0;
}

/* ========== 输入框美化 ========== */
.form-control {
  border-radius: 0.5rem;
  border: 1px solid #dcdfe6;
  transition: all 0.2s ease;
  font-size: 14px;
}

.form-control:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 0.2rem rgba(63, 81, 181, 0.15);
}

/* ========== Toast / Alert 提示美化 ========== */
.alert {
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

/* ========== 顶部导航栏背景图 + 遮罩 ========== */
.custom-navbar {
  background-image: url("../img/banner_orange.jpeg");
  background-size: cover;
  background-position: center;
  height: 80px;
  color: #fff;
  position: relative;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border: none;
  box-shadow: none;
  z-index: 10;
}

.custom-navbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
  border-bottom: none;
}

.custom-navbar .navbar-brand,
.custom-navbar .nav-link {
  position: relative;
  z-index: 1;
}

/* ===== Sidebar 样式（低饱和紫 ➜ 柔和橙） ===== */
#sidebar {
  position: relative;
  height: auto;

  /* 降低饱和度版本*/
  background: linear-gradient(180deg, #5b4b8a 0%, #c97a3d 100%);

  width: 220px;
  min-width: 150px;
  max-width: 400px;
  overflow-y: auto;
  flex-shrink: 0;

  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.2);
}

/* ===== 拖拽条 ===== */
#resizer {
  width: 10px;
  height: 100vh;
  cursor: col-resize;
  background-color: transparent;
  transition: background-color 0.2s ease;
  z-index: 1000;
}

#resizer:hover,
.resizing #resizer {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ===== Sidebar 文本 ===== */
.sidebar a,
.sidebar div[role="button"] {
  color: #f5f5f5;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  font-size: 16px;
  transition: all 0.25s ease;
}

/* ===== Hover（柔和橙，不刺眼） ===== */
.sidebar a.d-flex:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  transform: translateX(3px);
}

/* ===== Active（当前页） ===== */
.sidebar a.active {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  font-weight: bold;
  border-radius: 12px;
}

/* ===== 全局 active 高亮 ===== */
a.active {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 1.5rem;

  /* 轻微紫色阴影（更克制） */
  box-shadow: 0 0 12px rgba(91, 75, 138, 0.3);

  padding-left: 1.25rem;
  padding-right: 1.25rem;
  letter-spacing: 0.5px;
}

/* ===== 箭头动画 ===== */
.arrow-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.collapse.show + .arrow-icon {
  transform: rotate(90deg);
}

#main-content {
  flex-grow: 1;
  min-width: 0;
}

/* ======= 自定义页脚（玻璃感 + 深色背景）======= */
.custom-footer {
  background: linear-gradient(to bottom, rgba(110, 110, 110, 0.6), rgba(30,30,30,1));
  color: #f0f0f0;
  padding: 1rem 2rem;
  position: relative;
  z-index: 10;

  /* 阴影 */
  /*box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.3);*/
}

.custom-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.custom-footer .footer-content {
  position: relative;
  z-index: 1;
  text-align: right;
  font-size: 0.875rem;
}

.custom-footer a {
  color: #ddd;
  text-decoration: none;
}
.custom-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

