/* Design tokens — alinhados ao design system do Super Admin Panel.
   Paleta Nunito + verdes, com --primary override por case theme.
   Mantém ambos os esquemas de nomes (v2 + super admin) para os componentes. */
:root {
  color-scheme: light;

  /* Primary (case theme; default = verde super admin) */
  --primary: #007a50;
  --primary-dark: #006442;
  --primary-soft: #dff5ed;
  --primary-contrast: #ffffff;

  /* Super admin aliases (mesmo nome, mesma cor) */
  --green: #007a50;
  --green-dark: #006442;
  --green-soft: #dff5ed;
  --admin-primary: var(--primary);
  --admin-primary-dark: var(--primary-dark);
  --admin-primary-soft: var(--primary-soft);

  /* Surfaces */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #fafafd;
  --surface-2: #fafafd;

  /* Texto */
  --ink: #2d2b38;
  --text: #2d2b38;
  --muted: #6f6d7b;
  --text-muted: #5f5d6b;
  --text-soft: #6f6d7b;
  --grey: #6f6d7b;
  --grey-dark: #565461;

  /* Linhas */
  --line: #ecebf1;
  --border: #ecebf1;
  --border-strong: #d8d6df;

  /* Estados */
  --ok: #007a50;
  --ok-soft: #dff5ed;
  --warn: #c98a00;
  --warn-soft: #fff4d4;
  --danger: #b62f3b;
  --danger-soft: #ffe8e7;
  --info: #246b91;
  --info-soft: #dff1fb;
  --blue: #246b91;
  --blue-soft: #dff1fb;
  --red: #b62f3b;
  --red-soft: #ffe8e7;
  --yellow: #ffbf24;
  --yellow-soft: #fff4d4;
  --violet: #5b5874;

  /* Status marcações */
  --status-pending: #c98a00;
  --status-confirmed: #246b91;
  --status-completed: #007a50;
  --status-cancelled: #6f6d7b;
  --status-no_show: #b62f3b;

  /* Raios */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 18px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(63, 61, 86, 0.06);
  --shadow: 0 2px 8px rgba(63, 61, 86, 0.06);
  --shadow-lg: 0 18px 50px rgba(63, 61, 86, 0.16);

  /* Layout — fluido com clamp() */
  --sidebar: clamp(220px, 17vw, 246px);
  --sidebar-collapsed: 78px;
  --topbar-h: 84px;

  /* Tipografia */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Espaçamentos fluidos */
  --space-xs: clamp(6px, 0.4vw, 8px);
  --space-sm: clamp(10px, 0.7vw, 14px);
  --space-md: clamp(14px, 1vw, 20px);
  --space-lg: clamp(18px, 1.4vw, 28px);
  --space-xl: clamp(24px, 2vw, 40px);
  --pad-x: clamp(16px, 2.4vw, 32px);
  --pad-y: clamp(16px, 1.6vw, 28px);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(13px, 0.18vw + 12.6px, 15px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.sidebar-locked,
body.modal-open { overflow: hidden; }

button { font-family: inherit; cursor: pointer; border: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--primary); text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font); letter-spacing: -0.02em; color: var(--ink); }

button:disabled,
input:disabled,
select:disabled,
textarea:disabled { cursor: not-allowed; opacity: 0.55; }

:where(button, a, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 72%, #fff);
  outline-offset: 2px;
}

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