:root { --navy:#1F3864; --teal:#2E9BB3; --bg:#F4F6FA; }
* { box-sizing:border-box; }
body { margin:0; font-family:'Sarabun','Segoe UI',sans-serif; background:var(--bg); color:#1c2733; }
header { background:var(--navy); color:#fff; display:flex; justify-content:space-between; align-items:center;
  padding:12px 20px; border-bottom:4px solid var(--teal); }
.brand { font-weight:700; font-size:20px; letter-spacing:.5px; }
.brand span { color:var(--teal); }
nav a { color:#cfe3ef; margin-left:14px; text-decoration:none; }
main { max-width:1050px; margin:22px auto; padding:0 14px; }
.card { background:#fff; border-radius:10px; padding:20px 22px; margin-bottom:18px; box-shadow:0 1px 4px rgba(16,42,80,.08); }
h2 { margin:0 0 12px; color:var(--navy); font-size:19px; }
h3 { color:var(--navy); font-size:16px; margin:18px 0 8px; }
h4 { background:var(--navy); color:#fff; padding:7px 10px; border-radius:6px 6px 0 0; margin:16px 0 0; font-size:14.5px; }
label { display:block; margin:10px 0 4px; font-weight:600; font-size:14px; }
input, textarea, select { width:100%; padding:9px 10px; border:1px solid #c9d2dc; border-radius:7px; font-family:inherit; font-size:14.5px; }
button { margin-top:14px; background:var(--navy); color:#fff; border:0; padding:11px 22px; border-radius:8px;
  font-size:15px; font-family:inherit; cursor:pointer; }
button.primary { background:var(--teal); }
button:disabled { opacity:.6; }
.btnrow { display:flex; gap:10px; }
table.list { width:100%; border-collapse:collapse; font-size:14px; }
table.list th { background:#eef2f8; color:var(--navy); text-align:left; }
table.list th, table.list td { border:1px solid #d7dee8; padding:6px 8px; }
table.edit input { padding:4px 6px; font-size:13.5px; border-radius:5px; }
table.edit td.num { text-align:right; font-weight:600; white-space:nowrap; }
tr.subtotal td { background:#eef2f8; font-weight:700; }
.totalbar { margin-top:14px; padding:12px 14px; background:#fff8dc; border:1px solid #e3d9a5; border-radius:8px; font-size:16px; }
.totalbar .grand { color:var(--navy); font-weight:700; font-size:18px; }
.btn-sm { background:var(--teal); color:#fff; padding:3px 10px; border-radius:6px; text-decoration:none; font-size:13px; }
.muted { color:#6b7a8c; } .small { font-size:12.5px; }
.alert { background:#fde8e8; color:#9b1c1c; padding:9px 12px; border-radius:7px; margin-bottom:10px; }
.alert.ok { background:#e6f6ec; color:#14683a; }
.del { color:#c0392b; text-decoration:none; } .add { color:var(--teal); text-decoration:none; font-size:13px; }
.login-bg { display:flex; min-height:100vh; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#1F3864,#2E9BB3); }
.login-box { background:#fff; padding:34px 36px; border-radius:14px; width:360px; box-shadow:0 10px 40px rgba(0,0,0,.25); }
.login-box h1 { color:var(--navy); margin:0 0 4px; } .login-box h1 span { color:var(--teal); }
input[type=checkbox] { width:auto; margin-right:6px; vertical-align:middle; }
label.inline { display:inline-block; font-weight:500; margin-top:14px; }
