/* GN Foods — design system Organic (bản dùng chung cho public/)
   Nguồn: styles.css của bộ thiết kế; đổi font tiêu đề sang Baloo 2 vì Caprasimo thiếu dấu tiếng Việt. */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Figtree:wght@400;500;600;700;800&display=swap');

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --font-heading-weight: 700;
  --font-body: "Figtree", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);
}

html { color-scheme: light only; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 18px; line-height: 1.55;
  padding-bottom: 80px;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); line-height: 1.1; margin: 0; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
* { text-wrap: pretty; }

/* — nút — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none; font-family: var(--font-body);
  font-weight: 700; font-size: 18px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: 13px 24px; border-radius: 999px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-ghost { color: var(--color-accent-700); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-block { width: 100%; }

/* — ô nhập — */
.field > label {
  display: block; font-size: 17px; font-weight: 600; margin-bottom: 6px;
  color: var(--color-neutral-800);
}
.input {
  width: 100%; min-height: 48px; padding: 10px 18px; font: inherit;
  font-size: 18px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-divider); border-radius: 999px;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input, select.input { border-radius: var(--radius-md); }
textarea.input { min-height: 170px; resize: vertical; line-height: 1.6; }

/* — chip — */
.tag {
  display: inline-flex; align-items: center; font-size: 16px;
  letter-spacing: 0.02em; padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }

/* — bảng — */
.table { width: 100%; border-collapse: collapse; font-size: 17px; }
.table th {
  text-align: left; font-size: 16px; letter-spacing: 0.04em; font-weight: 700;
  color: var(--color-neutral-700);
  padding: 16px 18px; border-bottom: 1px solid var(--color-divider);
  white-space: nowrap; position: sticky; top: 0; background: var(--color-neutral-100); z-index: 2;
}
.table td {
  padding: 16px 18px; line-height: 1.4;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — thanh header dùng chung — */
.gnhead {
  position: sticky; top: 0; z-index: 20; background: var(--color-neutral-100);
  border-bottom: 1px solid var(--color-divider); box-shadow: var(--shadow-sm);
}
.gnhead .in {
  max-width: 1120px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.gnhead .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.gnhead .logo .g {
  width: 44px; height: 44px; border-radius: 999px; background: var(--color-accent); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.gnhead .logo .t1 { font-family: var(--font-heading); font-weight: 700; font-size: 22px; line-height: 1.1; }
.gnhead .logo .t2 { font-size: 14px; color: var(--color-neutral-700); }
.gnhead .sp { flex: 1; }
.gnhead .user {
  display: flex; align-items: center; gap: 10px;
  background: var(--color-accent-2-200); border-radius: 999px; padding: 8px 18px 8px 10px;
}
.gnhead .user .av {
  width: 32px; height: 32px; border-radius: 999px; background: var(--color-accent-2-600); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.gnhead .user .e { font-size: 15px; font-weight: 600; line-height: 1.25; }
.gnhead .user .r { font-size: 15px; color: var(--color-accent-2-800); line-height: 1.25; }

/* — thẻ lớn — */
.gncard {
  background: var(--color-neutral-100); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm);
}

/* — hộp thoại — */
.gnphu { position: fixed; inset: 0; background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent); display: none; z-index: 50; }
.gnphu.mo { display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; }
.gnform {
  background: var(--color-neutral-100); border-radius: var(--radius-lg); max-width: 620px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 30px; box-shadow: var(--shadow-lg);
}
