/* ===================================================================
   base.css — โทนสี, typography, reset พื้นฐานของทั้งระบบ
   ระบบจัดการโรงแรม/หอพัก/อพาร์ทเม้นท์/รีสอร์ท
   สไตล์: "ใบเช็คอิน" (Paper Ledger) — กระดาษอุ่น, หมึกเข้ม, เขียวทะเลสาบ
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:wght@600;700&family=Noto+Sans+Thai:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&family=Noto+Sans+Mono:wght@500;600&display=swap');

:root {
  /* พื้นหลัง — กระดาษอุ่น */
  --bg: #FAF8F4;
  --bg-soft: #F2EEE4;
  --panel: #FFFFFF;
  --panel-hover: #F5F2EA;
  --line: #E4DFD5;
  --line-strong: #D2CBBC;

  /* สี action หลักของแบรนด์ — ใช้กับปุ่ม, ลิงก์, แท็บ/เมนูที่เลือกอยู่, focus ring */
  --accent: #0F5C53;
  --accent-deep: #0B4640;
  --accent-dim: rgba(15, 92, 83, 0.10);

  /* สีสถานะ (ห้อง, บิล, ป้ายต่างๆ) — แยกจากสีแบรนด์ */
  --green: #3F8F5F;
  --green-dim: rgba(63, 143, 95, 0.12);
  --amber: #B08D45;
  --amber-dim: rgba(176, 141, 69, 0.14);
  --red: #B0452F;
  --red-dim: rgba(176, 69, 47, 0.12);
  --blue: #5B7C99;
  --blue-dim: rgba(91, 124, 153, 0.12);

  /* ตัวอักษร */
  --text: #2B2A28;
  --text-dim: #6B6660;
  --text-faint: #9A948A;

  /* ฟอนต์ */
  --font-sans: 'Noto Sans Thai', sans-serif;
  --font-serif: 'Noto Serif Thai', serif;
  --font-mono: 'IBM Plex Mono', 'Noto Sans Mono', monospace;

  /* ระยะ/ขนาด */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --sidebar-w: 248px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::placeholder {
  color: var(--text-faint);
}

/* scrollbar เข้ากับธีมกระดาษ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* utility คลาสที่ใช้บ่อย */
.mono {
  font-family: var(--font-mono);
}

.serif {
  font-family: var(--font-serif);
}

.text-dim {
  color: var(--text-dim);
}

.text-faint {
  color: var(--text-faint);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* โฟกัสที่มองเห็นได้ชัดเจน (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
