/* Petek Pastanesi — shared design system (website, guest app, panel). */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --green-900: #1f3428;
  --green-800: #2a4535;
  --green-700: #2f4a3a;   /* primary brand green */
  --green-600: #3d5c49;
  --green-100: #e6efe8;
  --green-50:  #f1f6f2;
  /* brand burgundy, sampled from the Petek Pastaneleri logo (variable names kept for compatibility) */
  --rose-600: #6f1231;
  --rose-500: #8c1d40;    /* primary action */
  --rose-100: #f5dde4;
  --rose-50:  #fbf1f4;
  --brand: #8c1d40;
  --cream-300: #e5d3b5;
  --cream-200: #efe3cf;
  --cream-100: #f7f0e4;
  --wood: #d8c09a;
  --gold: #c9a14a;
  --amber-100: #fdf0d9; --amber-700: #a2660b;
  --blue-100: #e3edfb;  --blue-700: #2f5fa8;
  --red-100: #fde4e1;   --red-700: #b3362a;
  --ink: #1d2a24;
  --ink-2: #4c5a53;
  --ink-3: #7b8781;
  --line: #e4e8e4;
  --bg: #f5f7f5;
  --surface: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,40,30,.06), 0 4px 16px rgba(20,40,30,.06);
  --shadow-lg: 0 10px 40px rgba(20,40,30,.14);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--rose-500) 60%, white); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; background: var(--surface); color: var(--ink); border-color: var(--line);
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: #cfd6d1; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--rose-500); color: #fff; border-color: var(--rose-500); }
.btn-primary:hover { background: var(--rose-600); border-color: var(--rose-600); }
.btn-green { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.btn-green:hover { background: var(--green-800); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-round { border-radius: 999px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* forms */
label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field { display: grid; gap: 6px; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid #d9dfdb; border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--rose-500); box-shadow: 0 0 0 3px var(--rose-100); }
textarea.input { resize: vertical; min-height: 80px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { accent-color: var(--rose-500); width: 16px; height: 16px; }

/* chips / segmented choices */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"], .chip.active { background: var(--rose-50); border-color: var(--rose-500); color: var(--rose-600); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { padding: 9px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--green-50); color: var(--green-700); white-space: nowrap; }
.badge-rose { background: var(--rose-100); color: var(--rose-600); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-red { background: var(--red-100); color: var(--red-700); }
.badge-gray { background: #eef0ef; color: var(--ink-2); }
.badge-sample { background: var(--amber-100); color: var(--amber-700); font-weight: 600; }
.allergen { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }

/* toast */
.toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; animation: toast-in .2s ease-out; pointer-events: auto; }
.toast.error { background: var(--red-700); }
.toast.ok { background: var(--green-700); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* dialog */
dialog { border: none; border-radius: 18px; padding: 0; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); }
dialog::backdrop { background: rgba(20,32,26,.45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.dialog-body { padding: 10px 20px 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }

/* skeleton / states */
.skeleton { background: linear-gradient(90deg, #eef1ee 25%, #f6f8f6 50%, #eef1ee 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-3); }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 12px; background: var(--green-50); color: var(--green-700); }

/* plate illustrations */
.plate { position: relative; overflow: hidden; border-radius: 12px; background: var(--cream-200); aspect-ratio: 1; }
.plate svg { width: 100%; height: 100%; }
.thumb { width: 52px; height: 52px; border-radius: 12px; flex: none; overflow: hidden; }
.thumb svg { width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
