/* ============================================================
   w7-style.css — สไตล์รวมของ Lab 7 (ใช้ทุกหน้า)
   แยก CSS ออกมาไฟล์เดียว จะได้ไม่ต้องเขียนซ้ำในทุกหน้า
   ============================================================ */
* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 24px;
    color: #222;
}
h1 { font-size: 20px; margin: 0 0 16px; }
a  { color: #e8722b; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- ปุ่ม ---------- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #e8722b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.btn:hover  { background: #c95f1f; text-decoration: none; }
.btn-gray   { background: #888; }
.btn-red    { background: #d64545; }

/* ---------- รายการ (แทน table ด้วย div) ---------- */
.list { max-width: 820px; }
.row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.row .id       { width: 40px; color: #999; font-weight: bold; }
.row .info     { flex: 1; }
.row .info .name { font-weight: bold; }
.row .info .sub  { font-size: 12px; color: #888; margin-top: 2px; }
.row .actions  { display: flex; gap: 6px; }
.pic { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #eee; }

/* ---------- ฟอร์ม (จัด layout ด้วย div) ---------- */
.form {
    max-width: 520px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 24px;
}
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.field input[type=text],
.field input[type=password],
.field input[type=file],
.field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
/* กลุ่ม radio / checkbox ให้เรียงแนวนอน */
.choices { display: flex; gap: 16px; flex-wrap: wrap; }
.choices label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 4px;
}
