﻿/**
 * 村务台账云版 - 自定义样式
 */

/* ====== 侧边栏 ====== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #fff;
  z-index: 1000;
  overflow-y: auto;
  transition: width 0.3s;
}

.sidebar-header {
  padding: 20px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .nav {
  padding: 10px 0;
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 10px 20px;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-left-color: #ffc107;
}

.sidebar .nav-link i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

/* ====== 主内容区 ====== */
.main-content {
  margin-left: 220px;
  min-height: 100vh;
  background: #f5f7fa;
}

/* ====== 统计卡片 ====== */
.stat-card {
  border: none;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card .card-body {
  padding: 15px;
}

.stat-card h6 {
  font-size: 13px;
  opacity: 0.9;
}

.stat-card h2 {
  font-size: 28px;
  font-weight: 700;
}

/* ====== 卡片样式 ====== */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
}

/* ====== 表格 ====== */
.table {
  font-size: 13px;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid #dee2e6;
}

.table td {
  vertical-align: middle;
}

.table code {
  font-size: 12px;
  color: #495057;
  background: #f0f0f0;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ====== 分页 ====== */
.pagination {
  margin-bottom: 0;
}

.page-link {
  font-size: 13px;
  padding: 4px 10px;
}

/* ====== 标签 ====== */
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 6px;
}

/* ====== 按钮 ====== */
.btn-sm {
  font-size: 13px;
}

/* ====== 表单 ====== */
.form-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.form-control, .form-select {
  font-size: 13px;
}

.form-check-label {
  font-size: 13px;
}

/* ====== 模态框 ====== */
.modal-header {
  padding: 12px 20px;
}

.modal-title {
  font-size: 16px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
}

/* ====== Toast ====== */
.toast {
  min-width: 250px;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    overflow: hidden;
  }

  .sidebar.show {
    width: 220px;
  }

  .main-content {
    margin-left: 0;
  }

  /* 移动端菜单按钮 */
  .mobile-toggle {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .mobile-toggle {
    display: none !important;
  }
}

/* ====== 移动端菜单按钮 ====== */
.mobile-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  display: none;
}

/* ====== 加载动画 ====== */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* ====== 空状态 ====== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 10px;
}
