/* 教师管理样式 */
.teacher-container {
  min-height: 100vh;
  background-color: #f8f9fa;
}

.teacher-container header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px 20px 90px;
  margin: 0;
  border-radius: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-left h1 {
  margin: 0;
  color: white;
  font-size: 2em;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  color: white;
  font-weight: bold;
  font-size: 1.1em;
}

.user-id {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9em;
}

.header-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.back-link,
.display-link {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-link:hover,
.display-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.logout-btn {
  background: #dc3545;
  border: 2px solid #dc3545;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #dc3545;
  border-color: #dc3545;
  transform: translateY(-2px);
}

/* 顶部栏按钮：统一圆角形状 */
.header-controls .action-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-controls .action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

#teacherContent {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 管理面板样式 */
.management-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #dee2e6;
}

.management-tabs .tab-button {
  background: none;
  border: none;
  padding: 15px 25px;
  font-size: 1.1em;
  color: #6c757d;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
}

.management-tabs .tab-button:hover {
  color: #28a745;
  background: #eaf7ee;
}

.management-tabs .tab-button.active,
.management-tabs .tab-button.active:hover {
  color: #ffffff;
  background: #28a745;
  border-bottom-color: #28a745;
  font-weight: bold;
}

.tab-content {
  display: none;
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
  display: block;
}

/* 积分管理样式 */
.points-management {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 30px;
}

.student-selector {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.student-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 15px;
}

.student-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.student-item:hover {
  background: #e9ecef;
}

.student-item.selected {
  border-color: #28a745;
  background: #d4edda;
}

.point-operations {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.operation-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.point-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.point-input-group label {
  white-space: nowrap;
}

/* CSV导入按钮 */
.import-csv-btn {
  background: #17a2b8;
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
.import-csv-btn:hover {
  background: #138496;
}

.template-btn {
  background: #6c757d;
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
.template-btn:hover {
  background: #5a6268;
}

/* 学生管理滚动列表 */
.student-scroll-list {
  max-height: 800px;
  min-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 4px;
}

.student-search-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 8px;
}

.student-search-wrap input {
  width: calc(100% / 3);
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 14px;
}

.student-search-wrap .reset-search-btn {
  padding: 0 16px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  line-height: 34px;
}

.student-search-wrap .reset-search-btn:hover {
  background: #5a6268;
}

.alpha-btn:hover {
  opacity: 0.8;
}

#pointsInput {
  width: 120px;
  text-align: center;
}

#pointsInput::-webkit-inner-spin-button {
  width: 30px;
  height: 30px;
  cursor: pointer;
}

#pointsInput::-webkit-outer-spin-button {
  width: 30px;
  height: 30px;
}

/* Firefox */
#pointsInput[type=number] {
  -moz-appearance: textfield;
}

/* 模拟上下箭头区域放大（兼容） */
.point-input-group {
  position: relative;
}

.point-buttons {
  display: flex;
  gap: 10px;
}

.add-points {
  background: #28a745;
}

.subtract-points {
  background: #dc3545;
}

/* 商品管理样式 */
.product-management {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* 学生管理：左侧表单占原宽度2/3，右侧列表更宽 */
#studentsTab .product-management {
  grid-template-columns: 1fr 2fr;
}

.product-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.product-list {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.edit-btn {
  background: #ffc107;
  color: #212529;
}

.delete-btn {
  background: #dc3545;
}

/* 搜索框样式 */
.search-box {
  margin-bottom: 15px;
}

.search-box input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

/* 学生信息样式 */
.student-info {
  display: flex;
  flex-direction: column;
}

.student-name {
  font-weight: bold;
  font-size: 1.1em;
}

.student-id {
  font-size: 0.9em;
  color: #6c757d;
}

.student-balance {
  font-weight: bold;
  font-size: 1.2em;
  color: #28a745;
}

/* 选中学生信息样式 */
.selected-student-info {
  background: #e9ecef;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.selected-student h4 {
  margin-bottom: 10px;
  color: #28a745;
}

.selected-student .balance {
  color: #28a745;
  font-weight: bold;
}

/* 操作表单样式 */
.operation-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}



.point-input-group label,
.reason-input label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.point-buttons {
  margin-top: 10px;
}

.point-buttons button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 5px 10px;
  margin-right: 5px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

.point-buttons button:hover {
  background: #5a6268;
}

.reason-input {
  margin-bottom: 20px;
}

.reason-input input {
  width: 100%;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.action-buttons button {
  flex: 1;
  padding: 12px;
  font-size: 1.1em;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 最近操作样式 */
.recent-operations {
  margin-top: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.recent-operations h4 {
  margin-bottom: 15px;
  color: #495057;
}

.operations-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.operation-item {
  background: #f1f3f5;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.9em;
}

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

.operation-reason {
  font-weight: bold;
}

.operation-points.add {
  color: #28a745;
}

.operation-points.subtract,
.operation-points.purchase {
  color: #dc3545;
}

.operation-footer {
  display: flex;
  justify-content: space-between;
  color: #6c757d;
  font-size: 0.85em;
}

/* 预约管理样式 */
.orders-management {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.orders-filter {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.filter-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

.orders-list {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  margin-bottom: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.student-name {
  font-weight: bold;
  font-size: 1.1em;
}

.order-status {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: bold;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-confirmed {
  background: #d4edda;
  color: #155724;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.order-details {
  font-size: 0.95em;
  color: #6c757d;
  margin-top: 10px;
}

.order-detail-row {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-detail-row strong {
  color: #2c3e50;
  min-width: 80px;
}

.order-operator {
  color: #6c757d;
  font-size: 0.9em;
}

.order-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.confirm-btn,
.cancel-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.confirm-btn {
  background: #28a745;
  color: white;
}

.confirm-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

.cancel-btn {
  background: #dc3545;
  color: white;
}

.cancel-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.order-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .order-item {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .order-actions {
    justify-content: center;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

.order-actions {
  display: flex;
  gap: 10px;
}

.confirm-btn {
  background: #28a745;
  color: white;
}

.cancel-btn {
  background: #dc3545;
  color: white;
}

/* 系统设置样式 */
.system-settings {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.setting-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-section h3 {
  margin-bottom: 20px;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.mode-controls,
.data-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.mode-switch-btn {
  background: #007bff;
  color: white;
}

.export-btn {
  background: #17a2b8;
  color: white;
}

.backup-btn {
  background: #6c757d;
  color: white;
}

.backup-manager-btn {
  background: #6f42c1;
  color: white;
}

.repair-btn {
  background: #fd7e14;
  color: white;
}

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

.reset-btn:disabled {
  background: #6c757d;
  opacity: 0.5;
  cursor: not-allowed;
}

.system-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.system-info p {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin: 0;
  font-size: 1.1em;
}

.system-info span {
  font-weight: bold;
  color: #28a745;
}

/* 配置表单样式 */
#configForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-group label {
  font-weight: bold;
  color: #495057;
}

.config-group input[type="number"],
.config-group input[type="date"] {
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.config-group input[type="number"]:focus,
.config-group input[type="date"]:focus {
  outline: none;
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: bold;
  color: #495057;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.config-group small {
  color: #6c757d;
  font-size: 0.9em;
  font-style: italic;
}

.config-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.save-config-btn {
  background: #28a745;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.save-config-btn:hover {
  background: #218838;
}

.reset-config-btn {
  background: #6c757d;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.reset-config-btn:hover {
  background: #5a6268;
}

.data-controls small {
  color: #6c757d;
  font-size: 0.9em;
  font-style: italic;
  margin-top: 10px;
  display: block;
}

/* 通用样式 */
.no-data {
  text-align: center;
  padding: 30px;
  color: #6c757d;
  font-style: italic;
  font-size: 1.1em;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.form-actions button {
  padding: 10px 20px;
  font-size: 1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .points-management,
  .product-management {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #studentsTab .product-management {
    grid-template-columns: 1fr;
  }

  .management-tabs {
    flex-wrap: wrap;
    gap: 5px;
  }

  .management-tabs .tab-button {
    padding: 10px 15px;
    font-size: 1em;
  }

  .header-controls {
    flex-direction: column;
    gap: 10px;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .order-item {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .order-actions {
    justify-content: center;
  }

  .mode-controls,
  .data-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .system-info {
    grid-template-columns: 1fr;
  }
} /* 备份管理样式 *
/
.backup-manager {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}



.refresh-btn {
    background: #007bff;
    color: white;
}

.refresh-btn:hover {
    background: #0056b3;
}

.cleanup-btn {
    background: #ffc107;
    color: #212529;
}

.cleanup-btn:hover {
    background: #e0a800;
}

.restore-btn {
    background: #28a745;
    color: white;
}

.restore-btn:hover {
    background: #1e7e34;
}

.backup-manager-btn {
    background: #6c757d;
    color: white;
}

.backup-manager-btn:hover {
    background: #545b62;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backup-table thead {
    background: #e9ecef;
}

.backup-table th {
    padding: 8px 12px;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.backup-table tbody tr {
    border-bottom: 1px solid #f1f3f4;
}

.backup-table tbody tr:last-child {
    border-bottom: none;
}

.backup-table tbody tr:hover {
    background: #f8f9fa;
}

.backup-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.backup-table th,
.backup-table td {
    font-size: 16px;
}

.backup-filename {
    font-family: monospace;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backup-size {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

.backup-date {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

.backup-manager > .backup-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    margin-bottom: 16px;
}

.backup-table .backup-actions {
    white-space: nowrap;
}

.backup-table .backup-actions button {
    display: inline-block !important;
    margin-right: 4px;
    padding: 2px 8px !important;
    font-size: 12px !important;
    border-radius: 3px !important;
}

.backup-table .backup-actions button:last-child {
    margin-right: 0;
}

.backup-table td.backup-actions,
.backup-table th:last-child {
    text-align: center;
}

.backup-actions button {
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.download-btn {
    background: #007bff;
    color: white;
}

.download-btn:hover {
    background: #0056b3;
}

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

.delete-btn:hover {
    background: #c82333;
}

.data-export-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.data-export-section h4 {
    margin-bottom: 15px;
    color: #495057;
}

.data-type-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.data-type-item {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    gap: 6px;
}

.data-type-item span {
    font-weight: 500;
    color: #495057;
}

.data-type-item button {
    padding: 2px 8px !important;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px !important;
    margin-left: 4px;
    line-height: 1.4;
    transition: background-color 0.2s;
}

.export-single-btn {
    background: #17a2b8;
    color: white;
}

.export-single-btn:hover {
    background: #138496;
}

.import-single-btn {
    background: #28a745;
    color: white;
}

.import-single-btn:hover {
    background: #1e7e34;
}

.data-statistics {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.data-statistics h4 {
    margin-bottom: 15px;
    color: #495057;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.stat-name {
    font-weight: 500;
    color: #495057;
}

.stat-details {
    color: #6c757d;
    font-size: 14px;
}

.file-upload-group {
    position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .backup-header-row > div,
  .backup-item > div {
    padding: 6px 10px;
  }

  .backup-actions {
    justify-content: flex-start;
  }

  .data-type-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .data-type-item button {
    margin-left: 0;
  }

  .stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* 加载和错误状态 */
.backup-list .loading,
.backup-list .error,
.backup-list .no-data {
  padding: 40px;
  text-align: center;
  color: #6c757d;
}

.backup-list .error {
  color: #dc3545;
}

.stats-loading {
  padding: 20px;
  text-align: center;
  color: #6c757d;
}
/* 退出
状态和登录状态样式 */
.logout-state,
.login-required-state {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  margin: 20px 0;
}

.logout-message,
.login-required-message {
  text-align: center;
  background: white;
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  margin: 20px;
}

.logout-icon,
.login-icon {
  font-size: 4em;
  margin-bottom: 20px;
  display: block;
}

.logout-message h2,
.login-required-message h2 {
  color: #495057;
  margin-bottom: 15px;
  font-size: 2em;
  font-weight: 600;
}

.logout-message p,
.login-required-message p {
  color: #6c757d;
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.5;
}

.logout-actions,
.login-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.login-again-btn,
.login-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.login-again-btn:hover,
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.back-home-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.back-home-btn:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* 禁用状态样式 */
.teacher-container.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.teacher-container.disabled .tab-content {
  filter: blur(2px);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logout-state,
.login-required-state {
  animation: fadeIn 0.5s ease-out;
}

.logout-message,
.login-required-message {
  animation: fadeIn 0.7s ease-out 0.2s both;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .logout-message,
  .login-required-message {
    padding: 30px 20px;
    margin: 10px;
  }

  .logout-icon,
  .login-icon {
    font-size: 3em;
  }

  .logout-message h2,
  .login-required-message h2 {
    font-size: 1.5em;
  }

  .logout-message p,
  .login-required-message p {
    font-size: 1em;
  }

  .logout-actions,
  .login-actions {
    flex-direction: column;
    align-items: center;
  }

  .login-again-btn,
  .login-btn,
  .back-home-btn {
    width: 100%;
    max-width: 250px;
  }
}

/* 加载状态优化 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  font-size: 1.2em;
  color: #6c757d;
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #6c757d;
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 错误状态样式 */
.error {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: #dc3545;
  font-size: 1.2em;
  text-align: center;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

/* ==================== 模态框及教师管理表格样式 ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.modal-content .form-group {
  margin-bottom: 15px;
}

.modal-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="number"],
.modal-content input[type="date"],
.modal-content select {
  width: 100%;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
}

.modal-content .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.modal-content .submit-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.modal-content .cancel-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

/* 教师管理特有样式 */
.management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.data-table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

.status-active {
  color: #28a745;
  font-weight: bold;
}

.status-inactive {
  color: #dc3545;
  font-weight: bold;
}

.role-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: bold;
}

.role-badge.admin {
  background: #dc3545;
  color: white;
}

.role-badge.director {
  background: #ffc107;
  color: #333;
}

.role-badge.teacher {
  background: #17a2b8;
  color: white;
}

/* 重置学生密码按钮 */
.reset-pwd-btn {
  background: #ffc107;
  color: #333;
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  margin: 0 3px;
  transition: all 0.3s ease;
}

.reset-pwd-btn:hover {
  background: #e0a800;
}

/* 通用输入弹窗 */
.prompt-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prompt-modal-content {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.prompt-modal-content .modal-header h3 {
  margin: 0;
  color: #333;
}

.prompt-modal-content .modal-body {
  padding: 25px;
}

.prompt-modal-content .modal-body p {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1em;
}

.prompt-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.prompt-input:focus {
  border-color: #007bff;
  outline: none;
}

.prompt-modal-content .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 25px;
  border-top: 1px solid #dee2e6;
}

.prompt-modal-content .modal-footer .btn-cancel {
  padding: 10px 25px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: white;
  color: #6c757d;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: bold;
  transition: all 0.3s ease;
}

.prompt-modal-content .modal-footer .btn-cancel:hover {
  background: #f8f9fa;
}

.prompt-modal-content .modal-footer .btn-confirm {
  padding: 10px 25px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  color: white;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: bold;
  transition: all 0.3s ease;
}

.prompt-modal-content .modal-footer .btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* 商品图片上传样式 */
.image-upload-wrapper {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
}

.image-preview {
    width: 160px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview span {
    color: #999;
    font-size: 0.9em;
}

.upload-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.upload-btn:hover {
    background: #5a6fd6;
}

.upload-hint {
    color: #999;
    font-size: 0.85em;
    margin-left: 8px;
}

.image-url-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
}

/* 商品列表图片缩略图 */
.product-item .product-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.product-thumb {
    width: 60px;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.product-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-details-wrap {
    flex: 1;
}

.product-desc {
    color: #888;
    font-size: 0.85em;
    margin-top: 4px;
}

/* 操作日志样式 */
.logs-section {
    padding: 20px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.logs-header h2 {
    margin: 0;
    color: #333;
}

.logs-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
}

.logs-info .refresh-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.logs-info .refresh-btn:hover {
    background: #f0f0f0;
    border-color: #28a745;
    color: #28a745;
}

.logs-info .refresh-btn.danger-btn {
    border-color: #e74c3c;
    color: #e74c3c;
}

.logs-info .refresh-btn.danger-btn:hover {
    background: #fff5f5;
    border-color: #c0392b;
    color: #c0392b;
}

.logs-section .logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logs-filter {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logs-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logs-filter-row input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
}

.logo-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logo-preview {
    width: 260px;
    height: 72px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

.logo-preview img {
    max-height: 64px;
    max-width: 256px;
    object-fit: contain;
}

.logo-placeholder {
    color: #999;
    font-size: 0.9em;
}

.logo-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-logo-btn {
    padding: 6px 16px;
    border: 1px solid #007bff;
    border-radius: 6px;
    background: white;
    color: #007bff;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.upload-logo-btn:hover {
    background: #007bff;
    color: white;
}

.logo-tip {
    font-size: 0.78em;
    color: #999;
}

.remove-logo-btn {
    padding: 6px 16px;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    background: white;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.remove-logo-btn:hover {
    background: #e74c3c;
    color: white;
}

.logs-filter select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    cursor: pointer;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 4px solid #6c757d;
    transition: background 0.2s;
}

.log-item:hover {
    background: #eef0f2;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.log-operator {
    font-weight: bold;
    color: #333;
    font-size: 0.95em;
}

.log-action {
    font-size: 0.85em;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.log-action.create {
    background: #d4edda;
    color: #155724;
}

.log-action.update {
    background: #cce5ff;
    color: #004085;
}

.log-action.delete {
    background: #f8d7da;
    color: #721c24;
}

.log-action.add {
    background: #d4edda;
    color: #155724;
}

.log-action.subtract {
    background: #fff3cd;
    color: #856404;
}

.log-action.confirm {
    background: #d4edda;
    color: #155724;
}

.log-action.cancel {
    background: #f8d7da;
    color: #721c24;
}

.log-target {
    font-size: 0.85em;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.log-time {
    font-size: 0.85em;
    color: #999;
    margin-left: auto;
}

.log-details {
    font-size: 0.9em;
    color: #666;
    padding-left: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .log-header {
        gap: 8px;
    }
    .log-time {
        margin-left: 0;
        width: 100%;
    }
}


/* 预约管理筛选区刷新按钮 */
.orders-filter .refresh-btn {
    padding: 6px 16px;
    border: 1px solid #007bff;
    border-radius: 6px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-size: 0.9em;
}

.orders-filter .refresh-btn:hover {
    background: #0056b3;
}