:root {
  --rosa-claro: #F8C8DC;
  --rosa-suave: #F5B8D0;
  --lilas-suave: #CDB4DB;
  --lavanda: #A890D3;
  --roxo-suave: #9B87F5;
  --pessego: #FFC8A2;
  --branco: #FFFFFF;
  --texto-escuro: #444444;
  --cinza-claro: #E5E5E5;
  --gradiente-principal: linear-gradient(135deg, #F8C8DC 0%, #CDB4DB 100%);
  --gradiente-botao: linear-gradient(135deg, #A890D3 0%, #F5B8D0 100%);
  --gradiente-roxo-rosa: linear-gradient(135deg, #9B87F5 0%, #CDB4DB 50%, #F8C8DC 100%);
  --sombra-suave: 0 4px 20px rgba(168, 144, 211, 0.15);
  --sombra-hover: 0 8px 30px rgba(168, 144, 211, 0.25);
  --sombra-card: 0 2px 12px rgba(168, 144, 211, 0.1);
  --sombra-soft: 0 2px 8px rgba(168, 144, 211, 0.08);
}

/* Reset e base mobile-first */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Poppins", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #FFF5F7 0%, #FFFFFF 100%) !important;
  position: relative;
  min-height: 100vh;
  color: var(--texto-escuro);
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  display: block;
}

html {
  overflow-x: hidden !important;
  max-width: 100vw;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(248, 200, 220, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(205, 180, 219, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}


body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='nail-polish' x='0' y='0' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M20 5 L25 10 L25 25 L20 30 L15 25 L15 10 Z' fill='%23F8C8DC' opacity='0.1'/%3E%3Ccircle cx='20' cy='20' r='2' fill='%23CDB4DB' opacity='0.15'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='80' height='80' fill='url(%23nail-polish)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Container principal mobile-first */
.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow-x: hidden;
}

.container-mobile {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Navbar mobile */
.navbar {
  border-bottom: 1px solid rgba(142, 122, 181, 0.1);
  background: #FFFFFF !important;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(142, 122, 181, 0.06);
  padding: 12px 0;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  margin-bottom: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

.navbar-brand {
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.navbar-brand-content {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-brand-name {
  font-family: 'Dancing Script', cursive;
  font-size: 1.75rem;
  font-weight: 700;
  color: #6B4C93;
  letter-spacing: 0.5px;
}

.navbar-brand-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: #888888;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.navbar-brand img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

/* Botões mobile-first */
.btn {
  min-height: 44px;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 16px;
  font-weight: 600;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gradiente-botao);
  border: none;
  color: var(--branco);
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: var(--sombra-suave);
}

.btn-primary:hover, .btn-primary:active {
  transform: translateY(-2px);
  box-shadow: var(--sombra-hover);
  background: linear-gradient(135deg, #FFB4D8 0%, #D9B8E8 100%);
  color: var(--branco);
}

.btn-outline-primary {
  color: var(--lilas-suave);
  border-color: var(--lilas-suave);
  border-width: 2px;
  background: transparent;
  min-width: 44px;
}

.btn-outline-primary:hover, .btn-outline-primary:active {
  background: var(--gradiente-botao);
  border-color: transparent;
  color: var(--branco);
  transform: translateY(-2px);
  box-shadow: var(--sombra-suave);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-lg {
  min-height: 48px;
  padding: 14px 24px;
  font-size: 1.1rem;
}

/* Cards mobile-first */
.card {
  background-color: var(--branco);
  border: 1px solid rgba(248, 200, 220, 0.3);
  border-radius: 20px;
  box-shadow: var(--sombra-suave);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card:hover {
  box-shadow: var(--sombra-hover);
  transform: translateY(-2px);
}

.card-body {
  padding: 16px;
}

.display-6 {
  font-weight: 700;
  color: var(--lilas-suave);
  font-size: 1.75rem;
  word-break: break-word;
}

.table thead th {
  color: var(--lilas-suave);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.badge {
  font-weight: 600;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.badge.bg-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%) !important;
  color: var(--branco) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--pessego) 0%, #FFB896 100%) !important;
  color: var(--texto-escuro) !important;
  font-weight: 600;
}

/* Formulários mobile-first */
.form-label {
  color: var(--lilas-suave);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.form-control, .form-select {
  border-color: rgba(248, 200, 220, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  width: 100%;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--lilas-suave);
  box-shadow: 0 0 0 0.2rem rgba(205, 180, 219, 0.25);
  outline: none;
}

.input-group {
  width: 100%;
  flex-wrap: nowrap;
}

.input-group-text {
  border-color: rgba(248, 200, 220, 0.5);
  background: var(--branco);
  padding: 12px 14px;
  min-height: 44px;
}

.btn-link {
  color: var(--lilas-suave);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.btn-link:hover {
  color: var(--rosa-claro);
  text-decoration: underline;
}

.btn-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  border: none;
  color: var(--branco);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  border-radius: 12px;
}

.btn-success:hover, .btn-success:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
  color: var(--branco);
}

.btn-danger, .btn-outline-danger {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
  border: none;
  color: var(--branco);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
  border-radius: 12px;
}

.btn-danger:hover, .btn-danger:active, .btn-outline-danger:hover, .btn-outline-danger:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
  background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
  color: var(--branco);
}

.btn-outline-danger {
  background: transparent;
  border: 2px solid #f44336;
  color: #f44336;
}

.btn-outline-danger:hover, .btn-outline-danger:active {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
  border-color: transparent;
  color: var(--branco);
}

.bg-light {
  background: transparent !important;
}

/* Tipografia mobile */
h1, h2, h3, h4, h5, h6 {
  color: var(--lilas-suave);
  font-weight: 700;
  word-break: break-word;
  margin-bottom: 12px;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.9rem; }

.text-muted {
  color: #888888 !important;
}

/* Agenda timeline mobile-first */
.agenda-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.agenda-row {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.agenda-time {
  font-weight: 700;
  color: var(--lilas-suave);
  text-align: right;
  padding-top: 6px;
  font-size: 0.9rem;
  flex-shrink: 0;
  min-width: 45px;
  box-sizing: border-box;
}

.agenda-slot {
  border-left: 3px solid var(--lilas-suave);
  padding-left: 10px;
  min-height: 48px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.agenda-empty {
  font-size: 0.9rem;
  color: var(--lilas-suave);
  padding: 8px 0;
  font-style: italic;
  opacity: 0.7;
  word-break: break-word;
}

.agenda-card-wrapper {
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.agenda-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 200, 220, 0.1) 100%);
  border: 2px solid var(--rosa-claro);
  border-radius: 16px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--texto-escuro);
  box-shadow: var(--sombra-suave);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  word-break: break-word;
  box-sizing: border-box;
  overflow: hidden;
}

.agenda-card:hover, .agenda-card:active {
  transform: translateY(-3px);
  box-shadow: var(--sombra-hover);
  border-color: var(--lilas-suave);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 200, 220, 0.15) 100%);
}

.agenda-card > div {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.agenda-card .text-end {
  text-align: left !important;
  margin-top: 8px;
}

.agenda-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.agenda-card-actions .btn {
  flex: 1;
  min-width: 100px;
}

.agenda-card-actions form {
  flex: 1;
  min-width: 100px;
}

.agenda-card-actions form .btn {
  width: 100%;
}

.agenda-card .fw-semibold {
  color: var(--lilas-suave);
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
}

.agenda-card .text-muted {
  color: var(--texto-escuro);
  opacity: 0.7;
  font-size: 0.9rem;
  word-break: break-word;
}

/* Main content - removido duplicação, estilos aplicados abaixo */

/* Row e col mobile */
.row {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.row > * {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  margin-bottom: 12px;
}

.row.g-3 > * {
  margin-bottom: 12px;
}

/* Alertas mobile */
.alert {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  word-break: break-word;
  font-size: 0.95rem;
}

/* Estilos adicionais */
.text-uppercase {
  letter-spacing: 0.1em;
  font-weight: 700;
}

.shadow-sm {
  box-shadow: var(--sombra-suave) !important;
}

.shadow-lg {
  box-shadow: var(--sombra-hover) !important;
}

/* Imagens responsivas */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Garantir que nada ultrapasse - removido duplicação */

/* Flexbox utilities mobile */
.d-flex {
  flex-wrap: wrap;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

/* Espaçamentos mobile */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.mt-1 { margin-top: 4px; }
.mt-4 { margin-top: 16px; }

.p-0 { padding: 0; }
.p-5 { padding: 16px; }

/* Texto responsivo */
.small {
  font-size: 0.875rem;
}

/* Garantir que formulários sejam full width */
form {
  width: 100%;
}

form .row {
  width: 100%;
}

/* Input group mobile */
.input-group > .form-control,
.input-group > .form-select {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

/* Estilos específicos para Agenda Diária */
.agenda-header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.agenda-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #8E7AB5;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  word-break: break-word;
  line-height: 1.2;
}

.agenda-subtitle {
  font-size: 0.8rem;
  color: #888888;
  margin: 0;
  font-weight: 400;
  word-break: break-word;
  line-height: 1.3;
}

.btn-novo-agendamento {
  background: linear-gradient(135deg, #F5B8D0 0%, #A890D3 100%);
  border: none;
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(168, 144, 211, 0.2);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  text-decoration: none;
}

.btn-novo-agendamento:hover,
.btn-novo-agendamento:active {
  transform: translateY(-2px);
  box-shadow: var(--sombra-hover);
  background: var(--gradiente-roxo-rosa);
  color: var(--branco);
}

.btn-novo-agendamento svg {
  transition: transform 0.3s ease;
}

.btn-novo-agendamento:hover svg {
  transform: rotate(90deg) scale(1.1);
}

/* Cards de resumo - Layout uniforme e compacto */
.cards-resumo-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.cards-resumo-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr; /* Card de data maior, valores menores */
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.card-resumo {
  background: #FFFFFF;
  border: 1px solid rgba(142, 122, 181, 0.15);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(142, 122, 181, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 95px;
  max-height: 110px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Card de data específico - mais espaço */
.card-data-selecao {
  min-height: 100px;
  max-height: 115px;
}

/* Cards de valores - menores */
.card-total {
  min-height: 90px;
  max-height: 105px;
}

.card-resumo:hover {
  box-shadow: 0 4px 12px rgba(142, 122, 181, 0.12);
  transform: translateY(-2px);
}

.card-resumo .card-body {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Card de data - mais padding interno */
.card-data-selecao .card-body {
  padding: 14px 12px;
}

/* Cards de valores - menos padding */
.card-total .card-body {
  padding: 10px 8px;
}

.card-resumo-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: #8E7AB5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-resumo-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #8E7AB5;
  display: flex;
  align-items: center;
  flex: 1;
  letter-spacing: -0.01em;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Valores nos cards de total - um pouco menores */
.card-total .card-resumo-value {
  font-size: 0.9rem;
}

/* Card de data específico - melhor visualização */
.card-data-selecao .card-resumo-title {
  font-size: 0.6rem;
  margin-bottom: 8px;
}

.card-data-selecao .d-flex.align-items-center {
  margin-bottom: 8px;
}

.card-data-selecao .d-flex.align-items-center svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
}

.data-display-compact {
  padding: 0 8px;
  flex: 1;
  min-width: 0;
}

.data-value-compact {
  font-size: 0.9rem;
  font-weight: 700;
  color: #8E7AB5;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  word-break: break-word;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-weekday-compact {
  font-size: 0.75rem;
  color: #888888;
  font-weight: 500;
  line-height: 1.2;
}

.btn-nav-date-small {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(142, 122, 181, 0.08);
  border: 1.5px solid rgba(142, 122, 181, 0.2);
  color: #8E7AB5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-nav-date-small svg {
  width: 14px;
  height: 14px;
}

.btn-nav-date-small:hover,
.btn-nav-date-small:active {
  background: linear-gradient(135deg, #F5B8D0 0%, #A890D3 100%);
  border-color: transparent;
  color: #FFFFFF;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(142, 122, 181, 0.2);
}

/* Barra decorativa nos cards de total */
.card-total .card-total-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #F5B8D0 0%, #A890D3 100%);
  border-radius: 0 0 16px 16px;
  opacity: 0.7;
}

.card-total:hover .card-total-bar {
  opacity: 1;
  height: 3px;
}

/* Responsividade para telas pequenas */
@media (max-width: 480px) {
  .container,
  .container-mobile {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .navbar .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  main.container,
  main.container-mobile {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .cards-resumo-grid {
    gap: 8px;
    grid-template-columns: 1.5fr 1fr 1fr; /* Em mobile, data ainda maior */
  }
  
  .card-resumo {
    min-height: 90px;
    max-height: 100px;
  }
  
  .card-data-selecao {
    min-height: 95px;
    max-height: 105px;
  }
  
  .card-total {
    min-height: 85px;
    max-height: 95px;
  }
  
  .card-resumo .card-body {
    padding: 10px 8px;
  }
  
  .card-data-selecao .card-body {
    padding: 12px 10px;
  }
  
  .card-total .card-body {
    padding: 8px 6px;
  }
  
  .card-resumo-title {
    font-size: 0.55rem;
    margin-bottom: 6px;
  }
  
  .card-data-selecao .card-resumo-title {
    font-size: 0.58rem;
    margin-bottom: 6px;
  }
  
  .card-resumo-value {
    font-size: 0.85rem;
  }
  
  .card-total .card-resumo-value {
    font-size: 0.8rem;
  }
  
  .data-value-compact {
    font-size: 0.85rem;
  }
  
  .data-weekday-compact {
    font-size: 0.7rem;
  }
  
  .btn-nav-date-small {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  
  .btn-nav-date-small svg {
    width: 12px;
    height: 12px;
  }
  
  .data-display-compact {
    padding: 0 6px;
  }
}

@media (max-width: 360px) {
  .cards-resumo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .card-resumo {
    min-height: 85px;
    max-height: 95px;
  }
}

/* Estilos específicos para formulário de agendamento */
.form-agendamento-wrapper {
  width: 100%;
  padding-bottom: 24px;
}

.card-form-agendamento {
  background: #FFFFFF;
  border: none;
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(142, 122, 181, 0.08), 
              0 2px 8px rgba(142, 122, 181, 0.04);
  width: 100%;
  margin-bottom: 0;
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

.card-form-agendamento .card-body {
  padding: 28px 24px;
}

.form-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #8E7AB5;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
  font-family: "Poppins", sans-serif;
}

.form-agendamento {
  width: 100%;
}

.form-field-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.form-label-custom {
  font-size: 0.95rem;
  font-weight: 500;
  color: #8E7AB5;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-family: "Poppins", sans-serif;
}

.form-label-icon {
  margin-right: 10px;
  color: #8E7AB5;
  flex-shrink: 0;
  opacity: 0.85;
}

.form-sublabel {
  font-size: 0.85rem;
  font-weight: 500;
  color: #888888;
  margin-bottom: 6px;
  display: block;
}

.link-add-item {
  font-size: 0.85rem;
  color: #8E7AB5;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: "Poppins", sans-serif;
}

.link-add-item:hover {
  color: #A890D3;
  text-decoration: underline;
}

.link-add-item svg {
  transition: transform 0.2s ease;
}

.link-add-item:hover svg {
  transform: scale(1.1);
}

.form-input-wrapper {
  position: relative;
  width: 100%;
}

.form-input-with-icon {
  position: relative;
}

.form-input-with-icon .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #8E7AB5;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.form-input-with-icon:focus-within .input-icon {
  opacity: 1;
  color: #8E7AB5;
  transform: translateY(-50%) scale(1.05);
}

.form-input-with-icon input,
.form-input-with-icon select {
  padding-left: 52px !important;
}

/* Estilos para todos os inputs do formulário de agendamento */
.form-agendamento input[type="text"],
.form-agendamento input[type="date"],
.form-agendamento select,
.form-agendamento .form-control,
.form-agendamento .form-select,
.form-agendamento #id_cliente,
.form-agendamento #id_cliente_nome,
.form-agendamento #id_data,
.form-agendamento #id_hora,
.form-agendamento #id_servico {
  width: 100% !important;
  padding: 16px 18px 16px 52px !important;
  border: 1px solid #E0E0E0 !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  color: var(--texto-escuro) !important;
  background: #FFFFFF !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  min-height: 56px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-family: "Poppins", sans-serif !important;
  font-weight: 400 !important;
  box-sizing: border-box !important;
}

.form-agendamento input[type="text"]:focus,
.form-agendamento input[type="date"]:focus,
.form-agendamento select:focus,
.form-agendamento .form-control:focus,
.form-agendamento .form-select:focus,
.form-agendamento #id_cliente:focus,
.form-agendamento #id_cliente_nome:focus,
.form-agendamento #id_data:focus,
.form-agendamento #id_hora:focus,
.form-agendamento #id_servico:focus {
  outline: none !important;
  border-color: #8E7AB5 !important;
  box-shadow: 0 0 0 3px rgba(142, 122, 181, 0.1) !important;
  background: #FFFFFF !important;
  transform: translateY(-1px) !important;
}

.form-select-custom {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238E7AB5' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px;
  padding-right: 46px !important;
}

/* Garantir que o dropdown do select não corte as margens */
.form-input-wrapper,
.form-input-with-icon {
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

.form-field-group {
  position: relative;
  overflow: visible !important;
  z-index: 1;
  margin-bottom: 20px;
}

/* Ajustar z-index do select quando aberto */
.form-agendamento select:focus,
.form-agendamento select:active {
  z-index: 10;
  position: relative;
}

/* Garantir que o container do formulário permita overflow do dropdown */
.form-agendamento-wrapper {
  overflow: visible !important;
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

.card-form-agendamento {
  overflow: visible !important;
  position: relative;
}

.card-form-agendamento .card-body {
  overflow: visible !important;
  position: relative;
  padding-bottom: 24px;
}

/* Garantir que selects tenham espaço para dropdown */
.form-agendamento select {
  position: relative;
  z-index: 1;
}

.form-agendamento select:focus {
  z-index: 20;
  position: relative;
}

/* Espaço extra para dropdowns abertos */
.form-datetime-group {
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

.form-datetime-field {
  position: relative;
  overflow: visible !important;
  z-index: 1;
  margin-bottom: 16px;
}

/* Ajustar para mobile - garantir que dropdown não corte */
@media (max-width: 480px) {
  .form-agendamento-wrapper {
    padding-bottom: 40px;
    margin-bottom: 20px;
  }
  
  .form-field-group {
    margin-bottom: 24px;
  }
  
  /* Garantir espaço extra para dropdowns abertos */
  .form-datetime-group {
    margin-bottom: 8px;
  }
  
  .form-datetime-field {
    margin-bottom: 16px;
  }
  
  /* Ajustar z-index para dropdowns em mobile */
  .form-input-with-icon select {
    z-index: 5;
  }
  
  .form-input-with-icon select:focus {
    z-index: 15;
  }
}

.form-help-text {
  font-size: 0.85rem;
  color: #888888;
  margin-top: 6px;
  font-style: italic;
}

.form-error {
  font-size: 0.85rem;
  color: #f44336;
  margin-top: 6px;
}

.form-datetime-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.form-datetime-field {
  width: 100%;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(248, 200, 220, 0.3);
}

.btn-save {
  background: linear-gradient(135deg, #F5B8D0 0%, #A890D3 100%);
  border: none;
  color: #FFFFFF;
  font-weight: 600;
  padding: 18px 24px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(168, 144, 211, 0.25);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
}

.btn-save:hover,
.btn-save:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 144, 211, 0.35);
  background: linear-gradient(135deg, #F5B8D0 0%, #9B87F5 100%);
  color: #FFFFFF;
}

.btn-save svg {
  transition: transform 0.3s ease;
}

.btn-save:hover svg {
  transform: translateY(-2px);
}

.btn-cancel {
  background: transparent;
  border: none;
  color: #888888;
  font-weight: 500;
  padding: 16px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
}

.btn-cancel:hover,
.btn-cancel:active {
  background: rgba(142, 122, 181, 0.05);
  color: #8E7AB5;
  transform: translateY(-1px);
}

/* Garantir que o formulário nunca corte conteúdo */
.form-agendamento-wrapper {
  min-height: calc(100vh - 200px);
}

/* main já está definido acima, removendo duplicação */

/* Forçar estilos em todos os campos do formulário - especificidade máxima */
.card-form-agendamento input,
.card-form-agendamento select,
.card-form-agendamento textarea {
  font-family: "Poppins", sans-serif !important;
}

/* Garantir que os ícones apareçam */
.form-input-with-icon {
  display: flex;
  align-items: center;
  position: relative;
}

.form-input-with-icon .input-icon {
  position: absolute;
  left: 18px;
  z-index: 10;
  pointer-events: none;
}

/* Garantir que o select tenha padding para o ícone */
.form-input-with-icon select.form-select-custom {
  padding-left: 52px !important;
  background-position: right 18px center !important;
}

/* ============================================
   REGRAS GLOBAIS PARA PREVENIR OVERFLOW MOBILE
   ============================================ */

/* Prevenir overflow horizontal em todo o site */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  position: relative;
}

/* Garantir que todos os elementos respeitem a largura */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Elementos específicos que podem causar overflow */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Navbar não deve causar overflow */
.navbar {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Todos os containers devem respeitar a largura */
.container,
.container-mobile,
main,
main.container,
main.container-mobile {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Cards e elementos flexíveis */
.card,
.card-body,
.agenda-card,
.card-resumo,
.cards-resumo-wrapper,
.cards-resumo-grid {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Botões e inputs */
button,
.btn,
input,
select,
textarea,
a {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ajustes específicos para telas pequenas */
@media (max-width: 480px) {
  body {
    padding: 0 !important;
  }
  
  .container,
  .container-mobile {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  .navbar .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  main.container,
  main.container-mobile {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  .navbar-brand-name {
    font-size: 1.3rem;
  }
  
  .cards-resumo-grid {
    gap: 8px;
  }
  
  .card-resumo {
    min-height: 88px;
    max-height: 98px;
  }
  
  .card-resumo .card-body {
    padding: 10px 8px;
  }
  
  .btn-nav-date-small {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  
  .btn-nav-date-small svg {
    width: 12px;
    height: 12px;
  }
  
  .agenda-row {
    grid-template-columns: 40px 1fr;
    gap: 8px;
  }
  
  .agenda-time {
    font-size: 0.8rem;
    min-width: 40px;
  }
  
  .agenda-slot {
    padding-left: 8px;
  }
  
  .agenda-card {
    padding: 10px 12px;
  }
}

@media (max-width: 360px) {
  .cards-resumo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .container,
  .container-mobile {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  main.container,
  main.container-mobile {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}
