/*
 * Prospecta Corban V292 — modal Cadastrar/Editar funcionario.
 * Somente estilos da janela #employee-modal, exclusivos do tema escuro.
 * Mantem as validacoes, hierarquia, credenciais e comissionamento intactos.
 * NUNCA modifica .corban-native-select (select invisivel da integracao JS),
 * nem muda o posicionamento do olhinho que fica dentro do campo de senha.
 */
html[data-app-theme="dark"] #employee-modal {
  background: radial-gradient(ellipse at 82% 13%, rgba(24, 105, 223, .15), transparent 45%),
              rgba(2, 9, 22, .82) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-card {
  box-sizing: border-box;
  width: min(860px, calc(100vw - 30px)) !important;
  max-height: min(850px, calc(100dvh - 32px)) !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(93, 175, 246, .39) !important;
  border-radius: 21px !important;
  color: #eaf6ff !important;
  background: radial-gradient(ellipse at 6% -11%, rgba(32, 118, 240, .17), transparent 42%),
              linear-gradient(163deg, #0d223c 0%, #091a32 48%, #071529 100%) !important;
  box-shadow: 0 32px 105px rgba(0, 5, 23, .66),
              0 0 29px rgba(41, 134, 252, .10),
              inset 0 1px 0 rgba(174, 228, 255, .09) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px;
  line-height: 1.45;
  scrollbar-color: rgba(68, 157, 239, .52) transparent;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-card::-webkit-scrollbar { width: 9px; }
html[data-app-theme="dark"] #employee-modal .employee-modal-card::-webkit-scrollbar-thumb {
  border-radius: 9px;
  background: rgba(69, 157, 235, .43);
}
html[data-app-theme="dark"] #employee-modal .employee-modal-head {
  position: sticky;
  z-index: 8;
  top: 0;
  min-height: 81px !important;
  padding: 19px 25px 17px !important;
  border-bottom: 1px solid rgba(91, 175, 244, .25) !important;
  background: linear-gradient(110deg, #123256, #0b213d 58%, #09192e) !important;
  box-shadow: 0 6px 20px rgba(0, 8, 28, .12) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-head small {
  display: block;
  color: #83dbff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .105em !important;
  line-height: 1.35;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-head h3 {
  margin-top: 5px !important;
  color: #f3faff !important;
  font-size: clamp(20px, 2vw, 24px) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -.025em;
}
html[data-app-theme="dark"] #employee-modal #employee-modal-close {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(95, 174, 238, .35) !important;
  border-radius: 11px !important;
  background: rgba(24, 63, 105, .43) !important;
  color: #bedff7 !important;
  font-size: 21px !important;
}
html[data-app-theme="dark"] #employee-modal #employee-modal-close:hover {
  color: #fff !important;
  border-color: rgba(111, 217, 255, .77) !important;
  background: rgba(42, 119, 197, .30) !important;
  box-shadow: 0 0 18px rgba(47, 165, 255, .17) !important;
}

/* Campos e hierarquia: melhorar leitura sem trocar IDs/classes funcionais. */
html[data-app-theme="dark"] #employee-modal .employee-form {
  gap: 16px 15px !important;
  padding: 22px 25px 25px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-field {
  gap: 7px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-field label {
  color: #adcbe0 !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  letter-spacing: .015em;
  line-height: 1.4;
}
html[data-app-theme="dark"] #employee-modal :is(
  .employee-field input:not([type="checkbox"]),
  .employee-field select:not(.corban-native-select),
  .employee-field .corban-employee-select-trigger,
  .employee-commission-rule > input,
  .employee-commission-rule > select:not(.corban-native-select),
  .employee-rule-money,
  .employee-rule-percent
) {
  min-height: 44px !important;
  border: 1px solid rgba(92, 158, 219, .36) !important;
  border-radius: 11px !important;
  color: #e9f6ff !important;
  background-color: #10253f !important;
  box-shadow: inset 0 1px 0 rgba(184, 232, 255, .045) !important;
  font-size: 12.5px !important;
  font-weight: 550 !important;
}
html[data-app-theme="dark"] #employee-modal .employee-field input:not([type="checkbox"])::placeholder,
html[data-app-theme="dark"] #employee-modal .employee-crm-password-shell input::placeholder {
  color: #819eb8 !important;
  opacity: 1;
}
html[data-app-theme="dark"] #employee-modal :is(
  .employee-field input:not([type="checkbox"]),
  .employee-field select:not(.corban-native-select),
  .employee-field .corban-employee-select-trigger,
  .employee-commission-rule > input,
  .employee-commission-rule > select:not(.corban-native-select)
):is(:hover, :focus, :focus-visible),
html[data-app-theme="dark"] #employee-modal .employee-field .corban-employee-select.is-open > .corban-employee-select-trigger {
  border-color: rgba(102, 201, 255, .78) !important;
  box-shadow: 0 0 0 3px rgba(45, 152, 250, .11) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-field select:not(.corban-native-select) {
  color-scheme: dark;
}
html[data-app-theme="dark"] #employee-modal .corban-employee-select-chevron {
  border-color: #9fcce9 !important;
}
html[data-app-theme="dark"] #employee-modal .corban-employee-select-menu {
  border: 1px solid rgba(91, 179, 246, .45) !important;
  color: #eaf7ff !important;
  background: linear-gradient(170deg, #112e50, #0a1d35) !important;
  box-shadow: 0 16px 35px rgba(2, 8, 25, .42), 0 0 16px rgba(47, 151, 251, .09) !important;
}
html[data-app-theme="dark"] #employee-modal .corban-employee-select-option {
  color: #c9e1f1 !important;
  font-size: 12px !important;
}
html[data-app-theme="dark"] #employee-modal .corban-employee-select-option:is(:hover, .is-selected) {
  color: #f6fcff !important;
  background: rgba(48, 143, 235, .27) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-field-hint {
  color: #92b2ca !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}
html[data-app-theme="dark"] #employee-modal .employee-hierarchy-fields {
  gap: 14px !important;
  padding: 17px !important;
  border-color: rgba(83, 171, 246, .31) !important;
  border-radius: 15px !important;
  background: linear-gradient(139deg, rgba(24, 77, 133, .25), rgba(8, 30, 58, .82)) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-hierarchy-note > span {
  background: #6ccfff !important;
  box-shadow: 0 0 10px rgba(82, 191, 255, .38) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-hierarchy-note small {
  color: #a1c2d7 !important;
  font-size: 11px !important;
}

/* Credenciais de CRM como card premium azul, sem verde antigo. */
html[data-app-theme="dark"] #employee-modal .employee-crm-access-card {
  padding: 18px !important;
  border: 1px solid rgba(89, 173, 240, .39) !important;
  border-radius: 16px !important;
  background: radial-gradient(ellipse at 98% 0%, rgba(46, 137, 235, .13), transparent 40%),
              linear-gradient(137deg, rgba(23, 63, 105, .72), rgba(9, 33, 64, .89)) !important;
  box-shadow: inset 0 1px 0 rgba(192, 238, 255, .075) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head {
  margin-bottom: 16px !important;
  padding-bottom: 14px !important;
  border-bottom-color: rgba(97, 177, 243, .21) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head > div {
  gap: 5px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head span {
  color: #80deff !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .11em !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head strong {
  color: #f0f9ff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head small {
  max-width: 680px;
  color: #a4c2d8 !important;
  font-size: 11px !important;
  line-height: 1.48 !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-head > i {
  width: 9px;
  height: 9px;
  background: #65d0ff !important;
  box-shadow: 0 0 13px rgba(75, 193, 255, .51) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-access-grid {
  gap: 15px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-credentials-fields {
  gap: 14px !important;
  padding-top: 1px;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-shell {
  position: relative; /* nao alterar para flex: olhinho deve ser absoluto */
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-shell input {
  padding-right: 47px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  transform: translateY(-50%) !important;
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 9px;
  color: #91ddff !important;
  background: rgba(39, 117, 194, .13) !important;
  box-shadow: none !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-toggle:is(:hover, :focus-visible) {
  background: rgba(54, 150, 236, .27) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-toggle:active {
  transform: translateY(-50%) scale(.96) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-toggle .eye-outline {
  border-color: #93dfff !important;
}
html[data-app-theme="dark"] #employee-modal .employee-crm-password-toggle .eye-pupil {
  background: #93dfff !important;
}

/* Comissao, metas e acoes: os estados reais continuam controlados pelo JS. */
html[data-app-theme="dark"] #employee-modal .employee-individual-commission {
  padding: 17px !important;
  border: 1px solid rgba(85, 165, 239, .32) !important;
  border-radius: 15px !important;
  background: linear-gradient(130deg, rgba(22, 65, 112, .56), rgba(7, 27, 51, .90)) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-head strong {
  color: #eff9ff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-head small {
  color: #a3c3d8 !important;
  font-size: 11px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-columns {
  color: #9abed7 !important;
  font-size: 10px !important;
  letter-spacing: .035em !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-head button {
  min-height: 35px;
  padding: 0 12px !important;
  color: #b2edff !important;
  border-color: rgba(103, 194, 255, .42) !important;
  background: rgba(39, 122, 204, .21) !important;
  font-size: 11px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-head button:hover {
  border-color: rgba(130, 227, 255, .78) !important;
  background: rgba(54, 154, 232, .32) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-commission-rule :is(
  .employee-rule-money span, .employee-rule-percent span
) {
  color: #a4c8e0 !important;
  font-size: 10px !important;
}
html[data-app-theme="dark"] #employee-modal .employee-rule-money input,
html[data-app-theme="dark"] #employee-modal .employee-rule-percent input {
  font-size: 12px !important;
  color: #eaf7ff !important;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-actions {
  position: sticky;
  z-index: 6;
  bottom: 0;
  gap: 12px !important;
  margin: 5px -25px -25px;
  padding: 14px 25px !important;
  border-top: 1px solid rgba(93, 176, 244, .29) !important;
  background: linear-gradient(110deg, rgba(15, 44, 78, .98), rgba(8, 27, 53, .99)) !important;
  box-shadow: 0 -12px 26px rgba(0, 11, 31, .21);
}
html[data-app-theme="dark"] #employee-modal .employee-modal-actions :is(button, .btn) {
  min-height: 40px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .01em;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-actions .btn.secondary {
  color: #bdddf1 !important;
  border: 1px solid rgba(100, 171, 231, .34) !important;
  background: rgba(36, 75, 115, .23) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-modal-actions .btn.secondary:hover {
  color: #fff !important;
  border-color: rgba(111, 213, 255, .68) !important;
  background: rgba(38, 110, 181, .31) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-save-button:not(:disabled) {
  border: 1px solid rgba(153, 232, 255, .76) !important;
  color: #061e3a !important;
  background: linear-gradient(106deg, #4b9fff, #71d7ff 63%, #a6f0ff) !important;
  box-shadow: 0 0 16px rgba(58, 161, 247, .20),
              inset 0 1px 0 rgba(255, 255, 255, .30) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-save-button:not(:disabled):hover {
  background: linear-gradient(106deg, #6bb5ff, #99e8ff) !important;
  box-shadow: 0 0 23px rgba(62, 172, 251, .27) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-save-button:disabled {
  opacity: .55;
}
html[data-app-theme="dark"] #employee-modal .employee-account-button.activate {
  color: #b2e9ff !important;
  background: rgba(45, 134, 211, .16) !important;
  border-color: rgba(94, 190, 248, .36) !important;
}
html[data-app-theme="dark"] #employee-modal .employee-account-button.password {
  color: #ffd995 !important; /* funcao sensivel: redefinir senha */
}
html[data-app-theme="dark"] #employee-modal .employee-account-button.deactivate {
  color: #ff9ca7 !important; /* funcao destrutiva: inativacao */
}
/* Nao usar shimmer no botao do olho nem nos dropdowns. */
html[data-app-theme="dark"] #employee-modal .employee-save-button:not(:disabled) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
html[data-app-theme="dark"] #employee-modal .employee-save-button:not(:disabled)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
  top: -75%;
  left: -60%;
  width: 36%;
  height: 250%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  transform: translate3d(0, 0, 0) skewX(-21deg);
  transition: transform .6s ease, opacity .12s ease;
}
html[data-app-theme="dark"] #employee-modal .employee-save-button:not(:disabled):is(:hover, :focus-visible)::after {
  opacity: 1;
  transform: translate3d(520%, 0, 0) skewX(-21deg);
}
@media (max-width: 680px) {
  html[data-app-theme="dark"] #employee-modal .employee-modal-card {
    width: calc(100vw - 18px) !important;
    max-height: calc(100dvh - 18px) !important;
  }
  html[data-app-theme="dark"] #employee-modal .employee-modal-head {
    padding: 15px 17px !important;
  }
  html[data-app-theme="dark"] #employee-modal .employee-form {
    grid-template-columns: 1fr !important;
    padding: 17px 17px 19px !important;
  }
  html[data-app-theme="dark"] #employee-modal .employee-crm-credentials-fields {
    grid-template-columns: 1fr !important;
  }
  html[data-app-theme="dark"] #employee-modal .employee-modal-actions {
    margin: 4px -17px -19px;
    padding: 12px 17px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="dark"] #employee-modal .employee-save-button::after {
    opacity: 0 !important;
    transition: none !important;
  }
}
