/* ZETA colaborador mobile app
   Reconstrucao visual isolada da area logada do colaborador.
   Nao altera Supabase, Auth, Storage, RH ou regra de download. */
.mobile-collab-app{display:none}

.mandatory-password-change{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:20px;
  background:
    radial-gradient(circle at 50% 16%,rgba(32,136,255,.20),transparent 28%),
    linear-gradient(180deg,#051022,#040d1b);
  color:#f8fbff;
}

.mandatory-password-change[hidden]{display:none}

.mandatory-password-card{
  width:min(100%,430px);
  border:1px solid rgba(77,151,255,.26);
  border-radius:22px;
  padding:22px;
  background:linear-gradient(180deg,rgba(9,25,48,.96),rgba(5,15,31,.96));
  box-shadow:0 24px 56px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.06);
}

.mandatory-password-head{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:14px;
  align-items:center;
  margin-bottom:20px;
}

.mandatory-password-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:rgba(32,136,255,.16);
  color:#4aa8ff;
}

.mandatory-password-head h2{
  margin:0 0 6px;
  font-size:20px;
  letter-spacing:1.4px;
}

.mandatory-password-head p{
  margin:0;
  color:#a9bdd8;
  font-size:14px;
  line-height:1.4;
}

.mandatory-password-fields{
  display:grid;
  gap:14px;
}

.mandatory-password-fields label span{
  display:block;
  margin:0 0 7px;
  color:#b9cbe4;
  font-size:11px;
  font-weight:950;
  letter-spacing:1.6px;
  text-transform:uppercase;
}

.mandatory-password-input{
  display:grid;
  grid-template-columns:minmax(0,1fr) 44px;
  align-items:center;
  border:1px solid rgba(77,151,255,.28);
  border-radius:14px;
  background:rgba(8,24,47,.72);
}

.mandatory-password-input input{
  min-width:0;
  height:48px;
  border:0;
  outline:0;
  padding:0 14px;
  background:transparent;
  color:#f8fbff;
  font-size:15px;
}

.mandatory-password-input button{
  width:44px;
  height:44px;
  border:0;
  display:grid;
  place-items:center;
  background:transparent;
  color:#6db4ff;
}

.mandatory-password-error{
  min-height:20px;
  margin:14px 0 0;
  color:#ffb4c6;
  font-size:13px;
  font-weight:800;
}

.mandatory-password-actions{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.mandatory-password-submit,
.mandatory-password-exit{
  min-height:48px;
  border-radius:14px;
  font-weight:950;
}

.mandatory-password-submit{
  border:0;
  background:linear-gradient(135deg,#12b7c9,#1f6fff);
  color:#fff;
  box-shadow:0 14px 28px rgba(18,183,201,.24);
}

.mandatory-password-exit{
  border:1px solid rgba(255,92,126,.28);
  background:rgba(201,21,77,.14);
  color:#ffd7e0;
}

.mandatory-password-submit:disabled,
.mandatory-password-exit:disabled{
  cursor:not-allowed;
  opacity:.62;
}

@media (max-width:720px){
  #portalScreen{
    min-height:100dvh;
    background:var(--portal-structural-bg);
    color:#f8fbff;
  }

  #portalScreen .portal-shell{
    display:block;
    min-height:100dvh;
    background:var(--portal-structural-bg);
  }

  #portalScreen .portal-shell > .sidebar,
  #portalScreen .portal-shell > .workspace{
    display:none;
  }

  #portalScreen .mobile-collab-app{
    display:block;
    width:100%;
    max-width:430px;
    min-height:100dvh;
    margin:0 auto;
    padding:14px 10px 26px;
    background:var(--portal-structural-bg);
  }

  .mobile-app-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
  }

  .mobile-brand{
    min-width:0;
  }

  .mobile-brand .zeta-brand-logo{
    display:block;
    width:132px;
    max-width:42vw;
    height:auto;
    max-height:52px;
    object-fit:contain;
  }

  .mobile-brand strong{
    display:block;
    color:#fff;
    font-size:22px;
    line-height:1;
    letter-spacing:3px;
    font-weight:950;
  }

  .mobile-brand span{
    display:block;
    margin-top:4px;
    color:#8fb7df;
    font-size:11px;
  }

  .mobile-user-actions{
    display:flex;
    align-items:center;
    gap:8px;
  }

  .mobile-bell{
    position:relative;
    width:43px;
    height:43px;
    display:grid;
    place-items:center;
    border:1px solid rgba(125,183,255,.18);
    border-radius:50%;
    background:rgba(12,30,57,.90);
    color:#dceaff;
  }

  .mobile-bell span{
    position:absolute;
    right:-2px;
    top:-6px;
    min-width:20px;
    height:20px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#ff3b68;
    color:#fff;
    font-size:11px;
    font-weight:950;
  }

  .mobile-logout{
    height:38px;
    border:1px solid rgba(255,92,126,.34);
    border-radius:14px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:linear-gradient(180deg,#c9154d,#a90b39);
    color:#fff;
    font-size:14px;
    font-weight:950;
    box-shadow:0 10px 22px rgba(184,15,61,.20);
  }

  .mobile-profile-card{
    display:grid;
    grid-template-columns:56px minmax(0,1fr);
    align-items:center;
    gap:12px;
    margin-bottom:12px;
  }

  .mobile-avatar{
    width:54px;
    height:54px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:linear-gradient(135deg,#20a2ff,#2b46ff);
    color:#fff;
    font-size:22px;
    font-weight:950;
    box-shadow:0 0 0 2px rgba(125,183,255,.30),0 12px 24px rgba(37,118,245,.30);
  }

  .mobile-profile-copy h1{
    margin:0 0 4px;
    color:#f8fbff;
    font-size:18px;
    line-height:1.15;
  }

  .mobile-profile-copy p{
    margin:0;
    color:#9eb3ce;
    font-size:12px;
    line-height:1.25;
  }

  .mobile-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:14px;
    padding:6px;
    border:1px solid rgba(77,151,255,.18);
    border-radius:16px;
    background:rgba(5,16,34,.78);
  }

  .mobile-tab{
    height:43px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:0;
    border-radius:11px;
    background:transparent;
    color:#9eb3ce;
    font-weight:850;
  }

  .mobile-tab.active{
    color:#dcebff;
    background:rgba(15,35,72,.52);
    border:2px solid rgba(38,130,255,.92);
    box-shadow:inset 0 0 0 1px rgba(135,190,255,.12),0 6px 14px rgba(37,118,245,.10);
  }

  .mobile-payroll-panel,
  .mobile-doc-panel{
    border:1px solid rgba(77,151,255,.22);
    border-radius:18px;
    background:linear-gradient(180deg,rgba(9,25,48,.88),rgba(5,15,31,.84));
    box-shadow:0 18px 40px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.05);
    overflow:hidden;
  }

  .mobile-payroll-panel{margin-bottom:14px}

  .mobile-panel-title{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:16px 16px 10px;
    color:#4aa8ff;
  }

  .mobile-panel-title .icon{
    width:24px;
    height:24px;
    flex:0 0 auto;
  }

  .mobile-panel-title h2{
    margin:0 0 4px;
    color:#f8fbff;
    font-size:18px;
    line-height:1.15;
  }

  .mobile-panel-title p{
    margin:0;
    color:#9eb3ce;
    font-size:12px;
    line-height:1.35;
  }

  .mobile-latest-payroll,
  .mobile-payroll-list,
  .mobile-doc-list{
    display:grid;
    gap:10px;
    padding:0 12px 12px;
  }

  .mobile-payroll-card,
  .mobile-doc-card{
    position:relative;
    border:1px solid rgba(77,151,255,.18);
    border-radius:15px;
    background:rgba(8,24,47,.70);
    box-shadow:0 12px 26px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.04);
  }

  .mobile-payroll-card{
    padding:15px;
    background:linear-gradient(180deg,rgba(10,34,68,.92),rgba(7,24,49,.88));
  }

  .mobile-payroll-card.featured{
    border:2px solid rgba(42,145,255,.98);
    box-shadow:
      0 0 0 1px rgba(116,204,255,.24),
      0 0 18px rgba(29,137,255,.58),
      inset 0 1px 0 rgba(255,255,255,.08);
  }

  .mobile-pill{
    width:max-content;
    margin-bottom:12px;
    padding:6px 9px;
    border-radius:999px;
    background:rgba(32,136,255,.22);
    color:#b9d8ff;
    font-size:11px;
    font-weight:950;
  }

  .mobile-feature-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
  }

  .mobile-feature-row strong,
  .mobile-payroll-copy strong,
  .mobile-doc-card strong{
    display:block;
    color:#f8fbff;
    font-size:17px;
    line-height:1.22;
  }

  .mobile-payroll-card .mobile-feature-row strong{font-size:19px}

  .mobile-feature-row span,
  .mobile-payroll-copy span,
  .mobile-doc-card span{
    display:block;
    margin-top:4px;
    color:#9eb3ce;
    font-size:12px;
    line-height:1.25;
  }

  .mobile-payroll-card small{
    display:flex;
    align-items:center;
    gap:6px;
    margin-top:12px;
    color:#78b7ff;
    font-size:12px;
    font-weight:800;
  }

  .mobile-download-main{
    width:100%;
    height:45px;
    margin-top:14px;
    border:0;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background:linear-gradient(135deg,#12b7c9,#1f6fff);
    color:#fff;
    font-size:14px;
    font-weight:950;
    box-shadow:0 14px 28px rgba(18,183,201,.24);
  }


  .mobile-collab-app .signature-badge{
    width:max-content;
    max-width:100%;
    padding:6px 9px;
    border-radius:999px;
    font-size:11px;
    line-height:1;
    white-space:normal;
    box-shadow:none;
  }

  .mobile-collab-app .signature-badge.signed{
    background:rgba(31,199,122,.10);
    border-color:rgba(31,199,122,.28);
    color:#83eab2;
  }

  .mobile-collab-app .signature-badge.pending{
    background:rgba(255,183,77,.10);
    border-color:rgba(255,183,77,.28);
    color:#ffd28a;
  }

  .mobile-doc-panel{
    margin-top:0;
  }

  .mobile-doc-card{
    min-height:66px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 45px;
    align-items:center;
    gap:12px;
    padding:12px;
  }

  .mobile-empty{
    padding:16px;
    border:1px dashed rgba(125,183,255,.22);
    border-radius:14px;
    color:#9eb3ce;
    text-align:center;
    font-size:13px;
  }
}
/* Ajustes mobile pos-validacao: titulo humano, assinatura discreta e rodape seguro. */
@media (max-width:720px){
  .mobile-doc-panel{display:none!important}

  .mobile-feature-row{
    align-items:center;
  }

  .mobile-collab-app .signature-badge.pending{
    background:rgba(255,183,77,.13);
    border-color:rgba(255,183,77,.34);
    color:#ffd28a;
    font-size:10px;
    padding:7px 9px;
    max-width:92px;
    text-align:center;
    line-height:1.12;
  }

  .mobile-collab-app .signature-badge.signed{
    font-size:10px;
    padding:7px 9px;
    max-width:92px;
    text-align:center;
    line-height:1.12;
  }

  .mobile-safe-footer{
    margin:28px -10px 0;
    border-top:1px solid rgba(125,183,255,.12);
    background:linear-gradient(180deg,rgba(9,25,48,.74),rgba(5,15,31,.84));
  }

  .mobile-safe-line{
    min-height:64px;
    display:flex;
    align-items:center;
    gap:14px;
    padding:0 18px;
    color:#bccce4;
    border-bottom:1px solid rgba(125,183,255,.08);
  }

  .mobile-safe-line .icon{
    width:34px;
    height:34px;
    color:#b8c8e4;
  }

  .mobile-safe-line span{
    font-size:14px;
    font-weight:800;
  }

  .mobile-safe-footer p{
    margin:0;
    padding:14px 18px 18px;
    color:#6f819f;
    font-size:11px;
    text-align:center;
  }
}
