* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial; margin: 0; background: linear-gradient(180deg,#f6f7fb 0%,#eff3ff 100%); color: #222; overflow-x: hidden; }
.container { max-width: 860px; margin: 20px auto; background: #fff; padding: 20px; border-radius: 14px; box-shadow: 0 10px 30px rgba(31,47,70,0.08); border: 1px solid #eef1f8; }
h1 { font-size: 22px; margin: 0 0 16px; letter-spacing: .3px; }
h2 { font-size: 18px; margin: 18px 0 10px; }

form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { form { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.row { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .lbl { width: 110px; min-width: 110px; color: #3a4a68; white-space: nowrap; }
.row input, .row select { flex: 1; min-width: 0; }
input[type="file"] { max-width: 100%; }
/* Make certificate upload row span full width to avoid squeeze */
#certUpload { grid-column: 1 / -1; }
input, select, button, a.btn { padding: 12px 12px; font-size: 16px; border: 1px solid #e1e3eb; border-radius: 10px; transition: all .2s ease; }
input, select { background: #fbfcff; }
/* Prevent iOS zoom and mispositioned pickers by ensuring >=16px */
input[type="text"], input[type="email"], input[type="tel"], select { font-size: 16px; }
/* Improve select look and dropdown arrow */
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2390A4B7' d='M5.8 7.3a1 1 0 0 1 1.4 0L10 10.1l2.8-2.8a1 1 0 1 1 1.4 1.4l-3.5 3.5a1 1 0 0 1-1.4 0L5.8 8.7a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
select::-ms-expand { display: none; }
input:focus, select:focus { outline: none; border-color: #7aa2ff; box-shadow: 0 0 0 4px rgba(122,162,255,0.15); }

button, .btn { background: #1f6feb; color: #fff; border: none; text-align: center; }
button:hover, .btn:hover { background: #1356c6; cursor: pointer; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(19,86,198,0.18); }
button:active, .btn:active { transform: translateY(0); box-shadow: none; }

.hidden { display: none; }
.admin-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

.card { background: #fff; border: 1px solid #eef1f8; border-radius: 12px; padding: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }

table { width: 100%; border-collapse: collapse; font-size: 13px; overflow: hidden; border-radius: 10px; border: 1px solid #eef1f8; }
th, td { border-bottom: 1px solid #f0f3fa; text-align: left; padding: 10px; }
th { background: #f7f9ff; color: #3a4a68; font-weight: 600; }
tr:hover td { background: #fbfdff; }

img.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid #eef1f8; cursor: pointer; transition: all 0.2s ease; }
img.thumb:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* 图片预览模态框 */
.image-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); }
.image-modal.show { display: flex; align-items: center; justify-content: center; }
.image-modal img { max-width: 90%; max-height: 90%; object-fit: contain; border-radius: 8px; }
.image-modal .close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }
.image-modal .close:hover { color: #ccc; }

#msg { margin-top: 6px; font-size: 13px; }
#msg[style*="color: #15803d"] { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46 !important; padding: 8px 10px; border-radius: 8px; }
#msg[style*="color: #b91c1c"] { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d !important; padding: 8px 10px; border-radius: 8px; }

.btn-link { display:inline-block; padding: 10px 12px; border: 1px solid #e1e3eb; border-radius: 10px; text-decoration: none; color: #1f2f46; background: #fbfcff; }
.btn-link:hover { border-color: #7aa2ff; color: #1356c6; }


