/* ===================================================================
   spike-pages.css — cany_spike 会员中心页面内容区通用样式
   所有业务页面共享，通过 header.php 统一引入
   =================================================================== */

/* ===== 页面通用卡片容器 ===== */
.main-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 28px 24px;
}

.el-button--text {
  color: #fbbebe;
}

.el-button--text:focus,
.el-button--text:hover {
  color: #f68d8d;
  border-color: transparent;
  background-color: transparent;
}

.el-input.is-disabled .el-input__inner {
  background-color: #ffffff;
}

.el-date-editor .el-range-separator {
  width: 10%;
  line-height: 28px
}

/* ===== 页面头部行（标题 + 右侧操作区）===== */
.main-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  min-height: 36px;
}

.main-card-title .title-text,
.main-card-title > span:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

/* ===== 卡片内部分节标题 ===== */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

/* ===== 搜索/筛选操作行 ===== */
.main-card-search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.main-card-search .right-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-card-search .right-search .el-select,
.main-card-search .right-search .el-input {
  width: 180px !important;
}

.main-card-search .right-search .el-select .el-input__inner,
.main-card-search .right-search .el-input .el-input__inner {
  height: 38px !important;
  line-height: 38px !important;
}

/* ===== 搜索按钮（覆盖旧 rem 写法）===== */
.search-btn {
  height: 38px;
  padding: 0 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-button-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0;
}

.search-btn:hover {
  background: #e8795d;
  box-shadow: 0 4px 12px rgba(250, 137, 107, 0.35);
}

/* ===== 表格区域包裹 ===== */
.main-card-table {
  margin-top: 0;
}

/* ===== 分页容器 ===== */
.page {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

/* ===== 自定义分页组件（pagination.js）===== */
.myPage.custom-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.myPage.custom-pagination .el-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.myPage.custom-pagination .manual-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.myPage.custom-pagination .page-total {
  font-size: 13px !important;
  color: var(--color-text-secondary);
  font-weight: 400;
  line-height: 28px;
  white-space: nowrap;
}

/* ===== 产品名称双行 ===== */
.cloud-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.cloud-name .packge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-name .name {
  font-size: 12px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 状态 Badge 基础外壳 ===== */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 24px;
  border-radius: var(--radius-tag);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  width: auto !important;
}

/* ===== 区域/国家旗帜 ===== */
.area {
  display: flex;
  align-items: center;
  gap: 6px;
  height: auto;
}

.area-img {
  height: 16px;
  width: auto;
  border-radius: 2px;
  flex-shrink: 0;
}

.area-country,
.area-city {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ===== IP 展示 ===== */
.list-show-ip .cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.com-ip-box {
  display: flex;
  align-items: center;
  max-width: calc(100% - 22px);
  overflow: hidden;
}

.com-ip-box > span {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1;
}

/* ===== 操作系统图标 ===== */
.os {
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.os-text {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ===== 电源状态 ===== */
.power-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.power-status img {
  width: 20px;
  height: 20px;
}

.power-status .status-text {
  font-size: 13px;
  color: var(--color-text-primary);
}

/* ===== 通用主题色文字 / 链接 ===== */
.base-color {
  color: var(--color-primary) !important;
  cursor: pointer;
}

/* ===== 可点击 ID 列 ===== */
.column-id {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 500;
  font-size: 13px;
}

.column-id:hover {
  text-decoration: underline;
}

/* ===== 表格行 hover 游标 ===== */
.el-table tbody tr {
  cursor: pointer;
}

/* ===== 表格操作列 ===== */
.operation .dot {
  color: var(--color-primary);
  font-size: 22px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.operation .dot:hover {
  opacity: 0.75;
}

/* ===== 数据中心 select option ===== */
.center-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 返回按钮行（详情页）===== */
.page-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  background: var(--color-hover);
  transition: background 0.2s;
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--color-primary-light);
}

.back-btn svg {
  width: 18px !important;
  height: 18px !important;
}

.top-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ===== 空状态占位 ===== */
.empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  gap: 12px;
}

/* ===== 响应式最小宽度保证 ===== */
@media (max-width: 1023px) {
  .main-card {
    padding: 16px;
  }

  .main-card-search .right-search .el-select,
  .main-card-search .right-search .el-input {
    width: 140px !important;
  }
}

/* ===================================================================
   安全页面（security / security_group / security_log / security_ssh）
   四个页面共享的公共样式，避免重复定义
   =================================================================== */

/* ===== 安全页内容表格区 ===== */
.main-card .content-table {
  margin-top: 20px;
}

.main-card .content-table .top-text {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.main-card .content-table .top-text .top-link {
  color: var(--color-primary);
  cursor: pointer;
  margin-left: 6px;
  transition: opacity 0.2s;
}

.main-card .content-table .top-text .top-link:hover {
  opacity: 0.8;
}

.main-card .content-table .content_searchbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.main-card .content-table .content_searchbar .left-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-button);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}

.main-card .content-table .content_searchbar .left-btn:hover {
  background: #e8795d;
  box-shadow: 0 4px 12px rgba(250, 137, 107, 0.3);
}

.main-card .content-table .tabledata {
  margin-top: 12px;
}

/* ===== 开关状态 Badge ===== */
.open-show {
  display: flex;
  align-items: center;
  gap: 8px;
}

.open-show .open {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: var(--color-info-light);
  border-radius: var(--radius-tag);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-info);
}

.open-show .un-open {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: #f0f0f0;
  border-radius: var(--radius-tag);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.open-show .setting {
  font-size: 13px;
  color: var(--color-primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.open-show .setting:hover {
  opacity: 0.8;
}

/* ===== 弹窗内容信息块 ===== */
.dialog-main {
  margin-top: 16px;
}

.dialog-main .content-msg {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  overflow: hidden;
}

.dialog-main .content-msg .msg-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 13px;
}

.dialog-main .content-msg .msg-item:last-child {
  border-bottom: none;
}

.dialog-main .content-msg .msg-item .item-label {
  min-width: 80px;
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

.dialog-main .content-msg .msg-item .item-vlaue {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-main .content-msg .msg-item .copy {
  flex-shrink: 0;
  color: var(--color-primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.dialog-main .content-msg .msg-item .copy:hover {
  opacity: 0.8;
}

.dialog-main .yellow {
  color: var(--color-warning);
}
.dialog-main .alert-text {
  margin-top: 12px;
}

.dialog-main .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.dialog-main .label:not(:first-child) {
  margin-top: 16px;
}

/* ===== 删除弹窗 ===== */
.del-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 8px;
}

.del-dialog-title .del-icon {
  font-size: 18px;
}

.del-dialog-main {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin: 16px 0 20px;
  line-height: 1.6;
}

.del-dialog-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== 白名单 IP 弹窗 switch ===== */
.white-ip-dialog .dialog-main .ip-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.white-ip-dialog .dialog-main .ip-status .ip-status-text {
  width: 80px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.white-ip-dialog .dialog-main .status-remind {
  margin: 12px 0 16px 96px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.white-ip-dialog .el-switch__label {
  position: absolute;
  display: none;
  color: #fff;
}
.white-ip-dialog .el-switch__label * {
  font-size: 12px !important;
}
.white-ip-dialog .el-switch__core {
  background-color: #a6a6a6;
}
.white-ip-dialog .el-switch__label--left {
  z-index: 9;
  left: 20px;
}
.white-ip-dialog .el-switch__label--right {
  z-index: 9;
  left: -3px;
}
.white-ip-dialog .el-switch__label.is-active {
  display: block;
}

/* ===== 三点更多操作触发点 ===== */
.more-operation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 28px;
  padding: 5px 3px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.more-operation:hover {
  background: var(--color-hover);
}

.more-operation .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* ===== checkbox label 多行文本 ===== */
.el-checkbox__label {
  display: inline;
  white-space: initial;
  word-wrap: break-word;
  overflow: hidden;
}

/* ===================================================================
   错误 / 空状态页公共样式（NotFound / networkErro / noPermissions）
   =================================================================== */
.error-page {
  width: 100%;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.error-page .error-img {
  width: 180px;
  height: auto;
  opacity: 0.85;
}

.error-page .error-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.error-page .error-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 320px;
  line-height: 1.6;
}

.error-page .back-home-btn {
  margin-top: 6px;
}

/* ===================================================================
   移动端 / 桌面端 内容切换
   桌面：隐藏 .mobel 移动列表；移动：隐藏 .tabledata 桌面表格
   =================================================================== */
.mobel {
  display: none !important;
}

@media (max-width: 768px) {
  .mobel {
    display: block !important;
  }
  .tabledata {
    display: none !important;
  }
}
