/* ============================================
   北京社保 - 后台管理端样式
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f0f2f5;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
input, select, button, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ---- 登录页 ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00a854 0%, #008f47 100%);
}
.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.login-box .login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #00a854;
  margin-bottom: 8px;
}
.login-box .login-sub {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 30px;
}
.login-box .login-field {
  margin-bottom: 18px;
}
.login-box .login-field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}
.login-box .login-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.login-box .login-field input:focus {
  border-color: #00a854;
}
.login-box .login-btn {
  width: 100%;
  padding: 12px;
  background: #00a854;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
}
.login-box .login-btn:hover { background: #008f47; }
.login-box .login-tip {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  margin-top: 20px;
}

/* ---- 管理后台布局 ---- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: #001529;
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar .logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #1f3552;
  font-size: 16px;
  font-weight: 600;
  color: #00d07a;
}
.sidebar .logo .logo-sub {
  font-size: 11px;
  color: #5a6e85;
  font-weight: 400;
  margin-top: 4px;
}
.sidebar .menu {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: #b3c0d1;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar .menu-item:hover {
  background: #00203a;
  color: #fff;
}
.sidebar .menu-item.active {
  background: #00284a;
  color: #00d07a;
  border-left-color: #00a854;
}
.sidebar .menu-item .menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.sidebar .sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid #1f3552;
  font-size: 12px;
  color: #5a6e85;
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶栏 */
.topbar {
  background: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .breadcrumb {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}
.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #666;
}
.topbar .topbar-right .admin-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar .topbar-right .admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00a854;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}
.topbar .topbar-right .logout-btn {
  color: #999;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}
.topbar .topbar-right .logout-btn:hover {
  color: #ff4d4f;
  background: #fff1f0;
}

/* 内容容器 */
.content-body {
  flex: 1;
  padding: 24px;
}

/* ---- 仪表盘 ---- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.stat-card .stat-icon.green { background: #e8f8f0; color: #00a854; }
.stat-card .stat-icon.blue { background: #e6f4ff; color: #1890ff; }
.stat-card .stat-icon.orange { background: #fff4e6; color: #fa8c16; }
.stat-card .stat-icon.purple { background: #f3e8ff; color: #722ed1; }
.stat-card .stat-info .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}
.stat-card .stat-info .stat-label {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

/* 面板 */
.panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}
.panel .panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel .panel-title .panel-action {
  font-size: 13px;
  font-weight: 400;
}

/* ---- 表格 ---- */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.table-toolbar .toolbar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-toolbar .toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-toolbar .search-input,
.table-toolbar .filter-select {
  padding: 7px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.table-toolbar .search-input { width: 220px; }
.table-toolbar .search-input:focus,
.table-toolbar .filter-select:focus {
  border-color: #00a854;
}
.table-toolbar .btn {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.table-toolbar .btn-primary {
  background: #00a854;
  color: #fff;
}
.table-toolbar .btn-primary:hover { background: #008f47; }
.table-toolbar .btn-default {
  background: #fff;
  color: #666;
  border: 1px solid #e0e0e0;
}
.table-toolbar .btn-default:hover { color: #00a854; border-color: #00a854; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: #fafafa;
  padding: 12px 14px;
  text-align: left;
  font-weight: 500;
  color: #666;
  border-bottom: 1px solid #e8e8e8;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}
.data-table tr:hover td { background: #fafafa; }
.data-table .tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.data-table .tag-green { background: #e8f8f0; color: #00a854; }
.data-table .tag-orange { background: #fff4e6; color: #fa8c16; }
.data-table .tag-blue { background: #e6f4ff; color: #1890ff; }
.data-table .tag-red { background: #fff1f0; color: #ff4d4f; }
.data-table .op-btn {
  color: #00a854;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 12px;
}
.data-table .op-btn:hover { text-decoration: underline; }
.data-table .op-btn.danger { color: #ff4d4f; }

.empty-row {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}
.empty-row .empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 12px;
}

/* ---- 详情弹窗 ---- */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal-panel {
  background: #fff;
  border-radius: 8px;
  width: 600px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal-panel .modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-panel .modal-header .close-btn {
  font-size: 22px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}
.modal-panel .modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-panel .modal-footer {
  padding: 12px 24px;
  border-top: 1px solid #f0f0f0;
  text-align: right;
}
.modal-panel .modal-footer .btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.modal-panel .modal-footer .btn-primary {
  background: #00a854;
  color: #fff;
}

/* 详情区块 */
.detail-group {
  margin-bottom: 20px;
}
.detail-group:last-child { margin-bottom: 0; }
.detail-group .group-title {
  font-size: 14px;
  font-weight: 600;
  color: #00a854;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8f8f0;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}
.detail-grid .detail-item {
  display: flex;
  font-size: 13px;
}
.detail-grid .detail-item .d-label {
  width: 90px;
  color: #999;
  flex-shrink: 0;
}
.detail-grid .detail-item .d-value {
  color: #333;
  flex: 1;
  word-break: break-all;
}
.detail-grid .detail-item .d-value.green { color: #00a854; font-weight: 500; }
.detail-grid .detail-item .d-value.red { color: #ff4d4f; font-weight: 600; }
.detail-grid .detail-item.full { grid-column: 1 / -1; }

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.fee-table th {
  background: #fafafa;
  padding: 8px 12px;
  text-align: left;
  color: #666;
  font-weight: 500;
  border-bottom: 1px solid #e8e8e8;
}
.fee-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.fee-table .total-row td {
  background: #fffbe6;
  font-weight: 600;
  font-size: 14px;
}
.fee-table .total-row .total-amount {
  color: #ff4d4f;
  font-size: 16px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
}
.pagination .page-info {
  color: #999;
  margin-right: 12px;
}
.pagination .page-btn {
  padding: 4px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  color: #666;
}
.pagination .page-btn:hover { border-color: #00a854; color: #00a854; }
.pagination .page-btn.active {
  background: #00a854;
  color: #fff;
  border-color: #00a854;
}
.pagination .page-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}
