:root {
  --bg: #f3f8ff;
  --surface: #ffffff;
  --surface-alt: #eef5ff;
  --surface-strong: #dceaff;
  --border: rgba(24, 88, 164, 0.14);
  --text: #000000;
  --text-muted: #6882a4;
  --primary: #1D9CE9;
  --primary-strong: #0C659E;
  --accent: #FFCD33;
  --success: #84AF21;
  --danger: #FF6467;
  --shadow: 0 24px 70px rgba(29, 71, 133, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, #f6fbff 0%, #edf5ff 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", sans-serif;
}

@layer base {
  a {
    color: inherit;
    text-decoration: none;
  }
}

.auth-body {
  background:
    radial-gradient(circle at top left, rgba(29, 156, 233, 0.32), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 212, 91, 0.28), transparent 25%),
    linear-gradient(135deg, #e7f3ff 0%, #f8fbff 45%, #edf5ff 100%);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.app-body {
  background:
    radial-gradient(circle at top left, rgba(29, 156, 233, 0.12), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);

  /* The app shell (sidebar + .app-content) is its own fixed-height, self-contained
     layout — <main> is the only element meant to scroll. Locking the document itself
     prevents any stray content from leaking a second, page-level scrollbar. */
  height: 100vh;
  overflow: hidden;
}

:root {
  --primary-blue: #1D9CE9;
  --primary-blue-hover: #1789D4;
  --border-gray: #E0E6ED;
  --text-gray: #6C6C6C;
  --bg-faint: #F8F8F8;
}

.icon-masked {
  display: block;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: currentColor;
}

/* No centred modals (20/10/2026, QA F19/F-D06): every overlay drawn with
   .modal-base-container / .modal-content-card is a SIDE SHEET — anchored on
   the right, full height, sliding in right → left over a dimmed page, full
   width on the phone. Shown/hidden through lib/sheet_panel.js (which adds
   the in-sheet "Descartar as alterações?"). The width caps of the partials
   (max-w-*) still apply, up to the drawer's 560 px. */
.modal-base-container {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 65; /* over a drawer (.ui-drawer, z 60) it was opened from */
  background-color: rgba(28, 39, 51, 0.35);
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  overflow: hidden;
}

.modal-content-card {
  background-color: white;
  border-radius: 0;
  width: 100% !important;
  max-width: min(560px, 100%);
  height: 100%;
  max-height: 100dvh !important;
  margin: 0 !important;
  box-shadow: -12px 0 32px rgba(28, 39, 51, 0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: sheet-panel-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes sheet-panel-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-content-card { animation: none; }
}

/* The unsaved-changes question at the bottom of the sheet (lib/sheet_panel). */
.sheet-panel__leave {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #fff6e5;
  border-top: 1px solid #f3d9a4;
  font-family: Inter, sans-serif;
  z-index: 2;
}
.sheet-panel__leave-text { display: flex; flex-direction: column; gap: 2px; color: #262626; }
.sheet-panel__leave-text small { color: #6a7282; font-size: 13px; }
.sheet-panel__leave-actions { display: flex; gap: 8px; }

.modal-body-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-body-scroll::-webkit-scrollbar,
.modal-content-card::-webkit-scrollbar {
  width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-track,
.modal-content-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.modal-body-scroll::-webkit-scrollbar-thumb,
.modal-content-card::-webkit-scrollbar-thumb {
  background: #D0D5E1;
  border-radius: 10px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover,
.modal-content-card::-webkit-scrollbar-thumb:hover {
  background: #A0AABF;
}

.cropper-overlay-lens {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.sidebar-brand,
.sidebar-nav,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  /* 12 px below + the nav's 8 px top padding = the original 20 px gap. */
  padding: 10px 0 12px 24px;
  min-height: 70px;
  flex-shrink: 0;
}

/* The sidebar is exactly one viewport tall (no scroll), so on short screens
   (1366x768, 1280x720 minus the browser chrome) the logo, links and footer
   shrink with the viewport height instead of pushing Configurações/profile
   below the fold. */
.sidebar-logo {
  width: auto;
  max-width: min(125px, 82%);
  height: auto;
  max-height: clamp(44px, 8vh, 123px);
  object-fit: contain;
  transition: width 0.3s ease;
}

.sidebar-toggle {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: white;
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.sidebar-toggle:hover {
  opacity: 0.8;
}

.sidebar-toggle__icon {
  width: 24px;
  height: 24px;
}

/* The sidebar is exactly one screen tall: brand on top, footer (Suporte,
   Configurações, the user's photo and name) pinned at the bottom, and the
   menu in between scrolling on its own — with no visible scrollbar — when
   its items don't fit (short notebook screens, Financeiro open). Before, the
   menu kept its full height and pushed the footer out of the screen. The
   8 px vertical padding keeps the active item's shadow out of the clip. */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 8px 14px;
  gap: 12px;
  align-items: center;
  transition: padding 0.3s ease;
  /* Last resort when even the shrunk links don't fit: the link list scrolls
     on its own and the footer stays pinned to the bottom. */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav > * {
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 212px;
  height: clamp(34px, 5.6vh, 55px);
  flex-shrink: 0;
  padding: 0 14px;
  border-radius: 20px;
  color: #ffffff;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}


.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-link.is-active {
  background: #ffffff;
  color: #1a8dd6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-link__icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.sidebar-link__text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: normal;
  white-space: nowrap;
  /* Cede espaço (com reticências) antes de deixar o rótulo ou o badge de
     notificações estourarem o overflow-hidden da sidebar. */
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Below 1467px the sidebar column is clamped under 220px; 16px labels don't
   fit 190px next to the notifications badge, so shrink them a notch. */
@media (max-width: 1466px) {
  .sidebar-link__text {
    font-size: 14px;
  }
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  /* 12 px + the nav's 8 px bottom padding = the original 20 px gap. */
  padding: 12px 24px 40px;
  gap: 20px;
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-support {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.sidebar-support:hover {
  opacity: 1;
}

.sidebar-support__text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: normal;
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.sidebar-support .sidebar-link__icon {
  width: 14px;
  height: 14px;
  background-color: #ffffff;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile__link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
  flex: 1;
  min-width: 0;
}

.sidebar-profile__link:hover {
  opacity: 0.8;
}

.sidebar-profile__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile__exit {
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.sidebar-profile__exit .sidebar-link__icon {
  width: 18px;
  height: 18px;
  background-color: #ffffff;
}


/* Short desktop screens (notebooks of 768 px or less, minus the browser's
   bars): the same sidebar, a notch smaller — logo, item height and the
   footer's spacing — so the whole menu and the user block fit without
   looking oversized. 1440×900 and taller screens keep the original sizes. */
@media (min-width: 64rem) and (max-height: 820px) {
  .sidebar-brand {
    padding: 8px 0 6px 20px;
    min-height: 56px;
  }

  .sidebar-logo {
    width: min(100px, 70%);
  }

  .sidebar-nav {
    padding: 6px 12px;
    gap: 6px;
  }

  .sidebar-link {
    height: 44px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .sidebar-link__icon {
    width: 22px;
    height: 22px;
  }

  .sidebar-footer {
    padding: 10px 20px 20px;
    gap: 12px;
  }

  .sidebar-support__text {
    font-size: 14px;
  }

  .sidebar-profile {
    padding-top: 8px;
  }

  .sidebar-profile__avatar {
    width: 36px;
    height: 36px;
  }
}

/* Notebook widths (1024–1365 px): the sidebar is 190 px, so the user's name
   wraps to a second line instead of being cut to "Ana Ma…". */
@media (min-width: 64rem) and (max-width: 1365.98px) {
  .sidebar-profile__name {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
}

/* ── Utilitários simples ────────────────────────────────────────────────── */
.page-stack {
  display: grid;
  gap: 24px;
}

body.no-scroll {
  overflow: hidden;
}

.text-link {
  color: var(--primary-strong);
  font-weight: 800;
}

@media (max-width: 1023.98px) {

  .app-main__content,
  .hero-card {
    padding: 22px;
  }

  .hero-card,
  .panel-card__header {
    position: relative;
  }
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container {
  display: none !important;
  -webkit-appearance: none;
}

.custom-select-container {
  position: relative;
  display: inline-block;
}

.custom-select-trigger {
  text-align: left;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236C6C6C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px !important;
  cursor: pointer;
}

.custom-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #ffffff;
  padding: 8px 0;
  list-style: none;
  z-index: 50;
  overflow-y: auto;
  box-sizing: border-box;
  width: 100%;
  max-height: 113px;
  border-radius: 20px;
  border: 1px solid #D0D5E1;
  box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.09);
}

.custom-select-menu::-webkit-scrollbar {
  width: 6px;
}

.custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: #D0D5E1;
  border-radius: 10px;
}

.custom-select-menu::-webkit-scrollbar-thumb:hover {
  background: #A0AABF;
}

.custom-select-option {
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #333333;
  transition: background-color 0.15s ease;
}

.custom-select-option:hover {
  background-color: #f0f4f8;
}

.custom-select-option.selected {
  font-weight: 700;
  background-color: rgba(29, 156, 233, 0.05);
}

.field-error-message {
  color: #D62514;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.criteria-item {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.criteria-item--fail {
  color: #D62514;
}

.criteria-item--pass {
  color: #84AF21;
}

.criteria-item--neutral {
  color: #6C6C6C;
}

.criteria-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #333333;
  margin-right: 4px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--inline {
  align-items: center;
  grid-template-columns: auto 1fr;
}

.field label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field select,
.field textarea {
  background: #fbfdff;
  border: 1px solid rgba(24, 88, 164, 0.14);
  border-radius: 16px;
  color: var(--text);
  min-height: 52px;
  padding: 14px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(29, 156, 233, 0.6);
  box-shadow: 0 0 0 4px rgba(29, 156, 233, 0.12);
  outline: none;
}

.field__hint {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.field__checkbox {
  accent-color: var(--primary);
  height: 18px;
  width: 18px;
}

.form-errors {
  background: rgba(211, 79, 102, 0.08);
  border: 1px solid rgba(211, 79, 102, 0.18);
  border-radius: 18px;
  color: #7f2034;
  padding: 16px 18px;
  font-family: 'Inter', 'Fredoka', sans-serif;
}

.form-errors strong {
  display: block;
  margin-bottom: 10px;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.profile-edit-form .field label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 14.4px;
  line-height: 100%;
  color: #6C6C6C;
}

.error-content__emoji {
  align-self: center;
  margin-bottom: 12px;
  width: 100px;
  height: auto;
}

.error-content__emoji img {
  display: block;
  height: auto;
  width: 100%;
}

.emoji-svg-inner {
  transition: opacity 0.3s ease, fill 0.3s ease, transform 0.3s ease;
}

.show-on-error {
  opacity: 0;
}

.hide-on-error {
  opacity: 1;
}

.emoji-error .show-on-error {
  opacity: 1;
}

.emoji-error .hide-on-error {
  opacity: 0;
}

.emoji-error .eyelid-fill {
  fill: #F8ACA4 !important;
}

.emoji-error .tear-fill {
  fill: #1D9CE9 !important;
}

.hidden-eye-element {
  opacity: 0;
  transition: opacity 0.1s ease;
}

.open-eye-element {
  opacity: 1;
  transition: opacity 0.1s ease;
}

.emoji-hidden .open-eye-element {
  opacity: 0;
}

.emoji-hidden .hidden-eye-element {
  opacity: 1;
}

.limbs {
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cable-main {
  stroke-width: 3;
  stroke-linecap: round;
}

.cable-fray {
  stroke-width: 0.5;
  stroke-linecap: round;
  fill: none;
}

@keyframes elastic {
  50% {
    transform: translateX(1px) translateY(1px);
  }
}