* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Thai", system-ui, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px; }
.card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.hidden { display: none !important; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #e6f0ff; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; margin: 24px 0 8px; }
.muted { color: #666; font-size: 13px; margin: 2px 0 0; }
label { font-size: 13px; font-weight: 600; display: block; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #d5d9dd; border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; }
button {
  cursor: pointer; border-radius: 8px; font-size: 14px; padding: 10px 16px;
  font-family: inherit; border: 1px solid #d5d9dd; background: #f0f2f4;
}
button.primary {
  width: 100%; margin-top: 16px; background: #1a56db; color: #fff; border: none; font-weight: 600;
}
button.ghost { background: transparent; border: 1px solid #d5d9dd; font-size: 12px; padding: 6px 10px; }
.error { color: #c0392b; font-size: 13px; margin-top: 10px; }
.success { color: #1a7f37; font-size: 13px; margin-top: 10px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.info-box { background: #f7f8fa; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ticket-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ticket-row {
  background: #f7f8fa; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px;
}
.ticket-row .row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ticket-row .row-title { font-weight: 600; font-size: 13px; margin: 0; }
.ticket-row .row-sub { font-size: 12px; color: #666; margin: 2px 0 0; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: #eee; }
.badge.status-submitted { background: #eef1f5; color: #444; }
.badge.status-inprogress, .badge.status-pendingapproval { background: #dbe9ff; color: #1a56db; }
.badge.status-completed, .badge.status-approved { background: #dcf5e0; color: #1a7f37; }
.badge.status-rejected, .badge.status-cancelled { background: #fbe0e0; color: #c0392b; }
.ticket-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ticket-controls select { width: auto; }
.ticket-controls button { margin-left: auto; background: #1a56db; color: #fff; border: none; font-weight: 600; padding: 6px 14px; }
.saved-note { font-size: 12px; color: #1a7f37; margin-top: 6px; }
