@media (max-width: 900px) {

  #btnNovo,
  #btnMoreActions {
    min-width: 90px;
    max-width: 45vw;
    font-size: 13px;
    padding: 7px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    display: inline-block;
  }

  .page-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .page-header .title-group {
    width: auto !important;
    margin-right: 10px !important;
    flex-shrink: 0;
  }

  .page-header .header-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
  }

  #btnNovo,
  #btnMoreActions {
    min-width: 90px;
    max-width: 45vw;
    font-size: 13px;
    padding: 7px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    display: inline-block;
    margin-bottom: 0 !important;
    width: auto !important;
  }
}

@media (max-width: 900px) {
  .filters-main {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 10px 12px !important;
    width: 100vw !important;
    padding: 0 12px !important;
    align-items: end !important;
    /* Remove stacking context */
    position: static !important;
    z-index: auto !important;
  }

  .filters-left,
  .filters-right {
    display: contents !important;
  }

  /* 1ª linha: Nome, Filtro plano, Filtro produto */
  .filters-left .filter-item:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .filters-right .filter-item:nth-child(1) {
    grid-column: 2 / 3;
    grid-row: 1;
  }

  .filters-right .filter-item:nth-child(2) {
    grid-column: 3 / 4;
    grid-row: 1;
  }

  /* 2ª linha: Status, Pagamento, X, Mostrar */
  .filters-right .filter-item:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .filters-right .filter-item:nth-child(4) {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .filters-right .filter-item:nth-child(5) {
    grid-column: 3 / 4;
    grid-row: 2;
  }

  .filters-right .filter-item:nth-child(6) {
    grid-column: 3 / 4;
    grid-row: 2;
    justify-self: end;
  }

  .filter-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
  }

  .filters-left .search-input {
    width: 90% !important;
    min-width: 0 !important;
    max-width: 90vw !important;
    box-sizing: border-box !important;
  }

  .filters-right .filter-item:nth-child(6) {
    display: flex !important;
    width: 60% !important;
    justify-content: flex-end !important;
    grid-column: 3 / 4;
    grid-row: 2;
    justify-self: end;

  }

  .filters-right .filter-item:nth-child(6) label {
    margin-right: 20px !important;
    white-space: nowrap;
    vertical-align: middle;
  }
}




@media (max-width: 900px) {

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

  .app,
  .main,
  .clients-page,
  .clients-box,
  .card,
  .filters,
  .page-header {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow: visible !important;
  }

  .sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100vh !important;
    width: 240px !important;
    max-width: 80vw !important;
    z-index: 2200 !important;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25);
    background: #23272f !important;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
  }

  .sidebar.menu-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  #sidebarToggleBtn {
    position: fixed !important;
    left: 18px !important;
    top: 18px !important;
    z-index: 2300 !important;
    display: block !important;
  }

  .global-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative;
    min-height: 56px;
    width: 100vw !important;
    overflow: visible !important;
  }

  .global-left {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: 56px !important;
  }

  .clients-box {
    overflow-x: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .clients-list {
    width: 1200px !important;
    min-width: 1200px !important;
    max-width: 1200px !important;
    display: block !important;
  }

  .clients-header-row,
  .client-row {
    min-width: 1200px !important;
    font-size: 14px !important;
    grid-template-columns: 2.5rem 8rem 2.5fr 2fr 2fr 2fr 2fr 2fr !important;
  }

  @media (max-width: 900px) {
    .actions-top {
      justify-content: flex-start !important;
      display: flex !important;
      width: 100% !important;
      margin-top: 0px !important;
      margin-bottom: 18px !important;
      padding-left: 15% !important;
    }

    .actions-btn-group {
      display: flex !important;
      gap: 12px !important;
      justify-content: flex-start !important;
      width: auto !important;
    }

    .filters-left .filter-item {
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100vw !important;
      box-sizing: border-box !important;
    }

    .filters-left .search-input {
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100vw !important;
      box-sizing: border-box !important;
    }
  }



  @media (max-width: 900px) {

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

/* Switch moderno para pagamento confirmado */
.rem-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch-input {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}

.switch-slider {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 24px;
  background: #222e3c;
  border-radius: 12px;
  border: 1.5px solid #2a3547;
  transition: background 0.2s;
  cursor: pointer;
  vertical-align: middle;
}

.switch-slider:after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(.4, 2, .6, 1);
  box-shadow: 0 1px 4px #0002;
}

.switch-input:checked+.switch-slider {
  background: #1ab87b;
  border-color: #1ab87b;
}

.switch-input:checked+.switch-slider:after {
  transform: translateX(16px);
}

.rem-label {
  font-size: 16px;
  font-weight: 700;
  color: #38b6ff;
  transition: color 0.2s;
}

.switch-input:checked~.rem-label {
  color: #4ade80 !important;
}

#importClientsModal input[type="file"] {
  border-radius: 8px;
  border: 1.5px solid #38b6ff;
  padding: 8px 12px;
  background: #20293a;
  color: #e0e6f0;
  font-size: 1.08rem;
  margin-bottom: 24px;
}

/* Alinhamento do modal de importação de clientes */
#importClientsModal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 18, 30, 0.82);
  z-index: 120002;
}

#importClientsModal .modal {
  max-width: 520px;
  min-height: 420px;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 8px 32px #0008;
  background: #232e3c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 0 32px 0;
}

#importClientsModal .modal-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
  position: relative;
  margin-bottom: 12px;
}

#importClientsModal .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #38b6ff;
  margin-bottom: 10px;
  margin-top: 0;
  padding-left: 24px;
  padding-right: 24px;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#importClientsModal .modal-body {
  z-index: 130000;
  padding: 0 36px 0 36px;
  width: 100%;
}

/* ===== WRAPPER DO BOTÃO ===== */
.more-actions-wrapper {
  display: inline-block;
  position: relative;
  margin-left: 8px;
  z-index: 120000;
}

/* ===== BOTÃO MAIS AÇÕES ===== */


.more-actions-wrapper {
  display: inline-block;
  position: relative;
  margin-left: 8px;
  z-index: 1100;
}

#btnMoreActions {
  height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(14, 165, 255, 0.06);
  color: #0ea5ff;
  border: 2px solid rgba(14, 165, 255, 0.15);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(14, 165, 255, 0.08);
}

#btnMoreActions:hover,
#btnMoreActions.active,
#btnMoreActions:focus {
  background: rgba(14, 165, 255, 0.18);
}

#btnMoreActions:hover,
#btnMoreActions.active,
#btnMoreActions:focus {
  background: rgba(14, 165, 255, 0.18);
}


/* =====================
   ESTILO CALENDÁRIO MODAL CLIENTE - TEMA ESCURO
   ===================== */

/* Força tema escuro global para calendários */
#clientModal {
  color-scheme: dark;
}

/* Estilo principal do input date */
#clientModal input[type="date"] {
  position: relative;
  color: #e0e6f0 !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color-scheme: dark;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 18px 18px;
  padding-right: 40px !important;
}

/* Cores dos elementos do datepicker */
#clientModal input[type="date"]::-webkit-datetime-edit {
  color: #e0e6f0 !important;
}

#clientModal input[type="date"]::-webkit-datetime-edit-text {
  color: #8ca0b3 !important;
}

#clientModal input[type="date"]::-webkit-datetime-edit-month-field,
#clientModal input[type="date"]::-webkit-datetime-edit-day-field,
#clientModal input[type="date"]::-webkit-datetime-edit-year-field {
  color: #e0e6f0 !important;
}

/* Ícone do calendário customizado */
#clientModal input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
  background-size: 18px 18px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 1 !important;
  width: 20px;
  height: 20px;
  cursor: pointer;
  filter: none;
  margin-left: 4px;
}

/* Placeholder personalizado */
#clientModal input[type="date"]::-ms-input-placeholder {
  color: #e0e6f0;
}

#clientModal input[type="date"]::-moz-placeholder {
  color: #e0e6f0;
}

#clientModal input[type="date"]::placeholder {
  color: #e0e6f0;
}

/* Placeholder customizado */
#clientModal input[type="date"]::-ms-input-placeholder {
  color: #e0e6f0;
}

#clientModal input[type="date"]::-moz-placeholder {
  color: #e0e6f0;
}

#clientModal input[type="date"]::placeholder {
  color: #e0e6f0;
}

/* Esconde o ícone nativo do input date no modal de renovação de cliente */
/* Aplica o mesmo estilo do input date do cliente ao modal de renovação */
#renewClientModal input[type="date"] {
  position: relative;
  color: #e0e6f0 !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color-scheme: dark;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 18px 18px;
  padding-right: 40px !important;
}

#renewClientModal input[type="date"]::-webkit-datetime-edit {
  color: #e0e6f000 !important;
}

#renewClientModal input[type="date"]::-webkit-datetime-edit-text {
  color: #8ca0b3 !important;
}

#renewClientModal input[type="date"]::-webkit-datetime-edit-month-field,
#renewClientModal input[type="date"]::-webkit-datetime-edit-day-field,
#renewClientModal input[type="date"]::-webkit-datetime-edit-year-field {
  color: #e0e6f0 !important;
}

#renewClientModal input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
  background-size: 18px 18px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 1 !important;
  width: 20px;
  height: 20px;
  cursor: pointer;
  filter: none;
  margin-left: 4px;
}

#renewClientModal input[type="date"]::-ms-input-placeholder {
  color: #e0e6f0;
}

#renewClientModal input[type="date"]::-moz-placeholder {
  color: #e0e6f0;
}

#renewClientModal input[type="date"]::placeholder {
  color: #e0e6f0;
}

/* Hover para botões do modal de renovação de cliente */
#renewClientModal .notify-btn:hover {
  background: rgba(14, 165, 255, 0.18) !important;
}

/* =====================
   MODAL DE RENOVAÇÃO DE CLIENTE
   ===================== */
#renewClientModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}

#renewClientModal.active {
  display: flex;
  opacity: 1;
}

#renewClientModal .modal {
  background: #181f2a;
  border-radius: 16px;
  min-width: 420px;
  max-width: 98vw;
  width: 480px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.32s cubic-bezier(.4, 2, .6, 1);
  padding-top: 36px;
  padding-bottom: 32px;
}

/* =====================
   FIM MODAL DE RENOVAÇÃO DE CLIENTE
   ===================== */
/* Hover para botões do modal de notificação */
#notifyClientModal .notify-btn:hover {
  background: rgba(14, 165, 255, 0.18) !important;
  /* Mantém a cor original do texto e borda */
}

/* =====================
   MODAL DE CLIENTE
   ===================== */

#notifyClientModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}

#notifyClientModal.active,
#notifyClientModal[style*="display: flex"] {
  display: flex !important;
  opacity: 1;
}

#notifyClientModal .modal {
  background: #181f2a;
  border-radius: 16px;
  min-width: 420px;
  max-width: 98vw;
  width: 420px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.32s cubic-bezier(.4, 2, .6, 1);
}

#notifyClientModal .modal-header {
  display: flex;
  justify-content: space-between;
  padding: 22px 28px 10px 28px;
  background: transparent;
}

#notifyClientModal .modal-title {
  margin: 0;
  color: #5C5FC7;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

#notifyClientModal .btn.small {
  background: none;
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}

#notifyClientModal .btn.small:hover {
  background: rgba(14, 165, 255, 0.18);
  /* Mantém a cor original do texto */
}

#notifyClientModal .modal-body {
  padding: 0 32px 28px 32px;
  overflow-y: auto;
}

#clientModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}

#clientModal.active {
  display: flex;
  opacity: 1;
}

#clientModal .modal {
  background: #181f2a;
  border-radius: 16px;
  padding: 0 0 0 0;
  min-width: 420px;
  max-width: 98vw;
  width: 520px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.32s cubic-bezier(.4, 2, .6, 1);
}

@keyframes modalIn {
  0% {
    transform: translateY(60px) scale(0.98);
    opacity: 0;
  }

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

#clientModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 10px 28px;
  background: transparent;
}

#clientModal .modal-header h3 {
  margin: 0;
  color: #38b6ff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

#clientModal .modal-header .btn.small {
  background: none;
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}

#clientModal .modal-header .btn.small:hover {
  background: #222e3c;
  color: #38b6ff;
}

#clientModal .modal-body {
  padding: 0 32px 28px 32px;
  overflow-y: auto;
}

#clientModal .modal-form .form-row.full {
  width: 100%;
  margin-bottom: 12px;
}

#clientModal .modal-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin-bottom: 12px;
}

#clientModal .modal-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#clientModal .modal-form input,
#clientModal .modal-form select {
  background: #20293a;
  border: 1.5px solid rgba(14, 165, 255, 0.13);
  color: #e0e6f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  outline: none;
  transition: border 0.18s, box-shadow 0.18s;
}

#clientModal .modal-form input:focus,
#clientModal .modal-form select:focus {
  border-color: #38b6ff;
  box-shadow: 0 0 0 2px #38b6ff33;
}

#clientModal .modal-form label.form-label {
  color: #e0e6f0;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

#clientModal .reminders-panel {
  margin-bottom: 12px;
  margin-top: 2px;
  padding: 14px 12px 10px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

#clientModal .reminders-panel .grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}

#clientModal .rem-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#clientModal .rem-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

#clientModal .rem-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 22px;
  background: #222e3c;
  border-radius: 12px;
  border: 1.5px solid #2a3547;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  margin-top: 2px;
  margin-right: 8px;
}

#clientModal .rem-toggle input[type="checkbox"]:checked {
  background: #1cac2f;
  border-color: #1cac2f;
}

#clientModal .rem-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(.4, 2, .6, 1);
  box-shadow: 0 1px 4px #0002;
}

#clientModal .rem-toggle input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: #fff;
}

#clientModal .rem-toggle input[type="checkbox"]:focus {
  box-shadow: 0 0 0 2px #38b6ff55;
}

#clientModal .rem-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#clientModal .rem-label {
  font-size: 12px;
  font-weight: 600;
  color: #e0e6f0;
}

#clientModal .rem-sub {
  font-size: 11px;
  color: #8ca0b3;
}

#clientModal .payment-panel {
  margin-bottom: 12px;
  margin-top: 2px;
  padding: 10px 12px 10px 12px;
  display: flex;
  align-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

#clientModal .payment-panel .rem-item {
  width: 100%;
}

#clientModal .payment-panel .rem-label {
  font-size: 16px;
  font-weight: 700;
  color: #38b6ff;
}

#clientModal .payment-panel .rem-toggle input[type="checkbox"] {
  margin-top: 4px;
}

#clientModal .modal-form textarea {
  width: 100%;
  background: #20293a;
  color: #e0e6f0;
  border: 1.5px solid rgba(14, 165, 255, 0.13);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  margin-top: 2px;
  min-height: 62px;
  resize: vertical;
}

#clientModal .modal-form .form-row.buttons {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: flex-start;
  margin-top: 10px;
}

#clientModal .modal-form .form-row.buttons .btn.success {
  background: rgba(14, 165, 255, 0.06);
  color: #1ab87b;
  border: 2px solid rgba(14, 165, 255, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(14, 165, 255, 0.08);
  min-width: 120px;
}

#clientModal .modal-form .form-row.buttons .btn.success:hover {
  background: rgba(14, 165, 255, 0.18);
  color: #1ab87b;
  border-color: #1ab87b;
}

#clientModal .modal-form .form-row.buttons .btn.danger {
  background: rgba(14, 165, 255, 0.06);
  color: #d66c26;
  border: 2px solid rgba(14, 165, 255, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(14, 165, 255, 0.08);
  min-width: 120px;
}

#clientModal .modal-form .form-row.buttons .btn.danger:hover {
  background: rgba(14, 165, 255, 0.18);
  color: #d66c26;
  border-color: #d66c26;
}

#clientModal .rem-toggle .rem-label,
#clientModal .rem-toggle .rem-sub {
  transition: color 0.25s cubic-bezier(.4, 2, .6, 1);
}

#clientModal .rem-toggle input[type="checkbox"]:checked~.rem-content .rem-label,
#clientModal .rem-toggle input[type="checkbox"]:checked~.rem-content .rem-sub {
  color: #4ade80 !important;
}

#clientModal .rem-toggle input[type="checkbox"]:checked~.rem-content .rem-label {
  font-weight: 700;
}

#clientModal .rem-toggle input[type="checkbox"]:checked~.rem-content .rem-sub {
  font-weight: 500;
}

/* =====================
   FIM MODAL DE CLIENTE
   ===================== */
/* =====================
   MODAL DE CLIENTE
   ===================== */
#clientModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
}

#clientModal.active {
  display: flex;
  opacity: 1;
}

#clientModal .modal {
  background: #181f2a;
  border-radius: 16px;
  padding: 0 0 0 0;
  min-width: 420px;
  max-width: 98vw;
  width: 520px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.32s cubic-bezier(.4, 2, .6, 1);
}

@keyframes modalIn {
  0% {
    transform: translateY(60px) scale(0.98);
    opacity: 0;
  }

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

#clientModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 10px 28px;
  background: transparent;
}

#clientModal .modal-header h3 {
  margin: 0;
  color: #38b6ff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

#clientModal .modal-header .btn.small {
  background: none;
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}

#clientModal .modal-header .btn.small:hover {
  background: #222e3c;
  color: #38b6ff;
}

#clientModal .modal-body {
  padding: 0 32px 28px 32px;
  overflow-y: auto;
}

/* =====================
   FIM MODAL DE CLIENTE
   ===================== */




.btn-clear-filter {
  background: transparent;
  color: #60a5fa;
  border: 1.5px solid rgba(14, 165, 255, 0.15);
  border-radius: 7px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  margin-left: 2px;
  transition: background 0.22s, color 0.22s, border 0.22s, box-shadow 0.22s, transform 0.12s;
  box-shadow: none;
}

.btn-clear-filter:hover,
.btn-clear-filter:focus {
  background: rgba(14, 165, 255, 0.12);
  color: #0ea5ff;
  border-color: #0ea5ff;
  box-shadow: 0 2px 8px rgba(14, 165, 255, 0.10) inset;
  outline: none;
  transform: scale(1.08);
}

.btn-clear-filter:active {
  background: rgba(14, 165, 255, 0.18);
  color: #fff;
  border-color: #0ea5ff;
  box-shadow: 0 0 0 2px rgba(14, 165, 255, 0.18) inset;
  transform: scale(0.96);
}


#btnNovo {
  background: rgba(14, 165, 255, 0.06);
  color: #0ea5ff;
  border: 2px solid rgba(14, 165, 255, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(14, 165, 255, 0.08);
}

#btnNovo:hover,
#btnNovo.active,
#btnNovo:focus {
  background: rgba(14, 165, 255, 0.18);
  /* Mantém a cor original do texto e borda */
}



#clientsPagination {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

/* Modal overlay padrão: oculto por padrão, flex quando .show */


.reminders-panel {
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}

.reminders-panel .panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.reminders-panel .panel-row .title {
  font-weight: 700;
  color: var(--muted-light);
}

.reminders-panel .grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.payment-panel {
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}

.modal-form textarea {
  resize: vertical;
  min-height: 62px;
  padding: 10px;
  border-radius: 6px;
}

.modal-form .form-row.buttons {
  margin-top: 8px;
}

#clientsSummary {
  margin: 12px 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}



/* ===== PÁGINA CLIENTES ===== */
/* Campo de busca dos filtros igual aos selects */
.filters-left .search-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  background: linear-gradient(145deg, rgba(16, 24, 35, 0.95), rgba(12, 17, 25, 0.95));
  color: var(--muted-light);
  border: 1.5px solid rgba(14, 165, 255, 0.15);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 2px 8px rgba(14, 165, 255, 0.06);
  transition: all 0.25s ease;
}

.filters-left .search-input:hover {
  border-color: rgba(14, 165, 255, 0.35);
  box-shadow: 0 0 8px rgba(14, 165, 255, 0.15);
  background: linear-gradient(145deg, rgba(16, 26, 38, 1), rgba(12, 20, 30, 1));
}

.filters-left .search-input:focus {
  outline: none;
  border-color: rgba(14, 165, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(14, 165, 255, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

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

.page-header .title-group h2 {
  margin: 0;
}

.clients-table-header {
  margin-bottom: 8px;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

/* ===== LINHAS DE CLIENTE E AVATARES ===== */
/* ===== CABEÇALHO DE CLIENTES ===== */
.clients-header-row {
  display: grid;
  grid-template-columns: 2.5rem 5rem 2.5fr 2fr 1.5fr 1.2fr 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.3rem;
  font-size: 13px;
  color: #66e8ff !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(14, 165, 255, 0.18) !important;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04) !important;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* =====LINHAS DE CLIENTE GRID ===== */
.client-row {
  display: grid;
  grid-template-columns: 2.5rem 5rem 2.5fr 2fr 1.5fr 1.2fr 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.2rem;
  border-radius: 0.5rem;
  border-bottom: 2px solid rgba(14, 165, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.5rem;
  color: #fff !important;
}

.client-row .col-check,
.clients-header-row .col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-row .col-client,
.clients-header-row .col-client {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
}

.client-row .col-plan,
.clients-header-row .col-plan {
  text-align: center;
  justify-self: center;
}

.client-row .col-due,
.clients-header-row .col-due {
  text-align: center;
  justify-self: center;
  font-size: 14px;
}

.client-row .col-days,
.clients-header-row .col-days {
  text-align: center;
  justify-self: center;
  font-size: 12px;
}

.client-row .col-status,
.clients-header-row .col-status {
  text-align: center;
  justify-self: center;
}

.client-row .col-payment,
.clients-header-row .col-payment {
  text-align: center;
  justify-self: center;
}

.client-row .col-actions,
.clients-header-row .col-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  justify-self: start;
}

.client-row .badge {
  margin-top: 6px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #6b21a8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.client-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  color: #dbdbdb
}

.client-info .name {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff
}

.client-info .sub {
  font-size: 14px;
  color: #94a3b8;
  font-family: monospace;
}

.client-info strong {
  display: block;
  margin: 0 0 4px 0;
  color: var(--muted-light);
}

.client-info .badge {
  display: block;
  font-size: 12px;
  font-weight: 400;
  padding: 0;
  color: var(--muted-light);
  margin: 0;
  margin-top: 4px;
  text-align: left;
}

.client-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.client-meta .plan-block .plan-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted-light);
}

.client-meta .plan-block .product-name {
  font-size: 12px;
  color: var(--muted-light);
  font-weight: 400;
}

.col-plan .plan-name {
  color: var(--muted-light);
  font-weight: 600;
  font-size: 13px;
  color: #ffffff
}

.col-plan .product-name {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 400;
}

.client-info .badge {
  font-size: 12px;
  font-weight: 400;
  padding: 4px 6px;
}

.due-badge {
  display: inline-block;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.days-text {
  font-weight: 400;
}

.days-text {
  font-weight: 600;
  font-size: 12px;
}

.days-text.overdue {
  color: #fb923c;
}

.days-text.today {
  color: #a78bfa;
}

.days-text.future {
  color: #60a5fa;
}

.days-text.active {
  color: #60a5fa;
}

.col-status .status-pill.overdue {
  background: #fb923c;
  font-weight: bold;
  color: #fff;
}

.col-status .status-pill.today {
  background: #a78bfa;
  font-weight: bold;
  color: #fff;
}

.col-status .status-pill.active {
  background: #60a5fa;
  font-weight: bold;
  color: #fff;
}

.col-status .status-pill.future {
  background: #60a5fa;
  font-weight: bold;
  color: #fff;
}

.col-payment .status-pill.active {
  background: #4ade80;
  font-weight: bold;
  color: #fff;
}

.col-payment .status-pill.overdue {
  background: #f87171;
  font-weight: bold;
  color: #fff;
}

.payment-text {
  font-weight: 600;
  font-size: 13px;
}

.payment-text.paid {
  color: #4ade80;
}

.payment-text.pending {
  color: #f59e0b;
}




/* ===== INFORMAÇÃO DO PLANO ===== */
.plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-name {
  font-weight: 600;
  font-size: 14px;
}

.plan-price {
  color: #0ea5ff;
  font-size: 12px;
  font-weight: 500;
}

.plan-product {
  color: #dbdbdb;
  font-size: 11px;
  text-transform: uppercase;
}


/* ===== BADGES (STATUS)===== */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}

.badge.success {
  background: transparent;
  color: #4ade80;
  border: 1px solid #4ade80;
}

.badge.danger {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.badge.warning {
  background: transparent;
  color: #f59e0b;
  border: 1px solid #f59e0b;
}





/* ===== CHECKBOX FANCY ===== */
.col-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.col-check input[type="checkbox"]:checked {
  background: linear-gradient(180deg, rgba(14, 165, 255, 0.16), rgba(14, 165, 255, 0.06));
  border-color: rgba(14, 165, 255, 0.35);
}

.col-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.client-row .col-check,
.header-row .col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-row .col-check input[type="checkbox"] {
  margin-left: 0;
}

/* ===== PAGINAÇÃO ===== */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination .page-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted-light);
  cursor: pointer;
  min-width: 36px;
  text-align: center;
}

.pagination .page-btn:hover:not(:disabled):not(.active) {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.pagination .page-btn.active {
  background: rgba(14, 165, 255, 0.06);
  border-color: rgba(14, 165, 255, 0.15);
  color: #0ea5ff;
}

.pagination .page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-ellipsis {
  color: var(--muted);
  padding: 6px 4px;
  user-select: none;
}

/* ===== BOTÃO AÇÕES ===== */
.actions {
  display: flex;
  gap: 4px;
}

.action {
  background: rgba(14, 165, 255, 0.06);
  color: #0ea5ff;
  border: 1px solid rgba(14, 165, 255, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.action:hover {
  background: rgba(14, 165, 255, 0.12);
}

/* ===== DROPDOWN (VERSÃO AJUSTADA: FIXA NO TOPO) ===== */
.action-dropdown {
  position: fixed !important;
  z-index: 130000 !important;
  /* O top/left SEMPRE são ajustados via JS, não force top/auto/left/auto aqui */
  min-width: 180px;
  max-width: 95vw;
  background: #10151c;
  border-radius: 10px;
  padding: 10px 0;
  border: 1px solid rgba(14, 165, 255, 0.10);
  overflow: visible;
  display: none;
  word-break: break-word;
  overflow-x: auto;
}

/* ===== ITENS DO DROPDOWN ===== */
.action-dropdown-item {
  padding: 10px 16px;
  text-align: left;
  color: var(--muted-light);
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.action-dropdown-item:hover {
  background: rgba(14, 165, 255, 0.08);
  color: #0ea5ff;
}

/* Item selecionado */
.action-dropdown-item.selected {
  background: rgba(14, 165, 255, 0.18);
  color: #0ea5ff;
  font-weight: 600;
}

/* Item de deletar */
.action-dropdown-item.delete {
  color: var(--danger);
}

.action-dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Ícones */
.action-dropdown-item .icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
  fill: #60a5fa;
  transition: fill 0.2s;
}

.action-dropdown-item.delete .icon {
  fill: #ef4444;
}

#moreActionsMenu.show {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  max-width: 95vw;
  background: #10151c;
  border-radius: 12px;
  padding: 10px 0;
  border: 1.5px solid rgba(14, 165, 255, 0.15);
  box-shadow: 0 8px 32px rgba(14, 165, 255, 0.10), 0 2px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 3000;
}


#moreActionsMenu .dropdown-item {
  padding: 12px 18px;
  color: #60a5fa;
  font-size: 14px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}

#moreActionsMenu .dropdown-item:last-child {
  border-bottom: none;
}

#moreActionsMenu .dropdown-item:hover,
#moreActionsMenu .dropdown-item:focus {
  background: rgba(14, 165, 255, 0.08);
  color: #0ea5ff;
}

#moreActionsMenu .dropdown-item.delete {
  color: #ef4444;
}

#moreActionsMenu .dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.10);
  color: #fff;
}

/* O menu só fica visível quando tem a classe .show */
#moreActionsMenu,
.dropdown-menu {
  display: none;
}


@media (max-width: 900px) {
#moreActionsMenu.show {
  display: block;
  position: fixed !important;
  left: 350px !important;
  top: 132px !important;
  transform: translateX(-50%) !important;
  background: #10151c;
  border-radius: 12px;
  padding: 10px 0;
  border: 1.5px solid rgba(14, 165, 255, 0.15);
  box-shadow: 0 8px 32px rgba(14, 165, 255, 0.10), 0 2px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 3000 !important;
}

#moreActionsMenu.show {
  display: block;
  position: absolute;
  right: 0;
  top: 10%;
  min-width: 150px;
  max-width: 220px;
  background: #10151c;
  border-radius: 10px;
  padding: 6px 0;
  border: 1.5px solid rgba(14, 165, 255, 0.15);
  box-shadow: 0 8px 24px rgba(14, 165, 255, 0.10), 0 2px 8px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 1100;
}

#moreActionsMenu .dropdown-item {
  padding: 12px 18px;
  color: #60a5fa;
  font-size: 14px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}

#moreActionsMenu .dropdown-item:last-child {
  border-bottom: none;
}

#moreActionsMenu .dropdown-item:hover,
#moreActionsMenu .dropdown-item:focus {
  background: rgba(14, 165, 255, 0.08);
  color: #0ea5ff;
}

#moreActionsMenu .dropdown-item.delete {
  color: #ef4444;
}

#moreActionsMenu .dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.10);
  color: #fff;
}

/* O menu só fica visível quando tem a classe .show */
#moreActionsMenu,
.dropdown-menu {
  display: none;
}
}