/* Roleta Premiada Santer — sistema visual compartilhado (Liquid Glass + identidade Santer) */

@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-ext-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-ext-italic.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Uicons by Flaticon — https://www.flaticon.com/uicons */
@font-face { font-family: 'uicons-rr'; src: url(uicons/uicons-regular-rounded.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'uicons-sr'; src: url(uicons/uicons-solid-rounded.woff2) format('woff2'); font-display: block; }

:root {
  --navy: #1B2D4B;
  --navy-700: #22385C;
  --navy-900: #0F1C31;
  --blue: #0A6CFF;
  --blue-600: #005BE0;
  --blue-300: #6FA8FF;
  --blue-100: #E6F0FF;
  --ink: var(--navy);
  --ink-2: #4A5A72;
  --muted: #7C8799;
  --line: rgba(27, 45, 75, .09);
  --surface: #F3F5F8;
  --danger: #D92D3A;
  --success: #0E9F6E;
  --warning: #C77700;
  --orange: #F97316;

  /* Liquid Glass */
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,.78) 0%, rgba(240,243,248,.62) 55%, rgba(233,237,244,.58) 100%);
  --glass-blur: blur(28px) saturate(170%);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.95) inset, 0 -1px 0 rgba(27,45,75,.04) inset, 0 0 0 1px rgba(27,45,75,.06),
    0 24px 60px -24px rgba(27,45,75,.28), 0 8px 18px -10px rgba(27,45,75,.12);
  --tile: rgba(27, 45, 75, .045);
  --tile-hover: rgba(27, 45, 75, .07);

  --r-xl: clamp(28px, 2.6vw, 52px);
  --r-lg: clamp(16px, 1.25vw, 24px);
  --r-md: 14px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  /* Molas: --spring = amortecimento 1.0, resposta .42s (~617ms); --spring-bouncy = amortecimento .72, resposta .5s (~800ms). Geradas por motion.js */
  --spring: cubic-bezier(.2, .9, .25, 1);
  --spring-bouncy: cubic-bezier(.34, 1.36, .64, 1);

  color-scheme: light;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.0228, 0.0787, 0.153, 0.2358, 0.3204, 0.4026, 0.4797, 0.5504, 0.6141, 0.6706, 0.7202, 0.7633, 0.8006, 0.8325, 0.8598, 0.8829, 0.9024, 0.9189, 0.9327, 0.9443, 0.9539, 0.962, 0.9687, 0.9742, 0.9788, 0.9826, 0.9857, 0.9883, 0.9904, 0.9922, 0.9936, 0.9948, 0.9957, 0.9965, 0.9972, 0.9977, 0.9981, 0.9985, 0.9988, 1);
    --spring-bouncy: linear(0, 0.0148, 0.0541, 0.1112, 0.1805, 0.2573, 0.3375, 0.4183, 0.4971, 0.5723, 0.6424, 0.7067, 0.7646, 0.816, 0.8609, 0.8995, 0.9322, 0.9594, 0.9815, 0.9991, 1.0127, 1.0228, 1.03, 1.0347, 1.0374, 1.0384, 1.0381, 1.0367, 1.0347, 1.0321, 1.0292, 1.0261, 1.023, 1.02, 1.017, 1.0143, 1.0118, 1.0095, 1.0075, 1.0057, 1.0042, 1.0029, 1.0018, 1.0009, 1.0002, 0.9996, 0.9992, 0.9989, 0.9987, 0.9986, 0.9985, 0.9985, 0.9986, 0.9986, 0.9987, 0.9989, 1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink); background: #fff; font-size: 1rem; line-height: 1.5; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; display: block; }
a.btn { text-decoration: none; }
.avatar-sm { width: clamp(38px, 2.6vw, 52px); height: clamp(38px, 2.6vw, 52px); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, #2A4470, var(--navy)); color: #fff; font-weight: 700; font-size: clamp(13px, .85vw, 17px); letter-spacing: .02em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--blue) 22%, transparent); }

/* Ícones Flaticon (glifo de fonte) */
.fi { font-family: 'uicons-rr'; font-style: normal; font-weight: 400 !important; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; speak: never; -webkit-font-smoothing: antialiased; flex: none; }
.fi.fi-s { font-family: 'uicons-sr'; }

/* ---------- Superfícies de vidro ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-xl);
}
/* Reflexo especular: brilho fino no topo e luz difusa no canto */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(120% 60% at 10% 0%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 30%);
  opacity: .7;
}
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px; background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.2) 40%, rgba(27,45,75,.08) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Ambiente atrás do vidro: luz azul suave, sem movimento contínuo */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #fff; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.ambient i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: 12vh; background: radial-gradient(circle, rgba(10,108,255,.22), transparent 65%); }
.ambient i:nth-child(2) { width: 38vw; height: 38vw; left: 22vw; bottom: -18vw; background: radial-gradient(circle, rgba(27,45,75,.16), transparent 65%); }
.ambient i:nth-child(3) { width: 30vw; height: 30vw; right: -8vw; top: -10vw; background: radial-gradient(circle, rgba(111,168,255,.2), transparent 65%); }

/* ---------- Botões ---------- */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h); padding: 0 1.5em; border: 0; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; letter-spacing: .01em; white-space: nowrap; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms, box-shadow 200ms, opacity 200ms, color 200ms;
}
.btn:active:not(:disabled) { transform: scale(.965); transition-duration: 80ms; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .fi { font-size: 1.05em; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px -12px rgba(27,45,75,.7), 0 1px 0 rgba(255,255,255,.18) inset; }
.btn-primary:hover:not(:disabled) { background: var(--navy-700); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 12px 28px -12px rgba(10,108,255,.75), 0 1px 0 rgba(255,255,255,.3) inset; }
.btn-blue:hover:not(:disabled) { background: var(--blue-600); }
.btn-soft { background: rgba(27,45,75,.08); color: var(--ink); }
.btn-soft:hover:not(:disabled) { background: rgba(27,45,75,.12); }
.btn-muted { background: #D5D8DE; color: #fff; }
.btn-muted:hover:not(:disabled) { background: #C6CAD2; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(27,45,75,.06); color: var(--ink); }
.btn-danger { background: rgba(217,45,58,.1); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(217,45,58,.16); }
.btn-sm { --h: 38px; padding: 0 1em; font-size: .875rem; }
.btn-icon { --h: 44px; width: var(--h); padding: 0; }
.btn-icon.btn-sm { width: 38px; }

/* ---------- Campos ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: .78rem; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(27,45,75,.12);
  background: rgba(255,255,255,.75); outline: none; transition: border-color 160ms, box-shadow 160ms, background 160ms; font-size: .95rem;
}
textarea.input { padding: 12px 16px; min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10,108,255,.14); background: #fff; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(217,45,58,.12); }
select.input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 10px; pointer-events: none; width: min(92vw, 520px); }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 18px; color: #fff; font-weight: 500; font-size: .92rem;
  background: rgba(15,28,49,.86); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 40px -18px rgba(15,28,49,.6); animation: toast-in 600ms var(--spring) both; }
.toast.out { animation: toast-out 220ms var(--ease-out) both; }
.toast .fi { font-size: 1.15rem; }
.toast.error .fi { color: #FF8A93; } .toast.success .fi { color: #5BE3AE; } .toast.info .fi { color: var(--blue-300); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- Diálogo (sheet de vidro) ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px;
  background: rgba(15,28,49,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in 220ms var(--ease-out) both; }
.dialog-backdrop.closing { animation: fade-out 200ms var(--ease-out) both; }
.dialog { width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: clamp(22px, 3vw, 36px); border-radius: 32px;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 40px 90px -30px rgba(15,28,49,.5), 0 0 0 1px rgba(255,255,255,.6) inset; animation: sheet-in 600ms var(--spring) both; }
.dialog-backdrop.closing .dialog { animation: sheet-out 200ms var(--ease-out) both; }
.dialog h2 { margin: 0 0 6px; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.2; }
.dialog p.lead { margin: 0 0 22px; color: var(--ink-2); font-size: .95rem; }
.dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Acessibilidade: preferências do sistema ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .dialog, .toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: #F2F4F7; }
  .toast { background: var(--navy-900); }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #26364F; --muted: #3E4C63; --line: rgba(27,45,75,.3); }
  .glass { background: #fff; box-shadow: 0 0 0 2px var(--navy); }
  .btn-muted { background: #8D96A5; }
}
