/* จัดวางหน้าจัดการกิจกรรมใหม่ (23 ต.ค. 2569 · taste-skill สำหรับหน้าทำงาน)
   เจ้าของระบบ: ใช้สีและเนื้อหาเดิม ปรับเฉพาะการจัดวาง
   - จอกว้าง: แผงเลือกกิจกรรมเป็นคอลัมน์ซ้ายติดอยู่กับที่ · ตารางเช็คชื่อคอลัมน์ขวา (เห็นรายชื่อได้ตั้งแต่จอแรก)
   - ปุ่มของกิจกรรม: ไอคอนกับข้อความบรรทัดเดียว · แก้ไข · QR · A4 แถวเดียว · e-Certificate ทีมงาน และผู้จัดกิจกรรม เต็มแถว (ชื่อไม่ถูกตัด)
   - มือถือ: ปุ่มสร้างกิจกรรม / อัปเดต อยู่แถวเดียวกัน */

.healthy-formal #adminApp .admin-event-row { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
.healthy-formal #adminApp .admin-event-row > .event-search,
.healthy-formal #adminApp .admin-event-row > #certBtn,
.healthy-formal #adminApp .admin-event-row > #teamBtn,
.healthy-formal #adminApp .admin-event-row > #organizersBtn,
.healthy-formal #adminApp .admin-event-row > #shirtBtn,
.healthy-formal #adminApp .admin-event-row > .admin-role-badge { grid-column: 1 / -1 !important; }
.healthy-formal #adminApp .admin-event-row > .button:not(.hidden) {
  display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important;
  gap: 8px !important; width: 100% !important; min-width: 0 !important; min-height: 52px !important; padding: 8px 12px !important; white-space: nowrap;
}
.healthy-formal #adminApp .admin-event-row > .button > span:last-child { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .healthy-formal .admin-panel:not(.roster-panel) .admin-panel-head { flex-direction: column; }
  .healthy-formal .admin-panel:not(.roster-panel) .admin-panel-actions { display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; width: 100%; }
  .healthy-formal .admin-panel-actions > #createEventBtn, .healthy-formal .admin-panel-actions > #refreshAdminBtn { width: 100% !important; min-height: 52px !important; }
}

@media (min-width: 1100px) {
  .healthy-formal .admin-shell { max-width: 1400px !important; margin-inline: auto; padding-inline: 24px !important; }
  .healthy-formal #adminApp:not(.hidden) { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
  .healthy-formal #adminApp > .admin-panel { margin: 0 !important; }
  .healthy-formal #adminApp > .admin-panel:not(.roster-panel) { position: sticky; top: calc(72px + var(--safe-top, 0px) + 16px); }
  .healthy-formal #adminApp > .admin-panel:not(.roster-panel) .admin-panel-head { flex-direction: column; align-items: stretch !important; gap: 12px; }
  .healthy-formal #adminApp > .admin-panel:not(.roster-panel) .admin-panel-actions { display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
  .healthy-formal #adminApp > .admin-panel:not(.roster-panel) .admin-panel-actions > .button { width: 100%; }
}

/* แท็บเล็ต (760–1099px): ตารางเช็คชื่อใช้แถวสองบรรทัดแบบมือถือ ปุ่มเช็คชื่อไม่ถูกตัดคำ */
@media (min-width: 760px) and (max-width: 1099px) {
  .roster-panel .roster-table tr { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "bib name status" "act act act"; }
  .roster-panel .roster-table thead tr { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "bib name status"; }
  .roster-panel .roster-table th.col-actions { display: none; }
}
/* หัวตารางเช็คชื่อ: กิจกรรมที่เลือก แบบเดียวกับแถวในช่องเลือกกิจกรรม (27 ต.ค. 2569) */
.healthy-formal .roster-event { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; min-width: 0; }
.healthy-formal .roster-event[hidden] { display: none; }
.healthy-formal .roster-event strong { color: var(--health-ink); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.healthy-formal .roster-event small { color: var(--health-muted); font-size: .85rem; }
/* ไซส์เสื้อใต้ป้ายสถานะในตารางเช็คชื่อ (27 ต.ค. 2569) */
.healthy-formal .roster-table .col-status .roster-shirt { display: block; margin-top: 4px; color: var(--health-ink); font-size: .82rem; font-weight: 700; }

/* แผงเลือกกิจกรรมกระชับ (เจ้าของระบบ 28 ต.ค. 2569 · Taste Skill)
   ช่องค้นหาเต็มแถว · เครื่องมือ 7 ปุ่มเป็นตารางไอคอนบน/ชื่อล่าง (เดิมปุ่มเต็มแถวทีละอัน สูง ~300px) · ไม่มีป้ายบทบาท (แถบเมนูบอกแล้ว) */
.healthy-formal #adminApp .admin-event-row { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important; gap: 6px !important; }
.healthy-formal #adminApp .admin-event-row > #certBtn,
.healthy-formal #adminApp .admin-event-row > #teamBtn,
.healthy-formal #adminApp .admin-event-row > #organizersBtn,
.healthy-formal #adminApp .admin-event-row > #shirtBtn { grid-column: auto !important; }
.healthy-formal #adminApp .admin-event-row > .button:not(.hidden) {
  flex-direction: column !important; gap: 2px !important; min-height: 60px !important; padding: 6px 4px !important;
  border-radius: 14px !important; font-size: .84rem !important; line-height: 1.2 !important; white-space: normal; text-align: center;
}
.healthy-formal #adminApp .admin-event-row > .button > span:last-child { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.healthy-formal #adminApp .admin-event-row > .button .material-symbols-rounded { font-size: 22px !important; }
