﻿* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #172033;
  background: #f3f7fb;
}

.fx-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #eef5ff;
}

.fx-login-card {
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(36, 63, 105, .12);
}

.fx-login-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: #1677ff;
  font-weight: 800;
  font-size: 20px;
}

.fx-login-title,
.fx-page-title {
  font-weight: 800;
  color: #111827;
}

.fx-login-title {
  font-size: 22px;
}

.fx-login-sub,
.fx-muted,
.fx-page-sub {
  color: #6b7280;
}

.fx-login-sub {
  margin: 6px 0 22px;
  font-size: 13px;
}

.fx-captcha-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  width: 100%;
}

.fx-captcha-img {
  width: 112px;
  height: 40px;
  border: 1px solid #d8e1ee;
  border-radius: 4px;
  cursor: pointer;
}

.fx-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.fx-sidebar {
  background: #101b2d;
  color: #d7e1ef;
  padding: 18px 10px;
}

.fx-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.fx-brand-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #1677ff;
  font-weight: 800;
}

.fx-brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.fx-brand-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #93a4bd;
}

.fx-nav-group {
  margin: 18px 8px 8px;
  font-size: 12px;
  color: #7e90aa;
}

.fx-nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: #d7e1ef;
  cursor: pointer;
}

.fx-nav-item:hover,
.fx-nav-item.active {
  background: #1687e8;
  color: #fff;
}

.fx-main {
  min-width: 0;
}

.fx-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid #dde8f5;
  background: #fff;
}

.fx-page-title {
  font-size: 18px;
}

.fx-page-sub {
  margin-top: 3px;
  font-size: 12px;
}

.fx-content {
  padding: 18px 22px 34px;
}

.fx-card {
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, .04);
}

.fx-card + .fx-card {
  margin-top: 14px;
}

.fx-card-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.fx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fx-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.fx-stat {
  padding: 14px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
}

.fx-stat-label {
  color: #6b7280;
  font-size: 12px;
}

.fx-stat-value {
  margin-top: 7px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.fx-help {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f1f7ff;
  color: #506176;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.fx-card pre {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fx-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.fx-click-mobile {
  display: none;
}

.fx-click-card {
  padding: 13px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
}

.fx-click-card + .fx-click-card {
  margin-top: 10px;
}

.fx-click-title {
  font-weight: 800;
  line-height: 1.4;
  word-break: break-word;
}

.fx-click-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  font-size: 13px;
}

.fx-click-row span:first-child {
  flex: 0 0 auto;
  color: #6b7280;
}

.fx-click-row span:last-child {
  min-width: 0;
  text-align: right;
  word-break: break-word;
}
.fx-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-online {
  padding: 3px 10px;
  border: 1px solid #b8ebc5;
  border-radius: 999px;
  color: #16a34a;
  background: #ecfff1;
  font-size: 12px;
}

@media (max-width: 980px) {
  .fx-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    overflow-x: hidden;
  }
  .fx-sidebar {
    position: static;
    min-width: 0;
  }
  .fx-stat-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  .fx-sidebar {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 8px;
  }

  .fx-main {
    width: 100%;
    min-width: 0;
  }

  .fx-brand {
    min-height: 56px;
    padding: 4px 8px 10px;
  }

  .fx-sidebar nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 2px;
    -webkit-overflow-scrolling: touch;
  }

  .fx-nav-group {
    display: none;
  }

  .fx-nav-item {
    flex: 0 0 auto;
    height: 36px;
    white-space: nowrap;
  }

  .fx-topbar {
    height: auto;
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px 12px;
  }

  .fx-topbar > div:first-child,
  .fx-top-actions {
    width: 100%;
    min-width: 0;
  }

  .fx-top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .fx-top-actions .fx-muted {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fx-content {
    padding: 12px;
  }

  .fx-toolbar .el-input,
  .fx-toolbar .el-select,
  .fx-toolbar .el-date-editor {
    width: 100% !important;
  }

  .fx-click-desktop {
    display: none;
  }

  .fx-click-mobile {
    display: block;
  }

  .fx-toolbar input[type="file"] {
    width: 100%;
    max-width: 100%;
  }

  .fx-content .el-pagination {
    flex-wrap: wrap;
    gap: 6px;
  }

  .el-dialog {
    width: calc(100vw - 24px) !important;
    max-width: 640px;
    margin-top: 8vh !important;
  }

  .el-dialog__body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 420px) {
  .fx-login {
    padding: 12px;
  }

  .fx-login-card {
    padding: 20px;
  }

  .fx-captcha-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .fx-captcha-img {
    width: 100px;
  }

  .fx-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
