/* KJ Pharmacy — clean white / green / light-blue theme (from logo) */
:root {
  --green: #2daa4f;
  --green-600: #23913f;
  --green-50: #eaf7ee;
  --blue: #1e9bd7;
  --blue-600: #1683b8;
  --blue-50: #eaf6fd;
  --sky: #f3fafe;
  --ink: #1f3446;
  --ink-2: #4c6275;
  --muted: #8298aa;
  --line: #dde8ef;
  --white: #ffffff;
  --red: #d64541;
  --red-50: #fdeeee;
  --amber: #e59a1c;
  --amber-50: #fff5e3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 52, 70, .06), 0 4px 16px rgba(31, 52, 70, .06);
  --font: 'IBM Plex Sans Thai', 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--sky); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-600); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
button, input, select, textarea { font: inherit; color: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; cursor: pointer; background: var(--white); border-color: var(--line); color: var(--ink); transition: .15s; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--blue); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-600); border-color: var(--green-600); }
.btn-blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-blue:hover { background: var(--blue-600); }
.btn-danger { background: var(--red-50); color: var(--red); border-color: #f3c4c2; }
.btn-danger:hover { border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.req::after { content: ' *'; color: var(--red); }
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; outline: none; transition: .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 155, 215, .15); }
textarea.input { resize: vertical; min-height: 64px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--blue-50); color: var(--blue-600); white-space: nowrap; }
.badge.green { background: var(--green-50); color: var(--green-600); }
.badge.red { background: var(--red-50); color: var(--red); }
.badge.amber { background: var(--amber-50); color: #a86b00; }
.badge.gray { background: #eef2f5; color: var(--ink-2); }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.alert-red { background: var(--red-50); border: 1px solid #f3c4c2; color: #8f2a27; }
.alert-green { background: var(--green-50); border: 1px solid #bfe5c9; color: #1f6b35; }
.alert-blue { background: var(--blue-50); border: 1px solid #bfe2f4; color: #145f86; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 38px; width: auto; }
.brand b { color: var(--green-600); }
.brand span { color: var(--blue); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 1000; box-shadow: var(--shadow); opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; }
.hidden { display: none !important; }
