/* ==================== 一张图统一样式 ==================== */

/* 字体定义（font-display:swap 避免字体下载阻塞首屏渲染） */
@font-face {
  font-family: "思源黑体";
  src: url("../fonts/思源黑体.otf");
  font-display: swap;
}

@font-face {
  font-family: "PangMenZhengDao";
  src: url("../fonts/庞门正道标题体3.0.ttf");
  font-display: swap;
}

@font-face {
  font-family: "苹方黑体-中黑-简";
  src: url("../fonts/苹方黑体-中黑-简.ttf");
  font-display: swap;
}

@font-face {
  font-family: "苹方黑体-中粗-简";
  src: url("../fonts/苹方黑体-中粗-简.ttf");
  font-display: swap;
}

@font-face {
  font-family: "PingFangNormal";
  src: url("../fonts/苹方黑体-常规-简.ttf");
  font-display: swap;
}

@font-face {
  font-family: "苹方黑体-细-简";
  src: url("../fonts/苹方黑体-细-简.ttf");
  font-display: swap;
}

@font-face {
  font-family: "titleFont";
  src: url("../fonts/title.ttf");
  font-display: swap;
}

@font-face {
  font-family: "textFont";
  src: url("../fonts/text.ttf");
  font-display: swap;
}

@font-face {
  font-family: "DINBold";
  src: url("../fonts/DIN-Bold.otf");
  font-display: swap;
}

@font-face {
  font-family: "DIN";
  src: url("../fonts/DIN-Light.otf");
  font-display: swap;
}

@font-face {
  font-family: "DINMedium";
  src: url("../fonts/DIN-Medium.otf");
  font-display: swap;
}

@font-face {
  font-family: "DINRegular";
  src: url("../fonts/DIN-Regular.otf");
  font-display: swap;
}

@font-face {
  font-family: "PINGFANG";
  src: url("../fonts/PingFang.ttf");
  font-display: swap;
}

/* 基础 */
html {
  height: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: "PingFangNormal", DIN, Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  background: #EFF3F4;
  color: #333333;
}

textarea {
  font-family: "PingFangNormal", DIN, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

a, a:focus, a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

a:focus, a:active {
  outline: none;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: #EDF2F5;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background-color: #B1D6FD;
  border-radius: 4px;
}
::-webkit-scrollbar-track-piece {
  border-radius: 4px;
}
::-webkit-scrollbar-corner,
::-webkit-scrollbar-corner:vertical {
  background-color: transparent !important;
}

::placeholder { color: #CCC; }

/* 表单元素 */
input:focus, textarea:focus, select:focus {
  border-color: #37BCE6;
  box-shadow: 0px 2px 4px 0px rgba(55, 111, 208, 0.33);
  outline: none;
}

input, textarea, select {
  border: 1px solid #D5DFE6;
  color: #171F21;
}

/* 按钮 */
.btn-primary {
  background: #009BE5;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: #2AB7FA;
}

/* ==================== 布局 ==================== */

/* 顶部导航栏 */
.navbar {
  height: 64px;
  background: #fff;
  box-shadow: 0px 3px 4px 0px rgba(118, 142, 199, 0.16);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.navbar-brand .word {
  font-family: 'PangMenZhengDao', 'PingFangNormal', sans-serif;
  font-size: 24px;
  color: #333333;
  letter-spacing: 2px;
  white-space: nowrap;
}

.navbar-brand .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3C78B7, #009BE5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navbar-nav a, .navbar-nav button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 16px;
  color: #5A5E66;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'PingFangNormal', 'DIN', sans-serif;
}

.navbar-nav a:hover, .navbar-nav button:hover {
  color: #1989FD;
  background: #F5F7FA;
}

.navbar-nav a.active {
  color: #1989FD;
  font-weight: 600;
}

/* 内容区域 */
.app-main {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  background: #EFF3F4;
  padding: 20px;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==================== 组件 ==================== */

/* 面板/卡片 */
.panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px 2px rgba(119, 139, 165, 0.15);
  overflow: hidden;
}

.panel-header {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.panel-body {
  padding: 16px 20px;
}

/* 列表标题栏 */
.list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 14px 20px;
}

.list-title .label-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-title .label-text::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #1989FD;
  border-radius: 2px;
}

.list-type {
  display: flex;
  gap: 0;
}

.list-type .tab-badge {
  position: relative;
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #D5DFE6;
  background: #fff;
  color: #636A6F;
  cursor: pointer;
  transition: all 0.2s;
  border-right: none;
}

.list-type .tab-badge:first-child {
  border-radius: 6px 0 0 6px;
}

.list-type .tab-badge:last-child {
  border-radius: 0 6px 6px 0;
  border-right: 1px solid #D5DFE6;
}

.list-type .tab-badge.active {
  background: #1989FD;
  color: #fff;
  border-color: #1989FD;
}

.list-type .tab-badge .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #E64A42;
  color: #fff;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  min-width: 18px;
  text-align: center;
  line-height: 18px;
}

/* 导航卡片 */
.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px 2px rgba(119, 139, 165, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px 0 rgba(119, 139, 165, 0.25);
  border-color: #B3D4F0;
}

.nav-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 22px;
  color: #fff;
}

.nav-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.nav-card .card-desc {
  font-size: 12px;
  color: #808080;
}

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.list-item:hover {
  background: #F5F7FA;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item .item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.list-item .item-body {
  flex: 1;
  min-width: 0;
}

.list-item .item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.list-item .item-desc {
  font-size: 12px;
  color: #808080;
  margin-top: 2px;
}

.list-item .item-arrow {
  color: #CCC;
  margin-left: 8px;
  flex-shrink: 0;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -2px 6px rgba(118, 142, 199, 0.12);
  z-index: 50;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  text-decoration: none;
  color: #808080;
  font-size: 11px;
  transition: color 0.2s;
}

.bottom-nav a.active {
  color: #1989FD;
}

.bottom-nav a i {
  font-size: 20px;
}

/* ==================== 工具类 ==================== */

.bg-gradient-primary {
  background: linear-gradient(135deg, #3C78B7 0%, #009BE5 100%);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, #009BE5 0%, #39B76B 100%);
}

.bg-gradient-accent {
  background: linear-gradient(135deg, #39B76B 0%, #2EA05A 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #EE8C0F 0%, #E67A08 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #E64A42 0%, #C0392B 100%);
}

.bg-gradient-purple {
  background: linear-gradient(135deg, #6C5CE7 0%, #A855F7 100%);
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
