* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #FAF6F0;
  color: #3E2723;
  font-size: 14px;
  line-height: 1.6;
}
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px;
  background: linear-gradient(180deg, #5D2E0C 0%, #4A2409 100%);
  color: #F5E6D3;
  padding: 24px 0;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(93,46,12,0.15);
}
.sidebar .logo {
  font-size: 19px;
  font-weight: 700;
  color: #FFD9A0;
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,217,160,0.15);
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.sidebar .menu a {
  display: block;
  padding: 13px 24px;
  color: #D9C4A8;
  text-decoration: none;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
  font-size: 14.5px;
}
.sidebar .menu a:hover {
  background: rgba(255,217,160,0.08);
  color: #FFD9A0;
  border-left-color: #D2B48C;
}
.sidebar .menu a.active {
  background: linear-gradient(90deg, rgba(139,69,19,0.9), rgba(139,69,19,0.4));
  color: #FFF;
  border-left-color: #FFD9A0;
}
.sidebar .user {
  padding: 20px 24px;
  font-size: 12px;
  color: #B89975;
  border-top: 1px solid rgba(255,217,160,0.1);
  margin-top: 24px;
}

.main { flex: 1; display: flex; flex-direction: column; }
.topbar {
  background: #FFF;
  padding: 20px 32px;
  font-size: 20px;
  font-weight: 600;
  color: #5D2E0C;
  border-bottom: 1px solid #E8DCC8;
  box-shadow: 0 1px 4px rgba(93,46,12,0.04);
}
.content { padding: 28px 32px; flex: 1; }

.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 20px; }
.card {
  background: #FFF;
  border: 1px solid #E8DCC8;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 2px 10px rgba(93,46,12,0.05);
  transition: all 0.25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(93,46,12,0.12); }
.card .num {
  font-size: 30px;
  font-weight: 700;
  color: #8B4513;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.card .label { font-size: 13px; color: #A0826D; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(93,46,12,0.06);
}
.data-table thead th {
  background: #F0E6D8;
  color: #5D2E0C;
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13.5px;
  border-bottom: 1px solid #E8DCC8;
}
.data-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #F5EEE2;
  color: #3E2723;
}
.data-table tbody tr:hover { background: #FDF8F3; }
.data-table tbody tr:last-child td { border-bottom: none; }

.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input {
  padding: 9px 14px;
  border: 1px solid #D2B48C;
  border-radius: 8px;
  background: #FFF;
  color: #3E2723;
  font-size: 14px;
  outline: none;
}
.toolbar select:focus, .toolbar input:focus { border-color: #8B4513; }
.toolbar button, .btn {
  padding: 9px 20px;
  background: linear-gradient(135deg, #8B4513, #5D2E0C);
  color: #FFF;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  font-weight: 500;
}
.toolbar button:hover, .btn:hover { background: linear-gradient(135deg, #A0521A, #6D3814); box-shadow: 0 4px 12px rgba(139,69,19,0.3); }
.btn-secondary { background: #E8DCC8; color: #5D2E0C; }
.btn-secondary:hover { background: #D9C4A8; }

.loading { text-align: center; padding: 60px; color: #A0826D; font-size: 15px; }
.error { color: #C0392B; padding: 24px; text-align: center; }
.empty { text-align: center; padding: 60px; color: #A0826D; }
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #3D1E08 0%, #8B4513 100%);
}
.login-box {
  background: #FFF;
  padding: 52px 44px;
  border-radius: 20px;
  width: 400px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.login-box h1 { color: #5D2E0C; font-size: 26px; text-align: center; margin-bottom: 10px; letter-spacing: 1px; }
.login-box .sub { color: #A0826D; text-align: center; font-size: 13px; margin-bottom: 34px; }
.login-box input {
  width: 100%;
  padding: 13px 18px;
  margin-bottom: 16px;
  border: 1px solid #D2B48C;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.login-box input:focus { border-color: #8B4513; box-shadow: 0 0 0 3px rgba(139,69,19,0.1); }
.login-box button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #8B4513, #5D2E0C);
  color: #FFF;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s;
}
.login-box button:hover { box-shadow: 0 8px 20px rgba(139,69,19,0.35); }
.login-box button:disabled { background: #C9A67B; cursor: not-allowed; }
.login-box .tip { font-size: 12px; color: #A0826D; text-align: center; margin-top: 18px; }
.login-box .msg { color: #C0392B; text-align: center; margin-top: 14px; min-height: 20px; font-size: 13px; }

.chat-bubble { background: #F5EEE2; padding: 12px 16px; border-radius: 12px; margin-bottom: 10px; max-width: 80%; }
.chat-bubble.ai { background: linear-gradient(135deg, #FDF6EE, #F5E6D3); margin-left: auto; }

.section-title { font-size: 16px; color: #5D2E0C; font-weight: 600; margin: 20px 0 14px; padding-left: 10px; border-left: 3px solid #8B4513; }
