/* ============================================================
   IT资产档案管理系统 - 全局样式
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: rgba(0, 0, 0, 0.88);
}

/* ===== 登录页 ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -200px;
  right: -200px;
}

.login-container::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  bottom: -150px;
  left: -150px;
}

.login-card {
  width: 420px;
  padding: 40px 36px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header .logo-icon {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 12px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: #8c8c8c;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #bfbfbf;
}

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

.app-sider {
  background: #001529 !important;
}

.app-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 1px;
}

.app-logo .logo-icon {
  font-size: 24px;
  margin-right: 8px;
  color: #1890ff;
}

.app-header {
  background: #fff !important;
  padding: 0 24px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 16px;
  font-weight: 500;
  color: #1f1f1f;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.password-lock-btn {
  margin-right: 8px;
}

.app-content {
  margin: 16px;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  min-height: calc(100vh - 64px - 32px);
}

/* ===== 统计卡片 ===== */
.stat-card {
  border-radius: 8px;
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.25;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

.stat-card.blue { background: linear-gradient(135deg, #1890ff, #096dd9); }
.stat-card.green { background: linear-gradient(135deg, #52c41a, #389e0d); }
.stat-card.orange { background: linear-gradient(135deg, #fa8c16, #d46b08); }
.stat-card.red { background: linear-gradient(135deg, #ff4d4f, #cf1322); }

/* ===== 表格区域 ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.search-bar {
  margin-bottom: 16px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
}

.search-bar .ant-form-item {
  margin-bottom: 0;
}

/* 密码列 */
.password-cell {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.password-mask {
  color: #8c8c8c;
  user-select: none;
}

.password-plain {
  color: #f5222d;
  font-weight: 500;
}

/* 状态标签 */
.status-tag {
  font-weight: 500;
}

/* ===== 弹窗表单 ===== */
.modal-form .ant-form-item {
  margin-bottom: 16px;
}

/* ===== 空状态 ===== */
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: #8c8c8c;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .login-card {
    width: 92%;
    padding: 28px 20px;
  }

  .app-content {
    margin: 8px;
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }
}
