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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #fff;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #2d5a2d 0%, #4a7c4a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
}

.login-left h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.login-left p {
  font-size: 18px;
  opacity: 0.9;
  line-height: 1.8;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form {
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4a7c4a;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: #4a7c4a;
  color: #fff;
}

.btn-primary:hover {
  background: #3a6a3a;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-success {
  background: #28a745;
  color: #fff;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* 布局 */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #2d5a2d;
  color: #fff;
  padding: 20px 0;
}

.sidebar-logo {
  padding: 0 20px 20px;
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu {
  margin-top: 20px;
}

.sidebar-menu a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.main-content {
  flex: 1;
  padding: 20px;
  background: #f5f5f5;
}

.page-header {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 24px;
  color: #333;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  border-left: 4px solid #4a7c4a;
  padding-left: 10px;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.stat-card .value {
  font-size: 32px;
  font-weight: bold;
  color: #4a7c4a;
  margin: 10px 0;
}

.stat-card .label {
  font-size: 14px;
  color: #666;
}

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.table th {
  background: #f9f9f9;
  font-weight: bold;
  color: #666;
}

.table tr:hover {
  background: #f9f9f9;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  margin-bottom: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
  }
  
  .login-left {
    padding: 30px;
    min-height: 200px;
  }
  
  .login-left h1 {
    font-size: 28px;
  }
  
  .layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    padding: 10px 0;
  }
  
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
    margin-top: 10px;
  }
  
  .sidebar-menu a {
    white-space: nowrap;
    padding: 10px 15px;
  }
  
  .main-content {
    padding: 10px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-card .value {
    font-size: 24px;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
}

/* 老板专属元素（员工隐藏） */
.owner-only {
  /* hideEmployeeOnly() 会在非 owner 时设 display:none */
}

/* 快速搜索框 */
.search-box {
  margin-bottom: 15px;
}
.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.search-box input:focus {
  border-color: #4a7c4a;
}
