* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Microsoft JhengHei', '微軟正黑體', sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.5;
}
a { color: #1890ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.page-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 1.5rem; font-weight: 700; }
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-secondary { background: #8c8c8c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 20px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #555; }
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
}
.form-control:focus { border-color: #1890ff; outline: none; }
select.form-control { cursor: pointer; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; }
table.data-table th { background: #fafafa; font-weight: 600; }
table.data-table tr:hover { background: #fafafa; }
table.data-table .col-no { width: 80px; }
table.data-table .col-actions { width: 220px; text-align: right; }
.nav-top {
  background: #001529;
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  min-height: 48px;
  flex-wrap: wrap;
}
.nav-top a { color: rgba(255,255,255,0.85); padding: 12px 16px; display: inline-block; }
.nav-top a:hover { color: #fff; }
.nav-top .brand { font-weight: 700; margin-right: 24px; }
.nav-top .right { margin-left: auto; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-danger { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.text-muted { color: #8c8c8c; font-size: 12px; }

/* 確認執行 modal */
.q-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto;
}
.q-modal {
  background: #fff; border-radius: 10px; width: min(960px, 100%); padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.q-modal h2 { font-size: 1.25rem; margin-bottom: 8px; }
.q-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.confirm-sessions-table input.form-control { padding: 4px 6px; font-size: 13px; }
.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.status-badge.draft { background: #f5f5f5; color: #595959; }
.status-badge.confirmed { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

/* 後台設定入口卡片 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.settings-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 20px;
  border: 1px solid #eee;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-card:hover {
  border-color: #1890ff;
  box-shadow: 0 2px 8px rgba(24,144,255,0.15);
  text-decoration: none;
}
.settings-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: #1890ff; }
.settings-card p { font-size: 13px; color: #555; margin-bottom: 12px; line-height: 1.5; }
.settings-card-link { font-size: 13px; color: #1890ff; font-weight: 500; }

.params-section { margin-bottom: 20px; }
.params-section-title { font-size: 1.15rem; margin-bottom: 8px; color: #1890ff; }
.mb-2 { margin-bottom: 8px; }
