/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.hidden {
  display: none !important;
}

/* 页面布局 */
.page {
  min-height: 100vh;
}

/* 登录页面 */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF8C69 0%, #FFD93D 100%);
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 400px;
}

.login-box h1 {
  color: #FF8C69;
  text-align: center;
  margin-bottom: 8px;
}

.login-box h2 {
  color: #666;
  text-align: center;
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 30px;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #FF8C69;
}

/* 按钮样式 */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: #FF8C69;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #e67e5c;
}

.btn-secondary {
  padding: 8px 16px;
  background: #f0f0f0;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-text {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
}

.btn-text:hover {
  color: #FF8C69;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  margin-right: 4px;
}

.btn-edit {
  background: #1890ff;
  color: white;
}

.btn-delete {
  background: #ff4d4f;
  color: white;
}

.btn-reply {
  background: #52c41a;
  color: white;
}

/* 主页面布局 */
#main-page {
  display: flex;
}

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: #001529;
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.logo h2 {
  color: #FF8C69;
  font-size: 20px;
}

.logo p {
  color: #999;
  font-size: 12px;
  margin-top: 4px;
}

.menu {
  flex: 1;
  padding: 10px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s;
}

.menu-item:hover,
.menu-item.active {
  background: #FF8C69;
  color: white;
}

.menu-item .icon {
  margin-right: 10px;
  font-size: 18px;
}

.logout {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* 主内容区 */
.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.content-page h1 {
  margin-bottom: 24px;
  font-size: 24px;
  color: #333;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  margin-bottom: 0;
}

.btn-group {
  display: flex;
  gap: 12px;
}

.config-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  background: white;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-card {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
}

.editor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.editor-card-title {
  font-size: 15px;
  font-weight: 600;
}

.form-row.three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 10px;
}

.history-meta {
  color: #666;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #f0f0f0;
  color: #666;
}

.badge.published {
  background: #e6f7ff;
  color: #1890ff;
}

.badge.draft {
  background: #fff7e6;
  color: #fa8c16;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: #FFF5F0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-right: 16px;
}

.stat-info h3 {
  font-size: 32px;
  color: #333;
  margin-bottom: 4px;
}

.stat-info p {
  color: #999;
  font-size: 14px;
}

/* 搜索和筛选 */
.search-bar,
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-bar input,
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-bar input {
  width: 300px;
}

/* 数据表格 */
.data-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-collapse: collapse;
}

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

.data-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
}

.data-table tr:hover {
  background: #fafafa;
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
}

.status-0 { background: #fff7e6; color: #fa8c16; }
.status-1 { background: #f6ffed; color: #52c41a; }
.status-2 { background: #e6f7ff; color: #1890ff; }
.status-3 { background: #fff1f0; color: #ff4d4f; }

/* 配置列表 */
.config-section {
  background: white;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.config-section h2 {
  margin-bottom: 16px;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-list {
  display: grid;
  gap: 12px;
}

.config-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #fafafa;
  border-radius: 6px;
}

.config-item img {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 16px;
}

.config-item-info {
  flex: 1;
}

.config-item-info h4 {
  margin-bottom: 4px;
}

.config-item-info p {
  color: #999;
  font-size: 13px;
}

/* 卡片列表 */
.card-list {
  display: grid;
  gap: 16px;
}

.feedback-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feedback-author {
  font-weight: 600;
}

.feedback-time {
  color: #999;
  font-size: 13px;
}

.feedback-content {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.feedback-reply {
  background: #f6ffed;
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
}

/* 模态框 */
.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: white;
  border-radius: 8px;
  width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
}

/* 响应式 */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  
  .logo h2,
  .logo p,
  .menu-item span:not(.icon) {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 导入导出按钮组 */
.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group .btn-secondary,
.btn-group .btn-primary {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
}

/* 帮助文本 */
.help-text {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

/* 小表格 */
.data-table.small {
  font-size: 12px;
}

.data-table.small th,
.data-table.small td {
  padding: 6px 8px;
}

/* 导入结果样式 */
.import-success {
  color: #52c41a;
}

.import-skip {
  color: #faad14;
}

.import-error {
  color: #f5222d;
}

/* 模态框样式补充 */
#import-modal .modal {
  max-width: 800px;
  width: 90%;
}

/* 统一后台入口：家长端内容与教务管理分区。 */
.menu-group-label{padding:24px 20px 8px;font-size:11px;letter-spacing:1px;color:#9099a6}.menu .menu-item{font-size:14px;padding:12px 22px}.config-section textarea{width:100%;box-sizing:border-box;padding:12px;border:1px solid #ddd;border-radius:8px;font:inherit}.help-text{font-size:13px;color:#777;line-height:1.7;margin-top:12px}

/* 统一管理界面 */
body{background:#f5f6f8;color:#171a20}#login-page{background:#eef0f3}.login-box h1{color:#171a20}.sidebar{background:#fff;border-right:1px solid #e7e9ed}.logo h2{color:#171a20}.logo p,.menu-group-label{color:#8a929d}.menu-item{color:#636d7a;border-radius:7px;margin:3px 12px}.menu-item.active,.menu-item:hover{color:#171a20;background:#edf0f4}.menu-group-label{font-size:11px;letter-spacing:1px;margin:24px 24px 10px}.btn-primary{background:#19283c;color:#fff;border:0}.btn-primary:hover{background:#2b3d54}.btn-small{background:#edf0f4;color:#435168;border:0;border-radius:5px}.content h1{font-size:28px;letter-spacing:-.5px;font-weight:550}.stat-card{box-shadow:none;border:1px solid #e5e9ef;border-radius:10px}.stat-info h3{color:#19283c;font-size:38px}.workspace-intro{color:#87909c;font-size:13px;margin:12px 0 24px;line-height:1.7}.data-table{box-shadow:none;border:1px solid #e5e9ef;border-radius:10px}.data-table th{background:#f0f2f5;color:#77818e;font-size:12px;font-weight:500}.data-table td{font-size:13px;padding:18px 14px}.data-table small{display:block;color:#8a939f;margin-top:7px}.note-cell{max-width:220px;white-space:pre-wrap;word-break:break-word}.table-scroll{overflow:auto}.renewal-summary{background:#19283c;color:white;padding:22px;border-radius:9px;margin:22px 0;line-height:1.8;font-size:14px}.teaching-modal{max-width:650px;width:90vw}.teaching-modal .modal-body{max-height:65vh;overflow:auto}.teaching-modal select,.teaching-modal textarea{width:100%;padding:11px;border:1px solid #dfe3e8;border-radius:6px}.teaching-modal textarea{min-height:90px}.muted{color:#87909c;font-size:13px;line-height:1.7;margin-bottom:20px}#teaching-error{color:#b13e36;line-height:1.6}.audit-row{padding:18px 0;border-bottom:1px solid #e5e9ef;font-size:13px;line-height:1.8;word-break:break-word}.audit-row small{display:block;color:#89929f}.filter-bar input{min-width:280px;padding:12px;border:1px solid #dfe3e8;border-radius:6px}button:disabled{opacity:.5;cursor:wait}
#renewals .data-table{min-width:1050px}#renewals .data-table td:nth-child(5),#renewals .data-table td:nth-child(6),#renewals .data-table td:nth-child(7){white-space:nowrap}
@media(max-width:900px){.sidebar{position:relative;width:100%;height:auto;min-height:0;display:block}.sidebar .logo{display:block;padding:24px}.sidebar .menu{display:flex;overflow-x:auto;align-items:center;padding:0 12px}.sidebar .menu-group-label{display:none}.sidebar .menu-item{flex-shrink:0;white-space:nowrap;padding:12px;margin:4px}.sidebar .logout{position:static;padding:10px 24px}.content{margin-left:0;width:100%;padding:24px}#main-page{display:block}.page-header{flex-wrap:wrap;gap:12px}.filter-bar{flex-wrap:wrap}.filter-bar input{min-width:0;width:100%}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
