/* ==========================================================================
   Studio Ranya Fernandes — Painel Administrativo de Disponibilidade (CSS)
   Design System: Rose Gold (#a9796d), Grafite (#2D2D2D), Neutro (#FAF8F7)
   Tipografia: Hanken Grotesk + JetBrains Mono
   ========================================================================== */

/* ==========================================================================
   ÁREA DA PROFISSIONAL — HEADER & HEADER SUSPENSO (MOBILE DRAWER)
   ========================================================================== */

/* Ajuste no cabeçalho desktop para acomodar o item da Área da Profissional */
.header-section ul {
  width: auto !important;
  gap: 20px !important;
}

/* Item da Área da Profissional no Header Desktop */
.admin-menu-item {
  display: inline-flex;
  align-items: center;
}

.admin-menu-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a9796d !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 5px 12px;
  border-radius: 14px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.admin-menu-item a:hover {
  color: rgba(169, 121, 109, 0.18);
  transform: translateY(-1px);
}

/* Regras para o Header Suspenso / Mobile Drawer (<= 768px) */
@media screen and (max-width: 768px) {
  .header-section ul {
    width: 280px !important;
    gap: 15px !important;
  }

  .admin-menu-item {
    display: block !important;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed rgba(169, 121, 109, 0.3);
  }

  .admin-menu-item a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #a9796d !important;
    font-size: 13px !important;
    padding: 8px 12px;
    border-radius: 8px;

    transition: transform 0.2s ease;
    text-align: center;
  }

  .admin-menu-item a:hover {
    transform: translateX(4px);
  }
}

/* Modal Overlay do Painel Administrativo */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 18, 17, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Container do Diálogo */
.admin-modal-dialog {
  background: #FFFFFF;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-overlay.active .admin-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Botão Fechar */
.admin-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #EAE6E4;
  background: #FAF8F7;
  color: #555;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.admin-modal-close:hover {
  background: #a9796d;
  color: #FFF;
  border-color: #a9796d;
}

/* Cabeçalho */
.admin-modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #F0ECE9;
  background: #FCFBFB;
}

.admin-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a9796d;
  background: rgba(169, 121, 109, 0.12);
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 8px;
}

.admin-modal-header h2 {
  font-size: 22px;
  font-weight: 500;
  color: #2D2D2D;
  margin-bottom: 4px;
}

.admin-modal-header p {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
}

/* Abas de Navegação */
.admin-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 32px 0;
  background: #FCFBFB;
  border-bottom: 1px solid #F0ECE9;
}

.admin-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #777;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: #2D2D2D;
}

.admin-tab-btn.active {
  color: #a9796d;
  border-bottom-color: #a9796d;
  font-weight: 600;
}

/* Corpo com Rolagem */
.admin-modal-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Visualização de Login */
.admin-login-view {
  max-width: 360px;
  margin: 30px auto;
  text-align: center;
}

.admin-login-view .login-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: inline-block;
}

.admin-login-view h3 {
  font-size: 18px;
  color: #2D2D2D;
  margin-bottom: 8px;
}

.admin-login-view p {
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
}

.admin-input-group {
  margin-bottom: 16px;
  text-align: left;
}

.admin-input-group label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}

.admin-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #E2DEDC;
  border-radius: 10px;
  font-size: 14px;
  background: #FAF8F7;
  color: #2D2D2D;
  outline: none;
  transition: all 0.2s ease;
}

.admin-input:focus {
  border-color: #a9796d;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(169, 121, 109, 0.15);
}

.admin-btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #4A4A4A 0%, #2B2B2B 100%);
  color: #FFF;
}

.admin-btn-primary:hover {
  background: linear-gradient(135deg, #3A3A3A 0%, #1B1B1B 100%);
  transform: translateY(-1px);
}

.admin-btn-accent {
  background: #a9796d;
  color: #FFF;
}

.admin-btn-accent:hover {
  background: #95695E;
}

.admin-btn-outline {
  background: transparent;
  border: 1px solid #D5CFCB;
  color: #555;
}

.admin-btn-outline:hover {
  background: #F5F1EE;
  border-color: #B5AFA9;
}

.admin-btn-danger {
  background: #FEE8E7;
  color: #D32F2F;
  border: 1px solid #F8C3C1;
  padding: 6px 12px;
  font-size: 12px;
}

.admin-btn-danger:hover {
  background: #D32F2F;
  color: #FFF;
}

/* Aba 1: Grade Semanal */
.admin-day-card {
  background: #FAF8F7;
  border: 1px solid #EAE6E4;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.admin-day-card.disabled {
  opacity: 0.6;
  background: #F5F3F2;
}

.admin-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #2D2D2D;
}

/* Switch Toggle Estilizado */
.admin-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.admin-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #D6D0CD;
  transition: .3s;
  border-radius: 24px;
}

.admin-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-toggle input:checked+.admin-toggle-slider {
  background-color: #a9796d;
}

.admin-toggle input:checked+.admin-toggle-slider:before {
  transform: translateX(20px);
}

.admin-day-ranges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-shift-box {
  background: #FFFFFF;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ECE7E5;
}

.admin-shift-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: #8E8A87;
  margin-bottom: 6px;
}

.admin-time-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-time-inputs input[type="time"] {
  border: 1px solid #E2DEDC;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  background: #FAF8F7;
  color: #2D2D2D;
  outline: none;
}

/* Aba 2: Folgas & Bloqueios */
.admin-overrides-form {
  background: #FCFBFB;
  border: 1px solid #EAE6E4;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.admin-overrides-form h4 {
  font-size: 14px;
  color: #2D2D2D;
  margin-bottom: 12px;
}

.admin-overrides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-overrides-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-override-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FAF8F7;
  border: 1px solid #EAE6E4;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.admin-override-info strong {
  display: block;
  font-size: 13px;
  color: #2D2D2D;
}

.admin-override-info span {
  font-size: 12px;
  color: #777;
  font-family: "JetBrains Mono", monospace;
}

/* Aba 3: Simulador */
.admin-sim-card {
  background: #FAF8F7;
  border: 1px solid #EAE6E4;
  border-radius: 14px;
  padding: 20px;
}

.admin-slots-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-slot-pill {
  padding: 6px 12px;
  background: #FFFFFF;
  border: 1px solid #E2DEDC;
  border-radius: 16px;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  color: #444;
}

/* Rodapé do Modal */
.admin-modal-footer {
  padding: 16px 32px;
  border-top: 1px solid #F0ECE9;
  background: #FCFBFB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* Toast Notification Flutuante */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #2D2D2D;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  z-index: 3000;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.admin-toast.active {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.success {
  border-left: 4px solid #4CAF50;
}

.admin-toast.error {
  border-left: 4px solid #F44336;
}

@media screen and (max-width: 640px) {
  .admin-day-ranges {
    grid-template-columns: 1fr;
  }

  .admin-overrides-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal-footer {
    flex-direction: column;
    gap: 12px;
  }

  .admin-footer-left,
  .admin-footer-right {
    width: 100%;
    justify-content: center;
  }
}