/* =========================================================================
   아이성장발달 관제 — Light theme (forked from Docker Manager)
   warm cream surfaces · apricot primary · sage accent · readable Korean body
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---------- BASE NEUTRALS (warm light) ---------- */
  --bg:              #f7f3ec;   /* app background — warm cream */
  --background:      #f7f3ec;
  --surface:         #ffffff;   /* cards, sidebar */
  --surface-hover:   #f3efe6;   /* row / button hover */
  --surface-active:  #ece6d8;   /* pressed / selected */
  --surface-tint:    #fbf8f1;   /* subtle inset (sections, alt rows) */
  --border:          #ece6d8;   /* hairline dividers */
  --border-light:    #d8d0bd;   /* elevated / hovered borders */

  /* ---------- TEXT ---------- */
  --text-primary:    #2b2722;   /* headings, primary copy — warm near-black */
  --text-secondary:  #6b6359;   /* body, table data */
  --text-muted:      #a39a8c;   /* meta, timestamps, placeholders */
  --text-on-primary: #ffffff;

  /* ---------- BRAND / PRIMARY ----------
     Apricot — warm, friendly, parent-tone. Replaces Docker blue. */
  --primary:         #e8804f;
  --primary-hover:   #d76e3d;
  --primary-soft:    rgba(232, 128, 79, 0.12);
  --primary-ring:    rgba(232, 128, 79, 0.30);

  /* ---------- SEMANTIC ---------- */
  --accent:          #5fb37e;   /* "잘 자라고 있어요" sage green */
  --accent-hover:    #4a9a68;
  --success:         #5fb37e;
  --warning:         #e8a838;   /* attention / overdue */
  --danger:          #d96961;   /* abnormal / urgent */
  --info:            #6fa8d6;   /* info / reminder */

  /* Status palette — child wellbeing states */
  --status-good:     #5fb37e;   /* 양호 */
  --status-watch:    #e8a838;   /* 관찰 */
  --status-care:     #d96961;   /* 주의 */
  --status-rest:     #a39a8c;   /* 결석 */
  --status-new:      #b58bd1;   /* 신규 */

  /* Mood palette — emotional state */
  --mood-happy:      #f0c656;
  --mood-calm:       #88c4a8;
  --mood-tired:      #b6aec0;
  --mood-upset:      #de8a8a;
  --mood-curious:    #f2a978;

  /* Chart / data-viz palette */
  --chart-1: #e8804f;   /* apricot */
  --chart-2: #5fb37e;   /* sage */
  --chart-3: #f0c656;   /* sunny */
  --chart-4: #b58bd1;   /* lavender */
  --chart-5: #6fb7c9;   /* sky */
  --chart-6: #de8a8a;   /* rose */

  /* Terminal/log (kept for activity log style blocks) */
  --term-bg:  #fbf8f1;
  --term-fg:  #2b2722;
  --term-sel: #ece6d8;

  /* ---------- TYPOGRAPHY ---------- */
  --font-sans:    'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-heading: 'Space Grotesk', 'Pretendard', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xs:   11px;
  --fs-sm:   13px;
  --fs-base: 14px;
  --fs-md:   16px;
  --fs-lg:   18px;
  --fs-xl:   20px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;
  --fs-4xl:  36px;

  --lh-tight:  1.2;
  --lh-normal: 1.5;
  --lh-loose:  1.7;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --tracking-wider: 0.05em;

  /* ---------- SPACING (4px grid) ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---------- RADII ---------- */
  --radius-sm:  4px;
  --radius:     10px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* ---------- ELEVATION ---------- */
  --shadow-sm: 0 1px 2px rgba(43, 39, 34, .04);
  --shadow:    0 4px 12px rgba(43, 39, 34, .06);
  --shadow-lg: 0 10px 30px rgba(43, 39, 34, .10);
  --shadow-xl: 0 20px 50px rgba(43, 39, 34, .14);

  /* ---------- MOTION ---------- */
  --dur-fast:   120ms;
  --dur-normal: 150ms;
  --dur-slow:   250ms;
  --ease:       cubic-bezier(.4, 0, .2, 1);

  /* ---------- LAYOUT ---------- */
  --sidebar-w: 248px;
  --topbar-h:  64px;
  --container-max: 1440px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; border: 0; cursor: pointer; background: transparent; color: inherit; }
input, textarea, select { font-family: inherit; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); color: var(--text-primary); line-height: var(--lh-tight); }
h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-xl); font-weight: 600; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-base); font-weight: 600; }

p { margin: 0; color: var(--text-secondary); }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
}

code, pre, .mono { font-family: var(--font-mono); font-size: 0.92em; }

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

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: var(--primary-soft); color: var(--text-primary); }
