/* ============================================================
   XINGUZINHO_AVISOS_LOGIN_CSS_V3
   ============================================================ */

/* MODAL DE LOGIN */
.xav-bg{
  position:fixed;
  inset:0;
  z-index:100000;
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.xav-modal{
  width:min(680px,100%);
  max-height:92vh;
  overflow:auto;
  background:var(--panel-bg,#fff);
  color:inherit;
  border:1px solid rgba(127,127,127,.18);
  border-radius:18px;
  box-shadow:0 28px 80px rgba(0,0,0,.38);
}

.xav-img{
  display:block;
  width:100%;
  max-height:55vh;
  object-fit:contain;
  background:rgba(127,127,127,.08);
  border-radius:18px 18px 0 0;
}

.xav-body{
  padding:22px;
}

.xav-chip{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(59,130,246,.12);
  margin-bottom:10px;
}

.xav-modal h2{
  margin:0 0 10px;
  font-size:22px;
}

.xav-msg{
  white-space:pre-wrap;
  line-height:1.55;
}

.xav-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

.xav-prog{
  margin-right:auto;
  font-size:12px;
  opacity:.65;
}

.xav-btn{
  border:0;
  border-radius:8px;
  padding:9px 12px;
  cursor:pointer;
  font-weight:600;
}

/* PAINEL ADMIN */
#xavAdmin.panel{
  margin-top:18px;
  padding:0;
  overflow:hidden;
}

#xavAdmin .panel-header{
  margin:0;
}

.xav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.xav-title{
  font-weight:700;
  font-size:15px;
}

.xav-subtitle{
  margin-top:3px;
  font-size:12px;
  opacity:.68;
  font-weight:400;
}

.xav-panel-body{
  padding:14px;
}

.xav-form{
  display:none;
  padding:14px;
  margin-bottom:14px;
  border:1px solid rgba(127,127,127,.16);
  border-radius:10px;
  background:rgba(127,127,127,.025);
}

.xav-form.open{
  display:block;
}

.xav-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.xav-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.xav-field label{
  font-size:12px;
  font-weight:600;
}

.xav-full{
  grid-column:1/-1;
}

.xav-field input,
.xav-field select,
.xav-field textarea{
  width:100%;
  box-sizing:border-box;
  padding:9px 10px;
  border:1px solid rgba(127,127,127,.22);
  border-radius:8px;
  background:transparent;
  color:inherit;
  font:inherit;
}

.xav-field textarea{
  min-height:100px;
  resize:vertical;
}

.xav-field small{
  font-size:11px;
  opacity:.62;
}

.xav-list{
  display:grid;
  gap:8px;
}

.xav-card{
  display:grid;
  grid-template-columns:76px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:11px 12px;
  border:1px solid rgba(127,127,127,.14);
  border-radius:9px;
  background:rgba(127,127,127,.018);
}

.xav-card:hover{
  background:rgba(127,127,127,.035);
}

.xav-thumb,
.xav-emptythumb{
  width:76px;
  height:58px;
  border-radius:7px;
}

.xav-thumb{
  object-fit:cover;
  background:rgba(127,127,127,.08);
}

.xav-emptythumb{
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(127,127,127,.08);
  font-size:24px;
}

.xav-meta{
  font-size:11px;
  opacity:.66;
  margin-top:4px;
}

.xav-card-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.xav-light{
  background:rgba(127,127,127,.12);
  color:inherit;
}

.xav-danger{
  background:rgba(220,38,38,.12);
  color:#dc2626;
}

.xav-empty{
  padding:20px;
  text-align:center;
  opacity:.62;
}

@media(max-width:720px){

  .xav-bg{
    padding:8px;
    align-items:flex-end;
  }

  .xav-modal{
    border-radius:18px 18px 0 0;
    max-height:94vh;
  }

  .xav-img{
    max-height:46vh;
    border-radius:18px 18px 0 0;
  }

  .xav-head{
    align-items:flex-start;
  }

  #xavNovo{
    width:100%;
  }

  .xav-grid{
    grid-template-columns:1fr;
  }

  .xav-full{
    grid-column:auto;
  }

  .xav-card{
    grid-template-columns:60px minmax(0,1fr);
  }

  .xav-thumb,
  .xav-emptythumb{
    width:60px;
    height:50px;
  }

  .xav-card-actions{
    grid-column:1/-1;
    justify-content:flex-start;
  }
}

/* ============================================================
   XINGUZINHO_AVISOS_LOGIN_DARK_FIX_V4
   ============================================================ */

/* LIGHT */
.xav-modal{
  background:#ffffff;
  color:#172033;
}

.xav-body{
  background:#ffffff;
  color:#172033;
}

.xav-chip{
  background:#eef2ff;
  color:#3156a3;
}

.xav-msg{
  color:#475467;
}

.xav-prog{
  color:#667085;
}


/* DARK */
html[data-theme="dark"] .xav-modal{
  background:#101827;
  color:#f3f6fb;
  border-color:#263347;
}

html[data-theme="dark"] .xav-body{
  background:#101827;
  color:#f3f6fb;
}

html[data-theme="dark"] .xav-modal h2{
  color:#f8fafc;
}

html[data-theme="dark"] .xav-msg{
  color:#c7d0df;
}

html[data-theme="dark"] .xav-prog{
  color:#94a3b8;
}

html[data-theme="dark"] .xav-chip{
  background:#182c4e;
  color:#8dbbff;
}

html[data-theme="dark"] .xav-img{
  background:#0b1220;
}

html[data-theme="dark"] .xav-modal{
  box-shadow:
    0 30px 90px rgba(0,0,0,.65),
    0 0 0 1px rgba(255,255,255,.025);
}


/* botão */
.xav-modal .xav-primary,
.xav-modal .primary{
  background:#0967c9;
  color:#ffffff;
}

.xav-modal .xav-primary:hover,
.xav-modal .primary:hover{
  filter:brightness(1.08);
}


/* evita transparência estranha do texto */
.xav-modal *,
.xav-modal *::before,
.xav-modal *::after{
  text-shadow:none;
}


/* mobile */
@media(max-width:720px){

  html[data-theme="dark"] .xav-modal{
    background:#101827;
  }

  html[data-theme="dark"] .xav-body{
    background:#101827;
  }
}
