/*
 * Tokens visuais compartilhados do SNC.
 * Este arquivo não estiliza componentes nem telas: a apresentação fica nas
 * classes Tailwind dos componentes Blade.
 */
:root {
  color-scheme: light;
  --snc-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --snc-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --snc-canvas: #F5F7FB;
  --snc-surface: #FFFFFF;
  --snc-surface-2: #F8FAFC;
  --snc-text: #172033;
  --snc-muted: #667085;
  --snc-subtle: #7A8699;
  --snc-placeholder: #98A2B3;
  --snc-border: #E3E8EF;
  --snc-border-strong: #CBD3DF;
  --snc-border-hover: #B6C0CE;
  --snc-primary: #2563EB;
  --snc-primary-hover: #1D4ED8;
  --snc-primary-soft: #EFF6FF;
  --snc-on-primary: #FFFFFF;
  --snc-on-danger: #FFFFFF;
  --snc-success: #15803D;
  --snc-success-soft: #DCFCE7;
  --snc-warning: #B45309;
  --snc-warning-soft: #FEF3C7;
  --snc-danger: #B91C1C;
  --snc-danger-soft: #FEE2E2;
  --snc-info: #0369A1;
  --snc-info-soft: #E0F2FE;
  --snc-focus: #2563EB;
  --snc-accent: #2563EB;
  --snc-login-background-start: var(--snc-primary);
  --snc-login-background-end: color-mix(in srgb, var(--snc-accent) 70%, var(--snc-primary));
  --snc-login-overlay: var(--snc-primary);
  --snc-login-on-image: #FFFFFF;
  --snc-code-bg: #0B1220;
  --snc-code-text: #DBEAFE;
  --snc-control: #F5F7FB;
  --snc-hover: #F1F5F9;
  --snc-elevated: #FFFFFF;
  --snc-env-bg: #FFE9B5;
  --snc-env-border: #E7C16D;
  --snc-env-text: #6F4808;
  --snc-env-icon: #9C6508;
  --snc-shadow-rgb: 15 23 42;
  --snc-shadow-soft: 0 1px 2px rgb(var(--snc-shadow-rgb) / .05);
  --snc-shadow-lift: 0 16px 40px rgb(var(--snc-shadow-rgb) / .14);
  --snc-overlay: rgb(7 27 54 / .55);
  --snc-chat-outgoing: #DBEAFE;
  --snc-chat-outgoing-text: #172033;
  --snc-chat-outgoing-muted: #667085;
  --snc-radius-sm: 6px;
  --snc-radius-md: 8px;
  --snc-radius: 12px;
  --snc-radius-lg: 12px;
  --snc-radius-pill: 999px;
  --snc-control-h: 36px;
  --snc-field-h: var(--snc-control-h);
  --snc-control-radius: 8px;
  --snc-control-px: 10px;
  --snc-control-px-primary: 12px;
  --snc-field-px: 12px;
  --snc-checkbox-size: 18px;
  --snc-checkbox-radius: 6px;
  --snc-topbar-h: 72px;
  --snc-banner-h: 0px;
  --snc-sidebar-w: 256px;
  --snc-sidebar-mini: 72px;
  --snc-ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --snc-canvas: #0F172A;
  --snc-surface: #172238;
  --snc-surface-2: #1E2D46;
  --snc-text: #E5EEFA;
  --snc-muted: #A9BBD3;
  --snc-subtle: #91A5C0;
  --snc-placeholder: #7D91AE;
  --snc-border: #2D4260;
  --snc-border-strong: #3C5574;
  --snc-border-hover: #4C6687;
  --snc-primary: #8AB4F8;
  --snc-primary-hover: #A5C5F9;
  --snc-primary-soft: #223B5F;
  --snc-on-primary: #0F2238;
  --snc-on-danger: #321F23;
  --snc-success: #81D6A0;
  --snc-success-soft: #2B4035;
  --snc-warning: #E7C17A;
  --snc-warning-soft: #453B2A;
  --snc-danger: #F09A9A;
  --snc-danger-soft: #49333A;
  --snc-info: #89CBE8;
  --snc-info-soft: #2D414D;
  --snc-focus: #8AB4F8;
  --snc-accent: #8AB4F8;
  --snc-login-background-start: #2A4D77;
  --snc-login-background-end: #4B75A5;
  --snc-login-overlay: #07182C;
  --snc-code-bg: #101B2D;
  --snc-code-text: #DCEBFF;
  --snc-control: #111D31;
  --snc-hover: #243650;
  --snc-elevated: #22334E;
  --snc-shadow-rgb: 0 0 0;
  --snc-overlay: rgb(0 0 0 / .6);
  --snc-chat-outgoing: #29486D;
  --snc-chat-outgoing-text: #F2F7FF;
  --snc-chat-outgoing-muted: #C1D1E6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --snc-canvas: #0F172A;
    --snc-surface: #172238;
    --snc-surface-2: #1E2D46;
    --snc-text: #E5EEFA;
    --snc-muted: #A9BBD3;
    --snc-subtle: #91A5C0;
    --snc-placeholder: #7D91AE;
    --snc-border: #2D4260;
    --snc-border-strong: #3C5574;
    --snc-border-hover: #4C6687;
    --snc-primary: #8AB4F8;
    --snc-primary-hover: #A5C5F9;
    --snc-primary-soft: #223B5F;
    --snc-on-primary: #0F2238;
    --snc-on-danger: #321F23;
    --snc-success: #81D6A0;
    --snc-success-soft: #2B4035;
    --snc-warning: #E7C17A;
    --snc-warning-soft: #453B2A;
    --snc-danger: #F09A9A;
    --snc-danger-soft: #49333A;
    --snc-info: #89CBE8;
    --snc-info-soft: #2D414D;
    --snc-focus: #8AB4F8;
    --snc-accent: #8AB4F8;
    --snc-login-background-start: #2A4D77;
    --snc-login-background-end: #4B75A5;
    --snc-login-overlay: #07182C;
    --snc-code-bg: #101B2D;
    --snc-code-text: #DCEBFF;
    --snc-control: #111D31;
    --snc-hover: #243650;
    --snc-elevated: #22334E;
    --snc-shadow-rgb: 0 0 0;
    --snc-overlay: rgb(0 0 0 / .6);
    --snc-chat-outgoing: #29486D;
    --snc-chat-outgoing-text: #F2F7FF;
    --snc-chat-outgoing-muted: #C1D1E6;
  }
}

.snc-birthday-dialog::backdrop {
  background: var(--snc-overlay);
  backdrop-filter: blur(5px);
}

.snc-birthday-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(700px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  overflow: visible;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
}

.snc-birthday-card {
  position: relative;
  isolation: isolate;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid rgb(255 255 255 / .52);
  border-radius: 28px;
  background: linear-gradient(135deg, #1769e8 0%, #1649c8 55%, #246be9 100%);
  box-shadow: 0 28px 80px rgb(8 27 70 / .38), inset 0 1px rgb(255 255 255 / .2);
}

.snc-birthday-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding: 34px 28px 26px;
  text-align: center;
}

.snc-birthday-title {
  max-width: 100%;
  color: #fff;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-shadow: 0 2px 12px rgb(9 32 91 / .24);
}

.snc-birthday-photo {
  position: relative;
  width: min(190px, 45vw);
  aspect-ratio: .92;
  margin-top: 24px;
  transform: rotate(-4deg);
  border: 9px solid #fff;
  background: #f3d9c7;
  box-shadow: 0 15px 32px rgb(5 26 80 / .35);
}

.snc-birthday-photo::before,
.snc-birthday-photo::after {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 72px;
  height: 18px;
  content: "";
  background: rgb(231 196 151 / .86);
  box-shadow: 0 2px 5px rgb(20 32 48 / .13);
  transform: translateX(-50%) rotate(3deg);
}

.snc-birthday-photo::before { top: -15px; }
.snc-birthday-photo::after { bottom: -14px; transform: translateX(-50%) rotate(-2deg); }

.snc-birthday-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.snc-birthday-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1769e8;
  background: linear-gradient(145deg, #f7fbff, #dceafe);
  font-size: 4rem;
  font-weight: 800;
}

.snc-birthday-photo-fallback[hidden] {
  display: none;
}

.snc-birthday-name {
  margin-top: 25px;
  color: #fff;
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.snc-birthday-message {
  max-width: 470px;
  margin-top: 10px;
  color: rgb(255 255 255 / .92);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.snc-birthday-footer {
  margin-top: 3px;
  color: #ffe78a;
  font-size: 13px;
  font-weight: 800;
}

.snc-birthday-actions {
  margin-top: 20px;
}

.snc-birthday-actions button {
  min-height: 38px;
  padding: 0 20px;
  border: 1px solid rgb(255 255 255 / .52);
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / .12);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.snc-birthday-actions button:hover {
  border-color: #fff;
  background: rgb(255 255 255 / .2);
}

.snc-birthday-actions button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.snc-birthday-balloons {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.snc-birthday-balloon {
  position: absolute;
  width: 82px;
  height: 104px;
  border-radius: 50% 50% 48% 48% / 45% 45% 55% 55%;
  filter: drop-shadow(0 8px 9px rgb(8 27 70 / .2));
  opacity: .92;
}

.snc-birthday-balloon::before {
  position: absolute;
  top: 18%;
  left: 21%;
  width: 23%;
  height: 37%;
  content: "";
  border-radius: 50%;
  background: rgb(255 255 255 / .42);
  filter: blur(3px);
  transform: rotate(24deg);
}

.snc-birthday-balloon::after {
  position: absolute;
  bottom: -8px;
  left: calc(50% - 5px);
  width: 10px;
  height: 12px;
  content: "";
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.snc-birthday-balloon--green { top: -14px; left: -25px; background: radial-gradient(circle at 34% 28%, #c5ff72, #43ce48 62%, #159944); transform: rotate(-16deg); }
.snc-birthday-balloon--pink { top: 7%; right: -34px; background: radial-gradient(circle at 34% 28%, #ff91e8, #e52bb5 62%, #9e1aa4); transform: rotate(18deg); }
.snc-birthday-balloon--orange { top: 43%; right: 9%; width: 65px; height: 82px; background: radial-gradient(circle at 34% 28%, #ffd77c, #ff8d22 62%, #df4c12); transform: rotate(12deg); }
.snc-birthday-balloon--red { bottom: -32px; left: -23px; width: 76px; height: 96px; background: radial-gradient(circle at 34% 28%, #ff9a86, #ed4e45 62%, #b82035); transform: rotate(14deg); }

.snc-birthday-burst {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.snc-birthday-burst > span {
  position: absolute;
  top: -12%;
  left: var(--confetti-left);
  width: var(--confetti-width);
  height: var(--confetti-height);
  border-radius: 2px;
  opacity: 0;
}

.snc-birthday-burst > span:nth-child(6n + 1) { background: #ffe46b; }
.snc-birthday-burst > span:nth-child(6n + 2) { background: #ff75c8; }
.snc-birthday-burst > span:nth-child(6n + 3) { background: #80f0dc; }
.snc-birthday-burst > span:nth-child(6n + 4) { background: #fff; }
.snc-birthday-burst > span:nth-child(6n + 5) { background: #ff9166; }
.snc-birthday-burst > span:nth-child(6n) { background: #bda4ff; }
.snc-birthday-burst > span:nth-child(5n) { border-radius: 50%; }

.snc-birthday-dialog[open] .snc-birthday-burst.is-active > span {
  animation: snc-birthday-confetti-fall var(--confetti-duration) linear infinite;
  animation-delay: var(--confetti-delay);
}

@media (max-width: 520px) {
  .snc-birthday-content { padding: 30px 20px 22px; }
  .snc-birthday-balloon { width: 58px; height: 76px; }
  .snc-birthday-balloon--orange { width: 48px; height: 62px; }
  .snc-birthday-balloon--red { width: 55px; height: 72px; }
}

@keyframes snc-birthday-confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -10%, 0) rotate(0); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--confetti-drift), 115vh, 0) rotate(var(--confetti-spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .snc-birthday-dialog[open] .snc-birthday-burst.is-active > span { animation: none; }
}
