* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }

/* ---------- 品牌主题变量(对齐登录页深蓝+品牌蓝) ---------- */
:root {
  --el-color-primary: #2f6fb2;
  --el-color-primary-light-3: #5b8fc6;
  --el-color-primary-light-5: #8aafd8;
  --el-color-primary-light-7: #b9cfe9;
  --el-color-primary-light-8: #d0e0f1;
  --el-color-primary-light-9: #e8f0f9;
  --el-color-primary-dark-2: #25598e;
  --el-border-radius-base: 8px;
  --el-box-shadow-light: 0 2px 12px rgba(15, 45, 90, .08);
}
/* 卡片/弹窗统一圆角与阴影 */
.el-card { border-radius: 12px; border-color: #e8eef6; }
.el-card__body { padding: 16px 18px; }
.el-dialog { border-radius: 14px; }
.el-tag { border-radius: 6px; }

/* 工具条与筛选区:统一节奏(高度/字号/间距),修复司机管理页筛选居中不齐 */
.toolbar { gap: 8px; }
.toolbar .el-button { height: 30px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.toolbar .el-input, .toolbar .el-select { font-size: 13px; }
.toolbar .el-input .el-input__wrapper { padding: 0 10px; }
.toolbar .el-input .el-input__inner { height: 28px; line-height: 28px; }
.toolbar .el-select .el-select__wrapper { min-height: 30px; padding: 2px 8px; font-size: 13px; border-radius: 8px; }
.el-button .more-caret { margin-left: 4px; }
/* 下拉菜单项图标间距 */
.el-dropdown-menu__item .el-icon { margin-right: 6px; }

/* 表格:紧凑行高与操作列 */
.el-table { font-size: 13px; }
.el-table td.el-table__cell { padding: 5px 0; }
.el-table th.el-table__cell { padding: 7px 0; }
.el-table .cell { padding: 0 10px; }
.el-table .el-button.is-link, .el-table .el-button.is-text { padding: 2px 4px; font-size: 13px; height: auto; }
.pager { padding: 10px 0 0; }
.el-button--primary {
  background: linear-gradient(135deg, #2f6fb2, #3d8bff);
  border: none;
}
.el-button--primary:hover, .el-button--primary:focus { background: linear-gradient(135deg, #3a7cc2, #5598ff); }
.el-button--primary.is-plain, .el-button--primary.is-text { background: var(--el-color-primary-light-9); border: 1px solid var(--el-color-primary-light-8); color: var(--el-color-primary); }
.el-button--primary.is-link, .el-button--primary.is-text { background: transparent; border: none; }
.el-table th.el-table__cell { background: #f4f8fc; color: #33475e; font-weight: 600; }
.el-table { --el-table-row-hover-bg-color: #f0f6ff; }
.el-table { border-radius: 10px; overflow: hidden; }

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: linear-gradient(180deg, #eef3f9 0%, #f3f6fa 40%, #f2f5fa 100%); color: #303133; font-size: 14px;
}
/* 全局滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d6e6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a9bcd4; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录(白天城市车流视频背景) ---------- */
.login-page { position: relative; height: 100%; overflow: hidden; background: #0b1c33; }
.login-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.5s linear;
}
.login-video.on { opacity: 1; }
.login-mask {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(7,18,38,.92) 0%, rgba(7,18,38,.84) 32%, rgba(7,18,38,.52) 52%, rgba(7,18,38,.28) 66%, rgba(7,18,38,.48) 82%, rgba(7,18,38,.44) 100%),
    linear-gradient(180deg, rgba(7,18,38,.40) 0%, rgba(7,18,38,0) 24%, rgba(7,18,38,0) 66%, rgba(7,18,38,.55) 100%);
}
.login-topbrand {
  position: absolute; z-index: 2; top: 26px; left: 38px;
  display: flex; align-items: center; gap: 10px; color: #fff;
}
.login-topbrand img { width: 38px; height: 38px; }
.login-topbrand span { font-size: 16px; font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.login-hero {
  position: absolute; z-index: 2; left: 6%; top: 50%; transform: translateY(-50%);
  max-width: 580px; color: #fff;
}
.login-hero h1 {
  margin: 0 0 18px; font-size: 40px; line-height: 1.35; font-weight: 700; letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 3px 16px rgba(0,10,30,.6);
}
.login-hero p {
  margin: 0; font-size: 16px; line-height: 2; color: rgba(255,255,255,.92);
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.hero-tags { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tags i {
  font-style: normal; font-size: 13px; padding: 6px 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.login-card {
  position: absolute; z-index: 3; top: 50%; right: 5%; transform: translateY(-50%);
  width: 460px; max-width: 90vw; padding: 38px 42px 30px;
  background: linear-gradient(160deg, rgba(15,30,58,.36), rgba(8,16,34,.22));
  border: 1px solid rgba(255,255,255,.22); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,10,30,.45);
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
}
.login-card-head { text-align: center; margin-bottom: 24px; }
.login-card-head h2 { margin: 0 0 8px; font-size: 22px; color: #fff; letter-spacing: 3px; }
.login-card-head p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.6); }
.login-extra { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.88); }
.login-extra span { opacity: .85; }
/* ---------- 站点页脚(版权/备案信息,单行紧凑) ---------- */
.site-footer { font-size: 12px; line-height: 1.6; color: #8a94a6; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #1e6fff; text-decoration: underline; }
.site-footer .sf-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; }
.site-footer .sf-sep { color: #c8ced8; }
.site-footer.sf-dark { color: rgba(255,255,255,.72); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.site-footer.sf-dark a { color: rgba(255,255,255,.88); }
.site-footer.sf-dark .sf-sep { color: rgba(255,255,255,.32); }
.login-page .site-footer {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 12px;
  padding: 0 24px;
}
.app-footer { padding: 4px 18px; background: #fff; border-top: 1px solid #ebeef5; }
.app-footer .site-footer .sf-inline { justify-content: center; }
.logo-img { width: 44px; height: 44px; flex-shrink: 0; }
.logo-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, #f5a623, #e6552e); flex-shrink: 0;
}
.demo-accounts { margin-top: 22px; border-top: 1px dashed #e4e7ed; padding-top: 14px; }
.demo-accounts p { margin: 0 0 8px; font-size: 12px; color: #909399; }
.demo-tag { cursor: pointer; margin: 0 8px 6px 0; }
@media (max-width: 1080px) {
  .login-mask { background: rgba(7,18,38,.72); }
  .login-hero { display: none; }
  .login-card { left: 50%; right: auto; transform: translate(-50%, -50%); }
}
@media (max-width: 560px) {
  .login-topbrand span { display: none; }
  .login-card { width: 92vw; padding: 28px 24px 22px; }
}

/* ---------- 布局 ---------- */
.layout { height: 100%; }
.aside {
  background: linear-gradient(180deg, #16294a 0%, #101f3a 55%, #0b1830 100%);
  display: flex; flex-direction: column;
}
.brand {
  height: 56px; color: #fff; font-weight: 600; font-size: 13px; display: flex;
  align-items: center; gap: 6px; padding: 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  white-space: nowrap; letter-spacing: 0;
}
.brand-logo { width: 26px; height: 26px; flex-shrink: 0; }
.side-menu { border-right: none; background: transparent; flex: 1; }
.side-menu .el-menu-item { color: #aeb6c8; margin: 2px 8px; border-radius: 8px; height: 44px; }
.side-menu .el-menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-menu .el-menu-item.is-active {
  background: linear-gradient(135deg, #2f6fb2, #3d8bff); color: #fff;
  box-shadow: 0 4px 14px rgba(47,111,178,.45);
}
.aside-footer { color: #5a6a87; font-size: 11px; text-align: center; padding: 12px 0; }
.header {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e6ecf4; padding: 0 20px;
}
.crumb { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.crumb::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, #2f6fb2, #3d8bff);
}
.header-right { display: flex; align-items: center; gap: 16px; }
.bell { cursor: pointer; display: flex; }
.user-chip { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; }
.main { padding: 16px 18px; overflow: auto; }

/* ---------- 通用 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel {
  background: #fff; border: 1px solid #e8eef6; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(15, 45, 90, .06);
}
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-sub { font-size: 12px; color: #909399; font-weight: 400; margin-left: 4px; }
.stat-card {
  background: #fff; border: 1px solid #e8eef6; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(15, 45, 90, .06);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: 0 6px 20px rgba(15, 45, 90, .10); transform: translateY(-2px); }
.stat-label { font-size: 12px; color: #909399; }
.stat-value { font-size: 26px; font-weight: 600; color: #1d3f72; margin-top: 6px; }
.stat-sub { font-size: 13px; color: #909399; font-weight: 400; margin-left: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
/* 数据中心第二行:卡片 flex 自适应,非财务时单卡补满整行 */
.stat-row2 { display: flex; gap: 14px; margin-top: 14px; }
.stat-row2 .stat-card { flex: 1; }
.sub-text { font-size: 12px; color: #909399; margin-top: 2px; }
.stat-sub-line { font-size: 12px; color: #909399; margin-top: 4px; }
.model-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.model-card { background: var(--el-color-primary-light-9); border: 1px solid var(--el-color-primary-light-8); border-radius: 10px; padding: 12px 20px; min-width: 120px; text-align: center; }
.model-name { font-size: 13px; color: #606266; margin-bottom: 4px; }
.model-count { font-size: 24px; font-weight: 700; color: #1d3f72; }
.model-unit { font-size: 12px; color: #909399; font-weight: 400; margin-left: 4px; }
/* 门店车型卡片区:固定约两排卡片高度,超出上下滑动查看 */
.model-scroll { max-height: 308px; overflow-y: auto; align-content: flex-start; padding-right: 4px; }
.model-scroll::-webkit-scrollbar { width: 6px; }
.model-scroll::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 3px; }
.model-scroll::-webkit-scrollbar-track { background: transparent; }
.perm-groups { display: flex; flex-direction: column; gap: 14px; }
.perm-group { border: 1px solid #ebeef5; border-radius: 6px; padding: 10px 14px; }
.perm-group-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; color: #303133; }
.perm-checkbox-group { display: flex; flex-wrap: wrap; gap: 4px 0; }
.perm-checkbox-group .el-checkbox { margin-right: 16px; }
.pager { display: flex; justify-content: flex-end; padding: 12px 0 0; }
.click-table .el-table__row { cursor: pointer; }

/* ---------- 详情 ---------- */
.detail-top { margin-bottom: 10px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.detail-name { font-size: 20px; font-weight: 600; }
.detail-no { color: #909399; font-size: 12px; margin-left: 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.detail-desc { margin-top: 4px; }
.tl-title { font-size: 13px; }
.tl-sub { font-size: 12px; color: #909399; margin-top: 2px; }

/* ---------- 通知 ---------- */
.notif-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; border-bottom: 1px solid #f0f2f5; }
.notif-list { max-height: 360px; overflow: auto; }
.notif-item { padding: 8px 4px; border-bottom: 1px solid #f5f7fa; cursor: pointer; }
.notif-item:hover { background: #f5f7fa; }
.notif-item.unread .notif-title { font-weight: 600; }
.notif-title { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.notif-content { font-size: 12px; color: #606266; margin: 3px 0; }
.notif-time { font-size: 11px; color: #c0c4cc; }
.empty-tip { text-align: center; color: #909399; padding: 20px 0; font-size: 13px; }

.import-result { margin-top: 10px; }

/* ---------- 访客未开通功能占位 ---------- */
.guest-lock {
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  color: #606266;
}
.guest-lock .el-icon { color: #c0c4cc; }
.guest-lock h3 { font-size: 20px; margin: 0; color: #303133; }
.guest-lock p { margin: 0; font-size: 14px; }
.guest-lock .guest-lock-sub { color: #909399; font-size: 12px; }

/* ---------- 移动端适配(仅 <=768px 生效,桌面端样式完全不变) ---------- */
.hamburger-btn { display: none; }
@media (max-width: 768px) {
  .hamburger-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 4px; border-radius: 8px; color: #33475e; }
  .hamburger-btn:active { background: #eef3f9; }

  /* 侧边栏变抽屉 */
  .aside.mobile {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 2001; width: 232px !important;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .aside.mobile.open { transform: translateX(0); box-shadow: 4px 0 28px rgba(8, 20, 44, .4); }
  .mobile-mask { position: fixed; inset: 0; background: rgba(8, 18, 38, .45); z-index: 2000; }

  /* 头部 */
  .header { padding: 0 10px; }
  .header-search { display: none; }
  .header-right { gap: 10px; }
  .crumb { font-size: 14px; }
  .user-chip .el-tag { display: none; }

  /* 内容区 */
  .main { padding: 10px 8px; }
  .panel, .stat-card { padding: 12px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-row2 { flex-direction: column; }
  .toolbar { gap: 6px; }
  .toolbar .el-input, .toolbar .el-select { width: 100% !important; max-width: 100%; }
  .toolbar-right { margin-left: 0; width: 100%; }

  /* 弹窗/消息框全屏适配 */
  .el-dialog { width: 94vw !important; max-width: 94vw; margin-top: 6vh !important; }
  .el-dialog__body { padding: 12px 16px; max-height: 68vh; overflow-y: auto; }
  .el-message-box { width: 92vw !important; max-width: 92vw; }
  .el-form-item__label { font-size: 13px; }
  .el-popover { max-width: 94vw; }
  .el-popper { max-width: 96vw; }

  /* 表格 */
  .el-table { font-size: 12px; }
  .pager { justify-content: center; flex-wrap: wrap; }
  .el-pagination { flex-wrap: wrap; justify-content: center; row-gap: 6px; }

  /* 详情页 */
  .detail-name { font-size: 17px; }
  .detail-head { flex-direction: column; }
  .detail-actions { width: 100%; }

  /* 未开通占位 */
  .guest-lock { min-height: 60vh; padding: 0 16px; text-align: center; }
  .guest-lock h3 { font-size: 17px; }

  /* 弹窗内所有控件占满一行,杜绝固定宽度溢出挤压 */
  .el-dialog .el-input, .el-dialog .el-select, .el-dialog .el-date-editor,
  .el-dialog .el-cascader, .el-dialog .el-input-number, .el-dialog .el-textarea {
    width: 100% !important; max-width: 100% !important;
  }
  .el-dialog .el-form-item { margin-bottom: 16px; }
  .el-dialog__footer { display: flex; flex-wrap: wrap; gap: 8px; }
  .el-dialog__footer .el-button { margin-left: 0 !important; flex: 1; min-width: 90px; }

  /* 弹窗表单:多列(姓名/手机/性别一行三个)在手机上改为单列,标签移到输入框上方 */
  .el-dialog .el-row .el-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
  .el-dialog .el-form--inline .el-form-item { margin-right: 0; }
  .el-dialog .el-form-item { display: flex; flex-direction: column; align-items: stretch; }
  .el-dialog .el-form-item__label {
    display: block; float: none; width: auto !important; height: auto !important;
    text-align: left !important; padding: 0 0 4px !important; line-height: 1.4 !important;
    font-size: 13px; color: #606266;
  }
  .el-dialog .el-form-item__content { margin-left: 0 !important; line-height: 1.4; }
  .el-dialog .el-checkbox { margin-right: 12px; }
  .el-dialog .el-radio { margin-right: 14px; }
  /* 下拉框弹层:确保在弹窗之上且不超出屏幕 */
  .el-select-dropdown { z-index: 3000 !important; max-width: 96vw; }
  .el-popper { z-index: 3000 !important; }

  /* 页面面板里写死宽度的筛选控件,移动端一律整行 */
  .panel .el-input, .panel .el-select, .panel .el-date-editor { max-width: 100% !important; }
  .panel .el-input[style*="width"], .panel .el-select[style*="width"], .panel .el-date-editor[style*="width"],
  div[style*="display:flex"] .el-input[style*="width"], div[style*="display:flex"] .el-select[style*="width"] {
    width: 100% !important;
  }

  /* 描述列表/标签页/卡片 */
  .el-descriptions__body .el-descriptions__table { font-size: 12px; }
  .el-tabs__item { padding: 0 12px !important; font-size: 13px; }
  .el-tabs__nav-wrap { overflow-x: auto; }
  .model-card { min-width: 96px; padding: 10px 12px; flex: 1; }
  .stat-sub { margin-left: 4px; font-size: 12px; }

  /* 表格在窄屏保留横向滑动,单元格留白收紧 */
  .el-table .cell { padding: 0 6px; }
  .panel { overflow-x: hidden; }
  .panel .el-table { max-width: 100%; }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 18px; }
}

