* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: #303133;
  background: #f3f6fb;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2747 0%, #164e78 55%, #0b7fa8 100%);
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 38px 36px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1677ff, #0b7fa8);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #102a43;
}

.login-sub {
  color: #829ab1;
  font-size: 13px;
  margin: 6px 0 26px;
}

.login-tip {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #9fb3c8;
}

.layout {
  min-height: 100vh;
}

.sidebar {
  background: #0f2747;
  color: #c7d7e8;
  min-height: 100vh;
  transition: width 0.2s;
}

.sidebar .brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1677ff, #22c1dc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sidebar .el-menu {
  border-right: 0;
  background: transparent;
}

.sidebar .el-menu-item {
  color: #a9bed3;
  height: 48px;
  line-height: 48px;
}

.sidebar .el-menu-item i {
  color: #7f9bb8;
}

.sidebar .el-menu-item:hover,
.sidebar .el-menu-item.is-active {
  background: rgba(22, 119, 255, 0.18);
  color: #fff;
}

.sidebar .el-menu-item.is-active i {
  color: #6fd3ff;
}

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e6edf5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: #102a43;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #627d98;
  font-size: 13px;
}

.content {
  padding: 22px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #102a43;
  margin: 0;
}

.page-desc {
  color: #829ab1;
  font-size: 13px;
  margin-top: 6px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e6edf5;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.04);
}

.stat-label {
  color: #829ab1;
  font-size: 13px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #102a43;
  margin-top: 8px;
}

.stat-value.blue { color: #1677ff; }
.stat-value.green { color: #12a150; }
.stat-value.orange { color: #e6a23c; }

.panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6edf5;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.04);
}

.panel + .panel {
  margin-top: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  color: #829ab1;
}

.mono {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.tag-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.tag-dot.on { background: #12a150; }
.tag-dot.off { background: #bcccdc; }

.drawer-section-title {
  font-weight: 600;
  color: #102a43;
  margin: 4px 0 12px;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.password-cell {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
}

.password-cell .slot {
  color: #829ab1;
  font-size: 12px;
}

.password-cell .value {
  font-family: Consolas, Monaco, monospace;
  font-size: 16px;
  margin-top: 4px;
  color: #102a43;
  letter-spacing: 1px;
}

.empty {
  text-align: center;
  color: #9fb3c8;
  padding: 30px 0;
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .password-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
