/* ==========================================================================
   Bookinguz Design System — tokens, base, components
   Tokens and base components for the dashboard.
   ========================================================================== */

:root {
  /* ── Brand: ocean blue (actions, links, focus) ── */
  --brand-50: #eef4ff;
  --brand-100: #dbe6ff;
  --brand-200: #bccfff;
  --brand-300: #8eadfd;
  --brand-400: #5d86f6;
  --brand-500: #3a66ec;
  --brand-600: #2450d4;
  --brand-700: #1d40ab;
  --brand-800: #1c3787;
  --brand-900: #1a2f6a;
  --brand-950: #0e1a40;

  /* ── Accent: sunset (deals, highlights — never body text on white) ── */
  --accent-50: #fff6ed;
  --accent-100: #ffead4;
  --accent-200: #ffd0a8;
  --accent-400: #ff9a4a;
  --accent-500: #fb7d1c;
  --accent-600: #e06208;
  --accent-700: #b84a0a;

  /* ── Neutrals (slate, slightly cool) ── */
  --ink-950: #070d1c;
  --ink-900: #0d1528;
  --ink-800: #1b2439;
  --ink-700: #323d55;
  --ink-600: #4a5670;
  --ink-500: #67728a;
  --ink-400: #97a0b3;
  --ink-300: #c6ccd8;
  --ink-200: #e2e6ee;
  --ink-100: #eef1f6;
  --ink-50: #f6f8fb;
  --white: #ffffff;

  /* ── Semantic ── */
  --success-50: #e9f8ef;  --success-600: #12924a;
  --warning-50: #fff7e0;  --warning-600: #b77900;
  --danger-50: #fdecec;   --danger-600: #d93a3f;

  /* ── Roles ── */
  --bg: var(--white);
  --bg-subtle: var(--ink-50);
  --surface: var(--white);
  --text: var(--ink-900);
  --text-2: var(--ink-600);
  --text-3: var(--ink-500);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);
  --primary: var(--brand-600);
  --primary-hover: var(--brand-700);
  --focus: 0 0 0 3px rgb(58 102 236 / .35);

  /* ── Typography ── */
  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .8125rem;   /* 13 */
  --fs-sm: .875rem;    /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-md: 1.125rem;   /* 18 */
  --fs-lg: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.65;

  /* ── Space (4px grid) ── */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1200px;

  /* ── Shape & depth ── */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px; --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgb(13 21 40 / .06);
  --shadow-sm: 0 1px 3px rgb(13 21 40 / .08), 0 1px 2px rgb(13 21 40 / .04);
  --shadow-md: 0 6px 16px -4px rgb(13 21 40 / .10), 0 2px 6px -2px rgb(13 21 40 / .06);
  --shadow-lg: 0 18px 40px -12px rgb(13 21 40 / .18), 0 6px 14px -6px rgb(13 21 40 / .08);
  --shadow-xl: 0 32px 64px -20px rgb(13 21 40 / .28);
  --shadow-brand: 0 10px 24px -8px rgb(36 80 212 / .55);

  /* ── Motion ── */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 450ms;

  --z-header: 100; --z-overlay: 1000; --z-chat: 1100; --z-toast: 1200;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-body);
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); letter-spacing: -.02em; font-weight: 800; color: var(--text); }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--brand-100); color: var(--brand-900); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 1em; height: 1em; }

/* ── Buttons ── */
.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--btn-h); padding-inline: 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--fs-base); line-height: 1; white-space: nowrap;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out),
              background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  user-select: none;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { width: 18px; height: 18px; transition: transform var(--t-base) var(--ease-out); }
.btn:hover .icon-move { transform: translateX(3px); }
.btn-sm { --btn-h: 40px; padding-inline: 16px; font-size: var(--fs-sm); }
.btn-lg { --btn-h: 56px; padding-inline: 28px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgb(36 80 212 / .6); }
.btn-secondary { background: var(--white); color: var(--ink-900); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-icon { --btn-h: 44px; width: var(--btn-h); padding: 0; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ── Chips / badges ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--white); color: var(--ink-700); font-weight: 600; font-size: var(--fs-sm);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--brand-300); color: var(--brand-700); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: var(--white); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding-inline: 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge-neutral { background: var(--ink-100); color: var(--ink-700); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.badge-accent { background: var(--accent-100); color: var(--accent-700); }
.badge-success { background: var(--success-50); color: var(--success-600); }
.badge-warning { background: var(--warning-50); color: var(--warning-600); }
.badge-danger { background: var(--danger-50); color: var(--danger-600); }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding-inline: 14px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--white); color: var(--text); font-size: var(--fs-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { height: auto; padding-block: 12px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2367728a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--focus); }

/* ── Card ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-xs); }

/* ── Skeleton ── */
.skeleton { background: linear-gradient(90deg, var(--ink-100) 0%, var(--ink-50) 50%, var(--ink-100) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
