/* ============================================================
   Raya Design Kit v1 — extracted from RayaHealth-FE (2026-07-27)
   Sources: src/styles.scss @theme, assets/styles/_variables.scss,
   _typography.scss, _button.scss, fonts.scss, _colors.scss
   This file is the single source of truth for mockup generation.
   ============================================================ */

:root {
  /* ---- Brand core ---- */
  --color-brand-primary: #6da14d;
  --color-brand-primary-100: #9ec981;
  --color-brand-primary-950: #547e72;
  --color-brand-secondary: #565d5d;
  --color-brand-tertiary: #9ea2a2;

  /* ---- Primary green scale ---- */
  --color-primary-100: #fdfffa;
  --color-primary-200: #f6ffed;
  --color-primary-300: #edf9e1;
  --color-primary-400: #d8e9c8;
  --color-primary-500: #b4d398;
  --color-primary-600: #749e4e;
  --color-primary-700: #537b2e;
  --color-primary-950: #3a4332;

  /* ---- Secondary (ink) scale ---- */
  --color-secondary-100: #9794aa;
  --color-secondary-200: #4a4a4a;
  --color-secondary-300: #383838;
  --color-secondary-400: #272727;
  --color-secondary-500: #1f1f1f;

  /* ---- Slate / core ---- */
  --color-brand-slate-50: #f5f9f5;
  --color-brand-slate-100: #e8ebed;
  --color-brand-slate-200: #f4f8f9;
  --color-brand-slate-950: #22404b;
  --color-core-solid-100: #e6e7e7;
  --color-core-solid-950: #0d1717;

  /* ---- Greys / light ---- */
  --color-grey-100: #f5f7fa;
  --color-grey-200: #cbcad7;
  --color-light-100: #f6f6f8;
  --color-light-200: #d5dadb;
  --color-light-700: #49475a;
  --color-light-800: #686677;

  /* ---- Semantic ---- */
  --color-semantic-success: #00c950;
  --color-semantic-success-950: #008236;
  --color-semantic-info: #00a6f4;
  --color-semantic-info-950: #1447e6;
  --color-semantic-error: #fb2c36;
  --color-semantic-error-950: #c10007;
  --color-semantic-alert: #fdc700;
  --color-semantic-alert-950: #a65f00;
  --color-semantic-solid-500: #2b7fff;
  --color-error-300: #ffddd7;
  --color-error-500: #e05744;
  --color-accent-800: #1587ce;
  --color-accent-50: #e4f7ff;

  /* ---- Radii ---- */
  --radius-button: 12px;
  --radius-card: 16px;
  --radius-ml: 10px;
  --radius-xxl: 18px;
  --radius-5xl: 60px;
  --radius-input: 30px; /* Material outlined container shape */

  /* ---- Shadow ---- */
  --shadow-card: 0px 12px 27px 0px #0000001a;

  /* ---- Fonts ---- */
  --font-primary: 'GeneralSans', -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Aujournuit', Georgia, serif;
}

/* GeneralSans + Aujournuit are served by the Studio at /fonts/.
   Standalone artifacts fall back to system stacks gracefully. */
@font-face { font-family: 'GeneralSans'; src: url('/fonts/GeneralSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'GeneralSans'; src: url('/fonts/GeneralSans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'GeneralSans'; src: url('/fonts/GeneralSans-Semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'GeneralSans'; src: url('/fonts/GeneralSans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Aujournuit'; src: url('/fonts/Aujournuit-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* ---- Base ---- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-secondary-500);
  background: var(--color-grey-100);
}

/* ---- Typography (mirrors _typography.scss) ---- */
h1 { font-weight: 500; font-size: 48px; line-height: 1.2; color: var(--color-core-solid-950); margin: 0 0 16px; }
h2 { font-size: 32px; line-height: 41px; font-weight: 600; color: var(--color-secondary-500); margin: 0 0 12px; }
h3 { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--color-secondary-500); margin: 0 0 8px; }
h4 { font-size: 24px; line-height: 28px; font-weight: 400; color: var(--color-secondary-500); margin: 0 0 8px; }
p  { font-size: 16px; line-height: 1.5; color: var(--color-secondary-500); margin: 0 0 12px; }
.display-xs { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.02em; color: var(--color-brand-slate-950); line-height: 1.1; }
.subtitle-1 { font-size: 22px; line-height: 26px; font-weight: 300; color: var(--color-secondary-500); }
.text-muted { color: var(--color-secondary-100); }
.text-small { font-size: 14px; }

@media (max-width: 640px) {
  h1 { font-size: 36px; }
  h2 { font-size: 24px; line-height: 32px; }
  h3, h4 { font-size: 20px; line-height: 28px; }
  p { font-size: 14px; }
  .display-xs { font-size: 28px; }
}

/* ---- Buttons (mirrors _button.scss) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-button);
  height: 48px; padding: 0 16px;
  font-family: var(--font-primary); font-size: 16px; font-weight: 500; line-height: 1;
  border: none; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease;
}
.btn.md { height: 40px; padding: 0 12px; }
.btn.full { width: 100%; }
.btn-primary { background: var(--color-brand-primary); color: #fff; }
.btn-primary:disabled { opacity: .4; }
.btn-secondary { background: #000; color: #fff; }
.btn-secondary:hover { background: var(--color-secondary-500); }
.btn-light { background: #fff; color: #0d1717; border: 1px solid #0d17171a; }
.btn-outline { background: #fff; color: var(--color-core-solid-950); border: 1px solid #0d17171a; }
.btn-danger-outline { background: #fff; color: var(--color-semantic-error-950); border: 1px solid rgb(from var(--color-semantic-error) r g b / 0.1); }
.btn-danger-outline:hover { background: rgb(from var(--color-semantic-error) r g b / 0.1); }
.btn-text { background: transparent; color: var(--color-semantic-solid-500); border: none; padding: 0 8px; }

/* ---- Inputs (Material outlined, 30px pill shape) ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--color-secondary-300); }
.input, select.input, textarea.input {
  font-family: var(--font-primary); font-size: 16px; color: var(--color-secondary-500);
  background: #fff; border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-input);
  height: 48px; padding: 0 20px; outline: none; width: 100%;
}
textarea.input { height: auto; min-height: 96px; padding: 14px 20px; border-radius: var(--radius-xxl); }
.input:focus { border-color: var(--color-brand-primary); box-shadow: 0 0 0 3px var(--color-primary-300); }
.input::placeholder { color: var(--color-secondary-100); }

/* ---- Cards ---- */
.card {
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 24px;
}
.card-flat { background: #fff; border-radius: var(--radius-card); border: 1px solid var(--color-brand-slate-100); padding: 24px; }

/* ---- Badges / status pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-5xl); padding: 4px 12px;
  font-size: 13px; font-weight: 500;
}
.badge-success { background: #e7f9ef; color: var(--color-semantic-success-950); }
.badge-info    { background: var(--color-accent-50); color: var(--color-semantic-info-950); }
.badge-error   { background: var(--color-error-300); color: var(--color-semantic-error-950); }
.badge-alert   { background: #fff8e1; color: var(--color-semantic-alert-950); }
.badge-neutral { background: var(--color-light-100); color: var(--color-light-800); }

/* ---- App chrome ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--color-brand-slate-100);
  padding: 12px 24px;
}
.topbar .logo { font-family: var(--font-display); font-size: 24px; color: var(--color-brand-slate-950); }
.sidenav { background: #fff; border-right: 1px solid var(--color-brand-slate-100); padding: 16px 0; min-width: 220px; }
.sidenav a { display: block; padding: 10px 24px; color: var(--color-secondary-300); text-decoration: none; font-size: 15px; border-radius: 0 var(--radius-5xl) var(--radius-5xl) 0; }
.sidenav a.active { background: var(--color-primary-200); color: var(--color-primary-700); font-weight: 600; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-card); overflow: hidden; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--color-secondary-100); text-transform: uppercase; letter-spacing: .03em; padding: 12px 16px; border-bottom: 1px solid var(--color-brand-slate-100); }
.table td { padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--color-light-100); }

/* ---- Layout helpers ---- */
.page { max-width: 1080px; margin: 0 auto; padding: 32px 24px; }
.row { display: flex; gap: 16px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
