/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface2: #f9fafb;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --text: #111827;
  --text2: #4b5563;
  --text3: #9ca3af;
  /* Cores da Paleta Viewgo */
  --primary: #7f23fe;
  /* Roxo violeta principal da logo */
  --primary-lt: #f1e9fe;
  /* Roxo bem claro para fundos e hover suave */
  --primary-dk: #7719fc;
  /* Roxo escuro para estados ativos ou contraste alto */
  --danger: #ef4444;
  --danger-lt: #fee2e2;
  --green: #16a34a;
  --green-lt: #dcfce7;
  --red: #dc2626;
  --red-lt: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow: 0 4px 16px rgba(0, 0, 0, .1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .15);
  --radius: 5px;
  --radius-sm: 5px;
  --radius-lg: 5px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --keyboard-h: 0px;
  /* Será atualizada via JS */
}

html,
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

input,
button,
textarea,
select {
  font-family: inherit;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 0;
  user-select: none;
  cursor: pointer;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* ===== LOGIN ===== */
#login-screen {
  background: #ffffff;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.login-wrap {
  width: 100%;
  max-width: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));

}

.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
  text-align: center;
  transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background-image: url('./estudante.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

}

/* Auth Stepper Styles */
.auth-step-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.auth-step-wrapper {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.auth-step {
  flex: 0 0 100%;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
}

.field-group {
  margin-bottom: 12px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.auth-nav {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 5px;
}






@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.login-title {
  font-size: 30px;

  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 1rem;
  color: var(--text2);
  color: white;
  opacity: 0.7;
  max-width: 85% !important;
}

#event-form {
  max-width: 600px;
}

.modal-body.modal-scroll {
  justify-content: center !important;
  align-items: center !important;
}

.login-footer {
  background: var(--surface);
  border-radius: 5px 5px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
  padding: 20px;
  width: 100%;
  border: 1px solid var(--border);
  border-bottom: none;
  transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center !important;
  align-items: center !important;
}



.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
}

.login-hint {
  font-size: .75rem;
  color: var(--text3);
  text-align: center;
  margin-top: 16px;

}

/* Ajuste nos inputs para mobile premium */
.login-footer .field-input {
  background: #f9fafb;
  border: 1.5px solid #f3f4f6;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 5px;
}

.login-footer .field-label {
  font-size: 0.85rem;
  margin-left: 4px;
  color: var(--text);
  margin-bottom: 8px;
}

/* New Auth Utilities */
.hidden {
  display: none !important;
}


/* ===== RECOVERY SCREEN ===== */
#recovery-area {
  animation: recoverySlidIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  width: 100%;
}

@keyframes recoverySlidIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Icon area */
.recovery-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.recovery-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-lt), #f2e7c4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: iconPulse 3s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(146, 122, 78, 0.3);
}

@keyframes iconPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(146, 122, 78, 0.25);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(146, 122, 78, 0);
  }
}

.recovery-icon-symbol {
  font-size: 34px;
  color: var(--primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 40;
}

/* Header */
.recovery-header {
  text-align: center;
  margin-bottom: 20px;
}

.recovery-title {

  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  text-align: center;
}

.recovery-subtitle {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
  text-align: center;
}

/* Input with icon */
.recovery-input-wrap {
  position: relative;
}

.recovery-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text3);
  pointer-events: none;
}

.recovery-field-input {
  padding-left: 44px !important;
}

/* Send button */
.recovery-send-btn {
  height: 46px;
  border-radius: 5px;
  justify-content: center;
  font-size: 0.92rem;
  gap: 8px;
  margin-top: 4px;
}

/* Security tips */
.recovery-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 12px 14px;
  margin-top: 16px;
}

.recovery-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  padding: 12px 14px;
  margin-top: 16px;
}

.recovery-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text2);

}

.recovery-tip .material-symbols-outlined {
  font-size: 16px;
  color: var(--text3);
  flex-shrink: 0;
}

.recovery-info-box .recovery-tip .material-symbols-outlined {
  color: #16a34a;
}

/* Back button */
.recovery-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;

  color: var(--text3);
  padding: 8px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.recovery-back-btn:hover {
  color: var(--primary);
  background: var(--primary-lt);
}

/* Success state */
.recovery-success-anim {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
  position: relative;
}

.recovery-success-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  z-index: 1;
}

.recovery-success-ripple {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.2);
  animation: successRipple 1.2s ease-out 0.3s both;
}

@keyframes successPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes successRipple {
  from {
    transform: scale(1);
    opacity: 0.6;
  }

  to {
    transform: scale(2.2);
    opacity: 0;
  }
}

.recovery-success-icon {
  font-size: 38px;
  color: #16a34a;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 40;
}

/* Countdown / Resend */
.recovery-countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text3);

}

.recovery-countdown-num {

  color: var(--primary);
  font-size: 0.88rem;
}

.recovery-resend-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.recovery-resend-text {
  font-size: 0.82rem;
  color: var(--text2);

}

.recovery-resend-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;

  color: var(--primary);
  padding: 4px 8px;
  border-radius: 5px;
  transition: background 0.2s;
}

.recovery-resend-btn:hover {
  background: var(--primary-lt);
}




/* ===== FORGOT PASSWORD BUTTON ===== */
.forgot-pass-wrap {
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.forgot-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.forgot-separator span:first-child,
.forgot-separator span:last-child {
  flex: 1;
  height: 1px;
  background: var(--border);
  display: block;
}

.forgot-separator-text {
  font-size: 0.72rem;
  color: var(--text3);

  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 0;
  white-space: nowrap;
}

.forgot-pass-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 1.5px dashed var(--border2);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;

  color: var(--text2);
  transition: all 0.2s ease;
}

.forgot-pass-btn:hover {
  background: var(--primary-lt);
  border-color: var(--primary);
  color: var(--primary);
  border-style: solid;
}

.forgot-pass-btn:active {
  transform: scale(0.98);
}

.forgot-pass-btn .material-symbols-outlined {
  font-size: 15px;
}

/* Hide forgot button in register mode */
#login-form.register-mode #forgot-pass-wrap {
  display: none;
}

#group-name,
#group-confirm,
#recaptcha-container {
  animation: slideDownFade 0.3s ease both;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ===== SIDE MENU ===== */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  height: 100vh;
  background: var(--surface);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: env(safe-area-inset-top, 0px);
}

.side-menu.active {
  transform: translateX(0);
}

.side-menu-header {
  padding: 16px;
  display: none !important;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  height: 71px;

}

.side-menu-content {
  flex: 1;
  padding: 0px 0px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0px;
  height: 100vh !important;
  background-color: #f8f4ea;


}

.side-menu .header-actions {
  flex-direction: column;
  align-items: stretch;

  gap: 20px !important;
  margin-top: 20px;

}

#btn-new-event {
  margin-bottom: 10px;
}

#btn-search {
  margin-bottom: 10px;
}

#btn-toggle-sound {
  margin-bottom: 10px;
}

.side-menu .btn-full {
  padding: 18px 24px;
  font-size: 1.1rem;
  border-radius: 5px;
  justify-content: flex-start;
}

.side-menu .menu-brand-name {
  font-size: 1.3rem;
}

.side-menu .material-symbols-outlined {
  font-size: 24px !important;
}

#btn-logout.btn-full {
  font-size: 1.1rem;
  position: absolute;
  bottom: 0;
  left: 0;
  margin-top: solid 1px black !important;
}

/* Ícone de toggle da sidebar — rotaciona quando fechada */
.sidebar-toggle-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotate(0deg);
}

.side-menu.collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}


/* ===== APP HEADER & SCALE BAR ===== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

/* ===== PREMIUM TOPBAR ===== */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 71px;
  padding: 0 16px;
  gap: 12px;
}

/* LEFT */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  color: var(--text2);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.topbar-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* CENTER */
.topbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: space-between;
  min-width: 0;
}

.topbar-page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  display: none;
  /* hidden on desktop — shown on mobile */
}

/* RIGHT */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  color: var(--text2);
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.conversation-focus-wrap {
  position: relative;
  flex-shrink: 0;
}

.conversation-focus-trigger {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

.conversation-focus-trigger:hover,
.conversation-focus-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface2);
}

.conversation-focus-trigger > .material-symbols-outlined {
  font-size: 18px;
}

.conversation-focus-trigger .conversation-focus-chevron {
  font-size: 17px;
  opacity: .7;
}

.conversation-focus-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10020;
  width: min(330px, calc(100vw - 24px));
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 44px rgba(15, 23, 42, .2);
}

.conversation-focus-menu-title {
  margin-bottom: 12px;
  font-size: .92rem;
  font-weight: 800;
}

.conversation-focus-list {
  display: grid;
  gap: 9px;
}

.conversation-focus-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface2);
  font-size: .8rem;
  line-height: 1.4;
}

.conversation-focus-item strong {
  color: var(--text);
}

.conversation-focus-item span,
.conversation-focus-empty {
  color: var(--text2);
}

.conversation-focus-empty {
  margin: 0;
  font-size: .82rem;
  line-height: 1.5;
}

.conversation-focus-edit {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.conversation-focus-edit .material-symbols-outlined {
  font-size: 17px;
}

@media (max-width: 520px) {
  .conversation-focus-trigger {
    gap: 4px;
    padding: 0 7px;
    font-size: .72rem;
  }

  .conversation-focus-trigger .conversation-focus-chevron {
    display: none;
  }
}

.topbar-avatar:hover {
  opacity: 0.85;
}


.header-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scale-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Permite que os itens comecem da esquerda */
  padding: 6px 14px 10px;
  gap: 8px;
  border-top: 1px solid var(--border);
  height: 70px;
  padding-left: 100px;
}

.scale-bar.hidden {
  display: none;
}


.scale-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}



.scale-label {
  font-size: .65rem;

  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.events-count {
  font-size: .75rem;
  color: var(--text3);

}


.view-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: .72rem;

  font-family: var(--font);
  background: transparent;
  color: var(--text3);
  transition: all .2s;
}

.view-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Specific for Finance Switcher */
#trans-type-income,
#trans-type-expense {
  font-size: 1.08rem;
  padding: 10px 16px;
  gap: 8px;
}

#trans-type-income .material-symbols-outlined,
#trans-type-expense .material-symbols-outlined {
  font-size: 27px !important;
}

#trans-type-income.active {
  background: var(--green) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

#trans-type-expense.active {
  background: var(--red) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 0;
  /* Removido para evitar corte da base em 100% altura */
  position: relative;
  /* Add this for absolute positioning of children if needed */
}

/* Pager mobile entre Resolver Questões/Chat e Perfil. A rolagem vertical continua
   acontecendo dentro de cada página, enquanto o container troca de página
   pelo gesto horizontal. */
.cardpromo {
  display: flex;
  gap: 10px;
  flex-direction: row;

}

.radius15 {
  border-radius: 15px !important;
}

.cardpromo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  justify-content: end;
  align-items: end;

}

.cardpromo-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 100%;
  min-width: 0;
  min-height: 70px;

  padding: 8px 6px;

  background-color: #ececec !important;
  border: 1px solid #e0e0e0;

  text-align: center;
  box-sizing: border-box;
}

.cardpromo-item h4 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.cardpromo-item p {
  margin: 0;
  font-size: 9px;
  line-height: 1.2;
  color: #666;
}

.botaomenu {
  display: flex;
  width: 100%;
  justify-content: end;
  align-items: end;
  gap: 10px;
}

.botaomenu button {
  display: flex;
  max-width: 200px;
  justify-content: center;
  align-items: center;
}

/* MOBILE */
@media (max-width: 600px) {
  .cardpromo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cardpromo-item {
    min-height: 65px;
  }
}


@media (max-width: 900px) {
  .mobilenone {
    display: none;
  }

  .main-content.mobile-section-pager {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  .main-content.mobile-section-pager::-webkit-scrollbar {
    display: none;
  }

  .main-content.mobile-section-pager>#view-year,
  .main-content.mobile-section-pager>#view-conversations {
    display: flex !important;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    touch-action: pan-x pan-y;
  }
}

/* ===== CAL VIEWS ===== */
.cal-view {
  display: none;
  flex-direction: column;
  height: 100%;
  position: relative;
  /* Ocupa a tela toda */
  background-color: white !important;
}

.cal-view.active {
  display: flex;
}

#viewAI.active {
  display: flex;
  flex-direction: column;
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  background: var(--bg);
  z-index: auto;
}

#viewAI iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 8px;
  flex-shrink: 0;
  /* Impede de encolher */
}

.cal-title {
  font-size: 1.35rem;

  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: capitalize;
  letter-spacing: -0.03em;
  padding: 6px 16px;
  border-radius: 5px;
  user-select: none;
  display: inline-block;
  /* Retornado para inline-block já que não há mais ícone */
}



.cal-title:active {
  background: var(--primary-lt);
  transform: scale(0.97);
}

.cal-title:hover {
  color: var(--primary);
}

.cal-nav-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  /* Impede de encolher */
}

.cal-weekdays>div {
  text-align: center;
  padding: 7px 0;
  font-size: .68rem;

  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* absolute nav buttons */
.btn-nav-abs {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: 1px solid var(--primary-dk);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(146, 122, 78, 0.3);
  color: white;
  transition: all 0.2s;
}

.btn-nav-abs:active {
  transform: translateY(-50%) scale(0.9);
}

.btn-nav-abs span {
  font-size: 28px;
}

#btn-prev-month-abs {
  left: 8px;
}

#btn-next-month-abs {
  right: 8px;
}


/* ===== MONTH SWIPER (SLIDE) ===== */
.month-swiper {
  flex: 1;
  overflow: hidden;
  position: relative;
  touch-action: pan-y pinch-zoom;
  /* Permite scroll vertical da página mas captura horizontal no JS se necessário, ou usamos pan-x pros slides */
}

.month-slides-wrapper {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.month-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  background: var(--border);
  gap: 1px;
  /* Garante um pequeno buffer no fundo para não cortar a 6ª linha */
  padding-bottom: env(safe-area-inset-bottom, 10px);
}

/* ===== DAY CELLS ===== */
.day-cell {
  background: var(--surface);
  min-height: 0;
  /* Removido altura fixa para permitir expansão fluida */
  padding: 6px 5px 5px;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.day-cell:active {
  background: #f0ebff;
}

.day-cell.other-month {
  background: var(--surface2);
}

.day-cell.other-month .day-num {
  color: var(--text3);
  opacity: .5;
}

.day-cell.today {
  background: var(--primary-lt);
  border: 2px solid var(--primary);

}

.day-cell.today .day-num {
  color: var(--primary);

}

.day-cell.selected {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.day-cell.work-day {
  background: white;
}

.day-cell.off-day {
  background: white;

}

.day-cell.other-month.work-day,
.day-cell.other-month.off-day {
  background: var(--surface2);
}

.day-num {
  font-size: 1.1rem;

  color: var(--text);
  line-height: 1;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-holiday-badge {
  font-size: .5rem;

  background: #f97316;
  color: white;
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1.2;
}

.day-holiday-name {
  font-size: .55rem;
  color: white;
  background: #f97316;

  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  line-height: 1.2;
}

.day-event-pill {
  font-size: .58rem;

  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
  line-height: 1.3;
}

.day-more {
  font-size: .58rem;
  color: var(--text3);

}

.day-work-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.day-work-dot.work {
  background: #ef4444;
}

.day-work-dot.off {
  background: #22c55e;
}

.day-work-label {
  position: absolute;
  bottom: -1px;
  right: 12px;
  font-size: 0.45rem;

  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.day-work-label.work {
  color: #ef4444;
}

.day-work-label.off {
  color: #22c55e;
}



/* ===== YEAR VIEW ===== */
.year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 14px 40px;
  /* Adicionado padding inferior para scroll */
}

@media (min-width: 480px) {
  .year-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== PROFILE / COMMUNITY CARD STYLES ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  cursor: pointer;
}

.proof-card,
.community-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.proof-card h3,
.community-card h3 {
  margin: 0;
  font-size: 1rem;
}

.proof-card .card-meta,
.community-card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text3);
  font-size: 0.85rem;
}

.proof-card .card-chip,
.community-card .card-chip {
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 0.8rem;
}

.proof-card .card-footer,
.community-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proof-card .card-actions,
.community-card .card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-header {
  gap: 20px;
}

.profile-card {
  min-width: 280px;
}

.margim30 {
  margin: 30px;
}

.stat-card {
  min-height: 110px;
}

.profile-mini-card {
  min-height: 130px;

}

.upload-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 15px;
  padding-left: 10%;
  padding-right: 10%;

}

.upload-step-indicator {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--border);
}

.upload-step-indicator.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.upload-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-step .field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-step .field-group {
  flex: 1;
  min-width: 180px;
}

.upload-step .hidden {
  display: none !important;
}

.gabarito-question {
  padding: 16px;
  background: var(--surface2);
  border-radius: 5px;
  border: 1px solid var(--border);
}

.gabarito-question .question-label {
  font-weight: 600;
  margin-bottom: 8px;
}

.gabarito-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  gap: 10px;
}

.gabarito-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  color: var(--text3);
  font-size: 0.9rem;
}

.gabarito-options input[type="radio"] {
  display: none;
}

.gabarito-options input[type="radio"]:checked+span {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.gabarito-options span {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 5px;
}

.confirm-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.mini-month {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow-sm);

}

.mini-month:active {
  transform: scale(.97);
  box-shadow: none;
}

.mini-month-title {
  font-size: .78rem;

  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
  text-transform: capitalize;

}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.mini-day-hdr {
  font-size: .5rem;
  text-align: center;
  color: var(--text3);

  padding: 2px 0;
}

.mini-day {
  font-size: .65rem;
  text-align: center;
  padding: 2px;
  border-radius: 3px;
  line-height: 1.4;
  position: relative;
  color: var(--text);
}

.scale-day.scale-today-marker {
  border-color: var(--primary);
  border-width: 2px;
  background: var(--primary-light);

  color: var(--primary);
}

.mini-day.other {
  color: var(--text3);
  opacity: .3;
}

.mini-day.today {
  background: var(--primary);
  color: white;
  border-radius: 50%;
}

.mini-day.holiday {
  background: #fff3ea;
  color: #f97316;
}

.mini-day.work-day {
  background: #fff5f5;
  color: #ef4444;
}

.mini-day.off-day {
  background: #f0fdf4;
  color: #16a34a;
}

.mini-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9500;
  background: rgba(0, 0, 0, .4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeIn .2s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-sheet {
  background: var(--surface);
  width: 100%;
  border-radius: 5px 5px 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s cubic-bezier(.22, .61, .36, 1);
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  transition: transform 0.2s ease-out, padding 0.2s ease;
  padding: 0;
}

.modal-sheet-tall {
  max-height: 95dvh;
}

.modal-sheet-full {
  height: 100vh !important;
  max-height: 100vh !important;
  width: 100vw !important;
  border-radius: 0 !important;
  background-color: #ececec;
  display: flex;
  flex-direction: column;
  position: absolute;
}

/* ===== FULL-SCREEN COMMUNITY FILTERS ===== */
.filter-modal-overlay {
  justify-content: flex-start;
  align-items: stretch;
  background: rgb(255, 255, 255);
  overflow: hidden;
}

.filter-modal-sheet {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  transform: translateX(-100%);
  animation: filterModalSlideIn .34s cubic-bezier(.22, .61, .36, 1) forwards;
  will-change: transform;
  background-color: #ececec !important;

}

.filter-modal-header {
  min-height: 60px;
  padding: 0px 0px;
  background-color: white;

  position: relative;
  z-index: 2;

  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
}

.filter-modal-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.filter-modal-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.filter-modal-intro>.material-symbols-outlined {
  color: var(--primary);
  font-size: 28px;
}

.filter-modal-intro h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.filter-modal-intro p {
  margin: 0;
  color: var(--text3);
  font-size: .9rem;
  line-height: 1.5;
}

.community-filter-count h1 {
  min-width: 5ch;
  margin-bottom: 2px;
  text-align: center;
}

.community-filter-count-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 12px;
  color: var(--primary);
  font-size: .78rem;
}

.community-filter-count-progress .material-symbols-outlined {
  font-size: 18px;
  animation: filterSelectorSpin .9s linear infinite;
}

.community-filter-count-message {
  max-width: 560px;
  margin: 2px auto 12px;
  color: var(--danger);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.filter-modal-footer .btn:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

.filter-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.filter-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;

  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-actions-footer { display: none; }

.filter-modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes filterModalSlideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (max-width:900px) {

  .filter-modal-header,
  .filter-modal-body,
  .filter-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filter-modal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .filter-modal-footer {
    justify-content: stretch;
  }

  .filter-actions-footer { display: none; }

.filter-modal-footer-actions {
    flex: 1;
  }

  .filter-modal-footer .btn {
    flex: 1;
    min-width: 140px;
  }
}

/* ===== FILTER CARD SELECTOR: RIGHT TO LEFT ===== */
.filter-selector-overlay {
  justify-content: flex-end;
  align-items: stretch;
  background: rgba(17, 24, 39, .36);
  overflow: hidden;
}

.filter-selector-sheet {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  transform: translateX(100%);
  animation: filterSelectorSlideIn .34s cubic-bezier(.22, .61, .36, 1) forwards;
  will-change: transform;
}

.filter-selector-header {
  min-height: 60px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
}

.filter-selector-body {
  flex: 1;
  overflow-y: auto;
  padding: 0px !important;
  background: var(--bg);
  padding-top: 15px;
}

.filter-selector-search {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text3);
}

.filter-selector-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}



.filter-selector-list {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 0px;
}

.filter-selector-loading {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text3);
  font-size: .9rem;
}

.filter-selector-spinner {
  color: var(--primary);
  font-size: 28px;
  animation: filterSelectorSpin .9s linear infinite;
}

@keyframes filterSelectorSpin {
  to {
    transform: rotate(360deg);
  }
}

.filter-selector-load-more {
  padding: 9px 0 2px;
  color: var(--text3);
  font-size: .72rem;
  text-align: center;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 0px solid var(--border);

  border-bottom: 1px solid var(--border);
  border-radius: 0px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: .95rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}



.filter-option.selected {

  background: var(--primary-lt);
  color: var(--primary-dk);
  font-weight: 700;
}

.filter-option-check {
  color: transparent;
  font-size: 20px;
}

.filter-option.selected .filter-option-check {
  color: var(--primary);
}

.filter-selector-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  color: var(--text3);
  text-align: center;
}

.filter-selector-empty .material-symbols-outlined {
  font-size: 36px;
  color: var(--border2);
}

.filter-selector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px !important;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.filter-selector-selected-count {
  color: var(--text3);
  font-size: .85rem;
}

.agent-start-answer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  min-height: 42px;
}

@keyframes filterSelectorSlideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  .filter-selector-header,
  .filter-selector-body,


  .filter-selector-footer .btn {
    min-width: 128px;
  }
}

.modal-sheet-auto {
  max-height: 60dvh;
  height: auto;
}

@media (max-width: 768px) {
  #modal-edit-note .modal-sheet {
    min-height: 80vh !important;
    min-height: 80dvh !important;
    max-height: 95dvh !important;
    display: flex;
    flex-direction: column;
  }
}

.modal-sheet-auto .modal-body {
  flex: none;
}

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border2);
  margin: 10px auto 0;
  flex-shrink: 0;
  touch-action: none;
  cursor: pointer;
  /* Impede o scroll de interferir no gesto */
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  touch-action: none;
  cursor: pointer;
  /* Impede o scroll de interferir no gesto */
}

.modal-title {
  font-size: 1.05rem;

  color: var(--text);
}

.modal-subtitle {
  font-size: .75rem;
  color: var(--text3);
  text-transform: capitalize;
  display: block;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.modal-scroll {
  overflow-y: auto;
}

.modal-desc {
  font-size: .85rem;
  color: var(--text2);
  margin-bottom: 14px;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  justify-content: end;
  align-items: center;
}

/* ===== FORMS ===== */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;

}

.field-label {
  font-size: .78rem;

  color: var(--text2);
}

.field-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;

  min-width: 550px;
  max-width: 550px;
}

.logocenter {
  width: 200px;
  margin-bottom: 30px;
}


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

.field-select {
  cursor: pointer;
}

.field-row {
  display: flex;
  gap: 10px;
}

.form-error {
  font-size: .75rem;
  color: var(--danger);
  display: none;
  margin-top: 4px;
}

.required-asterisk {
  color: var(--danger);
  font-weight: bold;
  margin-left: 2px;
}

.form-error.visible {
  display: block;
}

/* Efeito de brilho para mensagens de erro */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.5),
      transparent);
  transform: skewX(-20deg);
  animation: shine-sweep 0.6s ease-in-out;
  pointer-events: none;
}

@keyframes shine-sweep {
  0% {
    left: -100%;
  }

  100% {
    left: 150%;
  }
}


.field-input.error {
  border-color: var(--danger);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.cat-btn {
  padding: 8px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  font-size: .72rem;

  font-family: var(--font);
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  line-height: 1.3;
}

.cat-btn.active {
  border-color: var(--primary);
  background: var(--primary-lt);
  color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 5px;
  font-family: var(--font);

  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(.96);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dk);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border2);
}

.btn-outline:hover {
  background: var(--surface2);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
}

.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-ghost-violet {
  background: var(--primary-lt);
  color: var(--primary);
  border: 1px solid rgba(146, 122, 78, .2);
}

.btn-ghost-violet:hover {
  background: #f2e7c4;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 7px 14px;
  font-size: .8rem;
}

.btn-sm-text {
  padding: 7px 10px;
  font-size: .78rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 5px;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 5px;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 13px 16px;
  font-size: .95rem;
  border-radius: 5px;
}

.btn-danger.hidden,
.btn.hidden {
  display: none !important;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-lt);
}

/* ===== EVENTS LIST ===== */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  /* Previne que o card seja esmagado em listas flex */
}

.event-item:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-lt);
}

.event-item:active {
  transform: scale(0.98);
}

.event-stripe {
  width: 5px;
  border-radius: 4px;
  align-self: stretch;
  flex-shrink: 0;
  min-height: 40px;
}

.event-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}


.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;

  color: var(--text2);
  flex-wrap: wrap;
}

.event-meta .material-symbols-outlined {
  font-size: 16px;
  color: var(--primary);
  opacity: 0.8;
}

.event-description {
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-actions {
  display: none;
  gap: 6px;
  flex-shrink: 0;
}

.no-events {
  text-align: center;
  padding: 32px 16px;
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  color: var(--text3);
  font-size: .85rem;
}

/* ===== WORK STATUS CARD ===== */
.work-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.work-status-card.work {
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.work-status-card.off {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.work-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.work-status-icon.work {
  background: #fee2e2;
}

.work-status-icon.off {
  background: var(--green-lt);
}

.work-status-text {
  flex: 1;
}

.work-status-label {
  font-size: .75rem;
  color: var(--text3);

}

.work-status-value {
  font-size: .95rem;

}

.work-status-card.work .work-status-value {
  color: var(--red);
}

.work-status-card.off .work-status-value {
  color: var(--green);
}

.work-badge {
  font-size: .7rem;

  padding: 3px 10px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.work-badge.work {
  background: #fee2e2;
  color: var(--red);
}

.work-badge.off {
  background: var(--green-lt);
  color: var(--green);
}

/* ===== SCALE PREVIEW ===== */
.scale-preview-wrap {
  max-height: 50dvh;
  overflow-y: hidden !important;
  padding-bottom: 10px !important;
}

.scale-month-block {
  margin-bottom: 20px;
}

.scale-month-name {
  font-size: .8rem;

  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  margin-bottom: 10px;
}

.scale-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-width: 340px;
  margin: 0 auto;
}

.scale-hdr {
  font-size: .65rem;
  text-align: center;
  color: var(--text3);

}

.scale-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .78rem;

  cursor: pointer;
  transition: all .15s;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.scale-day:active {
  transform: scale(.9);
}

.scale-day.empty {
  opacity: 0;
  pointer-events: none;
}

.scale-day.work-explicit {
  background: #ef4444;
  color: white;
}

.scale-day.off-explicit {
  background: #22c55e;
  color: white;
}

.scale-day.work-preview {
  background: #fee2e2;
  color: #dc2626;
}

.scale-day.off-preview {
  background: #dcfce7;
  color: #16a34a;
}

.scale-hint {
  font-size: .7rem;
  color: var(--text3);
  text-align: center;
  font-style: italic;
  margin-top: 8px;
}

/* ===== SEARCH ===== */
.search-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.search-bar svg {
  color: var(--text3);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  outline: none;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  min-height: 90vh !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 40px;
  -webkit-overflow-scrolling: touch;
  /* Melhora rolagem no iOS */

}

/* ===== LOGOUT ===== */
.logout-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--danger-lt);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-title {
  font-size: 1.15rem;

  color: var(--text);
  margin-bottom: 8px;
}

.logout-desc {
  font-size: .82rem;
  color: var(--text3);
  margin-bottom: 20px;
  line-height: 1.5;
}

.logout-actions {
  display: flex;
  gap: 10px;
}

.text-center {
  text-align: center;
}

/* ===== UTILS ===== */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-1 {
  flex: 1;
}

.gap-2 {
  gap: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.items-center {
  align-items: center;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1
  }

  to {
    transform: translateY(100%);
    opacity: 0
  }
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 10px;
  border: 3px solid var(--surface2);
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}


/* ===== SWIPE TRANSITION ===== */
.cal-view {
  transition: opacity .15s;
}

.sliding-out {
  opacity: 0;
}

#buttonActionModal {

  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 20px;
}

#month-title {
  min-width: 210px;
  text-align: center;
  cursor: pointer;
}

#btn-view-ai {
  display: none;
}

#logoMarca {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.imgGif {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

#cardtime {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.loginImg {

  width: 150px;
  height: auto;
  object-fit: contain;
}

.btn-full {
  border: none !important;
  border-radius: 0px !important;
  margin: 0px !important;
  border-bottom: solid 1px rgb(231, 231, 231) !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;

}




/* ===== WEB APP LAYOUT (DESKTOP FIRST) ===== */
@media (min-width: 900px) {


  html,
  body {
    background: #e5e7eb;
    margin: 0;
    padding: 0;
    font-size: 17px;
    /* Aumenta tamanho base de textos e botões */
  }



  #app-screen:not(.hidden) {
    display: flex !important;
    flex-direction: row !important;
    background: var(--bg);
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    position: relative;
  }

  .scale-bar {
    position: relative;
  }

  /* Make sidebar persistent */
  .side-menu {
    position: static;
    transform: translateX(0) !important;
    width: 290px;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    z-index: 10;
    padding-bottom: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    /* Necessário para o botão saindo pra fora */
    position: relative;
  }

  .side-menu.collapsed {
    width: 65px !important;
  }

  .side-menu.collapsed .menu-brand-name,
  .side-menu.collapsed .btn span:not(.material-symbols-outlined),
  .side-menu.collapsed .side-menu-content p {
    display: none !important;
  }

  .side-menu.collapsed .header-actions .btn {
    justify-content: center !important;
    padding: 0 !important;
    width: 100% !important;
    height: 56px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .side-menu.collapsed .header-actions .btn span.material-symbols-outlined {
    margin: 0 !important;
    font-size: 24px !important;
  }

  .side-menu.collapsed .side-menu-header {
    justify-content: center !important;
    padding: 12px 8px !important;
  }

  .side-menu.collapsed .logo-area {
    justify-content: space-between !important;

    gap: 0;
  }

  .side-menu.collapsed .logo-area>div {
    flex-shrink: 0;
  }

  .side-menu.collapsed .sidebar-toggle-icon {
    flex-shrink: 0;
  }

  .side-menu.collapsed #btn-collapse-sidebar {
    transform: none;
  }

  /* Estilo solicitado: Roxo com fundo branco (agora no header) */
  #btn-collapse-sidebar {
    position: absolute;
    left: -0px;
    /* Fica exatamente na emenda */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;

    background: #ffffff !important;
    color: var(--primary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;

    border-radius: 0% !important;
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease, left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #btn-collapse-sidebar:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }



  /* Rotação tratada via JS para precisão total */
  #btn-collapse-sidebar span {
    transition: transform 0.3s ease;
  }

  .side-menu-overlay {
    display: none !important;
  }

  /* Hide mobile menu toggles */
  #btn-close-menu,
  #btn-open-menu {
    display: none !important;
  }

  /* Login Screen Redesign for Web App */
  #login-screen {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    background: var(--surface2);
    box-shadow: none;
  }

  .login-wrap {
    flex-direction: row;
    width: 100%;
    height: 100%;
  }

  .login-hero {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    justify-content: center;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    width: 50% !;
    background-image: url('./estudante.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  .login-hero .login-title,
  .login-hero .login-sub {
    color: white;
  }


  .login-footer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border-radius: 0;
    border: none;
    background: var(--surface);
    height: 100%;
    box-shadow: none;
  }

  /* Padroniza Overlays para alinhar a aba no centro da área disponível */
  .modal-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;

    width: auto !important;
    border-radius: 0;
    justify-content: center !important;
    align-items: center !important;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    /* Leve escurecimento no fundo */
  }

  /* Transforma "Sheets" mobile em Janelas Centrais (Caixa) */
  .modal-sheet {
    max-height: 90vh !important;
    width: 100% !important;
    max-width: 600px !important;
    border-radius: 5px !important;
  }

  /* Garante uma fluidez padrão interna com rolagem a partir do topo */
  .modal-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

  }

  /* Otimizações de Grid e Células para Desktop (Restauradas) */
  .day-cell {
    min-height: 100px;

  }

  .month-slide {
    grid-template-rows: repeat(6, minmax(100px, 1fr));
  }

  .scale-preview-wrap {
    max-height: 70vh;
  }

  .year-grid {
    grid-template-columns: repeat(4, 1fr);
  }



}


/* UI FIXES */
.form-error {
  color: #ef4444 !important;
  font-size: .85rem;
  margin-top: 6px;
  display: none;
}

.field-error {
  border-color: #ef4444 !important;
  background-color: #fee2e2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.hidden {
  display: none !important;
}

/* VISIBILITY HELPERS */
.mobile-only {
  display: flex !important;
}

.desktop-only {
  display: none !important;
}

@media (min-width: 900px) {
  .mobile-only {
    display: none !important;
  }

  .desktop-only {
    display: flex !important;
  }
}

input,
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* FAB AGENTE BIZU */
.btn-agent-fab {
  position: fixed;
  right: 20px;
  bottom: 85px;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #927a4e, #6f5b33);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(146, 122, 78, 0.4);
  z-index: 990;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  animation: fab-pulse 2s infinite ease-in-out;
}

.btn-agent-fab:active {
  transform: scale(0.9) rotate(-10deg);
}

.btn-agent-fab .material-symbols-outlined {
  font-size: 30px;
  font-variation-settings: 'FILL' 1;
}

@keyframes fab-pulse {

  0%,
  100% {
    box-shadow: 0 10px 25px rgba(146, 122, 78, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 10px 35px rgba(146, 122, 78, 0.6);
    transform: scale(1.08);
  }
}

/* ===== YEAR VIEW FINANCIALS & CHARTS ===== */
.year-summary-container {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.year-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 2fr);
  gap: 10px;
}

.year-summary-card {
  padding: 12px 8px;
  border-radius: 5px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.year-summary-card .label {
  font-size: 0.6rem;

  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}

.year-summary-card .value {
  font-size: 0.85rem;

  color: var(--text);
}

.year-summary-card.income {
  border-color: var(--green-lt);
  background: #f0fdf4;
}

.year-summary-card.income .label {
  color: var(--green);
}

.year-summary-card.expense {
  border-color: var(--danger-lt);
  background: #fff1f2;
}

.year-summary-card.expense .label {
  color: var(--danger);
}

.year-summary-card.balance {
  border-color: var(--primary-lt);
  background: #f5f3ff;
}

.year-summary-card.balance .label {
  color: var(--primary);
}

.year-chart-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.year-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.year-chart-title {
  font-size: 0.85rem;

  color: var(--text);
}

.year-chart-legend {
  display: flex;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;

  color: var(--text3);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.year-chart-container {
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  padding-top: 10px;
}

.chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.chart-bar {
  width: 100%;
  transition: height 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  min-height: 2px;
}

.chart-bar.income {
  background: var(--green);
}

.chart-bar.expense {
  background: var(--danger);
}

.chart-label {
  font-size: 0.55rem;

  color: var(--text3);
  text-transform: uppercase;
}

/* Financials in Mini-Month Cards */
.mini-month-fin {
  display: flex;
  justify-content: space-around;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.mini-fin-item {
  font-size: 0.55rem;

  display: flex;
  align-items: center;
  gap: 2px;
}

.mini-fin-item.inc {
  color: var(--green);
}

.mini-fin-item.exp {
  color: var(--danger);
}

.mini-fin-item.bal {
  color: var(--text);
}

/* ===== SCALE BAR SHORTCUTS ===== */
.scale-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  /* Garante que os atalhos fiquem na extremidade direita */
}

#btn-shortcut-sound {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 38px;
  height: 38px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#btn-shortcut-sound:hover {
  background: var(--primary-lt);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

#btn-shortcut-sound:active {
  transform: scale(0.92);
}

#btn-shortcut-sound span {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}



/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.perfil {
  padding: 0px;
  overflow-y: auto;
}


@media (min-width: 900px) {



  .toast-container {
    left: auto;
    right: 24px;
    transform: none;
    align-items: flex-end;
  }

}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
  animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.hiding {
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 1, 1);
  opacity: 0;
  transform: translateY(15px) scale(0.95);
}

.toast-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon.ia {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: white;
}

.toast-icon.tutorial {
  background: #f973161a;
  color: #f97316;
  border: 1px solid #f9731633;
}

.toast-content {
  flex: 1;
}

.toast-title {

  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.toast-msg {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
}

.toast-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.admin-filter-merge-checkbox {
  display: inline-block !important;
  appearance: checkbox !important;
  -webkit-appearance: checkbox !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  margin: 0 4px 0 2px;
  accent-color: var(--primary, #2563eb);
  cursor: pointer;
  opacity: 1 !important;
  visibility: visible !important;
  flex: 0 0 20px;
}
.toast-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  position: relative;
  z-index: 5;
}

.toast-checkbox-wrapper input {
  appearance: checkbox !important;
  /* Força aparecimento padrão */
  -webkit-appearance: checkbox !important;
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  accent-color: var(--primary);
  /* Cor do check */
  position: relative;
  z-index: 6;
  pointer-events: auto !important;
}

.toast-checkbox-label {
  font-size: 0.8rem;

  color: var(--text2);
  line-height: 1;
}

.toast-buttons {
  display: flex;
  gap: 8px;
}

.toast-btn {
  padding: 7px 14px;
  border-radius: 5px;
  font-size: 0.78rem;

  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.toast-btn.primary {
  background: var(--primary);
  color: white;
}

.toast-btn.ghost {
  background: var(--surface2);
  color: var(--text2);
}

.toast-btn:hover {
  transform: scale(1.05);
}

.toast-btn:active {
  transform: scale(0.95);
}

.toast-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

button span {
  font-size: 18px;
}

button {
  font-size: 18px !important;
}

/* ===== FLATPICKR CUSTOMIZATION ===== */
.flatpickr-calendar {
  background: var(--surface) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid var(--border) !important;
  border-radius: 5px !important;
  font-family: var(--font) !important;
  z-index: 999999 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.flatpickr-day.today {
  border-color: var(--primary-lt) !important;
}

.flatpickr-months .flatpickr-month {
  background: var(--primary) !important;
  color: white !important;
  fill: white !important;
  border-radius: 5px 5px 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: white !important;
  background: transparent !important;
  border: none !important;
  font-weight: 600 !important;
}

.flatpickr-monthDropdown-months option {
  color: #374151 !important;
  /* Texto escuro para os itens da lista */
  background: #ffffff !important;
}

.flatpickr-monthDropdown-months:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px;
}

.flatpickr-current-month {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.flatpickr-weekday {
  color: rgb(255, 255, 255) !important;

}

span.flatpickr-weekday {
  background: var(--primary) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: white !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: white !important;
  color: white;
}

.flatpickr-day:hover {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}

.flatpickr-day.selected:hover {
  background: var(--primary-dk) !important;
  border-color: var(--primary-dk) !important;
  color: white !important;
}

.flatpickr-monthDropdown-months {
  cursor: pointer !important;

}

.flatpickr-day {
  color: var(--text) !important;
}

.flatpickr-time input {
  color: var(--text) !important;
}

.flatpickr-time .flatpickr-time-separator {
  color: var(--text) !important;
}

.flatpickr-time .flatpickr-am-pm {
  color: var(--text) !important;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
  background: var(--surface2) !important;
}




/* Language Toggle Button */
.lang-toggle-btn {
  background: var(--surface2, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 5px;
  color: var(--text, #1f2937);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.72rem;
  height: 32px;
  letter-spacing: 0.06em;
  min-width: 36px;
  padding: 0 8px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: none !important;
}


.lang-toggle-btn:active {
  transform: scale(0.95);
}

/* ===== LANGUAGE PICKER MODAL ===== */
#lang-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(17, 12, 34, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lpFadeIn 0.35s ease both;
}

#lang-picker-overlay.hide {
  animation: lpFadeOut 0.3s ease forwards;
}

@keyframes lpFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lpFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.lp-card {
  background: #ffffff;
  border-radius: 5px;
  padding: 36px 28px 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: lpSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lpSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lp-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(146, 122, 78, 0.18));
}

.lp-title {
  font-family: var(--font);
  font-size: 1.35rem;

  color: #111827;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.lp-subtitle {
  font-family: var(--font);
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 28px;

}

.lp-flags {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.lp-flag-btn {
  flex: 1;
  max-width: 140px;
  background: #f9fafb;
  border: 2.5px solid #e5e7eb;
  border-radius: 5px;
  padding: 20px 12px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lp-flag-btn:hover {
  border-color: #927a4e;
  background: #f7efe0;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 28px rgba(146, 122, 78, 0.15);
}

.lp-flag-btn:active {
  transform: translateY(0) scale(0.97);
}

.lp-flag-btn.selected {
  border-color: #927a4e;
  background: #f3e7ce;
  box-shadow: 0 0 0 4px rgba(146, 122, 78, 0.12);
}

.lp-flag-img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: block;
}

.lp-flag-label {
  font-family: var(--font);
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.2;
}

.lp-flag-label small {
  display: block;
  font-size: 0.72rem;

  color: #9ca3af;
  margin-top: 2px;
}

.lp-confirm-btn {
  margin-top: 24px;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #927a4e, #6f5b33);
  border: none;
  border-radius: 5px;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 8px 24px rgba(146, 122, 78, 0.35);
}

.lp-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(146, 122, 78, 0.4);
}

.lp-confirm-btn:active {
  transform: translateY(0) scale(0.98);
}

.lp-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== MULTI-ACTION FAB (SPEED DIAL) ===== */
.fab-wrapper {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.fab-wrapper.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.fab-main-btn {
  pointer-events: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #927a4e, #6f5b33);
  color: white;
  border: none;
  box-shadow: 0 8px 24px rgba(146, 122, 78, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
  z-index: 2;
  display: none !important;
}

.fab-main-btn:active {
  transform: scale(0.92);
}

.fab-wrapper.open .fab-main-btn {
  transform: rotate(45deg) scale(1.1);
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.fab-main-btn .material-symbols-outlined {
  font-size: 32px;
  font-variation-settings: 'wght' 600;
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-wrapper.open .fab-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fab-action {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  pointer-events: auto;
}

.fab-action:active {
  transform: scale(0.95);
}

.fab-label {
  background: var(--surface);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  pointer-events: none;
}

.fab-sub-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.fab-sub-btn .material-symbols-outlined {
  font-size: 24px;
}

/* Staggered animation for menu items */
.fab-wrapper.open .fab-action:nth-child(3) {
  transition-delay: 0.05s;
}

.fab-wrapper.open .fab-action:nth-child(2) {
  transition-delay: 0.1s;
}

.fab-wrapper.open .fab-action:nth-child(1) {
  transition-delay: 0.15s;
}

/* ===== RESOLVE PROVA SIDEBAR ===== */
.resolve-layout {
  position: relative;
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ===== RESOLVE NOTAS SIDEBAR ===== */
.resolve-notas-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background-color: #ffffff !important;
  border-right: 1px solid var(--border);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.resolve-notas-sidebar.active {
  transform: translateX(0);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}


.btn-delete-note {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  padding: 4px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

.btn-delete-note:hover {
  color: var(--danger);
  background: var(--danger-lt);
}

@media (max-width: 900px) {
  .side-menu-header {
    display: flex !important;
  }

  .perfil {

    padding: 0px !important;
    overflow-y: auto;
  }

  .margim30 {
    margin: 0px !important;
    border-radius: 0px !important;
    border: solid 0px rgb(255, 255, 255) !important;
  }

  .resolve-notas-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }

  .profile-card {
    margin: 0px !important;
    border-radius: 0px !important;
    border: solid 0px rgb(255, 255, 255) !important;
  }
}


.resolve-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.resolve-sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.resolve-gabarito-sidebar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.resolve-gabarito-sidebar.active {
  transform: translateX(0);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

/* Overrides para modais em tela cheia */
.modal-overlay.modal-full-screen {
  padding: 0 !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  background: var(--surface) !important;
}

.modal-overlay.modal-full-screen .modal-sheet-full {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  flex: 1;
}

/* ===== OTIMIZAÇÕES MOBILE GLOBAIS ===== */
@media (max-width: 600px) {
  :root {
    --radius: 5px;
    --radius-lg: 5px;
  }

  body {
    font-size: 14px;
  }

  .modal-sheet:not(.modal-sheet-full) {
    border-radius: 5px 5px 0 0 !important;
  }

  /* Cabeçalhos mais compactos no mobile */
  .modal-header {
    padding: 12px 14px;
  }

  .modal-title {
    font-size: 1rem;
  }

  /* Ajuste específico para o cabeçalho de resolução de prova no mobile */
  #modal-resolve-prova .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
  }

  #modal-resolve-prova .modal-header>div:last-child {
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
  }

  #resolve-prova-title {
    font-size: 1rem;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Refinamentos no resumo de resultados */
  #result-summary-list {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)) !important;
    gap: 8px !important;
  }

  /* Melhora área de clique de botões */
  button.btn {
    min-height: 42px;
  }

  .btn-sm {
    min-height: 36px;
    padding: 6px 12px;
  }

  /* Sidebar de Gabarito no mobile */
  .resolve-gabarito-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===== PROFESSIONAL RESOLUTION VIEW (DESKTOP SPLIT) ===== */
@media (min-width: 1024px) {

  /* O modal de resolução ocupa a tela inteira — não rolagem externa */
  #modal-resolve-prova .modal-sheet-full {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  /* O wrapper principal do layout: PDF esquerda | Gabarito direita */
  .resolve-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex: 1 !important;
    overflow: hidden !important;
    min-height: 0 !important;
    /* Essencial para flex + overflow funcionar */
  }

  /* Área do PDF (coluna esquerda) — scroll independente */
  #modal-resolve-prova .resolve-layout>div:first-child {
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .pdf-render-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: var(--bg) !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }

  /* Sidebar do Gabarito (coluna direita) — fixa, scroll interno */
  .resolve-gabarito-sidebar {
    position: static !important;
    transform: none !important;
    width: 380px !important;
    max-width: 380px !important;
    min-width: 300px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    border-left: 2px solid var(--border) !important;
    border-top: none !important;
    z-index: 5 !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05) !important;
    background: var(--surface) !important;
    overflow: hidden !important;
  }

  /* Garantir o scroll interno das questões do gabarito */
  #resolve-gabarito-questions {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
  }

  /* Remover overlay de fundo no desktop */
  #resolve-sidebar-overlay {
    display: none !important;
  }

  /* Ocultar controles redundantes no desktop:
     - Botão "X" de fechar gabarito
     - Botão "Continuar Lendo"
     - Botão "Responder no Gabarito" do header (já visível como coluna) */
  .resolve-gabarito-sidebar .btn-icon-sm[onclick*="toggleResolveGabarito"],
  .resolve-gabarito-sidebar .btn-ghost.btn-full {
    display: none !important;
  }

  #modal-resolve-prova .modal-header button[onclick*="toggleResolveGabarito(true)"] {
    display: none !important;
  }

  /* Redimensionar páginas do PDF para caber na coluna esquerda */
  .pdf-page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .pdf-page-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ===== COMMUNITY MINIMALIST SEARCH ===== */
/* ===== COMMUNITY MINIMALIST SEARCH ===== */
.community-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: top;
  min-height: 100%;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 5px;
  padding-top: 0px;
  margin: 0px !important;

  background-image: url('./fundochat.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Camada para clarear o fundo */
.community-search-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 0;
  pointer-events: none;
}

.community-logo-main {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 32px;
  letter-spacing: -2px;
}



.search-wrapper {
  width: 100%;

  position: relative;
  margin-bottom: 0px;
  background-color: transparent;
  width: 100%;
}

.search-input-fancy {
  width: 100%;
  padding: 16px 24px 16px 20px;
  font-size: 1.1rem;
  border-radius: 100px !important;
  border: 0px solid var(--border);
  background: var(--surface);
  border-bottom-right-radius: 0px;
  border-top-right-radius: 0pc;

}


.search-input-fancy2 {
  width: 100%;
  padding: 10px;
  padding-bottom: 0px;
  padding-top: 0px;
  padding-left: 0px;
  font-size: 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface);

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.10);

  max-width: 900px;


}

.search-input-fancy2:focus {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.10);
  border-color: var(--primary);
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
  background: #fff !important;
}

.search-icon-fancy {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 24px;
}

.search-actions-main {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 20% !important;


}

.results-header-minimal {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.results-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.results-back-btn:hover {
  color: var(--primary);
}

#community-results-container {
  width: 100%;
  animation: fadeIn 0.4s ease;
}

/* ===== CATEGORY SELECTION ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.category-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 5px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
}

.category-card:hover {
  border-color: var(--primary);
  background: var(--primary-lt);
}

.category-card.active {
  border-color: var(--primary);
  background: var(--primary-lt);
  box-shadow: 0 8px 24px rgba(146, 122, 78, 0.2);
}

.category-card .material-symbols-outlined {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
}

/* ===== RECURSOS DE RESOLUÇÃO (TESOURA E REVISÃO) ===== */
.gabarito-option-item {
  display: flex;
  align-items: center;
  position: relative;
  padding: 4px;
  border-radius: 5px;
  transition: all 0.2s;
  padding-right: 10px;
}

.gabarito-option-item.eliminated {
  opacity: 0.35;
  text-decoration: line-through;
  filter: grayscale(1);
}

.question-container.in-review {
  background: #fef9c3 !important;
  /* Amarelo tipo marca-texto */
  border-color: #facc15 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

.btn-eliminate {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
  box-shadow: var(--shadow-sm);
}

.btn-eliminate .material-symbols-outlined {
  font-size: 14px !important;
}

.btn-eliminate:hover {
  color: var(--danger);
  transform: scale(1.1);
  border-color: var(--danger);
}

.btn-review-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  background: none;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.2s;
}

.btn-review-toggle.active {
  background: #facc15;
  color: var(--text);
  border-color: #eab308;
}

/* ===== POST DETAILS PAGE ===== */
.post-details-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.post-header {
  margin-bottom: 24px;
}

.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-lt);
  color: var(--primary);
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.post-meta-detailed {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text3);
  font-size: 0.9rem;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-description-large {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text2);
  margin-bottom: 32px;
}

.comment-item {
  background: var(--surface2);
  padding: 16px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ===== UPLOAD PIPELINE UTILS ===== */
.section-item {
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.upload-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#confirm-gabarito-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

/* Category card active state */
.category-card.active {
  background: var(--primary-lt);
  border-color: var(--primary);
  color: var(--primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(146, 122, 78, 0.2);
}

/* ===== GOOGLE-STYLE SEARCH RESULTS ===== */
.community-card.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.community-card.search-result-list:hover {
  border-left-color: var(--primary);
  background: var(--surface2);
}

/* Forçar layout em lista (1 coluna) quando houver busca global */
#community-feed:has(.search-result-list) {
  grid-template-columns: 1fr !important;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-header-row h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.card-body-desc {
  color: var(--text2);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.search-annotation {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.search-annotation b {
  color: var(--text);
}

.search-annotation .material-symbols-outlined {
  font-size: 18px;
  color: var(--success);
}

mark {
  background: rgba(146, 122, 78, 0.2);
  color: var(--primary-dk);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.primary-chip {
  background: var(--primary-lt) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
}

.card-date {
  font-size: 0.8rem;
  color: var(--text3);
}

#view-month {
  background-color: #f0f0f0ce !important;
}

#view-post-details {

  background-color: #f0f0f0 !important;

}

#view-year {
  background-color: #f0f0f0 !important;


}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  background: var(--surface);
}

.purchase-wall {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.purchase-wall .material-symbols-outlined {
  font-size: 80px;
  color: var(--primary);
  opacity: 0.2;
  margin-bottom: 20px;
}

.purchase-wall h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: var(--text);
}

.purchase-wall p {
  color: var(--text3);
  max-width: 400px;
  margin: 0 auto 20px;
}

.purchase-wall .price-tag {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 30px;
}

.highlight-comment {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0% {
    background-color: var(--primary-lt);
    transform: scale(1.02);
  }

  100% {
    background-color: transparent;
    transform: scale(1);
  }
}








/* Focused state only applies on small screens (mobile) */
@media (max-width: 900px) {
  #login-screen.focused .login-hero {
    flex: 0;
    max-height: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(-20px);
    overflow: hidden;

    background-image: url('./estudante.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  .nomobile {
    display: none !important;
  }

  .search-actions-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20% !important;


  }
}

@media (max-width: 900px) {
  #login-screen.focused .login-footer {
    flex: 1;
    border-radius: 5;
    padding-top: 32px;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-y: auto;
  }

  #login-screen.focused .login-footer .login-form {
    width: 100%;
  }
}


/* Mobile adjustments */
@media (max-width: 900px) {
  .topbar-page-title {
    display: block;
  }



  .topbar-center {
    display: none;
  }
}

@media (max-width: 900px) {
  .login-title {
    font-size: 25px;
    color: white;
  }

  .logocenter {
    width: 150px;
    margin-bottom: 20px;

  }

  .loginImg {

    width: 90px;
    height: auto;
    object-fit: contain;
  }

  #cardtime {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
    flex-direction: column;
    gap: 10px;
  }

  .side-menu .btn-full {
    padding: 10px 20px;
    font-size: 1.3rem !important;
    border-radius: 5px;
    justify-content: flex-start;
  }

  .header-actions button {
    font-size: 14px !important;
  }

  .scale-preview-wrap {
    padding: 10px !important;
  }

  .imgGif {
    width: 100px;
    height: 100px;
    object-fit: contain;
  }

  #buttonActionModal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
  }

  #btn-prev-month-abs {
    display: none;
  }

  #btn-next-month-abs {
    display: none;
  }

  #month-title {
    /* Removido min-width fixo para permitir flexibilidade no mobile */
    text-align: center;
    cursor: pointer;
    font-size: 1.25rem;
  }

  #scale-display {
    display: none;
  }

  #logoMarca {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .scale-bar {
    height: auto;
    padding: 8px 12px;
  }

  /* Posiciona o botão de menu na extremidade esquerda e aumenta a área de clique */
  #btn-open-menu.mobile-only,
  #btn-close-menu {
    width: 46px;
    height: 46px;
  }

  #btn-open-menu.mobile-only .material-symbols-outlined,
  #btn-close-menu .material-symbols-outlined {
    font-size: 28px;
  }

  #btn-open-menu.mobile-only {
    margin-right: auto !important;
    margin-left: -4px;
    /* Ajuste para encostar mais na borda */
  }

}

@media (max-width: 900px) {
  .scale-right {
    gap: 4px;
  }

  #btn-shortcut-sound {
    width: 34px;
    height: 34px;
    border-radius: 5px;
  }

  #btn-shortcut-sound span {
    font-size: 18px;
  }
}

/* ===== PREMIUM PDF VIEWER & ANNOTATIONS ===== */
.pdf-render-container {
  flex: 1;
  background: #525659;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center !important;
  gap: 20px;
  scroll-behavior: smooth;
  position: relative;
  width: 100vw !important;
}

.pdf-page-wrapper {
  position: relative;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  max-width: 900px !important;
}

.pdf-page-wrapper canvas {
  display: block;
}

.textLayer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  /* Aumentado para controle total da seleção */
  line-height: 1;
  z-index: 2;
}

/* Remove o fundo branco e texto branco na seleção nativa */
.textLayer ::selection {
  background: rgba(0, 100, 255, 0.3);
  /* Azul clássico de seleção mas suave */
  color: transparent !important;
  /* Mantém o texto "invisível" para não sobrepor a imagem do Canvas */
}

/* Garante que a seleção respeite a largura exata das letras */
.textLayer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  pointer-events: auto;
}

.pdf-annotation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.pdf-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  animation: pdfSlideDown 0.3s ease;
}

@keyframes pdfSlideDown {
  from {
    transform: translate(-50%, -10px);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.color-picker {
  display: flex;
  gap: 6px;
}

.color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: var(--text);
}

.color-btn.yellow {
  background: #ffeb3b;
}

.color-btn.green {
  background: #ccff00;
}

.color-btn.blue {
  background: #00e5ff;
}

.color-btn.red {
  background: #ff4081;
}

.pdf-annotation-layer svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.highlight-path {
  pointer-events: auto;
  cursor: pointer;
  transition: fill-opacity 0.2s;
  fill-opacity: 0.4;
  /* Transparência única e uniforme */
}

.highlight-path:hover {
  fill-opacity: 0.6;
}

.note-indicator {
  position: absolute;
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 5;
  cursor: pointer;
  border: 2px solid white;
}

.pdf-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  z-index: 10;
  gap: 12px;
  color: var(--text2);
}

/* Popover de nota flutuante */
.pdf-note-popup {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  padding: 16px;
  min-width: 200px;
  max-width: 300px;
  z-index: 2000;
  animation: pdfPopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

@keyframes pdfPopIn {
  from {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

.pdf-note-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text3);
}

.pdf-note-popup-header {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-note-popup textarea {
  width: 100%;
  min-height: 80px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
}

.pdf-note-popup textarea:focus {
  border-color: var(--primary);
}

.pdf-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sidebar-note-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  /* Impede que o card seja espremido */
  border-left: 4px solid var(--primary);
  /* Cor padrão se não houver no inline */
}

.sidebar-note-item:hover {
  background: var(--surface);
  border-color: var(--primary);
}

/* Fix para a Barra Lateral de Notas */
.resolve-notas-sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

#resolve-notas-list {
  flex: 1 !important;
  overflow-y: auto !important;
  padding-bottom: 30px !important;
  height: auto !important;
}

.aula-markdown-content h1,
.aula-markdown-content h2,
.aula-markdown-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.aula-markdown-content p {
  margin-bottom: 1rem;
}

.aula-markdown-content ul,
.aula-markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.aula-markdown-content li {
  margin-bottom: 0.5rem;
}

.aula-markdown-content blockquote {
  border-left: 4px solid var(--primary-lt);
  padding-left: 1rem;
  color: var(--text3);
  font-style: italic;
  margin-bottom: 1rem;
}

.aula-markdown-content code {
  background: var(--surface2);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.aula-markdown-content pre {
  background: var(--surface2);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.aula-markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ===== UPLOAD PREVIEW ===== */
.upload-preview-container {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

.upload-preview-media {
  width: auto;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}

.upload-preview-info {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.upload-preview-info .material-symbols-outlined {
  font-size: 16px;
  color: var(--green);
}

.upload-preview-remove {
  color: var(--danger) !important;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.upload-preview-remove:hover {
  opacity: 1;
}

.md-toolbar {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: auto;
  justify-content: start;
  align-items: center;
  padding: 12px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1100;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin: 0 -16px 20px -16px;
  /* Estende até as bordas do modal-body */
  border-radius: 0;
}

.md-toolbar .md-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
}

.md-toolbar .md-btn:hover {
  background: var(--primary-lt);
  border-color: var(--primary);
  color: var(--primary);
}



.floating-lesson-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  /* Sobre o modal */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  padding: 0 !important;
  border: 2px solid #fff !important;
}

.floating-lesson-btn .material-symbols-outlined {
  font-size: 28px !important;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sendmessage {
  border-radius: 50px !important;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 5px;
  font-family: var(--font);

  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  padding: 14px 16px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.message-action-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.message-action-wrap .sendmessage {
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}

.message-options-button {
  width: 34px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.message-options-button:hover,
.message-action-wrap.is-open .message-options-button {
  background: var(--primary-lt);
  color: var(--primary);
}

.message-action-menu {
  position: absolute;
  z-index: 80;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  min-width: 270px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .16s ease, transform .16s ease;
}

.message-action-wrap.is-open .message-action-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.message-action-menu::after {
  position: absolute;
  /* O menu termina alinhado ao botão Enviar; a seta aponta para o botão de opções à esquerda. */
  right: 53px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  content: '';
  transform: rotate(45deg);
}

.message-action-menu button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .78rem;
  text-align: left;
  cursor: pointer;
}

.message-action-menu button:hover {
  background: var(--primary-lt);
  color: var(--primary);
}

.message-action-menu button .material-symbols-outlined {
  color: var(--primary);
  font-size: 18px;
}

.messagelist {
  height: 100%;
  width: 100%;
  max-width: 900px;
  background-color: transparent;

  overflow-y: auto;
  overflow-x: hidden;

  box-sizing: border-box;
  padding: 10px;

  /* Esconde a barra de rolagem */
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 15px !important;
}

.messagelist::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Mensagem recebida — esquerda */

.card {
  height: auto;
  width: fit-content;
  max-width: 90%;
  margin-top: 5px;
  margin-right: auto;

  padding: 10px 10px;

  background-color: rgb(255, 255, 255);
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);

  position: relative;

  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;

  width: 0;
  height: 0;

  border-top: 12px solid rgb(255, 255, 255);
  border-right: 12px solid transparent;
}

/* Mensagem enviada — direita */

.cardsend {
  height: auto;
  width: fit-content;
  max-width: 90%;
  margin-top: 5px;
  margin-left: auto;
  min-width: 70px;
  padding: 10px 10px;

  background-color: rgb(234, 219, 248);
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);

  position: relative;

  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cardsend::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -10px;

  width: 0;
  height: 0;

  border-top: 12px solid transparent;
  border-left: 12px solid rgb(234, 219, 248);
  border-bottom: 0 solid transparent;
}

/* Spacing rules: default small gap between consecutive messages (same author)
   and larger gap when author changes (bot -> user or user -> bot) */
.card+.card,
.cardsend+.cardsend {
  margin-top: 5px;
  /* same-author messages */
}

.card+.cardsend,
.cardsend+.card {
  margin-top: 10px;
  /* different-author messages */
}

.none {
  display: none !important;
}

.menssagemrobo {

  text-align: start;
  margin-bottom: 25px;
}

.vg-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 48px;
  min-height: 20px;
  margin: 0;
  flex-shrink: 0;
  flex: 0 0 auto;
}

.vg-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: typingDot 1s infinite ease-in-out;
  display: inline-block;
  vertical-align: middle;
}

.vg-typing-dots span:nth-child(2) {
  animation-delay: .14s;
}

.vg-typing-dots span:nth-child(3) {
  animation-delay: .28s;
}

.typewriter-message {
  white-space: pre-line;
}

@keyframes typingDot {

  0%,
  60%,
  100% {
    opacity: .3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.menssagemuser {

  text-align: start;
  margin-bottom: 20px;
}

.datahoramenssagemuser {
  position: absolute;

  right: 15px;
  text-align: start;
  bottom: 10px;

}




.filter-card {
  position: relative;

  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  min-height: 72px;

  padding: 12px 14px;

  border: 1px solid #e5e7eb;
  border-radius: 16px;

  background: #ffffff;

  text-align: left;
  cursor: pointer;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.filter-card:hover {
  transform: translateY(-2px);
  border-color: #8b5cf6;
  background: #faf8ff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.10);
}

.filter-card:active {
  transform: translateY(0);
}

.filter-card-icon {
  flex: 0 0 42px;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: linear-gradient(135deg,
      #f3e8ff,
      #ede9fe);

  font-size: 20px;
}

.filter-card-content {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;

  flex: 1;
}

.filter-card-content strong {
  color: #1f2937;

  font-size: 14px;
  font-weight: 700;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-card-content small {
  color: #94a3b8;

  font-size: 11px;
  font-weight: 500;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-card-arrow {
  flex: 0 0 auto;

  color: #a78bfa;

  font-size: 22px;
  line-height: 1;

  transition: transform 0.18s ease;
}

.filter-card:hover .filter-card-arrow {
  transform: translateX(3px);
}


/* ============================================================================
   NOVAVIEWGO · FLUTTER VISUAL SYSTEM
   Camada visual aplicada sobre os componentes existentes. A estrutura e os
   handlers JS permanecem intactos; esta camada apenas normaliza aparência,
   tipografia, espaçamento, estados e responsividade.
   ============================================================================ */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --primary: #7c3aed;
  --primary-lt: #f0ebf9;
  --primary-dk: #6d28d9;
  --primary-glow: rgba(124, 58, 237, .08);
  --danger: #dc2626;
  --danger-lt: rgba(220, 38, 38, .08);
  --green: #059669;
  --green-lt: rgba(5, 150, 105, .08);
  --red: #dc2626;
  --red-lt: rgba(220, 38, 38, .08);
  --warning: #d97706;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

button,
input,
textarea,
select {
  font-family: var(--font);
}

button {
  font-weight: 600;
}

/* Shared containers and cards */
.card,
.cardsend,
.profile-card,
.profile-mini-card,
.filter-card,
.modal-sheet,
.modal-sheet-auto,
.modal-sheet-full,
.settings-card,
.stat-card,
.content-card,
.question-card,
.post-card,
.course-card,
.results-card,
.search-card,
.upload-card {

  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.card,
.profile-card,
.profile-mini-card,
.filter-card,
.modal-sheet,
.modal-sheet-auto,
.modal-sheet-full,
.settings-card,
.stat-card,
.content-card,
.question-card,
.post-card,
.course-card,
.results-card,
.search-card,
.upload-card {
  background: var(--surface);
}

.card:hover,
.profile-mini-card:hover,
.filter-card:hover,
.content-card:hover,
.course-card:hover {
  border-color: rgba(124, 58, 237, .25) !important;
}

/* Buttons: Material 3-like, compact and rounded */
.btn {
  min-height: 40px;
  border-radius: 10px !important;
  border-width: 1px;
  gap: 8px;
  padding: 0 16px;
  font-size: .875rem;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--primary-dk) !important;
  border-color: var(--primary-dk) !important;
}

.btn-outline {
  background: var(--surface) !important;
  border-color: var(--border2) !important;
  color: var(--text2) !important;
}

.btn-outline:hover {
  background: var(--surface2) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.btn-ghost {
  color: var(--text2) !important;
  border-radius: 10px !important;
}

.btn-ghost:hover {
  background: var(--primary-glow) !important;
  color: var(--primary) !important;
}

.btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: .8125rem;
}

.btn-icon-sm {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}

/* Inputs and form controls */
.field-label,
label {
  color: var(--text2);
  font-size: .8125rem;
  font-weight: 600;
}

.field-input,
input,
textarea,
select,
.search-input {
  border: 0px solid var(--border) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  min-height: 42px;
  font-size: .875rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}


::placeholder {
  color: var(--text3);
  opacity: 1;
}

/* Auth / Flutter-like landing surface */
#login-screen {
  background: var(--bg);
}

.login-wrap {
  background: transparent;
}

.login-hero {
  background-color: var(--primary) !important;
}

.login-footer {
  border-radius: 20px 20px 0 0 !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 -12px 32px rgba(15, 23, 42, .08);
}

.login-title {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -.04em;
}

.login-sub {
  font-family: var(--font);
}

.login-footer .field-input {
  border-radius: 10px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

.auth-nav {
  gap: 10px;
}

.step-dot.active {
  background: var(--primary) !important;
}

/* App shell, top bar and navigation */
.app-shell,
#app-screen,
.app-container {
  background: var(--bg);
}

.topbar,
.app-header,
header {
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.topbar-title,
.page-title,
.modal-title {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.025em;
}

.sidebar,
.bottom-nav,
.mobile-nav {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

.nav-item,
.sidebar-item,
.bottom-nav-item {
  border-radius: 10px !important;
  color: var(--text2);
}

.nav-item.active,
.sidebar-item.active,
.bottom-nav-item.active {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
  font-weight: 700;
}

.main-content,
.cal-view {
  background: var(--bg);
}

/* Headings and content hierarchy */
h1,
h2,
h3,
h4 {
  color: var(--text);
  letter-spacing: -.03em;
}

h1 {
  font-weight: 800;
}

h2,
h3 {
  font-weight: 700;
}

p {
  color: var(--text2);
}

.text-muted,
.muted,
small {
  color: var(--text3);
}

/* Question cards, tags, answer states */
.questao-card,
.question-card,
.card-question {
  border-radius: 12px !important;
}

.badge,
.tag,
.chip,
.category-chip,
.status-badge {
  border-radius: 999px !important;
  font-weight: 600;
}

.correct,
.success,
.answer-correct {
  color: var(--green) !important;
}

.incorrect,
.danger,
.answer-wrong {
  color: var(--danger) !important;
}

/* Modals and bottom sheets */
.modal-overlay {
  background: rgba(15, 23, 42, .42) !important;
  backdrop-filter: blur(3px);
}

.modal-sheet,
.modal-sheet-auto,
.modal-sheet-full {
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}

.modal-header {
  border-bottom-color: var(--border) !important;
}

.modal-footer {
  border-top-color: var(--border) !important;
}

.modal-handle {
  background: var(--border2) !important;
  border-radius: 999px !important;
}

/* Filter panel */
.filter-modal-sheet {
  border-radius: 20px !important;
}

.filter-card {
  padding: 14px !important;
}

.filter-card-icon {
  color: var(--primary) !important;
  background: var(--primary-glow) !important;
  border-radius: 10px !important;
}

.filter-card-arrow {
  color: var(--text3) !important;
}

/* Floating action button */
.fab-main-btn {
  background: var(--primary) !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, .28) !important;
}

/* Scrollbars follow the light Flutter surface */
* {
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

@media (min-width: 861px) {
  body {
    font-size: 15.5px;
  }
}

@media (min-width: 1201px) {
  body {
    font-size: 16px;
  }
}

@media (max-width: 700px) {
  .btn {
    min-height: 42px;
  }

  .modal-sheet,
  .modal-sheet-auto {
    border-radius: 20px 20px 0 0 !important;
  }

  .modal-sheet-full {
    border-radius: 0 !important;
  }

  .main-content {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}


/* ============================================================================
   CONVERSAS · painel desktop + terceira aba mobile
   ============================================================================ */
.conversations-panel {
  display: flex;
  flex: 0 0 316px;
  width: 316px;
  min-width: 316px;
  height: 100%;
  flex-direction: column;
  gap: 0;
  padding: 0px 0px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 8;
}

.conversations-panel-header,
.conversations-mobile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
}

.conversations-panel-header h2,
.conversations-mobile-heading h1 {
  margin: 0px 0 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.035em;

}

.conversations-eyebrow {
  display: block;
  color: var(--primary);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.conversations-panel-subtitle {
  margin: 6px 0 18px;
  color: var(--text3);
  font-size: .75rem;
}

.conversations-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 0px;
  overflow-y: auto;
  padding: 0px 0px 0px;
  margin: 0px !important;
  padding-bottom: 100px !important;
}

.conversations-panel,
.conversations-mobile-shell {
  position: relative;
}

.conversations-scroll-bottom {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 22px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(124, 58, 237, .28);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.92);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.conversations-scroll-bottom.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.conversations-scroll-bottom:hover {
  background: var(--primary-dark, #5b21b6);
}

.conversations-scroll-bottom .material-symbols-outlined {
  font-size: 21px;
}

.conversations-scroll-bottom-mobile {
  display: none;
}

.conversation-card {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  border-radius: 0px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  margin-top: 0px !important;

}

.conversation-card:hover,
.conversation-card.active {
  border-color: rgba(124, 58, 237, .32);
  background: var(--primary-glow);
}

.conversation-card:active {
  transform: translateY(1px);
}

.conversation-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 19px;
}

.conversation-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.conversation-card-body strong {
  overflow: hidden;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card-body small {
  overflow: hidden;
  color: var(--text3);
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card-date {
  align-self: flex-start;
  color: var(--text3);
  font-size: .62rem;
  white-space: nowrap;
}

.conversation-card-pin {
  margin-right: 4px;
  color: var(--primary);
  font-size: 14px;
  vertical-align: -2px;
}

.conversation-card-menu-wrap {
  position: relative;
  align-self: flex-start;
  flex: 0 0 auto;
}

.conversation-card-menu-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
}

.conversation-card-menu-button:hover,
.conversation-card-menu-wrap.is-open .conversation-card-menu-button {
  background: var(--primary-glow);
  color: var(--primary);
}

.conversation-card-menu-button .material-symbols-outlined {
  font-size: 20px;
}

.conversation-card-menu {
  position: absolute;
  z-index: 30;
  top: 32px;
  right: 0;
  display: none;
  min-width: 200px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.conversation-card-menu-wrap.is-open .conversation-card-menu {
  display: grid;
}

.conversation-card-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .74rem;
  text-align: left;
  cursor: pointer;
}

.conversation-card-menu button:hover {
  background: var(--surface2);
}

.conversation-card-menu button.danger {
  color: var(--danger);
}

.conversation-card-menu button .material-symbols-outlined {
  font-size: 17px;
}

.conversations-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 34px 16px;
  flex-direction: column;
  color: var(--text3);
  text-align: center;
  font-size: .74rem;
}

.conversations-empty .material-symbols-outlined {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 30px;
}

.conversations-empty strong {
  color: var(--text2);
  font-size: .8rem;
}

.conversations-mobile-view {
  display: none !important;
}

.botaonotamob {
  display: flex;
}

@media (max-width: 900px) {
  .botaonotamob {
    display: none !important;
  }

  .field-input {
    min-width: auto !important;
    max-width: auto !important;
    min-width: auto !important;
  }

  .conversations-panel {
    display: none !important;
  }

  .main-content.mobile-section-pager>#view-year,
  .main-content.mobile-section-pager>#view-conversations {
    display: flex !important;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    touch-action: pan-x pan-y;
  }

  .main-content.mobile-section-pager>#view-month {
    display: none !important;
  }

  .main-content.mobile-section-pager>#view-conversations {
    order: 1;
  }

  .main-content.mobile-section-pager>#view-year {
    order: 2;
  }

  .conversations-mobile-view {
    background: var(--bg) !important;
  }

  .conversations-mobile-shell {
    width: min(100%, 720px);
    min-height: 100%;
    margin: 0 auto;
    padding: 0px 0px 0px;
  }

  #btn-conversations-scroll-bottom {
    display: none;
  }

  .conversations-scroll-bottom-mobile {
    position: fixed;
    right: 18px;
    bottom: calc(22px + env(safe-area-inset-bottom));
    display: grid;
  }

  .conversations-mobile-heading h1 {
    font-size: 1.5rem;
  }

  .conversations-mobile-heading p {
    margin: 5px 0 0;
    color: var(--text3);
    font-size: .8rem;
  }

  .conversations-mobile-heading .btn {
    min-height: 38px;
    padding: 0 11px;
    font-size: .75rem;
  }

  .conversations-list-mobile {
    margin-top: 22px;
    overflow: visible;
  }

  .conversations-list-mobile .conversation-card {
    min-height: 76px;
    padding: 13px;
  }

  .conversations-list-mobile .conversation-card-body strong {
    font-size: .85rem;
  }

  .conversations-list-mobile .conversation-card-body small {
    font-size: .75rem;
  }
}

@media (min-width: 901px) {
  .conversations-panel+.main-wrapper {
    min-width: 0;
  }

  #btn-conversations-side {
    order: 1;
  }
}


/* ============================================================================
   CONVERSAS · transição desktop entre Perfil e Chat
   ============================================================================ */
@media (min-width: 901px) {
  .conversations-panel {
    overflow: hidden;
    transform: translateX(0);
    opacity: 1;
    transition:
      transform .22s cubic-bezier(.4, 0, .2, 1),
      opacity .16s ease,
      flex-basis .22s cubic-bezier(.4, 0, .2, 1),
      width .22s cubic-bezier(.4, 0, .2, 1),
      min-width .22s cubic-bezier(.4, 0, .2, 1),
      padding .22s cubic-bezier(.4, 0, .2, 1),
      border-color .16s ease;
    will-change: transform, opacity, width;
  }

  .conversations-panel.conversations-panel-hidden {
    flex-basis: 0;
    width: 0;
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
    border-right-color: transparent !important;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
}


/* ============================================================================
   CHAT · balões com cauda curva estilo WhatsApp
   ============================================================================ */
.messagelist>.card,
.messagelist>.cardsend {
  position: relative;
  overflow: visible !important;
}

/* Balão do ViewGo: cauda no canto superior esquerdo */
.messagelist>.card {
  border-radius: 4px 18px 18px 18px !important;
}

.messagelist>.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 14px;
  height: 16px;
  background: rgb(255, 255, 255);
  border-top-left-radius: 11px;
  border-bottom-right-radius: 12px;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  z-index: 1;
}



.messagelist>.cardsend::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 14px;
  height: 16px;
  background: rgb(234, 219, 248);
  border-top-left-radius: 12px;
  border-bottom-right-radius: 11px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* Indicador de "pensando": última bolha da conversa, com cauda inferior esquerda */
.messagelist>.vg-typing-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 72px;
  min-height: 40px;
  margin-top: 10px;
  margin-right: auto;
  margin-bottom: 0;
  padding: 10px 12px;
}

.messagelist>.vg-typing-indicator::after {
  content: "";
  position: absolute;
  top: auto;
  right: auto;
  bottom: -10px;
  left: 8px;
  width: 0;
  height: 0;
  background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid rgb(255, 255, 255);
  border-bottom: 0;
  border-radius: 0;
  clip-path: none;
  z-index: 1;
}

/* Evita que o horário encoste na cauda do balão do usuário */
.messagelist>.cardsend .datahoramenssagemuser {
  right: 15px;
  padding-right: 2px;
}

#btn-conversations-side {
  display: none !important;
}

/* Em telas grandes, o histórico já aparece no painel lateral dedicado. */
@media (max-width: 900px) {
  #btn-conversations-side {
    display: flex !important;
  }
}



.message-copy-btn {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text3);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.message-copy-btn .material-symbols-outlined {
  font-size: 14px;
}

.message-copy-btn:hover,
.message-copy-btn:focus-visible {
  background: var(--primary-glow);
  color: var(--primary);
}

.message-copy-btn.copied {
  color: var(--green);
}


/* Capa personalizável do chat */
.chat-cover-controls {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  display: none !important;
}

.chat-cover-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  background: rgba(20, 20, 28, .42);
  color: #fff;
  font: 600 11px var(--font);
  cursor: pointer;
  backdrop-filter: blur(7px);
  transition: background .16s ease, transform .16s ease;
}

.chat-cover-button:hover {
  background: rgba(20, 20, 28, .62);
  transform: translateY(-1px);
}

.chat-cover-button .material-symbols-outlined {
  font-size: 16px;
}

.chat-cover-crop-container {
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.chat-cover-crop-container img {
  display: block;
  max-width: 100%;
}


@media (max-width: 900px) {


  .chat-cover-controls {
    top: 8px;
    right: 8px;
  }

  .chat-cover-button span:last-child {
    display: none;
  }

  .chat-cover-button {
    padding: 7px;
    border-radius: 50%;
  }




  .card {

    max-width: 99%;

  }


  .cardsend {

    max-width: 99%;

  }

  .btnmobileside {
    border-radius: 0px !important;
  }

  .btnmobileside {
    border-radius: 0px !important;
    position: relative;
  }

  .btnmobileside.btn-primary::after {
    content: "➜";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #8b5cf6;
    color: white;
    border-radius: 50% !important;

    font-size: 16px;
    font-weight: bold;

    z-index: 10;
  }
}

#pesquisaconversa {
  background-color: #ececec73 !important;
  margin: 10px;
  padding: 10px;
  padding-left: 20px;
  margin-top: 0px;
  color: rgb(68, 68, 68);
}



/* Note cards in sidebars and modal */
.note-card {

  border-bottom: 1px solid var(--border);
  border-radius: 0px;
  padding: 14px;
  position: relative;
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.2s;
  background-color: white;
  min-width: 100% !important;
  margin: 0px !important;
}

.note-card:hover {
  box-shadow: var(--shadow-sm);
  background-color: rgba(238, 237, 237, 0.582);

}

.note-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.note-card-text {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0px solid var(--border);
}

.note-card-date {
  font-size: 0.72rem;
  color: var(--text3);
}

.note-card-origin {
  font-size: 0.72rem;
  color: var(--primary);
  background: var(--primary-lt);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  display: none;
}

.note-card::after {
  content: "";
  position: absolute !important;
  top: 0;
  left: -1px;

  width: 0;
  height: 0;

  border-top: 0px solid rgb(255, 255, 255) !important;
  border-right: 0px solid transparent !important;

}

.topbar-avatar {
  border-radius: 100% !important;
  border: solid 2px rgb(255, 255, 255);
}

#btn-go-to-conversation {
  border: solid 0px white !important;
  box-shadow: 0px !important;
}

/* ==================== PROFILE SKELETON LOADING ==================== */
@keyframes profileSkeletonShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.profile-skeleton-block {
  background: linear-gradient(90deg,
      #eef2f7 0%,
      #e2e8f0 50%,
      #eef2f7 100%);
  background-size: 200% 100%;
  animation: profileSkeletonShimmer 1.5s infinite linear;
  border-radius: var(--radius-sm, 4px);
  display: inline-block;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
}

[data-theme="dark"] .profile-skeleton-block,
body.dark-theme .profile-skeleton-block {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
}

.profile-skeleton-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 5px);
  box-sizing: border-box;
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.profile-fade-in {
  animation: profileFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes profileFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#btn-shortcut-sound {
  display: none !important;
}

/* ===== QUESTION COMMENTS FULLSCREEN DRAWER (RIGHT TO LEFT) ===== */
.comments-drawer-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.comments-drawer-sheet {
  width: 80%;
  height: 100vh;
  background: var(--surface, #ffffff);
  color: var(--text, #1e293b);

  display: flex;
  flex-direction: column;

  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  justify-content: center;
  align-items: center;

  /* Borda lateral */
  border-left: 4px solid #f1f5f9;

  /* Efeito de flutuação */
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 900px) {
  .comments-drawer-modal {
    width: 100vw;
  }

  .comments-drawer-sheet {
    width: 100%;
  }
}

.comments-drawer-modal.active {
  opacity: 1;
  pointer-events: auto;
}


.comments-drawer-modal.active .comments-drawer-sheet {
  transform: translateX(0);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--surface2, #f8fafc);
  width: 100%;
}

.comments-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-header-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0;
}

.comments-count-badge {
  background: var(--primary, #f97316);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.comments-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  width: 100%;
}

.comment-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 0px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #cbd5e1;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-owner-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 1;
  transition: opacity 0.18s ease;
  flex-shrink: 0;
}

.comment-card:hover .comment-owner-actions {
  opacity: 1;
}

.btn-comment-edit,
.btn-comment-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.15s;
  padding: 0;
  line-height: 1;
  background: transparent;
}

.btn-comment-edit {
  width: 26px;
  height: 26px;
  color: var(--text3, #94a3b8);
}

.btn-comment-edit:hover {
  background: var(--primary-lt, #fff7ed);
  color: var(--primary, #f97316);
  transform: scale(1.1);
}

.btn-comment-delete {
  width: 26px;
  height: 26px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text3, #94a3b8);
}

.btn-comment-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger, #ef4444);
  transform: scale(1.1);
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #1e293b);
}

.comment-date {
  font-size: 11px;
  color: var(--text3, #94a3b8);
  margin-left: 6px;
}

.comment-text {
  font-size: 13px;
  color: var(--text, #334155);
  margin-top: 4px;
  line-height: 1.5;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-like-comment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2, #475569);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-like-comment.liked {
  background: #fff7ed;
  border-color: #7c3bed;
  color: #7c3bed;
  font-weight: 600;
}

.comments-footer-form {
  padding: 12px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #ffffff);
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}

.comments-actions-group {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.comments-actions-group textarea#new-comment-textarea {
  flex: 1;
  width: 100%;
  height: 40px;
  min-height: 40px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 14px;
  line-height: 20px;
  outline: none;
  resize: none;
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}



.comments-markdown-dropdown {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 270px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.comments-markdown-dropdown.hidden {
  display: none !important;
}

.comments-dropdown-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3, #64748b);
}

/* Bolinha Pulsante Indicadora de Comentários */
.comment-indicator-dot {
  position: relative;
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

.comment-indicator-dot .ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #a78bfa;
  opacity: 0.75;
  animation: pingDot 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.comment-indicator-dot .dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

@keyframes pingDot {

  75%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Banner de Notificação de Edição de Comentário */
.comment-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  margin-bottom: 8px;
  background: var(--primary-lt, #fff7ed);
  border: 1px solid var(--primary, #f97316);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary, #f97316);
  transition: all 0.2s ease;
}

.comment-editing-banner.hidden {
  display: none !important;
}

.comment-editing-banner button {
  border: none;
  background: transparent;
  color: var(--text3, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.comment-editing-banner button:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--danger, #ef4444);
}

/* ==========================================================================
   DESIGN EXCLUSIVO PARA BOTÕES DO MENU (#side-menu) NO DESKTOP (>= 900px)
   - Apenas ícones (texto oculta)
   - Sem fundo (transparente)
   - Sem bordas ou sombras
   - Oculta o botão #btn-conversations-side no desktop (usado apenas no mobile)
   - Em telas mobile (< 900px), mantém o estilo e textos originais
   ========================================================================== */
@media (min-width: 900px) {

  #btn-conversations-side {
    display: none !important;
  }

  #side-menu .btn:not(#btn-conversations-side),
  #side-menu button:not(#btn-collapse-sidebar):not(#btn-conversations-side) {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 12px 0 !important;
    margin: 0 0 8px 0 !important;
    width: 100% !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  /* Oculta o texto de todos os botões do #side-menu no desktop */
  #side-menu .btn span:not(.material-symbols-outlined),
  #side-menu button:not(#btn-collapse-sidebar) span:not(.material-symbols-outlined),
  #side-menu [data-i18n] {
    display: none !important;
  }

  /* Estilização centralizada do ícone */
  #side-menu .btn:not(#btn-conversations-side) .material-symbols-outlined,
  #side-menu button:not(#btn-collapse-sidebar):not(#btn-conversations-side) .material-symbols-outlined {
    margin: 0 !important;
    font-size: 24px !important;
    color: var(--text2, #64748b) !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
  }

  /* Efeitos visuais de interatividade (Hover e Active) */
  #side-menu .btn:not(#btn-conversations-side):hover,
  #side-menu button:not(#btn-collapse-sidebar):not(#btn-conversations-side):hover {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  #side-menu .btn:not(#btn-conversations-side):hover .material-symbols-outlined,
  #side-menu button:not(#btn-collapse-sidebar):not(#btn-conversations-side):hover .material-symbols-outlined {
    color: var(--primary, #f97316) !important;
    transform: scale(1.2) !important;
  }

  #side-menu .btn:not(#btn-conversations-side):active .material-symbols-outlined,
  #side-menu button:not(#btn-collapse-sidebar):not(#btn-conversations-side):active .material-symbols-outlined {
    transform: scale(0.95) !important;
  }

  /* Posicionamento do botão Sair (Logout) no rodapé */
  #side-menu #btn-logout {
    position: absolute !important;
    bottom: 16px !important;
    left: 0 !important;
    margin: 0 !important;
    border-top: none !important;
  }
}

.messagelist-back-to-top {
  position: fixed;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary, #1f2937);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.16));
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
 height: 50px;
 width: 50px;
}

.messagelist-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.messagelist-back-to-top .material-symbols-outlined { font-size: 20px; }
/* Realça a ação escolhida no Gerenciador de respostas. */
.admin-response-action-option:has(input:checked) {
  border-color: var(--primary) !important;
  background: rgba(124, 58, 237, 0.08);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.16);
}
.admin-response-action-option:focus-within {
  outline: 2px solid rgba(124, 58, 237, 0.28);
  outline-offset: 2px;
}

.message-copy-label {
  font-size: 14px;
}

/* Desktop login proportions */
@media (min-width: 901px) {
  .login-wrap {
    flex-direction: row;
  }

  .login-hero {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
  }

  .login-footer {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    box-sizing: border-box;
  }
}


#inp-email {
width: 100% !important;
}

/* Keep login fields aligned with the auth action buttons */
.login-footer #login-form,
.login-footer .auth-step-container,
.login-footer .auth-step-wrapper,
.login-footer .auth-step,
.login-footer .field-group,
.login-footer .auth-nav {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.login-footer .auth-step {
  padding-left: 0;
  padding-right: 0;
}

.login-footer .field-input {
  width: 100%;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
