@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #7B6DB3;    /* Roxo da logo */
    --accent-color: #D65CA0;     /* Rosa da flor */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, var(--primary-color) 100%);
    color: var(--text-color);
}

/* Fundo animado com itens de salão */
.salon-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.salon-item {
  position: absolute;
  opacity: 0.6;
  will-change: transform;
  transform: translateZ(0);
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0deg); }
  35% { transform: translateY(-45vh) translateX(12px) rotate(4deg); }
  70% { transform: translateY(-90vh) translateX(-8px) rotate(-3deg); }
  100% { transform: translateY(-120vh) translateX(0) rotate(0deg); }
}

/* Estilos para múltiplos serviços */
.services-container {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(123, 109, 179, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(6px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.services-container:hover {
    box-shadow: 0 8px 24px rgba(123, 109, 179, 0.12);
    transform: translateY(-1px);
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(123, 109, 179, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px) scale(1.005);
    box-shadow: 0 4px 15px rgba(123, 109, 179, 0.1);
}

.service-item:hover::before {
    opacity: 1;
}

.service-select {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.service-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 109, 179, 0.1), 0 2px 12px rgba(123, 109, 179, 0.15);
    transform: scale(1.01);
}

.service-select option {
    padding: 12px;
    background: white;
    color: var(--text-color);
    font-weight: 400;
}

.service-select optgroup {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--primary-color);
    font-weight: 600;
    font-style: normal;
    padding: 8px;
}

.remove-service-btn {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    border: none;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 300;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}



.remove-service-btn:hover {
    background: linear-gradient(135deg, #ff3742, #ff2837);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

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

.add-service-btn {
    background: linear-gradient(135deg, var(--primary-color), #6a5a9c);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(123, 109, 179, 0.2);
    position: relative;
    overflow: hidden;
}

.add-service-btn::before {
    content: '+';
    font-size: 16px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.add-service-btn:hover {
    background: linear-gradient(135deg, #6a5a9c, #5a4a8c);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 20px rgba(123, 109, 179, 0.25);
}

.add-service-btn:hover::before {
    transform: rotate(180deg);
}

.add-service-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.total-duration {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--primary-color);
    border: 1px solid rgba(123, 109, 179, 0.15);
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.total-duration::before {
    content: '⏱️';
    margin-right: 8px;
    font-size: 16px;
}

.total-duration::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(123, 109, 179, 0.1), transparent);
    transition: left 0.6s ease;
}

.total-duration:hover::after {
    left: 100%;
}

/* Enhanced service option styling with duration */
.service-select option[data-duration]:after {
    content: " (" attr(data-duration) "min)";
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9em;
}

.service-select option[data-price]:before {
    content: attr(data-price) " CHF ";
    color: #28a745;
    font-weight: 600;
    font-size: 0.9em;
}

.services-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 13px;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 24px;
}

.services-container label::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    margin-right: 6px;
}

/* Animação de entrada para novos serviços */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-item {
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Wrapper de tela Full HD em paisagem (16:9) */
.fullhd-landscape {
  width: 100vw;
  height: 100vh;
  max-width: 1920px;
  max-height: 1080px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  position: relative; /* Permitir posicionamento absoluto da camada de fundo */
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.fullhd-landscape > * {
  width: 100%;
  height: 100%;
}

/* O formulário não deve ocupar 100% da largura dentro do wrapper */
.fullhd-landscape > .container {
  width: auto;
  height: auto;
}

/* Garantir que containers internos preencham o wrapper */
.fullhd-landscape .container,
.fullhd-landscape .login-container,
.fullhd-landscape .admin-container {
  height: 100%;
  position: relative;
  z-index: 1; /* garantir que o conteúdo fique acima da animação */
}

.logo-container {
    text-align: center;
    margin-bottom: 16px;
}

.main-logo {
    width: 100px;
    height: auto;
    margin: 0 auto;
}

/* Estilos para o calendário semanal com Bootstrap */
.admin-container {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--white);
  border-bottom: 1px solid var(--primary-color);
  border-radius: 8px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
}

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

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

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.badge-primary {
  background-color: var(--primary-color) !important;
}

.appointment {
  border-left: 4px solid var(--accent-color) !important;
}

.calendar-header:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.calendar-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.calendar-title p {
  margin: 5px 0 0;
  color: #6c757d;
  font-size: 0.9rem;
}

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

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.calendar-nav button {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.calendar-nav button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.calendar-view-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.calendar-view-selector button {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: #333;
  transition: all 0.2s ease;
}

.calendar-view-selector button.active {
  background-color: #007bff;
  color: white;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 20px;
}

.calendar-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
}

.calendar-container:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.sidebar {
  width: 300px;
  background-color: #fff;
  border-left: 1px solid #e0e0e0;
  padding: 20px;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
}

.sidebar:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Animações */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.language-selector {
  text-align: right;
  margin-bottom: 15px;
}

.language-selector button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: 5px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.language-selector button.active {
  opacity: 1;
  font-weight: bold;
  border-bottom: 2px solid #4285f4;
}

.form-title {
  text-align: center;
  color: #4285f4;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: #4285f4;
  outline: none;
}

button {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #3367d6;
}

.error-message {
  color: #d32f2f;
  font-size: 14px;
  margin-top: 5px;
}

.success-message {
  color: #388e3c;
  font-size: 16px;
  text-align: center;
  padding: 20px;
  background-color: #e8f5e9;
  border-radius: 4px;
  margin-top: 20px;
}

/* Calendar Styles */
#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 20px;
}

.weekday {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background-color: #f0f0f0;
}

.day {
  min-height: 100px;
  border: 1px solid #ddd;
  padding: 5px;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.day:hover {
  background-color: #f5f5f5;
}

/* Month grid cells (admin monthly view) */
.month-cell {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  will-change: transform, background-color, box-shadow;
}

.month-cell:hover {
  background-color: #f1f3f4 !important; /* subtle hover, overrides inline bg */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

/* Dias fora do mês atual */
.month-cell.other-month {
  cursor: default;
  opacity: 0.8;
}

.month-cell.other-month:hover {
  background-color: #f8f9fa !important;
  box-shadow: none;
  transform: none;
}

.month-cell.selected {
  background-color: #e3f2fd !important;
  border: 2px solid #1976d2 !important;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.date {
  text-align: right;
  font-weight: bold;
  margin-bottom: 5px;
}

.event-dot {
  background-color: #4285f4;
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 3px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.details-item:last-child {
  border-bottom: none;
}

.muted {
  color: #666;
  font-size: 0.9em;
}

/* Admin Styles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.admin-actions button {
  padding: 8px 15px;
  font-size: 14px;
}

/* Novo Modelo de Calendário Semanal */
.admin-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.calendar-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.calendar-title p {
  margin: 5px 0 0;
  color: #666;
  font-size: 0.9rem;
}

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

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.calendar-nav button {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.calendar-nav button:hover {
  background-color: #f0f0f0;
}

.calendar-view-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.calendar-view-selector button {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: #333;
}

.calendar-view-selector button.active {
  background-color: #4285f4;
  color: white;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.calendar-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #f9f9f9;
}

.sidebar {
  width: 300px;
  background-color: #fff;
  border-left: 1px solid #e0e0e0;
  padding: 20px;
  overflow-y: auto;
}

.sidebar-left {
  width: 250px;
  background-color: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 20px;
  overflow-y: auto;
}

/* Mini Calendário */
.mini-calendar {
  margin-bottom: 20px;
}

.mini-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

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

.mini-calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  color: #666;
  padding: 2px 0;
}

.mini-calendar-day {
  text-align: center;
  font-size: 0.8rem;
  padding: 5px 0;
  border-radius: 50%;
  cursor: pointer;
}

.mini-calendar-day:hover {
  background-color: #f0f0f0;
}

.mini-calendar-day.today {
  background-color: #4285f4;
  color: white;
}

.mini-calendar-day.has-events {
  font-weight: bold;
  position: relative;
}

.mini-calendar-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #4285f4;
}

.mini-calendar-day.other-month {
  color: #ccc;
}

/* Filtros */
.filter-section {
  margin-top: 20px;
}

.filter-section h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.filter-group {
  margin-bottom: 15px;
}

.filter-group h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-options label {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  margin-right: 8px;
}

.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.color-dot.blue {
  background-color: #4285f4;
}

.color-dot.green {
  background-color: #0f9d58;
}

.color-dot.purple {
  background-color: #9c27b0;
}

.color-dot.red {
  background-color: #ea4335;
}

/* Estilos do Calendário Semanal */
.calendar-grid {
  display: flex;
  height: 600px;
  border: 1px solid #e0e0e0;
  background-color: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.time-column {
  width: 50px;
  border-right: 1px solid #e0e0e0;
  background-color: #f9f9f9;
}

.day-column {
  flex: 1;
  position: relative;
  border-right: 1px solid #e0e0e0;
  max-width: 150px;
}

.day-column:last-child {
  border-right: none;
}

.day-header {
  height: 40px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
  position: sticky;
  top: 0;
  z-index: 10;
}

.day-name {
  font-weight: 500;
  font-size: 0.8rem;
}

.day-number {
  font-size: 1rem;
  font-weight: bold;
}

.time-slot {
  height: 30px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #666;
}

.time-grid {
  position: relative;
  height: calc(100% - 40px);
}

.appointment {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  padding: 3px;
  font-size: 0.7rem;
  color: white;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.appointment:hover {
  transform: scale(1.02);
  z-index: 100;
}

.appointment-blue {
  background-color: #4285f4;
}

.appointment-green {
  background-color: #0f9d58;
}

.appointment-purple {
  background-color: #9c27b0;
}

.appointment-red {
  background-color: #ea4335;
}

.appointment-time {
  font-weight: bold;
  margin-bottom: 2px;
  font-size: 0.65rem;
}

.appointment-title {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
}

.appointment-title svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

/* Z-index fixes to keep admin dropdown above calendar */
.admin-container { overflow: visible; }
.calendar-header { position: relative; z-index: 2000; overflow: visible; }
.dropdown-menu { z-index: 3000; }

/* Animação suave do dropdown de Configurações Admin */
.calendar-header .dropdown-menu {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 240ms ease;
  will-change: opacity, transform, box-shadow;
  pointer-events: none;
  visibility: hidden;
  backface-visibility: hidden;
}

.calendar-header .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  pointer-events: auto;
  visibility: visible;
}

/* Reduzir movimento se o usuário preferir */
@media (prefers-reduced-motion: reduce) {
  .calendar-header .dropdown-menu,
  .calendar-header .dropdown-menu.show {
    transition: none;
    transform: none;
  }
}

/* Botão primário */
.primary-button {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.primary-button:hover {
  background-color: #3367d6;
}

/* Responsive */
@media (max-width: 768px) {
  /* Tornar layout proporcional em telas pequenas */
  body {
    display: block;
    min-height: auto;
    background: #f8f9fa;
  }
  .container {
    max-width: 380px;
    padding: 12px;
    margin: 12px auto;
    border-radius: 10px;
  }
  .main-logo { height: 32px; width: auto; }
  .form-title { font-size: 18px; margin: 6px 0 12px; padding-bottom: 10px; }
  .main-user-info { gap: 20px; }
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  .form-row .user-input-box {
    width: 100%;
    flex: 1 !important;
  }
  .user-input-box { width: 100%; }
  .user-input-box label { font-size: 13px; }
  .user-input-box input, .user-input-box select { height: 40px; font-size: 15px; padding: 8px 10px; }
  /* Garantir proporção consistente dos campos de data e hora */
  input[type="date"], input[type="time"] {
    height: 40px;
    font-size: 15px;
    padding: 8px 10px;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
  }
  .user-input-box textarea { font-size: 15px; padding: 10px; }
  .form-submit-btn { margin-top: 10px; }
  .form-submit-btn input { font-size: 16px; padding: 12px; border-radius: 8px; }
  .language-selector img { width: 22px; height: 22px; }
  
  #calendar {
    font-size: 14px;
  }
  
  .day {
    min-height: 80px;
  }
  
  button {
    padding: 10px 15px;
  }
  
  .sidebar, .sidebar-left {
    display: none;
  }
  
  .calendar-header { flex-direction: column; gap: 10px; padding: 10px; }
  .calendar-title h1 { font-size: 1.2rem; }
  .calendar-title p { font-size: 0.85rem; }

  .calendar-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Ajustes de mobile para o wrapper fullhd */
  .fullhd-landscape {
    max-height: none;
    aspect-ratio: auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    align-items: flex-start;
    justify-content: stretch;
    padding: 10px 0;
  }
  .fullhd-landscape > * {
    height: auto;
  }
  /* Evitar sobreposição do seletor de idioma no topo em telas pequenas */
  .top-controls .language-selector {
    position: static;
    top: auto;
    right: auto;
    margin-bottom: 10px;
  }
  /* Melhorar rolagem em containers de calendário no mobile */
  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  /* Admin container não deve travar altura no mobile */
  .admin-container { height: auto; max-height: none; padding: 10px; }
  .main-content { gap: 10px; }
  /* Calendar grid mais compacto com rolagem horizontal quando necessário */
  #calendar { grid-template-columns: repeat(7, minmax(80px, 1fr)); }
  .weekday { padding: 6px; font-size: 12px; }
  .day { min-height: 64px; }
}

/* Estilos para o calendário de administração */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    background-color: #f0f0f0;
}

.day {
    min-height: 80px;
    border: 1px solid #ddd;
    padding: 5px;
    position: relative;
    cursor: pointer;
}

.day:hover {
    background-color: #f5f5f5;
}

.date {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-dot {
    background-color: #e1f5fe;
    border-left: 3px solid #03a9f4;
    padding: 3px 5px;
    margin-bottom: 3px;
    font-size: 0.8em;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-dot svg {
    color: #0277bd;
    flex-shrink: 0;
}

.details-item {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #fff;
}

.details-item svg {
    vertical-align: middle;
    margin-right: 5px;
    color: #0277bd;
}

.muted {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.container {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    padding: 28px;
    margin: 0 20px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Escopo do posicionamento absoluto apenas para a página do formulário */
.top-controls .language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

/* No admin, manter inline para não sobrepor outros botões */
.calendar-header .language-selector {
    position: static;
    display: flex;
    gap: 10px;
    margin: 0;
}

.language-selector img {
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.language-selector img:hover {
  transform: scale(1.1);
}

/* Link do ícone de engrenagem ao lado das bandeiras */
.language-selector .admin-gear-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  color: #6c757d;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.2s ease, color 0.2s ease;
}
.language-selector .admin-gear-link:hover {
  transform: scale(1.1);
  color: #4285f4;
}
.language-selector .admin-gear-link svg {
  width: 20px;
  height: 20px;
}

.form-title {
    font-size: 22px;
    font-weight: 500;
    text-align: center;
    padding-bottom: 12px;
    color: #6a3093;
    border-bottom: 1px solid #e0d0f0;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.main-user-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.form-row .user-input-box {
    flex: 1;
    min-width: 0;
}

.form-row .user-input-box:nth-child(1) { flex: 1.2; }
.form-row .user-input-box:nth-child(2) { flex: 1; }
.form-row .user-input-box:nth-child(3) { flex: 0.8; }

.user-input-box {
    display: flex;
    flex-direction: column;
    width: calc(50% - 10px);
}

.user-input-box label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #666;
    letter-spacing: 0.3px;
}

.user-input-box input,
.user-input-box select,
.user-input-box textarea {
    height: 42px;
    width: 100%;
    border-radius: 10px;
    outline: none;
    border: 1px solid #e1e5e9;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.user-input-box input:focus,
.user-input-box select:focus,
.user-input-box textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 109, 179, 0.15), 0 4px 12px rgba(123, 109, 179, 0.1);
    transform: translateY(-1px);
}

.user-input-box textarea {
    height: auto;
    padding-top: 10px;
    resize: vertical;
}

.new-customer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0 0;
}

.new-customer-box input[type="checkbox"] {
    margin: 0;
    width: auto;
    height: auto;
}

.new-customer-box label {
    margin: 0;
    font-weight: 400;
    font-size: 12px;
    color: #666;
}

.form-submit-btn {
    margin-top: 30px;
}

.form-submit-btn input {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #71b7e6, #9b59b6);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    letter-spacing: 0.5px;
}

.form-submit-btn input:hover {
    background: linear-gradient(-135deg, #71b7e6, #9b59b6);
}

#status {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

@media(max-width: 600px) {
    .container {
        min-width: 280px;
        max-width: 360px;
        padding: 10px;
        margin: 10px auto;
    }

    .user-input-box {
        width: 100%;
    }

    /* Reforçar ajuste do wrapper para telas muito pequenas */
    .fullhd-landscape {
      padding: 10px 0;
    }
}

/* Mensagem de erro de horário */
.time-error-message {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 8px 12px;
  background-color: #dc2626;
  color: white;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  z-index: 10;
  animation: slideDown 0.3s ease-out;
}

.time-error-message::before {
  content: '⚠️ ';
  font-weight: bold;
}

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

/* Toasts simples para página do cliente */
.toast-container-client {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
}
.toast-client {
  min-width: 280px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toast-client.success { background-color: #28a745; }
.toast-client.error { background-color: #dc3545; }
.toast-client .close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  margin-left: 12px;
} 
 / *   L o a d i n g   O v e r l a y   * /  
 . l o a d i n g - o v e r l a y   {  
         p o s i t i o n :   f i x e d ;  
         t o p :   0 ;  
         l e f t :   0 ;  
         w i d t h :   1 0 0 % ;  
         h e i g h t :   1 0 0 % ;  
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ;  
         z - i n d e x :   9 9 9 9 ;  
         d i s p l a y :   f l e x ;  
         j u s t i f y - c o n t e n t :   c e n t e r ;  
         a l i g n - i t e m s :   c e n t e r ;  
         b a c k d r o p - f i l t e r :   b l u r ( 5 p x ) ;  
         a n i m a t i o n :   f a d e I n   0 . 3 s   e a s e - o u t ;  
 }  
  
 . s p i n n e r - c o n t a i n e r   {  
         t e x t - a l i g n :   c e n t e r ;  
         b a c k g r o u n d :   w h i t e ;  
         p a d d i n g :   3 0 p x ;  
         b o r d e r - r a d i u s :   2 0 p x ;  
         b o x - s h a d o w :   0   1 0 p x   3 0 p x   r g b a ( 1 2 3 ,   1 0 9 ,   1 7 9 ,   0 . 2 ) ;  
         b o r d e r :   1 p x   s o l i d   r g b a ( 1 2 3 ,   1 0 9 ,   1 7 9 ,   0 . 1 ) ;  
 }  
  
 . s p i n n e r   {  
         w i d t h :   5 0 p x ;  
         h e i g h t :   5 0 p x ;  
         b o r d e r :   4 p x   s o l i d   r g b a ( 1 2 3 ,   1 0 9 ,   1 7 9 ,   0 . 1 ) ;  
         b o r d e r - l e f t - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;  
         b o r d e r - r a d i u s :   5 0 % ;  
         m a r g i n :   0   a u t o   1 5 p x ;  
         a n i m a t i o n :   s p i n   1 s   l i n e a r   i n f i n i t e ;  
 }  
  
 # l o a d i n g - t e x t   {  
         c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;  
         f o n t - w e i g h t :   6 0 0 ;  
         f o n t - s i z e :   1 . 1 e m ;  
         m a r g i n :   0 ;  
         a n i m a t i o n :   p u l s e   1 . 5 s   i n f i n i t e   e a s e - i n - o u t ;  
 }  
  
 @ k e y f r a m e s   s p i n   {  
         0 %   {   t r a n s f o r m :   r o t a t e ( 0 d e g ) ;   }  
         1 0 0 %   {   t r a n s f o r m :   r o t a t e ( 3 6 0 d e g ) ;   }  
 }  
 