* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f4f8; color: #333; }
.container { max-width: 600px; margin: 0 auto; padding: 15px; }
.form-header { text-align: center; padding: 20px 0; background: linear-gradient(135deg, #1a7bb9, #0d5a8a); color: #fff; border-radius: 12px 12px 0 0; margin: -15px -15px 0; padding: 25px 15px; }
.form-header h1 { font-size: 20px; letter-spacing: 2px; }
.form-header h2 { font-size: 16px; font-weight: normal; margin-top: 5px; opacity: 0.9; }
form { background: #fff; padding: 20px 15px; border-radius: 0 0 12px 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); margin-bottom: 30px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: #555; margin-bottom: 5px; }
.form-group .required { color: #e74c3c; }
.form-row { display: flex; gap: 12px; }
.form-row .half { flex: 1; }
input[type="text"], input[type="tel"], input[type="date"], input[type="month"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 15px; transition: border-color 0.2s; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1a7bb9; box-shadow: 0 0 0 3px rgba(26,123,185,0.1); }
input[type="file"] { padding: 8px 0; font-size: 14px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 6px; }
.checkbox-group.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.checkbox-inline { display: flex; align-items: center; gap: 4px; font-size: 14px; cursor: pointer; padding: 4px 0; }
.checkbox-inline input[type="checkbox"], .checkbox-inline input[type="radio"] { width: 16px; height: 16px; }
.commitment { background: #f8faff; padding: 12px; border-radius: 8px; border: 1px solid #e0e8f0; }
.commitment-text p { font-size: 13px; line-height: 1.8; color: #555; text-indent: 2em; margin-bottom: 8px; }
.submit-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #1a7bb9, #0d5a8a); color: #fff; border: none; border-radius: 8px; font-size: 17px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; letter-spacing: 2px; }
.submit-btn:hover { opacity: 0.9; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.success-page { text-align: center; padding: 60px 20px; background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); margin-top: 30px; }
.success-icon { width: 80px; height: 80px; line-height: 80px; border-radius: 50%; background: #27ae60; color: #fff; font-size: 40px; margin: 0 auto 20px; }
.success-page h1 { font-size: 24px; color: #27ae60; margin-bottom: 10px; }
.success-page p { color: #666; line-height: 1.8; }
.success-actions { margin-top: 24px; }
.btn { display: inline-block; padding: 10px 24px; border-radius: 8px; text-decoration: none; font-size: 14px; border: 1px solid #d0d5dd; background: #fff; color: #333; cursor: pointer; }
.btn-primary { background: #1a7bb9; color: #fff; border-color: #1a7bb9; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn.small { padding: 5px 12px; font-size: 12px; }

.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #e8f0fe, #d0e2f7); }
.login-box { background: #fff; padding: 40px 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); width: 360px; max-width: 90%; }
.login-box h1 { font-size: 18px; text-align: center; color: #1a7bb9; margin-bottom: 5px; }
.login-box h2 { font-size: 14px; text-align: center; color: #888; font-weight: normal; margin-bottom: 24px; }
.error-msg { color: #e74c3c; font-size: 13px; margin-bottom: 10px; text-align: center; }

.admin-nav { background: #00a9e8; color: #fff; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 50px; }
.nav-brand { font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.nav-link { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 13px; }
.nav-link:hover { color: #fff; }
.admin-layout { display: grid; grid-template-columns: 194px minmax(0, 1fr); min-height: calc(100vh - 50px); align-items: stretch; }
.admin-sidebar { display: block; background: #eef1f4; border-right: 1px solid #d4dce3; }
.side-title { display: block; width: 100%; box-sizing: border-box; padding: 12px 18px; font-weight: 700; background: #e1e5e9; color: #111827; line-height: 1.4; }
.side-item { display: block; width: 100%; box-sizing: border-box; padding: 11px 18px; color: #1f2937; text-decoration: none; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.side-item.active { background: #fff; border-left: 3px solid #00a9e8; font-weight: 700; }
.side-item:hover { background: #fff; color: #00a9e8; }
.admin-container { max-width: 1450px; width: 100%; margin: 0 auto; padding: 20px; min-width: 0; }

.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 16px; border-radius: 10px; text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.stat-num { display: block; font-size: 28px; font-weight: 700; color: #1a7bb9; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

.admin-toolbar { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.admin-toolbar select, .admin-toolbar input { padding: 8px 12px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 14px; }
.filter-group { display: flex; gap: 8px; flex: 1; }

.table-wrap { background: #fff; border-radius: 10px; overflow-x: auto; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #f7f9fc; padding: 12px 10px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #e8ecf1; white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid #f0f2f5; }
.admin-table tr:hover { background: #f8faff; }
.action-btns { display: flex; gap: 4px; flex-wrap: nowrap; }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.status-pending { background: #fff3e0; color: #e67e22; }
.status-assigned { background: #e8f5e9; color: #27ae60; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: #fff; border-radius: 12px; max-width: 700px; width: 95%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.modal-header h2 { font-size: 18px; }
.modal-close { font-size: 24px; cursor: pointer; color: #999; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #eee; display: flex; gap: 8px; justify-content: flex-end; }
.detail-grid { display: flex; gap: 20px; }
.detail-photo { flex-shrink: 0; }
.detail-info { flex: 1; }
.detail-info p { line-height: 2; font-size: 14px; }
.assign-section { margin-top: 15px; }
.assign-section h3 { font-size: 16px; margin-bottom: 12px; color: #1a7bb9; }
.assign-section select, .assign-section textarea { width: 100%; padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 14px; margin-bottom: 10px; }
.readonly-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 12px; }
.status-help { color: #667085; font-size: 13px; }
.readonly-field { min-height: 38px; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: 6px; background: #f7f9fc; color: #344054; line-height: 1.5; }

@media (max-width: 600px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-container { padding: 14px; }
  .admin-toolbar { flex-direction: column; }
  .filter-group { width: 100%; flex-direction: column; }
  .admin-toolbar .btn { width: 100%; }
  .stats-bar { gap: 10px; }
  .form-row { flex-direction: column; gap: 0; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { flex-direction: column; }
  .checkbox-group.grid-2 { grid-template-columns: 1fr; }
}
