:root {
  --main-dark-20: color-mix(in srgb, var(--main-color) 80%, black);
  --main-dark-40: color-mix(in srgb, var(--main-color) 60%, black);
  --main-light-20: color-mix(in srgb, var(--main-color) 80%, white);
  --sidebar-width: 256px;
}

body {
  font-family: "Manrope";
}

a:not(.btn):not(.paginate_button):hover h4 {
  color: white !important;
}

a:not(.btn):not(.paginate_button).active {
  color: white !important;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.holder {
  width: 100vw;
  height: 100vh;
  background-color: #F4F7FB;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 90px 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar content";
  overflow: hidden !important;
}

.holder #vue-content {
  height: 100%;
  max-width: 90%;
  width: 100%;
  margin: 0 auto;
  padding-top: 0.5rem;
}

@media (min-width: 992px) {
  .holder #vue-content {
    max-width: 85%;
  }
}

@media (min-width: 1400px) {
  .holder #vue-content {
    max-width: 80%;
  }
}

@media (min-width: 1920px) {
  .holder #vue-content {
    max-width: 75%;
  }
}

/* Centralizar conteudo das paginas de consulta */
.patient-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  padding: 1rem !important;
}

.patient-wrapper .mv-card {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.patient-wrapper .meet-wrapper {
  max-width: 100%;
  padding: 1.5rem !important;
}

/* ============================================
   DESKTOP HEADER
   ============================================ */

.patient-header {
  grid-area: header;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.patient-header-greeting {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.patient-header-label {
  font-size: 14px;
  color: #6a7282;
  font-weight: 400;
}

.patient-header-name {
  font-size: 16px;
  font-weight: 700;
  color: #101828;
}

/* WhatsApp button position */
.holder > a {
  position: fixed;
  top: 22px;
  right: 2rem;
  z-index: 100;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  grid-area: sidebar;
  /* Cor do menu lateral configurada na clínica (ver global_base.html) */
  background-color: var(--redesign-sidebar-bg, #2f2f2f);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
  box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1), 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 20;
}

/* Brand area */
.patient-sidebar-brand {
  height: 89px;
  padding: 16px 24px;
  border-bottom: 1px solid #404040;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Somente a logomarca: sem bloco/fundo, sem quadrado fixo e sem recorte.
   A proporção original é preservada (width/height auto + object-fit: contain). */
.patient-sidebar-logo {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 57px;
  border-radius: 0;
  background-color: transparent;
  object-fit: contain;
  flex-shrink: 0;
}

.patient-sidebar-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #d0fae5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.patient-sidebar-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--redesign-sidebar-text, #ffffff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Navigation items */
.sidebar .sidebar-menu {
  list-style: none;
  padding: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar .nav-item {
  width: 100%;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-radius: 6px;
  color: var(--redesign-sidebar-text, #ffffff) !important;
  text-decoration: none;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: 400;
  transition: background-color 0.2s;
}

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

.sidebar .nav-link.active {
  background-color: var(--main-color, #096) !important;
  color: var(--main-color-contrast, #ffffff) !important;
}

.sidebar .nav-link.active .custom-icon {
  color: var(--main-color-contrast, #ffffff) !important;
}

.sidebar .custom-icon {
  font-size: 20px;
  color: var(--redesign-sidebar-text, #ffffff) !important;
  flex-shrink: 0;
}

/* Profile fixed at bottom */
.patient-sidebar-profile {
  border-top: 1px solid #404040;
  padding: 17px 16px;
  flex-shrink: 0;
}

.patient-sidebar-profile .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-radius: 6px;
  color: var(--redesign-sidebar-text, #ffffff) !important;
  text-decoration: none;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: 400;
  transition: background-color 0.2s;
}

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

.patient-sidebar-profile .nav-link.active {
  background-color: var(--main-color, #096) !important;
  color: var(--main-color-contrast, #ffffff) !important;
}

.patient-sidebar-profile .custom-icon {
  font-size: 20px;
  color: var(--redesign-sidebar-text, #ffffff) !important;
  flex-shrink: 0;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
  grid-area: content;
  overflow: auto;
  overflow-x: hidden;
  padding-top: 0.5rem;
}

/* ============================================
   LEGACY CLASSES (kept for compatibility)
   ============================================ */

.bg-pacient {
  background-color: var(--main-color);
}

.bg-pacient-dark {
  background: var(--main-color-dark);
  color: white;
}

.bg-pacient-dark h4 {
  color: white;
}

.bg-main-light {
  background-color: color-mix(in srgb, var(--main-color) 30%, white);
}

.btn-primary {
  background-color: var(--main-color);
  border: 0px;
}

.border-primary {
  border-color: var(--main-color) !important;
}

.btn:hover {
  background-color: var(--main-color-hover);
}

.whats {
  border-radius: 500px;
}

/* MAIN */
.main-wrapper {
  min-height: calc(100vh - 128px);
  align-items: stretch;
}

.header-branding {
  width: var(--sidebar-width);
}

/* Legacy patient-sidebar (used in old layout, kept for sub-page compatibility) */
.patient-sidebar {
  background-color: var(--main-color);
  width: var(--sidebar-width);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.patient-sidebar .sidebar-menu {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.patient-sidebar .nav-item {
  width: 100%;
  text-align: left !important;
}

.patient-sidebar .nav-link {
  color: white !important;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px !important;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s;
}

.patient-sidebar .nav-link:hover {
  transform: scale(1.1);
}

.patient-sidebar .custom-icon {
  color: white !important;
  font-size: 24px;
}

.patient-sidebar .nav-link.active {
  color: var(--main-dark-40);
  font-weight: bold;
}

.patient-sidebar .nav-link.active iconify-icon,
.patient-sidebar .nav-link.active .custom-icon {
  color: var(--main-dark-40) !important;
  --icon-color: var(--main-dark-40) !important;
}

.patient-sidebar .sidebar-nav .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  align-items: center;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.action-card {
  transition: transform .2s ease;
  width: 100%;
}

.action-card:hover {
  transform: translateY(-4px);
}

.cta-card {
  min-height: 220px;
  background-color: #ED0E4E;
}

.records .action-card {
  min-height: 120px;
}

.mv-card {
  background-color: #F4F7FB;
  max-width: 700px;
  width: 100%;
}

.card-main-strong {
  background-color: var(--main-dark-20);
}

.card-main-dark {
  background-color: var(--main-dark-40);
}

.card-main-light {
  background-color: var(--main-light-20);
}

.wrapper {
  padding-bottom: 0px;
}

.custom-icon {
  font-size: 24px;
}

.custom-link {
  height: 100px;
  width: 100px;
}

.waiting-img {
  max-height: 450px;
  width: 100%;
}

.attachment-list-enter-active,
.attachment-list-leave-active {
  transition: all 0.5s ease;
}

.attachment-list-enter-from {
  opacity: 0;
  transform: translateY(-20px);
}

.attachment-list-leave-to {
  opacity: 0;
  transform: translateX(20px);
}

.attachment-item {
  transition: all 0.3s ease;
  min-height: 37px;
}

.attachment-filename {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mic-bar-true-gradient {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #28a745, #ffc107, #dc3545);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.star {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ccc;
  flex-grow: 1;
}

.star i {
  transition: color 0.5s, transform 0.5s;
  position: relative;
}

.star.selected i,
.star.hover i {
  color: #f4c150 !important;
  transform: scale(1.25);
}

.star-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background-color: rgba(244, 193, 80, 0.5);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.star-pulse.active {
  animation: pulse 0.5s ease-out;
}

#vue-content {
  flex-grow: 1;
  width: 100%;
  padding: 20px 40px;
  background-color: #F4F7FB;
}

@keyframes pulse {
  0% {
    width: 0;
    height: 0;
    opacity: 0.7;
  }
  100% {
    width: 45px;
    height: 45px;
    opacity: 0;
  }
}

.logo {
  max-width: 150px;
  height: auto;
}

.patient-card-title {
  background-color: var(--main-dark-40)
}

.patient-card-title-body {
  height: 140px;
}

@media (max-width: 575px) {
  .meet-wrapper {
    padding: 1rem !important;
  }

  #connection-status :not(i) {
    display: none !important;
  }

  .mv-card {
    flex-grow: 1;
    width: 100vw;
  }

  .patient-wrapper {
    padding: 0 !important;
  }

  a {
    font-size: 12px !important;
  }

  .custom-icon {
    font-size: 20px;
  }
}

@media (max-width: 376px) {
  ul {
    gap: 0px;
  }

  li a {
    padding: 0 !important;
  }
}

/* ============================================
   MOBILE MENU STYLES
   ============================================ */

/* Mobile Only Styles */
@media (max-width: 991px) {
  /* Mobile Header */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1001;
  }

  .mobile-logo {
    height: 35px;
    width: auto;
    margin-right: 0.75rem;
  }

  .mobile-user-name {
    font-weight: 600;
    color: #000;
    font-size: 0.95rem;
    flex: 1;
  }

  /* WhatsApp button on mobile */
  .holder > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    top: 10px !important;
    right: 1rem !important;
    z-index: 1002 !important;
    margin: 0 !important;
    height: 40px !important;
    width: 40px !important;
  }

  /* Reduzir tamanho do icone do WhatsApp */
  .holder > a img,
  .holder > a svg,
  .holder > a iconify-icon {
    max-height: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    width: 32px !important;
  }

  /* Hide desktop header on mobile */
  .patient-header {
    display: none !important;
  }

  /* Hide sidebar brand and profile on mobile */
  .patient-sidebar-brand {
    display: none !important;
  }

  .patient-sidebar-profile {
    display: none !important;
  }

  /* Hide nav text on mobile */
  .nav-text {
    display: none !important;
  }

  /* Holder adjustments */
  .holder {
    display: flex !important;
    flex-direction: row !important;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
    grid-template-areas: unset !important;
    padding-top: 0;
    overflow: hidden !important;
    height: 100vh;
  }

  /* Sidebar adjustments - always visible, icons only, below mobile header */
  .sidebar {
    display: flex !important;
    position: fixed;
    top: 60px;
    left: 0;
    width: 60px;
    height: calc(100vh - 60px);
    z-index: 1000;
    overflow-y: auto;
    grid-area: unset !important;
    padding-top: 0;
    border-right: none;
    box-shadow: none;
  }

  .sidebar .sidebar-menu {
    width: 100%;
    padding: 0.5rem 0;
    margin-top: 0;
    gap: 0;
  }

  .sidebar .nav-item {
    width: 100%;
  }

  .sidebar .nav-link {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0 !important;
    min-height: 60px;
    gap: 0;
    height: auto;
  }

  .sidebar .custom-icon {
    font-size: 26px !important;
    width: 26px;
    height: 26px;
  }

  /* Content adjustments */
  .content {
    grid-area: unset !important;
    flex: 1;
    margin-left: 60px;
    margin-top: 60px;
    width: calc(100% - 60px);
    height: calc(100vh - 60px);
    overflow-y: auto !important;
    padding: 0.75rem;
  }

  /* Reduzir espacamento interno dos cards */
  .card-body {
    padding: 0.75rem !important;
  }

  .patient-wrapper .card-body {
    padding: 0.5rem !important;
  }

  /* Reduzir espacamento dos cards de acao */
  .action-card {
    padding: 0.75rem !important;
  }

  /* Ajustar gaps entre elementos */
  .row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
  }

  .row > * {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .content-wrapper {
    padding: 0.5rem !important;
  }

  /* Reduzir padding do content */
  .content {
    padding: 0.5rem !important;
  }

  /* Remover padding do vue-content */
  #vue-content {
    padding: 0 !important;
  }
}

/* Telas menores que 622px - Imagens acima do texto */
@media (max-width: 622px) {
  .action-card {
    flex-direction: column !important;
    text-align: center !important;
  }

  .action-card img {
    margin: 0 auto 0.75rem auto !important;
  }

  .action-card .flex-grow-1 {
    width: 100% !important;
  }

  .action-card h5,
  .action-card h6,
  .action-card p {
    text-align: center !important;
  }

  /* Ajustar titulo da pagina de agendamentos */
  .card-header h5 {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }
}

/* Ajustes para paginas normais (nao consulta) - Desktop */
@media (min-width: 992px) {
  /* Paginas de agendamentos, historico e perfil nao usam patient-wrapper centralizado */
  .patient-wrapper:has(#schedule_app),
  .patient-wrapper:has(.dataTable),
  .patient-wrapper:not(:has(.mv-card)) {
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    padding: 0 !important;
  }

  #schedule_app {
    max-width: 100% !important;
    width: 100% !important;
  }

  #schedule_app .card {
    max-width: 100% !important;
  }

  #schedule_app .card-body {
    padding: 1.5rem !important;
  }

  /* Paginas com datatables (historico) */
  .patient-wrapper:has(.dataTable) .card {
    max-width: 100% !important;
  }

  .patient-wrapper:has(.dataTable) .card-body {
    padding: 1.5rem !important;
  }
}

/* Ajustes para pagina de agendamentos em mobile */
@media (max-width: 991px) {
  /* Pagina de agendamentos no mobile - nao centralizar */
  .patient-wrapper:has(#schedule_app) {
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    padding: 0 !important;
  }

  .patient-wrapper:has(#schedule_app) .d-flex.flex-column {
    width: 100% !important;
  }

  .patient-wrapper:has(#schedule_app) .card-body {
    padding: 0.5rem !important;
  }

  #schedule_app {
    padding: 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #schedule_app .card-body {
    padding: 0.5rem !important;
  }

  #schedule_app .border.mb-4.rounded {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* Ajustes para pagina de agendamentos em telas pequenas */
@media (max-width: 680px) {
  /* Ajustar titulo do stepper */
  #schedule_app .card-header h5 {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }

  /* Forcar stepper em coluna vertical */
  #schedule_app .d-flex.justify-content-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Ocultar linhas horizontais entre passos */
  #schedule_app hr.flex-grow-1 {
    display: none !important;
  }

  /* Ajustar cada passo do stepper */
  #schedule_app .text-center.flex-shrink-0 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  /* Circulo do numero */
  #schedule_app .rounded-circle {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  /* Container do texto ao lado do circulo */
  #schedule_app .text-center.flex-shrink-0 > div:last-child {
    flex: 1 !important;
    margin-top: 0.25rem !important;
  }

  /* Texto do passo */
  #schedule_app .fs-3 {
    font-size: 0.85rem !important;
    margin-top: 0 !important;
    text-align: left !important;
  }

  /* Informacao selecionada (especialidade, data, etc) */
  #schedule_app .fs-3 span {
    font-size: 0.8rem !important;
  }

  /* Reduzir padding dos cards */
  #schedule_app .card-body {
    padding: 0.75rem !important;
  }

  #schedule_app .border.mb-4.rounded {
    padding: 0.75rem !important;
  }
}

@media (max-width: 768px) and (min-width: 681px) {
  /* Ajustar stepper para tablets */
  #schedule_app .card-header h5 {
    font-size: 1.05rem !important;
  }

  #schedule_app .fs-3 {
    font-size: 0.85rem !important;
  }

  #schedule_app .card-body {
    padding: 1rem !important;
  }
}

/* ============================================
   DATATABLES MOBILE - CARD STYLE
   ============================================ */

@media (max-width: 768px) {
  /* Ocultar elementos de datatable padrao */
  .patient-wrapper .dataTables_wrapper .dataTables_length,
  .patient-wrapper .dataTables_wrapper .dataTables_filter,
  .patient-wrapper .dataTables_wrapper .dataTables_info,
  .patient-wrapper .dataTables_wrapper .dataTables_paginate {
    display: none !important;
  }

  /* Ocultar cabecalho da tabela */
  .patient-wrapper .dataTable thead {
    display: none !important;
  }

  /* Transformar tabela em lista de cards */
  .patient-wrapper .dataTable,
  .patient-wrapper .dataTable tbody {
    display: block !important;
    width: 100% !important;
  }

  /* Cada linha vira um card */
  .patient-wrapper .dataTable tbody tr {
    display: block !important;
    margin-bottom: 1rem !important;
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
  }

  /* Cada celula vira uma linha no card */
  .patient-wrapper .dataTable tbody tr td {
    display: block !important;
    padding: 0.75rem 0 !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    text-align: left !important;
    position: relative !important;
  }

  .patient-wrapper .dataTable tbody tr td:last-child {
    border-bottom: none !important;
  }

  /* Adicionar labels antes de cada valor */
  .patient-wrapper .dataTable tbody tr td:before {
    content: attr(data-label) ": ";
    display: block !important;
    font-weight: 700 !important;
    color: #495057 !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  /* Valor da celula */
  .patient-wrapper .dataTable tbody tr td > * {
    display: block !important;
  }

  /* Ajustar acoes (botoes) */
  .patient-wrapper .dataTable tbody tr td.action-column {
    justify-content: center !important;
    padding-top: 0.75rem !important;
    margin-top: 0.5rem !important;
    border-top: 1px solid #dee2e6 !important;
    border-bottom: none !important;
  }

  .patient-wrapper .dataTable tbody tr td.action-column:before {
    display: none !important;
  }

  /* Botoes de acao */
  .patient-wrapper .dataTable tbody tr td .btn {
    width: 100% !important;
    margin: 0.25rem 0 !important;
  }

  /* Badges e status */
  .patient-wrapper .dataTable tbody tr td .badge {
    margin-left: auto !important;
  }

  /* Wrapper da tabela */
  .patient-wrapper .dataTables_wrapper {
    overflow-x: visible !important;
  }

  .patient-wrapper .table-responsive {
    overflow-x: visible !important;
  }
}

/* Telas muito pequenas (320px - 480px) */
@media (max-width: 480px) {
  /* Diminuir imagens dos cards */
  .action-card img {
    height: 80px !important;
    width: 80px !important;
    max-width: 80px !important;
  }

  /* Ajustar textos */
  .action-card h5 {
    font-size: 1rem !important;
  }

  .action-card h6 {
    font-size: 0.85rem !important;
  }

  .action-card p {
    font-size: 0.8rem !important;
  }

  /* Aumentar espacamento interno */
  .action-card {
    padding: 1rem !important;
    min-height: 140px !important;
  }

  /* Ajustar altura minima dos cards principais */
  .cta-card {
    min-height: 160px !important;
  }

  .card-main-strong {
    min-height: 120px !important;
  }
}

/* Telas extra pequenas (320px) */
@media (max-width: 360px) {
  /* Imagens ainda menores */
  .action-card img {
    height: 60px !important;
    width: 60px !important;
    max-width: 60px !important;
  }

  /* Textos menores */
  .action-card h5 {
    font-size: 0.9rem !important;
  }

  .action-card h6 {
    font-size: 0.75rem !important;
  }

  .action-card p {
    font-size: 0.75rem !important;
  }

  /* Padding ajustado */
  .action-card {
    padding: 0.5rem !important;
  }

  /* Content padding minimo */
  .content {
    padding: 0.25rem !important;
  }

  .content-wrapper {
    padding: 0.25rem !important;
  }

  /* Remover padding do vue-content em 320px */
  #vue-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Card body padding minimo */
  .card-body {
    padding: 0.5rem !important;
  }

  .patient-wrapper .card-body {
    padding: 0.25rem !important;
  }

  /* Reduzir gaps */
  .row {
    margin-left: -0.25rem !important;
    margin-right: -0.25rem !important;
  }

  .row > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Reduzir gap entre cards */
  .row.g-3 {
    gap: 0.5rem !important;
  }
}

/* Desktop - Ensure mobile elements are hidden and show nav text */
@media (min-width: 992px) {
  .mobile-header {
    display: none !important;
  }

  .nav-text {
    display: inline !important;
  }
}

/* Quebrar links longos dentro de alertas */
.alert a {
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  display: inline-block !important;
  max-width: 100% !important;
}

/* ============================================
   HOME PAGE REDESIGN
   ============================================ */

.home-content {
  max-width: 896px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Title section */
.home-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-title {
  font-size: 24px;
  font-weight: 700;
  color: #101828;
  margin: 0;
  line-height: 1.3;
}

.home-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #6a7282;
  margin: 0;
}

/* Emergency card */
.home-emergency-card {
  position: relative;
  width: 100%;
  background: linear-gradient(165deg, #00d492 0%, #00bc7d 100%);
  border-radius: 12px;
  padding: 24px;
  overflow: hidden;
  box-shadow: 0px 10px 15px rgba(0,0,0,0.1), 0px 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.home-emergency-card:hover {
  transform: translateY(-2px);
}

.home-emergency-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.home-emergency-card--disabled:hover {
  transform: none;
}

.home-emergency-card__decor {
  position: absolute;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  transform: rotate(15deg);
  pointer-events: none;
}

.home-emergency-card__decor--top {
  width: 128px;
  height: 128px;
  top: -32px;
  right: -16px;
}

.home-emergency-card__decor--bottom {
  width: 96px;
  height: 96px;
  bottom: -24px;
  right: 48px;
}

.home-emergency-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-emergency-card__badge {
  display: inline-block;
  width: fit-content;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.home-emergency-card__title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.home-emergency-card__desc {
  font-size: 14px;
  font-weight: 400;
  color: #ecfdf5;
  margin: 0;
}

.home-emergency-card__btn {
  display: inline-block;
  width: fit-content;
  background: white;
  color: #096;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 8px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.1), 0px 1px 2px rgba(0,0,0,0.1);
  margin-top: 4px;
}

/* Emergency card - blue variant (used when clinic highlights medical regulation) */
.home-emergency-card--blue {
  background: linear-gradient(165deg, #51a2ff 0%, #2b7fff 100%);
}

.home-emergency-card--blue .home-emergency-card__btn {
  color: #1447e6;
}

.home-emergency-card--blue .home-emergency-card__desc {
  color: #eff6ff;
}

/* Quick access section */
.home-quick-access {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-quick-access__title {
  font-size: 20px;
  font-weight: 700;
  color: #101828;
  margin: 0;
}

.home-quick-access__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Quick access items */
.home-quick-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  height: 80px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.1), 0px 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.home-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 8px rgba(0,0,0,0.12), 0px 2px 4px rgba(0,0,0,0.08);
}

.home-quick-item__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-quick-item__icon--blue {
  background-color: #2b7fff;
}

.home-quick-item__icon--green {
  background-color: #00bc7d;
}

.home-quick-item__icon--purple {
  background-color: #615fff;
}

.home-quick-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.home-quick-item__title {
  font-size: 18px;
  font-weight: 700;
  color: #101828;
}

.home-quick-item__subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #6a7282;
}

.home-quick-item__chevron {
  color: #9ca3af;
  flex-shrink: 0;
}

/* Home page mobile adjustments */
@media (max-width: 991px) {
  .home-content {
    padding: 16px;
  }

  .home-title {
    font-size: 20px;
  }

  .home-subtitle {
    font-size: 14px;
  }

  .home-quick-item__title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .home-content {
    padding: 12px;
    gap: 16px;
  }

  .home-title {
    font-size: 18px;
  }

  .home-emergency-card {
    padding: 16px;
  }

  .home-emergency-card__title {
    font-size: 18px;
  }

  .home-quick-item {
    height: auto;
    min-height: 68px;
    padding: 12px;
  }

  .home-quick-item__icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .home-quick-item__title {
    font-size: 15px;
  }

  .home-quick-item__subtitle {
    font-size: 13px;
  }
}
