/* ============ 全局 ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

a { cursor: pointer; text-decoration: none; }

/* ============ 布局 ============ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ============ 侧边栏 ============ */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #5f5fe7;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  transition: all .15s;
  margin-bottom: 2px;
}

.sidebar-item:hover { background: #a7f3ba; color:#055dcf; }
.sidebar-item.active { background: #a7f3ba; color:#1a73e8; font-weight: 600; }

/* 首页、用户管理、云平台账号 — 与分组目录统一配色 */
.sidebar-standalone {
  font-weight: 600 !important;
  color: #5f5fe7 !important;
  background: #e6eafa;
  margin-bottom: 4px;
}
.sidebar-standalone:hover { background: #a7f3ba !important; color: #5f5fe7 !important; }
.sidebar-standalone.active { background: #e6eafa !important; color: #5f5fe7 !important; }

.sidebar-icon { font-size: 16px; }

/* ============ 侧边栏目录分组 ============ */
.sidebar-group { margin-bottom: 4px; }
.sidebar-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #5f5fe7;
  background: #e6eafa;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background .15s;
}
.sidebar-group-title:hover { background: #a7f3ba; }
.sidebar-group-arrow {
  font-size: 10px;
  transition: transform .2s;
  display: inline-block;
}
.sidebar-group-arrow.open { transform: rotate(90deg); }
.sidebar-group-items { padding-left: 8px; }
.sidebar-sub-item {
  padding-left: 32px !important;
  font-size: 13px !important;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-user {
  font-size: 13px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-block { width: 100%; }

/* ============ 主体内容区 ============ */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-x: hidden;
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* ============ 统计卡片 ============ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stats-row-ecs {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  border-left: 4px solid #1a73e8;
}

.stat-card.online { border-left-color: #34a853; }
.stat-card.warning { border-left-color: #fbbc04; }
.stat-card.danger { border-left-color: #ea4335; }
.stat-card.offline { border-left-color: #9aa0a6; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.stat-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* ============ 筛选栏 ============ */
.filter-bar {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ 表单元素 ============ */
.input,
.select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.input:focus,
.select:focus,
.input-error:focus,
.input-success:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .1);
}

/* 输入框校验反馈 */
.input-error {
  border-color: #ea4335 !important;
}
.input-error:focus {
  border-color: #ea4335 !important;
  box-shadow: 0 0 0 3px rgba(234, 67, 53, .15);
}
.input-success {
  border-color: #34a853 !important;
}
.input-success:focus {
  border-color: #34a853 !important;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .15);
}

.input {
  width: 220px;
}

.input-date {
  width: 150px;
}

.select {
  width: 140px;
  background: #fff;
  cursor: pointer;
  /* 禁用原生下拉框外观，防止点击时闪白框 */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.date-sep {
  font-size: 13px;
  color: #888;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #1557b0;
}

.btn-default {
  background: #fff;
  color: #555;
  border-color: #d0d5dd;
}

.btn-default:hover:not(:disabled) {
  background: #f5f5f5;
}

.btn-text {
  background: none;
  color: #1a73e8;
  border: none;
  padding: 0 4px;
}

.btn-text:hover { text-decoration: underline; }

.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover { color: #333; }

/* ============ 表格 ============ */
.table-wrapper {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  /* 窄屏时表格（如堡垒机13列表）超出宽度改为内部横向滚动，避免被裁切/覆盖且无法滚动 */
  overflow: auto;
  padding-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.table th {
  background: #fafafa;
  font-weight: 600;
  color: #555;
  font-size: 13px;
}

.table tbody tr:hover {
  background: #f8f9ff;
}

/* ============ 列选择器 ============ */
.table th:last-child {
  position: relative;
}

.col-picker-trigger {
  cursor: pointer;
  font-size: 16px;
  margin-left: 6px;
  color: #999;
  user-select: none;
}

.col-picker-trigger:hover { color: #1a73e8; }

.col-picker-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  padding: 8px 0;
  min-width: 160px;
  z-index: 50;
}

.col-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}

.col-picker-item:hover { background: #f5f5f5; }

.col-picker-item input[type="checkbox"] {
  accent-color: #1a73e8;
}

/* ============ 排序图标 ============ */
.sort-icon {
  cursor: pointer;
  margin-left: 4px;
  font-size: 12px;
  color: #bbb;
  user-select: none;
}

.sort-icon:hover { color: #1a73e8; }

/* ============ 漏斗筛选 ============ */
.th-filter {
  position: relative;
}

.filter-funnel {
  cursor: pointer;
  margin-left: 4px;
  font-size: 11px;
  color: #bbb;
  user-select: none;
}

.filter-funnel:hover { color: #1a73e8; }
.filter-funnel.active { color: #1a73e8; }

.funnel-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  z-index: 50;
  min-width: 140px;
  min-height: 80px;
}

.funnel-options {
  padding: 4px 0;
}

.funnel-opt {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}

.funnel-opt:hover { background: #f5f5f5; }

.funnel-opt.selected {
  color: #1a73e8;
  background: #e8f0fe;
}

.funnel-opt-multi {
  display: flex;
  align-items: center;
  gap: 6px;
}

.funnel-check {
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.funnel-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #f0f0f0;
  justify-content: flex-end;
}

.funnel-opt-all {
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  color: #1a73e8;
}

.btn-xs {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

/* ============ 域名备注 ============ */
.domain-remark {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-offline {
  opacity: .55;
}

.text-center { text-align: center; }
.py-40 { padding: 40px 0; }
.text-gray { color: #999; }

.domain-link {
  color: #1a73e8;
  font-weight: 500;
}

.domain-link:hover { text-decoration: underline; }

/* ============ 标签 ============ */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tag-platform {
  background: #e8f0fe;
  color: #1a73e8;
}

.tag-success { background: #e6f4ea; color: #1e8e3e; }
.tag-warning { background: #fef7e0; color: #f9ab00; }
.tag-danger { background: #fce8e6; color: #d93025; }
.tag-offline { background: #f1f3f4; color: #80868b; }
.tag-default { background: #f1f3f4; color: #5f6368; }

/* ============ 文字颜色 ============ */
.text-success { color: #1e8e3e; font-weight: 600; }
.text-warning { color: #f9ab00; font-weight: 600; }
.text-danger { color: #d93025; font-weight: 600; }

/* ============ 分页 ============ */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.page-info {
  font-size: 13px;
  color: #888;
}

.page-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-jump {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-page {
  width: 52px;
  text-align: center;
  padding: 0 4px;
}

.page-size {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-sm {
  height: 30px;
  font-size: 13px;
  width: 68px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 22px;
}

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
}
html { overflow-y: scroll; }
.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  overflow: visible;
}
/* 带动画的弹窗（数据优先渲染方案，需配合 :class="{ open: xxx }" 使用） */
.modal-overlay.animated {
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.animated.open {
  opacity: 1;
  visibility: visible;
}
.modal-overlay.animated .modal {
  transform: scale(.92) translateY(12px);
  opacity: 0;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
  will-change: transform, opacity;
}
.modal-overlay.animated.open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ============ 自定义下拉（目录模式 — 无闪烁展开） ============ */
.cust-sel { position: relative; display: inline-block; cursor: pointer; user-select: none; }
.cust-sel-trigger { background: #333; color: #ccc; border: 1px solid #555; border-radius: 4px; padding: 2px 10px; font-size: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 60px; transition: border-color .2s; }
.cust-sel-trigger:hover { background: #3a3a3a; border-color: #666; }
/* 箭头动画 */
.cust-sel-arrow { display: inline-block; font-size: 10px; transition: transform .3s cubic-bezier(.34,1.56,.64,1); flex-shrink: 0; }
.cust-sel:has(.cust-sel-drop.open) .cust-sel-arrow { transform: rotate(180deg); }
.cust-sel:has(.cust-sel-drop.open) .cust-sel-trigger { border-color: #4285f4; }

/* 下拉面板 — 从 0 高度平滑展开，无白屏跳变 */
.cust-sel-drop { position: absolute; top: 100%; left: 0; margin-top: 3px; background: #2d2d2d; border: 1px solid #555; border-radius: 8px; min-width: 100%; max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transform: scaleY(.92) translateY(-4px); transform-origin: top center; transition: max-height .35s cubic-bezier(.34,1.56,.64,1), opacity .2s, transform .25s cubic-bezier(.34,1.56,.64,1); z-index: 150; box-shadow: 0 6px 20px rgba(0,0,0,.4); will-change: transform, opacity, max-height; }
.cust-sel-drop.open { max-height: 360px; overflow-y: auto; opacity: 1; pointer-events: all; transform: scaleY(1) translateY(0); }

/* 选项 — 目录项风格 */
.cust-sel-item { padding: 6px 12px; font-size: 12px; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.06); transition: background .12s, padding-left .18s; }
.cust-sel-item:last-child { border-bottom: none; }
.cust-sel-item:hover { background: #3a3a4a; padding-left: 16px; }
.cust-sel-item.sel { background: #094771; color: #fff; padding-left: 20px; }
.cust-sel-item.sel::before { content: "✓ "; font-weight: 600; color: #4fc3f7; }
/* 空提示项 */
.cust-sel-empty { padding: 10px 12px; font-size: 12px; color: #888; text-align: center; border-bottom: none; }

/* 滚动条 */
.cust-sel-drop::-webkit-scrollbar { width: 4px; }
.cust-sel-drop::-webkit-scrollbar-track { background: transparent; }
.cust-sel-drop::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }

.drp-backdrop { position: fixed; inset: 0; z-index: 140; }

/* 弹窗内下拉（浅色主题） */
.modal .cust-sel-trigger { background: #fff; color: #333; border-color: #d0d0d0; font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.modal .cust-sel-trigger:hover { background: #f5f5f5; border-color: #4285f4; }
.modal .cust-sel-drop { background: #fff; border-color: #d0d0d0; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.modal .cust-sel-drop.open { max-height: 260px; }
.modal .cust-sel-item { color: #333; border-bottom-color: #f0f0f0; }
.modal .cust-sel-item:hover { background: #f0f5ff; }
.modal .cust-sel-item.sel { background: #e8f0fe; color: #1a73e8; }
.modal .cust-sel-item.sel::before { color: #4285f4; }
.modal .cust-sel-drop::-webkit-scrollbar-thumb { background: #d0d0d0; }
.modal .cust-sel-item.sel { background: #e8f0fe; color: #1a73e8; }

/* ============ 右侧抽屉 ============ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  z-index: 200;
  animation: fadeIn .2s;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 600px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, .1);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.drawer.drawer-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.drawer-header h2 {
  font-size: 16px;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ============ 抽屉内表单 ============ */
.dns-form-group {
  margin-bottom: 20px;
}

.dns-form-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
  font-weight: 500;
}

.dns-form-group label .required {
  color: #e34d59;
  margin-left: 2px;
}

.dns-form-group .form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.dns-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dns-input-wrap .input {
  flex: 1;
}

.dns-domain-suffix {
  padding: 0 10px;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-left: none;
  border-radius: 0 6px 6px 0;
  height: 38px;
  line-height: 38px;
  white-space: nowrap;
  user-select: none;
}

.dns-domain-suffix + .dns-domain-suffix {
  border-left: 1px solid #d9d9d9;
  border-radius: 0;
}

/* 记录类型选择 */
.dns-type-select {
  position: relative;
}

.dns-type-select select {
  width: 100%;
}

.dns-type-desc {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* 折叠面板 */
.dns-collapse-panel {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.dns-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: background .2s;
}

.dns-collapse-header:hover {
  background: #f0f0f0;
}

.dns-collapse-header .collapse-arrow {
  font-size: 12px;
  color: #999;
  transition: transform .2s;
  margin-right: 6px;
}

.dns-collapse-header .collapse-arrow.open {
  transform: rotate(90deg);
}

.dns-collapse-header .collapse-title {
  flex: 1;
}

.dns-collapse-body {
  padding: 16px;
  display: none;
}

.dns-collapse-body.open {
  display: block;
}

.dns-collapse-panel.expanded .dns-collapse-header {
  border-bottom-color: #e8e8e8;
}

/* TTL快捷选项 */
.ttl-quick-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ttl-quick-btn {
  padding: 4px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: all .2s;
}

.ttl-quick-btn:hover {
  border-color: #4a90d9;
  color: #4a90d9;
}

.ttl-quick-btn.active {
  border-color: #4a90d9;
  background: #e8f0fe;
  color: #4a90d9;
  font-weight: 500;
}

.ttl-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ttl-custom-row .input {
  width: 100px;
}

.ttl-unit {
  font-size: 13px;
  color: #666;
}

/* 记录值集合表格 */
.dns-record-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.dns-record-table th,
.dns-record-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.dns-record-table th {
  background: #fafafa;
  color: #666;
  font-weight: 500;
  font-size: 12px;
}

.dns-record-table td .input {
  width: 100%;
  padding: 5px 8px;
  font-size: 13px;
}

.dns-record-table .btn-text {
  font-size: 12px;
}

.dns-record-table .remark-input {
  width: 100px;
}

.dns-add-record-row {
  margin-top: 8px;
}

.dns-add-record-row .btn-link {
  font-size: 13px;
  color: #4a90d9;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.dns-add-record-row .btn-link:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

/* 备注字数统计 */
.remark-counter {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: 2px;
}

/* 表单分隔标题 */
.dns-section-title {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
  animation: slideUp .25s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
  font-size: 18px;
  color: #333;
}

.modal-body {
  padding: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
}

.detail-item span {
  font-size: 14px;
  color: #333;
}

.detail-item .domain {
  font-weight: 600;
  color: #1a73e8;
  font-size: 16px;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  z-index: 999;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.toast.show { opacity: 1; }
.toast-success { background: #34a853; }
.toast-error { background: #ea4335; }

/* ============ 同步日志右侧面板 ============ */
.sync-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sync {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  color: #fff;
}
.btn-sync-running {
  background: #1a73e8;
  border-color: #1a73e8;
  animation: syncPulse 1.5s infinite;
}
.btn-sync-running:hover {
  background: #1557b0;
}
.btn-sync-error {
  background: #ea4335;
  border-color: #ea4335;
}
.btn-sync-error:hover {
  background: #d93025;
}
.btn-sync-done {
  background: #34a853;
  border-color: #34a853;
}
.btn-sync-done:hover {
  background: #2d9249;
}

@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .75; }
}

/* 日志查看小按钮 */
.btn-log {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: all .2s;
  color: #666;
}
.btn-log:hover {
  background: #f0f7ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

/* 面板遮罩（改为右侧抽屉，不阻塞底层界面：点击穿透 + 无黑底遮罩） */
.sync-panel-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: transparent;
  pointer-events: none; /* 点击穿透，不阻塞登录/仪表盘等底层界面 */
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  animation: fadeIn .2s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 面板容器（右侧抽屉，仅自身可交互） */
.sync-panel {
  pointer-events: auto;
  background: #fff;
  border-radius: 0;
  width: 460px;
  max-width: 92vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.18);
  overflow: hidden;
  animation: slideInRight .2s ease;
}
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 全屏 */
.sync-panel.sync-panel-fullscreen {
  width: 96vw;
  height: 100vh;
  max-width: none;
}

/* 面板头部 */
.sync-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.sync-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.sync-panel-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.sync-panel-actions .btn-text {
  font-size: 16px;
  color: #999;
  padding: 2px 6px;
}
.sync-panel-actions .btn-text:hover {
  color: #333;
}

/* 面板主体 */
.sync-panel-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sync-panel .sync-log-box {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px;
}
.sync-log-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.sync-spinner {
  color: #f0c040;
  margin-top: 8px;
  font-weight: 600;
}
.sync-dots::after {
  content: '';
  animation: syncDots 1.5s infinite;
}
@keyframes syncDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}
.sync-log-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.sync-spinner {
  color: #f0c040;
  margin-top: 8px;
  font-weight: 600;
}
.sync-dots::after {
  content: '';
  animation: syncDots 1.5s infinite;
}
@keyframes syncDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ============ 堡垒机 IP 选择卡片 ============ */
.bastion-ip-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  user-select: none;
}
.bastion-ip-card:hover {
  border-color: #94a3b8;
  transform: scale(1.01);
}
.bastion-ip-card.active {
  border-color: #2563eb;
  background: #eef2ff;
  box-shadow: 0 4px 16px rgba(59,130,246,.12);
}
.bastion-ip-card-tag {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #64748b;
}
.bastion-ip-card.active .bastion-ip-card-tag {
  background: #1a56db;
}
.bastion-ip-card-addr {
  font-family: 'SF Mono','Consolas','Courier New',monospace;
  font-size: 15px;
  color: #333;
}

/* ============ 堡垒机连接弹窗（目录式下拉风格） ============ */
.bastion-connect-modal {
  border-radius: 24px;
  overflow: visible;
}
.bastion-connect-modal .modal-header {
  padding: 24px 28px 20px;
}
.bastion-connect-modal .modal-header h2 {
  font-size: 20px;
  color: #0b1a33;
}
.bastion-connect-modal .modal-body {
  padding: 0 28px 28px;
}

/* 目标主机卡片 */
.bastion-host-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 20px 24px;
  border-left: 4px solid #3b82f6;
  margin-bottom: 24px;
}
.bastion-host-card-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.bastion-host-card-name {
  font-size: 18px;
  font-weight: 600;
  color: #0b1a33;
  font-family: 'SF Mono','Consolas','Courier New',monospace;
}

/* 分区标签 */
.bastion-section-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}

/* 目录式凭证下拉（弹窗内 — 无白屏） */
.bastion-cust-sel {
  position: relative;
  width: 100%;
  user-select: none;
}
.bastion-cust-sel-trigger {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 18px;
  font-size: 15px;
  font-weight: 500;
  color: #0b1a33;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color .2s, box-shadow .3s, transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.bastion-cust-sel-trigger:hover {
  border-color: #94a3b8;
}
.bastion-cust-sel.active .bastion-cust-sel-trigger {
  border-color: #2563eb;
  transform: scale(1.015) translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(59,130,246,.25), 0 0 0 4px rgba(59,130,246,.08);
}
.bastion-cust-sel-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
  opacity: .5;
}
.bastion-cust-sel.active .bastion-cust-sel-arrow {
  transform: rotate(180deg);
  opacity: .8;
}

.bastion-cust-sel-drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(.92) translateY(-8px);
  transform-origin: top center;
  transition: max-height .35s cubic-bezier(.34,1.56,.64,1),
              opacity .2s,
              transform .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 150;
  pointer-events: none;
}
.bastion-cust-sel-drop.open {
  max-height: 280px;
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
  overflow-y: auto;
}
.bastion-cust-sel-drop::-webkit-scrollbar {
  width: 4px;
}
.bastion-cust-sel-drop::-webkit-scrollbar-track {
  background: transparent;
}
.bastion-cust-sel-drop::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.bastion-cust-sel-item {
  padding: 12px 18px;
  font-size: 14px;
  color: #0b1a33;
  cursor: pointer;
  transition: background .12s, padding-left .18s;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bastion-cust-sel-item:last-child { border-bottom: none; }
.bastion-cust-sel-item:hover {
  background: #f1f5f9;
  padding-left: 24px;
}
.bastion-cust-sel-item.sel {
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 500;
}
.bastion-cust-sel-item.sel::before {
  content: "✓";
  font-weight: 600;
  color: #2563eb;
}
.bastion-cust-sel-empty {
  padding: 14px 18px;
  font-size: 13px;
  color: #ea4335;
  text-align: center;
  border-bottom: none;
}

/* 堡垒机连接操作按钮 */
.bastion-connect-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.bastion-connect-btn {
  padding: 10px 28px !important;
  border-radius: 50px !important;
  height: auto !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  transition: all .2s !important;
}
.bastion-connect-btn:hover:not(:disabled) {
  transform: scale(.97);
}

/* ============ 文件浏览器抽屉 ============ */
.bastion-file-drawer {
  width: 0;
  background: #252526;
  border-left: 1px solid transparent;
  overflow: hidden;
  transition: width .2s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bastion-file-drawer.open {
  border-left-color: #444;
}
.bastion-file-drawer-inner {
  min-width: 200px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  min-height: 0;
}

/* 拖拽手柄 */
.bastion-file-handle {
  width: 5px;
  cursor: col-resize;
  background: #555;
  flex-shrink: 0;
  transition: background .15s;
}
.bastion-file-handle:hover { background: #4285f4; }

/* 拖拽上传高亮 */
.bastion-file-drawer-inner.dragover {
  outline: 2px dashed #4285f4;
  outline-offset: -4px;
}
.bastion-file-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: #ccc;
  font-size: 13px;
  border-radius: 4px;
  transition: background .1s;
}
.bastion-file-row:hover { background: #2a2d2e; }
.bastion-file-row.selected { background: #094771; color: #fff; }


/* ============ 动画 ============ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 登录页面 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  animation: slideUp .3s;
}

.login-logo {
  text-align: center;
  font-size: 28px;
  color: #1a73e8;
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 28px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.input-full { width: 100%; }

.btn-full {
  width: 100%;
  height: 42px;
  font-size: 15px;
  margin-top: 4px;
}

.login-error {
  font-size: 13px;
  color: #ea4335;
  text-align: center;
  padding: 6px;
  background: #fce8e6;
  border-radius: 4px;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .sidebar { width: 60px; }
  .sidebar-logo { font-size: 14px; padding: 16px 8px; text-align: center; }
  .sidebar-item span:not(.sidebar-icon) { display: none; }
  .sidebar-item { justify-content: center; padding: 10px; }
  .sidebar-footer { padding: 8px; }
  .sidebar-user { display: none; }
  .main-content { margin-left: 60px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}

/* IP地址列表 */
.ip-list { line-height: 1.6; }
.ip-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ip-tag { font-size: 10px; padding: 1px 5px; border-radius: 3px; line-height: 1.4; }
.ip-tag-public { background: #e8f5e9; color: #2e7d32; }
.ip-tag-private { background: #e3f2fd; color: #1565c0; }
.ip-tag-eip { background: #fff3e0; color: #e65100; }

/* ============ 首页 ============ */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.home-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.home-card-icon {
  font-size: 32px;
}

.home-card-info {
  text-align: center;
}

.home-card-value {
  font-size: 36px;
  font-weight: 700;
  color: #333;
}

.home-card-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

.home-card-detail {
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-detail-row {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-online { background: #34a853; }
.dot-warning { background: #fbbc04; }
.dot-danger { background: #ea4335; }
.dot-offline { background: #9aa0a6; }

.home-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.home-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.home-actions {
  display: flex;
  gap: 12px;
}

@media (max-width: 768px) {
  .home-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .input, .select, .input-date {
    width: 100%;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ 辅助 ============ */
.text-center { text-align: center; }
.text-gray { color: #999; }
.text-sm { font-size: 12px; }
.text-mono { font-family: 'Consolas', 'Courier New', monospace; font-size: 12px; }
.py-20 { padding: 20px 0; }
.py-40 { padding: 40px 0; }

/* ============ 弹窗表单 ============ */
.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-vertical .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-vertical .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

/* 表单2列/3列布局 */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
}
