:root{

  --blue:#4f8bff;

  --blue2:#2f6bff;

  --bg:#070b14;

  --card:rgba(15,23,42,.72);

  --text:#eaf0ff;

  --muted:#98a6c2;

  --line:rgba(255,255,255,.10);

  --shadow:0 18px 40px rgba(0,0,0,.40);

  --radius:18px;

  --radius2:24px;

}

*{ box-sizing:border-box; }

html,body{ height:100%; }

body{

  margin:0;

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", Noto Sans;

  color:var(--text);

  background:
    radial-gradient(900px 500px at 15% 10%, rgba(79,139,255,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, #050815 0%, var(--bg) 55%, #050815 120%);

  -webkit-tap-highlight-color: transparent;

}

.is-hidden{ display:none !important; }

.topbar{

  position:sticky;

  top:0;

  z-index:10;

  background:linear-gradient(180deg, rgba(8,12,22,.78) 0%, rgba(8,12,22,.62) 60%, rgba(8,12,22,.52) 100%);

  backdrop-filter: blur(12px);

  border-bottom:1px solid var(--line);

  padding:14px 14px 10px;

}

.topbar__row{

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:10px;

}

.topbar__brand{

  font-weight:900;

  letter-spacing:.6px;

  font-size:20px;

  color:#cfe0ff;

  text-align:center;

  flex:1;

  text-shadow: 0 18px 40px rgba(79,139,255,.18);

}

.topbar__actions{

  display:flex;

  gap:10px;

}

.iconBtn{

  width:42px; height:42px;

  border-radius:14px;

  border:1px solid var(--line);

  background:rgba(15,23,42,.55);

  display:grid;

  place-items:center;

  color:#cfe0ff;

  box-shadow:0 10px 26px rgba(0,0,0,.25);

  cursor:pointer;

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

.iconBtn:active{ transform: translateY(1px); }

.iconBtn svg{ width:20px; height:20px; }

.profileBar{

  margin-top:10px;

  padding:10px 14px;

  border-radius:18px;

  background:rgba(15,23,42,.55);

  border:1px solid var(--line);

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:10px;

}

.profileBar__name{ font-weight:800; font-size:14px; }

.profileBar__cpf{ font-size:12px; color:var(--muted); font-weight:700; }

.main{

  padding:14px;

  padding-bottom:90px;

  max-width:560px;

  margin:0 auto;

}

.view{ min-height:calc(100vh - 70px); }

.stack{ display:flex; flex-direction:column; gap:14px; }

.card{

  background:var(--card);

  border:1px solid var(--line);

  border-radius:var(--radius2);

  box-shadow:var(--shadow);

  padding:14px;

}

.card__head{ display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }

.card__title{ font-weight:900; letter-spacing:.2px; }

.card__sub{ color:var(--muted); font-size:12px; font-weight:650; }

.hero{

  padding:16px;

  background:
    radial-gradient(1200px 420px at 20% 0%, rgba(79,139,255,.22) 0%, rgba(15,23,42,.86) 45%, rgba(15,23,42,.72) 100%);

}

.hero__row{

  display:flex;

  justify-content:space-between;

  gap:14px;

  align-items:flex-start;

}

.hero__title{ font-weight:900; font-size:16px; }

.hero__meta{ margin-top:6px; }

.hero__value{

  font-weight:900;

  font-size:20px;

  color:#cfe0ff;

  text-align:right;

}

.hero__row2{

  margin-top:12px;

  display:grid;

  grid-template-columns: 1fr 1fr 1fr;

  gap:10px;

}

.kv{

  padding:10px;

  border:1px solid var(--line);

  border-radius:16px;

  background:rgba(2,6,23,.35);

}

.kv__k{ font-size:11px; color:var(--muted); font-weight:800; }

.kv__v{ margin-top:4px; font-size:12px; font-weight:900; }

.hero__actions{

  margin-top:14px;

  display:flex;

  gap:10px;

}

.btn{

  width:100%;

  border-radius:16px;

  border:1px solid var(--line);

  padding:12px 14px;

  font-weight:900;

  cursor:pointer;

  display:flex;

  align-items:center;

  justify-content:center;

  gap:10px;

  text-decoration:none;

  user-select:none;

  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;

}
.btn:active{ transform: translateY(1px); }

.btn--primary{

  background:linear-gradient(180deg, var(--blue) 0%, var(--blue2) 100%);

  color:#fff;

  border-color:rgba(255,255,255,.15);

  box-shadow:0 18px 40px rgba(79,139,255,.20);

}

.btn--ghost{

  background:rgba(15,23,42,.55);

  color:#cfe0ff;

}

.grid2{

  display:grid;

  grid-template-columns:1fr 1fr;

  gap:12px;

}

.tile{

  border:1px solid var(--line);

  border-radius:20px;

  background:rgba(15,23,42,.60);

  box-shadow:0 18px 34px rgba(0,0,0,.25);

  padding:14px;

  display:flex;

  gap:12px;

  align-items:center;

  cursor:pointer;

  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tile:active{ transform: translateY(1px); }

.tile__icon{

  width:44px; height:44px;

  border-radius:16px;

  display:grid; place-items:center;

  background:rgba(79,139,255,.14);

  color:#cfe0ff;

}

.tile__icon svg{ width:22px; height:22px; }

.tile__title{ font-weight:900; }

.tile__sub{ color:var(--muted); font-size:12px; font-weight:700; margin-top:2px; }

.list{ display:flex; flex-direction:column; gap:10px; }

.item{

  border:1px solid var(--line);

  border-radius:18px;

  padding:12px;

  background:rgba(2,6,23,.35);

}

.item__top{ display:flex; justify-content:space-between; gap:10px; }

.item__title{ font-weight:900; font-size:13px; }

.item__meta{ margin-top:4px; color:var(--muted); font-size:12px; font-weight:650; }

.item__value{ font-weight:900; color:#cfe0ff; white-space:nowrap; }

.item__actions{ margin-top:10px; display:flex; gap:10px; align-items:center; }

.linkBtn{

  display:inline-flex;

  align-items:center;

  gap:8px;

  padding:10px 12px;

  border-radius:14px;

  background:rgba(15,23,42,.55);

  border:1px solid var(--line);

  color:#cfe0ff;

  font-weight:900;

  text-decoration:none;

}

.linkBtn svg{ width:18px; height:18px; }

.tag{

  display:inline-flex;

  align-items:center;

  padding:6px 10px;

  border-radius:999px;

  font-size:11px;

  font-weight:900;

  border:1px solid var(--line);

  background:rgba(15,23,42,.55);

  color:#cfe0ff;

}

.tag--ok{ color:#5eead4; background:rgba(20,184,166,.12); border-color:rgba(20,184,166,.22); }

.tag--warn{ color:#fbbf24; background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.22); }

.tag--danger{ color:#fb7185; background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.22); }

.tag--muted{ color:var(--muted); background:rgba(100,116,139,.10); border-color:rgba(100,116,139,.18); }

.nav{

  position:fixed;

  left:0; right:0; bottom:0;

  z-index:12;

  padding:10px 10px calc(10px + env(safe-area-inset-bottom));

  background:rgba(8,12,22,.74);

  backdrop-filter: blur(12px);

  border-top:1px solid var(--line);

  display:flex;

  justify-content:space-between;

  gap:8px;

}

.nav__item{

  flex:1;

  border:0;

  background:transparent;

  display:flex;

  flex-direction:column;

  gap:6px;

  align-items:center;

  justify-content:center;

  padding:10px 6px;

  border-radius:18px;

  color:rgba(152,166,194,.95);

  font-weight:900;

  font-size:11px;

  cursor:pointer;

  transition: transform .08s ease, background .15s ease, color .15s ease;
}

.nav__item svg{ width:22px; height:22px; }

.nav__item.is-active{

  color:#cfe0ff;

  background:rgba(79,139,255,.14);

}

.login{

  max-width:420px;

  margin:0 auto;

  padding:20px 12px;

  display:flex;

  flex-direction:column;

  align-items:center;

  gap:12px;

}

.login__logo{

  width:92px; height:92px;

  object-fit:contain;

  border-radius:24px;

  box-shadow:0 18px 44px rgba(0,0,0,.35);

  background:rgba(15,23,42,.60);

  border:1px solid var(--line);

  padding:10px;

}

.login__title{ margin:8px 0 0; font-size:18px; font-weight:1000; text-align:center; }

.login__subtitle{ margin:0; color:var(--muted); font-weight:750; font-size:13px; text-align:center; }

.label{

  display:block;

  font-size:12px;

  font-weight:900;

  color:var(--muted);

  margin:8px 0 6px;

}

.input, .textarea{

  width:100%;

  border-radius:16px;

  border:1px solid var(--line);

  padding:12px 12px;

  font-weight:850;

  font-size:14px;

  outline:none;

  background:rgba(2,6,23,.35);

  color:var(--text);

}

.input::placeholder, .textarea::placeholder{ color: rgba(152,166,194,.75); }

.input:focus, .textarea:focus{
  border-color: rgba(79,139,255,.45);
  box-shadow: 0 0 0 3px rgba(79,139,255,.12);
}

.textarea{ min-height:120px; resize:none; }

.error{

  margin:10px 0 0;

  font-weight:850;

  color:#fecaca;

  background:rgba(239,68,68,.14);

  border:1px solid rgba(239,68,68,.22);

  padding:10px 12px;

  border-radius:16px;

}

.hint{

  width:100%;

  max-width:420px;

  border-radius:20px;

  border:1px dashed rgba(79,139,255,.45);

  background:rgba(79,139,255,.08);

  padding:12px 14px;

}

.hint__title{ font-weight:1000; color:#cfe0ff; }

.hint__text{ margin-top:6px; color:rgba(152,166,194,.90); font-weight:750; font-size:12px; }

.footerNote{

  color:rgba(152,166,194,.85);

  font-weight:850;

  font-size:12px;

  margin-top:8px;

}

.loading{

  position:fixed;

  inset:0;

  z-index:50;

  background:rgba(5,8,15,.78);

  backdrop-filter: blur(14px);

  display:grid;

  place-items:center;

  padding:20px;

}

.loading__card{

  width:min(360px, 92vw);

  background:rgba(15,23,42,.72);

  border:1px solid var(--line);

  border-radius:24px;

  box-shadow:var(--shadow);

  padding:18px;

  display:flex;

  flex-direction:column;

  align-items:center;

  gap:10px;

}

.loading__logo{ width:80px; height:80px; object-fit:contain; }

.loading__dots{ display:flex; gap:6px; }

.loading__dots span{

  width:8px; height:8px;

  border-radius:999px;

  background:rgba(79,139,255,.65);

  animation: pulse 1s infinite ease-in-out;

}

.loading__dots span:nth-child(2){ animation-delay:.15s; }

.loading__dots span:nth-child(3){ animation-delay:.3s; }

@keyframes pulse{

  0%,100%{ transform:translateY(0); opacity:.55; }

  50%{ transform:translateY(-6px); opacity:1; }

}

.loading__text{ color:rgba(152,166,194,.90); font-weight:850; font-size:12px; }

.toast{

  position:fixed;

  left:50%;

  transform:translateX(-50%);

  bottom:86px;

  z-index:60;

  background:rgba(2,6,23,.88);

  color:#fff;

  padding:10px 12px;

  border-radius:14px;

  font-weight:850;

  font-size:12px;

  max-width:92vw;

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

  box-shadow:0 20px 40px rgba(0,0,0,.35);

}

.spark{

  display:flex;

  gap:10px;

  align-items:flex-end;

  height:110px;

  padding:10px 4px 2px;

}

.barWrap{ display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; }

.bar{

  width:100%;

  max-width:26px;

  border-radius:12px;

  background:rgba(79,139,255,.22);

  border:1px solid rgba(79,139,255,.18);

}

.bar--late{ background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.22); }

.bar--open{ background:rgba(245,158,11,.18); border-color:rgba(245,158,11,.22); }

.bar--paid{ background:rgba(20,184,166,.16); border-color:rgba(20,184,166,.22); }

.barLabel{ font-size:10px; color:var(--muted); font-weight:900; }

.miniNote{

  margin-top:10px;

  color:var(--muted);

  font-weight:750;

  font-size:12px;

}

/* ---------- NOTIFICAÇÕES ---------- */
.notification { position: relative; }

.notifCount{
  position:absolute;
  top:-4px;
  right:-4px;
  background:#fb7185;
  color:#fff;
  font-size:10px;
  font-weight:900;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.2);
}

.notifPanel{
  position:absolute;
  right:0;
  top:48px;
  width:320px;
  max-width:92vw;
  background:rgba(15,23,42,.96);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
  z-index:50;
}

.notifPanel__title{
  padding:12px 14px;
  font-weight:900;
  border-bottom:1px solid var(--line);
}

.notifList{
  max-height:320px;
  overflow-y:auto;
}

.notifItem{
  padding:12px 14px;
  font-weight:750;
  font-size:13px;
  border-bottom:1px solid var(--line);
}
.notifItem:last-child{ border-bottom:none; }
.notifItem:hover{ background:rgba(79,139,255,.12); }



/* ---------- AVISOS GERAIS (ADMIN) ---------- */

.annBanner{

  position: sticky;

  top: 0;

  z-index: 80;

  display: flex;

  align-items: flex-start;

  gap: 12px;

  padding: 12px 14px;

  border-bottom: 1px solid var(--line);

  background: rgba(245,158,11,.16);

  backdrop-filter: blur(10px);

}

.annBanner__content{ flex:1; min-width:0; }

.annBanner__title{ font-weight: 900; }

.annBanner__msg{ opacity:.92; font-weight: 650; font-size: 13px; margin-top: 2px; }

.annBanner__close{

  width: 34px; height: 34px;

  border-radius: 12px;

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

  background: rgba(2,6,23,.35);

  color: var(--txt);

  font-size: 20px;

  line-height: 30px;

  cursor: pointer;

}



/* PUSH button (ao lado do sino) */

#btnEnablePush{

  padding: 0 10px;

  min-width: 56px;

  height: 40px;

  border-radius: 12px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

}

#btnEnablePush.is-on{

  border-color: rgba(34,197,94,.35);

  box-shadow: 0 0 0 2px rgba(34,197,94,.12) inset;

}



/* Item de ação dentro do painel de notificações */

.notifDivider{

  height: 1px;

  background: rgba(255,255,255,.08);

  margin: 8px 0;

}



.notifAction{

  cursor: pointer;

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap: 12px;

}



.notifAction__title{ font-weight: 900; }

.notifAction__desc{ opacity:.85; font-size: 12px; margin-top: 2px; }



.pushBadge{

  display:inline-flex;

  align-items:center;

  justify-content:center;

  min-width: 44px;

  height: 24px;

  padding: 0 10px;

  border-radius: 999px;

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

  background: rgba(2,6,23,.35);

  font-weight: 900;

  font-size: 12px;

}



.pushBadge.on{

  border-color: rgba(34,197,94,.35);

  box-shadow: 0 0 0 2px rgba(34,197,94,.12) inset;

}




/* MOBILE_PWA_FIX_SAFEAREA_NOTIF */

/* 1) iOS/Android PWA: respeitar safe-area do topo (status bar) */

:root {

  --safe-top: env(safe-area-inset-top, 0px);

  --safe-bot: env(safe-area-inset-bottom, 0px);

}



/* evita topo coberto no modo PWA */

.topbar {

  padding-top: calc(var(--safe-top) + 14px);

}



/* melhora o scroll/ancora em telas com header fixo/sticky */

html {

  scroll-padding-top: calc(var(--safe-top) + 80px);

}



/* 2) Painel do sininho: nunca sair da tela no smartphone

   (aplica em vários IDs/classes comuns — só o que existir será usado) */

@media (max-width: 640px) {

  #notifPanel, #notifPopover, #notificationsPanel, #notificationPanel,

  .notifPanel, .notifPopover, .notificationsPanel {

    position: fixed !important;

    left: 12px !important;

    right: 12px !important;

    top: calc(var(--safe-top) + 74px) !important;  /* abaixo do header */

    bottom: calc(var(--safe-bot) + 12px) !important;

    width: auto !important;

    max-height: none !important;

    overflow: auto !important;

    -webkit-overflow-scrolling: touch;

    z-index: 9999 !important;

  }



  /* se o seu painel for só a lista */

  #notifList {

    overflow: auto;

    -webkit-overflow-scrolling: touch;

    max-height: calc(100vh - var(--safe-top) - var(--safe-bot) - 140px);

  }

}




/* NOTIF_PANEL_MOBILE_FIX */

/* Ajuste do painel de notificações (sininho) no smartphone/PWA */

#notifPanel, .notifPanel, .notifDropdown, .notificationsPanel {

  width: min(92vw, 420px) !important;

  max-width: 92vw !important;

  min-width: 280px !important;

}



#notifPanel, .notifPanel, .notifDropdown, .notificationsPanel {

  position: fixed !important;

  left: 50% !important;

  right: auto !important;

  transform: translateX(-50%) !important;

  top: calc(64px + env(safe-area-inset-top, 0px) + 8px) !important;

  z-index: 9999 !important;



  max-height: calc(100vh - (64px + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px)) !important;

  overflow: auto !important;



  border-radius: 16px !important;

}



/* lista interna (evita ficar “apertada”) */

#notifList {

  width: 100% !important;

}



/* garante que itens não quebrem layout */

#notifList .notifItem {

  width: 100% !important;

  box-sizing: border-box !important;

}



/* se seu topo não tiver 64px, você pode ajustar aqui:

   top: calc(56px + env(safe-area-inset-top,0px) + 8px)

*/




/* NOTIF_PANEL_FINAL_FIX */

/* Painel do sininho: corrigir largura/posição no mobile e PWA */

#notifPanel.notifPanel{

  position: fixed !important;

  left: 50% !important;

  right: auto !important;

  transform: translateX(-50%) !important;



  /* fica abaixo do topo, respeitando notch */

  top: calc(64px + env(safe-area-inset-top, 0px) + 8px) !important;



  width: min(92vw, 440px) !important;

  max-width: 92vw !important;

  min-width: 300px !important;



  max-height: calc(100vh - (64px + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px)) !important;

  overflow: auto !important;



  border-radius: 16px !important;

  z-index: 9999 !important;

}



/* garante que o conteúdo use a largura toda */

#notifPanel .notifPanel__title{ width: 100%; }

#notifList{ width: 100% !important; }



/* itens */

#notifList .notifItem{

  width: 100% !important;

  box-sizing: border-box !important;

}



/* item do PUSH (evita ficar esmagado) */

#notifEnablePush{

  width: 100% !important;

  box-sizing: border-box !important;

}

#notifEnablePush .notifAction__left{ min-width: 0; }

#notifEnablePush .notifAction__title{ white-space: normal; }

#notifEnablePush .notifAction__desc{ white-space: normal; }



/* no mobile, se precisar, dá um respiro */

@media (max-width: 480px){

  #notifPanel.notifPanel{

    min-width: 0 !important;

    width: 94vw !important;

    max-width: 94vw !important;

    top: calc(56px + env(safe-area-inset-top, 0px) + 8px) !important;

  }

}




/* NOTIF_PANEL_THICKNESS_FIX */

/* Painel do sininho menos “achatado” no mobile */

#notifPanel.notifPanel{

  padding: 12px !important;

  min-height: 240px !important;     /* evita ficar baixinho */

}



/* título com mais respiro */

#notifPanel .notifPanel__title{

  padding: 6px 2px 10px 2px !important;

  font-size: 14px !important;

  font-weight: 900 !important;

}



/* itens mais “clicáveis” */

#notifList .notifItem{

  padding: 12px 12px !important;

  min-height: 46px !important;      /* touch target */

  line-height: 1.25 !important;

  border-radius: 14px !important;

}



/* item de ação do PUSH */

#notifEnablePush{

  padding: 12px 12px !important;

  min-height: 56px !important;

}



/* no celular, aumenta um pouco mais */

@media (max-width: 480px){

  #notifPanel.notifPanel{

    min-height: 300px !important;

  }

  #notifList .notifItem{

    min-height: 52px !important;

  }

}




/* PWA_UPDATE_TOAST */

#pwaUpdateToast{

  position: fixed;

  left: 12px;

  right: 12px;

  bottom: calc(12px + env(safe-area-inset-bottom, 0px));

  z-index: 99999;



  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;



  padding: 12px 12px;

  border-radius: 16px;



  background: rgba(2,6,23,.92);

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

  box-shadow: 0 10px 30px rgba(0,0,0,.35);

  color: #eaf0ff;

  backdrop-filter: blur(10px);

}



.pwaToast__title{ font-weight: 900; font-size: 14px; }

.pwaToast__desc{ opacity: .85; font-size: 12px; margin-top: 2px; }



.pwaToast__btn{

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

  background: rgba(79,139,255,.20);

  color: #eaf0ff;

  font-weight: 900;

  border-radius: 14px;

  padding: 10px 12px;

  cursor: pointer;

  white-space: nowrap;

}


