/* ============================================================
   VTTECH 3.1
   LOGIN + SELETOR DE TITULAR
   COMPONENTES ISOLADOS
   ============================================================ */

:root{
  --v31-navy:#0b2f4d;
  --v31-navy-light:#174f75;
  --v31-lime:#b7ef0d;
  --v31-blue:#1f8fc5;
  --v31-cyan:#18a7aa;
  --v31-bg:#f3f7fa;
  --v31-line:#d9e4eb;
  --v31-text:#173750;
  --v31-muted:#708394;
}

/* ============================================================
   LOGIN
   ============================================================ */

html:has(body.page-login){
  height:100%!important;
  overflow:hidden!important;
}

body.page-login{
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
  background:#f3f7fa!important;
}

body.page-login .v31-auth-shell{
  width:min(1100px,calc(100vw - 56px))!important;
  height:calc(100vh - 126px)!important;
  min-height:510px!important;
  max-height:610px!important;

  margin:28px auto 0!important;

  display:grid!important;
  grid-template-columns:
    minmax(420px,47%)
    minmax(0,53%)!important;

  background:#fff!important;

  border:
    1px solid rgba(15,55,82,.08)!important;

  border-radius:24px!important;

  overflow:hidden!important;

  box-shadow:
    0 22px 65px rgba(10,43,68,.13)!important;

  box-sizing:border-box!important;
}

/* Primeiro acesso: card largo em coluna única (sem a imagem ao lado), evita a quebra de layout */
body.page-login.v31-first-access-page .v31-auth-shell{
  grid-template-columns:1fr!important;
  height:auto!important;
  min-height:0!important;
  max-height:calc(100vh - 56px)!important;
  overflow:auto!important;
}
body.page-login.v31-first-access-page .v31-auth-visual{display:none!important}

body.page-login .v31-auth-form{
  min-width:0!important;
  height:100%!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  padding:34px 44px!important;

  box-sizing:border-box!important;

  background:#fff!important;
}

body.page-login .v31-auth-card{
  width:100%!important;
  max-width:390px!important;

  padding:0!important;
  margin:0!important;

  background:transparent!important;
  border:0!important;
  box-shadow:none!important;

  overflow:visible!important;
}

.v31-auth-brandline{
  display:flex;
  align-items:center;
  gap:8px;

  margin-bottom:17px;

  color:#129b94;

  font-size:11px;
  font-weight:900;
  letter-spacing:.10em;
}

.v31-auth-dot{
  width:8px;
  height:8px;

  border-radius:50%;

  background:var(--v31-lime);

  box-shadow:
    0 0 0 4px rgba(183,239,13,.20);
}

body.page-login .v31-auth-card h1{
  margin:0 0 9px!important;

  color:var(--v31-navy)!important;

  font-size:34px!important;
  line-height:1.05!important;

  letter-spacing:-.035em!important;
}

.v31-auth-subtitle{
  margin:0 0 22px;

  color:var(--v31-muted);

  font-size:13px;
  line-height:1.52;
}

.v31-auth-field{
  display:block;

  margin-bottom:13px;
}

.v31-auth-field > span{
  display:block;

  margin-bottom:6px;

  color:#29475e;

  font-size:12px;
  font-weight:850;
}

.v31-auth-field input{
  display:block;

  width:100%!important;
  height:48px!important;

  min-width:0!important;
  max-width:none!important;

  padding:0 14px!important;

  border:
    1px solid #ccd9e2!important;

  border-radius:12px!important;

  outline:none!important;

  background:#fbfdfe!important;

  color:#17364e!important;

  font-size:14px!important;

  box-sizing:border-box!important;

  transition:
    border-color .14s ease,
    box-shadow .14s ease,
    background .14s ease!important;
}

.v31-auth-field input:hover{
  border-color:#aebfcb!important;
}

.v31-auth-field input:focus{
  border-color:var(--v31-blue)!important;

  background:#fff!important;

  box-shadow:
    0 0 0 4px rgba(31,143,197,.12)!important;
}

.v31-auth-primary{
  display:flex;

  width:100%;
  min-height:48px;

  align-items:center;
  justify-content:center;

  margin-top:5px;

  padding:0 18px;

  border:0;
  border-radius:12px;

  background:
    linear-gradient(
      135deg,
      #b7ef0d,
      #9fe40c
    );

  color:#17380c;

  font-size:14px;
  font-weight:900;

  cursor:pointer;

  box-shadow:
    0 9px 22px rgba(161,224,10,.22);

  transition:
    transform .14s ease,
    box-shadow .14s ease,
    filter .14s ease;
}

.v31-auth-primary:hover:not(:disabled){
  transform:translateY(-1px);

  box-shadow:
    0 12px 26px rgba(161,224,10,.27);
}

.v31-auth-primary:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.v31-auth-message{
  min-height:18px;

  margin-top:8px!important;
}

.v31-auth-divider{
  display:flex;
  align-items:center;

  gap:11px;

  margin:14px 0 10px;
}

.v31-auth-divider span{
  height:1px;
  flex:1;

  background:#e3eaef;
}

.v31-auth-divider em{
  color:#9aa7b2;

  font-size:10px;
  font-style:normal;
}

.v31-first-link{
  width:100%;

  padding:7px 5px;

  border:0;

  background:transparent;

  color:#0a6496;

  font-size:12px;
  font-weight:850;

  cursor:pointer;
}

.v31-first-link:hover{
  color:#074d75;
  text-decoration:underline;
}

.v31-auth-security{
  margin:7px 0 0;

  text-align:center;

  color:#82919e;

  font-size:10px;
  line-height:1.45;
}

.v31-first-head{
  display:flex;
  align-items:center;
  justify-content:space-between;

  margin-bottom:17px;
}

.v31-first-head > span{
  color:#169a92;

  font-size:10px;
  font-weight:900;

  letter-spacing:.10em;
}

.v31-back{
  padding:7px 10px;

  border:0;
  border-radius:9px;

  background:#f0f5f8;

  color:#39586f;

  font-size:11px;
  font-weight:800;

  cursor:pointer;
}

.v31-success-note{
  margin-bottom:14px;

  padding:11px 13px;

  border:
    1px solid #c6e7dd;

  border-radius:11px;

  background:#effaf6;

  color:#167257;

  font-size:11px;
  line-height:1.45;
}

.v31-password-help{
  margin:-3px 0 10px;

  color:#81919e;

  font-size:10px;
}

/* Visual direito */

.v31-auth-visual{
  position:relative;

  min-width:0;
  height:100%;

  overflow:hidden;

  background:#0a3454;
}

.v31-auth-visual > img{
  position:absolute;
  inset:0;

  width:100%;
  height:100%;

  object-fit:cover;

  display:block;
}

.v31-auth-visual-shade{
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      180deg,
      rgba(3,26,44,.12) 0%,
      rgba(4,31,51,.40) 45%,
      rgba(4,29,49,.92) 100%
    );
}

.v31-auth-visual-copy{
  position:absolute;

  left:36px;
  right:36px;
  bottom:34px;

  z-index:2;

  color:#fff;
}

.v31-auth-visual-copy > span{
  display:block;

  margin-bottom:8px;

  color:#b7ef0d;

  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
}

.v31-auth-visual-copy h2{
  max-width:480px;

  margin:0 0 10px;

  color:#fff;

  font-size:30px;
  line-height:1.08;
  letter-spacing:-.035em;
}

.v31-auth-visual-copy > p{
  max-width:490px;

  margin:0;

  color:#d5e3ec;

  font-size:12px;
  line-height:1.55;
}

.v31-auth-benefits{
  display:grid;

  grid-template-columns:1fr;

  gap:7px;

  margin-top:18px;
}

.v31-auth-benefits div{
  display:flex;
  align-items:center;

  gap:8px;

  color:#edf5f8;

  font-size:11px;
  font-weight:700;
}

.v31-auth-benefits b{
  display:grid;
  place-items:center;

  width:20px;
  height:20px;

  flex:0 0 20px;

  border-radius:50%;

  background:
    rgba(183,239,13,.14);

  color:#c9f44b;
}


/* ============================================================
   MODAL DE ESCOLHA DE TITULAR
   ============================================================ */

body.v31-modal-open{
  overflow:hidden!important;
}

.v31-company-modal{
  position:fixed;

  inset:0;

  z-index:99999;

  display:flex;

  align-items:center;
  justify-content:center;

  padding:24px;

  background:
    rgba(7,31,51,.58);

  backdrop-filter:blur(5px);

  box-sizing:border-box;
}

.v31-company-dialog{
  width:min(720px,100%);
  max-height:min(720px,calc(100vh - 48px));

  display:flex;
  flex-direction:column;

  overflow:hidden;

  border:
    1px solid rgba(255,255,255,.40);

  border-radius:23px;

  background:#fff;

  box-shadow:
    0 32px 100px rgba(4,25,42,.30);
}

.v31-company-dialog-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;

  gap:20px;

  padding:
    25px 26px
    18px;

  border-bottom:
    1px solid #e4ebf0;
}

.v31-company-dialog-top > div{
  min-width:0;
}

.v31-company-eyebrow{
  display:block;

  margin-bottom:6px;

  color:#129b93;

  font-size:10px;
  font-weight:900;

  letter-spacing:.12em;
}

.v31-company-dialog h2{
  margin:0 0 6px;

  color:var(--v31-navy);

  font-size:23px;
  line-height:1.1;

  letter-spacing:-.025em;
}

.v31-company-dialog-top p{
  max-width:580px;

  margin:0;

  color:#718494;

  font-size:12px;
  line-height:1.5;
}

.v31-company-close{
  display:grid;
  place-items:center;

  width:34px;
  height:34px;

  flex:0 0 34px;

  border:0;
  border-radius:10px;

  background:#f1f5f7;

  color:#627786;

  font-size:24px;
  line-height:1;

  cursor:pointer;
}

.v31-company-close:hover{
  background:#e7eef2;
}

.v31-company-list{
  display:grid;

  gap:9px;

  padding:18px 26px;

  overflow-y:auto;

  overscroll-behavior:contain;
}

.v31-company-option{
  appearance:none;

  display:grid;

  grid-template-columns:
    22px minmax(0,1fr);

  gap:12px;

  width:100%;

  padding:14px 15px;

  border:
    1px solid #d7e2e9;

  border-radius:14px;

  background:#fff;

  text-align:left;

  cursor:pointer;

  box-sizing:border-box;

  transition:
    border-color .14s ease,
    box-shadow .14s ease,
    background .14s ease,
    transform .14s ease;
}

.v31-company-option:hover:not(:disabled){
  transform:translateY(-1px);

  border-color:#8bbdd3;

  box-shadow:
    0 7px 18px rgba(22,77,108,.07);
}

.v31-company-option.is-selected{
  border-color:var(--v31-blue);

  background:#f4faff;

  box-shadow:
    0 0 0 3px rgba(31,143,197,.12);
}

.v31-company-option.is-disabled{
  opacity:.50;

  background:#f4f6f7;

  cursor:not-allowed;
}

.v31-company-radio{
  display:grid;
  place-items:center;

  width:18px;
  height:18px;

  margin-top:3px;

  border:
    2px solid #adbdc8;

  border-radius:50%;

  box-sizing:border-box;
}

.v31-company-radio i{
  display:none;

  width:8px;
  height:8px;

  border-radius:50%;

  background:var(--v31-blue);
}

.v31-company-option.is-selected
.v31-company-radio{
  border-color:var(--v31-blue);
}

.v31-company-option.is-selected
.v31-company-radio i{
  display:block;
}

.v31-company-option-body{
  display:flex;
  flex-direction:column;

  gap:3px;

  min-width:0;
}

.v31-company-option-top{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;
}

.v31-company-option-top strong{
  color:#173a55;

  font-size:13px;
}

.v31-company-option-top em{
  padding:4px 7px;

  border-radius:99px;

  background:#ecf8f4;

  color:#178063;

  font-size:9px;
  font-style:normal;
  font-weight:850;
}

.v31-company-option.is-disabled
.v31-company-option-top em{
  background:#eceff1;
  color:#76838d;
}

.v31-company-name{
  color:#324f64;

  font-size:12px;
  font-weight:700;

  overflow-wrap:anywhere;
}

.v31-company-email{
  color:#718493;

  font-size:11px;
}

.v31-company-option-body small{
  margin-top:3px;

  color:#916122;

  font-size:10px;
  line-height:1.4;
}

.v31-company-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;

  gap:10px;

  padding:
    16px 26px
    20px;

  border-top:
    1px solid #e4ebf0;

  background:#fafcfd;
}

.v31-company-secondary,
.v31-company-primary{
  min-height:43px;

  padding:0 18px;

  border-radius:11px;

  font-size:12px;
  font-weight:850;

  cursor:pointer;
}

.v31-company-secondary{
  border:
    1px solid #d7e1e8;

  background:#fff;

  color:#536c7e;
}

.v31-company-primary{
  border:0;

  background:
    linear-gradient(
      135deg,
      #b7ef0d,
      #a1e50d
    );

  color:#17370d;

  box-shadow:
    0 8px 19px rgba(161,224,10,.19);
}

.v31-company-primary:disabled{
  opacity:.42;

  box-shadow:none;

  cursor:not-allowed;
}

.v31-company-empty{
  padding:20px;

  border:
    1px dashed #ccd9e1;

  border-radius:13px;

  background:#f7fafb;

  color:#6d8191;

  text-align:center;

  font-size:12px;
}

.v31-company-existing{
  display:flex;

  gap:12px;

  margin:20px 26px;

  padding:15px;

  border:
    1px solid #c6e6dc;

  border-radius:14px;

  background:#f0faf6;
}

.v31-company-existing-icon{
  display:grid;
  place-items:center;

  width:35px;
  height:35px;

  flex:0 0 35px;

  border-radius:50%;

  background:#16a67c;

  color:#fff;

  font-weight:900;
}

.v31-company-existing strong,
.v31-company-existing span{
  display:block;
}

.v31-company-existing strong{
  color:#185b49;

  font-size:13px;
}

.v31-company-existing span{
  margin-top:3px;

  color:#678078;

  font-size:11px;
}


/* ============================================================
   CADASTRO
   Não tentamos mais colocar a seleção dentro do wizard.
   ============================================================ */

body.page-cadastro input:focus,
body.page-cadastro select:focus,
body.page-cadastro textarea:focus{
  outline:none!important;

  border-color:#258fc4!important;

  box-shadow:
    0 0 0 3px rgba(37,143,196,.11)!important;
}


/* ============================================================
   RESPONSIVO
   ============================================================ */

@media(max-width:900px){

  body.page-login{
    height:auto!important;
    min-height:100vh!important;
    overflow-y:auto!important;
  }

  body.page-login .v31-auth-shell{
    width:min(540px,calc(100% - 22px))!important;

    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    grid-template-columns:1fr!important;

    margin:
      16px auto
      28px!important;
  }

  body.page-login .v31-auth-form{
    height:auto!important;

    padding:
      30px 25px!important;
  }

  body.page-login .v31-auth-card{
    max-width:420px!important;
  }

  body.page-login .v31-auth-visual{
    display:none!important;
  }
}

@media(max-width:620px){

  body.page-login .v31-auth-shell{
    width:calc(100% - 14px)!important;

    border-radius:18px!important;
  }

  body.page-login .v31-auth-form{
    padding:
      25px 18px!important;
  }

  body.page-login .v31-auth-card h1{
    font-size:30px!important;
  }

  .v31-company-modal{
    padding:10px;

    align-items:flex-end;
  }

  .v31-company-dialog{
    width:100%;
    max-height:calc(100vh - 20px);

    border-radius:
      20px 20px
      15px 15px;
  }

  .v31-company-dialog-top{
    padding:
      20px 18px
      15px;
  }

  .v31-company-dialog h2{
    font-size:20px;
  }

  .v31-company-list{
    padding:
      14px 18px;
  }

  .v31-company-actions{
    padding:
      13px 18px
      18px;
  }

  .v31-company-secondary,
  .v31-company-primary{
    flex:1;
  }
}
