/* ==========================================================
   Patient Exams (PE) — LOGIN CSS
   ========================================================== */

/* Container geral do login */
.pe-login-area{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Inter", Arial, sans-serif;
}

/* Card do login */
#pe-login-form{
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.10);
  border: 1px solid #f0f0f0;
}

/* Título */
#pe-login-form h2{
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
  color: #111;
}

/* Subtítulo */
.pe-subtitle{
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* Inputs */
#pe-login-form input{
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  padding: 14px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  background: #fff;
  font-size: 15px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}

#pe-login-form input::placeholder{
  color: #999;
}

#pe-login-form input:focus{
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 0 0 4px rgba(13,110,253,.12);
}

/* Botão */
#pe-login-form button{
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  background: #0d6efd;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

#pe-login-form button:hover{
  background: #0b5ed7;
  box-shadow: 0 10px 22px rgba(13,110,253,.35);
  transform: translateY(-1px);
}

#pe-login-form button:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(13,110,253,.25);
}

/* Botão desabilitado (loading) */
#pe-login-form button:disabled{
  opacity: .7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* Texto do botão */
#pe-login-form .btn-text{
  display: inline-block;
}

/* Loader (spinner simples) */
#pe-login-form .btn-loader{
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: pe-spin 0.8s linear infinite;
}

/* Mensagem de erro */
.pe-msg{
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffe5e5;
  color: #a10000;
  font-size: 14px;
  text-align: center;
  border: 1px solid #ffc2c2;
}

/* Animação do loader */
@keyframes pe-spin{
  to{ transform: rotate(360deg); }
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 480px){
  #pe-login-form{
    padding: 28px 20px;
  }

  #pe-login-form h2{
    font-size: 20px;
  }
}

/* ==========================================================
   Patient Exams (PE) — CSS completo (isolado dentro do plugin)
   ========================================================== */

/* Reset isolado (não afeta o resto do site) */
.pe-patient-area,
.pe-patient-area *{ 
  box-sizing: border-box;
}

.pe-patient-area{
  font-family: "Inter", Arial, sans-serif;
  padding: 28px 16px;
  min-height: 100vh;
  color: #111;
}

/* Evita que o tema estoure fonte/títulos dentro do plugin */
.pe-patient-area h1,
.pe-patient-area h2,
.pe-patient-area h3,
.pe-patient-area h4,
.pe-patient-area p{
  margin: 0;
  padding: 0;
  line-height: 1.25;
}

.pe-shell{
  max-width: 980px;
  margin: 0 auto;
}

/* =========================
   TOPBAR
========================= */
.pe-topbar{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap: 16px !important;
  padding: 18px 18px !important;
  background:#fff !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.06) !important;
  margin-bottom: 14px !important;
}

.pe-topbar__left{
  display:flex !important;
  align-items:center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.pe-avatar{
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background: rgba(13,110,253,.10) !important;
  color:#0d6efd !important;
  font-weight: 800 !important;
  flex: 0 0 auto !important;
}

.pe-topbar__text{
  min-width: 0 !important;
}

.pe-kicker{
  font-size: 12px !important;
  color:#7a7a7a !important;
  margin-bottom: 2px !important;
}

.pe-title{
  font-size: 18px !important;
  font-weight: 800 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Logout button/link (blindado contra tema) */
.pe-topbar__right a,
.pe-topbar__right .pe-logout{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  border: 1px solid #eee !important;
  background:#fff !important;
  color:#a10000 !important;
  text-decoration:none !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
.pe-topbar__right a:hover,
.pe-topbar__right .pe-logout:hover{
  background:#fafafa !important;
}

/* =========================
   TOOLBAR (Busca + contador)
========================= */
.pe-toolbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap: 12px !important;
  margin: 14px 0 18px !important;
}

.pe-toolbar__meta{
  font-size: 13px !important;
  color:#666 !important;
  white-space: nowrap !important;
}

/* Busca com ícone */
.pe-search{
  position:relative !important;
  flex: 1 !important;
  min-width: 0 !important;
}

#pe-exam-search{
  -webkit-appearance:none !important;
  appearance:none !important;

  width:100% !important;
  padding: 14px 44px 14px 44px !important;
  border-radius: 14px !important;
  border: 1px solid #e6e6e6 !important;
  background:#fff !important;
  outline: none !important;

  box-shadow: 0 6px 18px rgba(0,0,0,.04) !important;
  font-size: 16px !important;
}

#pe-exam-search:focus{
  border-color: rgba(13,110,253,.35) !important;
  box-shadow: 0 0 0 4px rgba(13,110,253,.10), 0 10px 25px rgba(0,0,0,.05) !important;
}

.pe-search__icon{
  position:absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  opacity: .65 !important;
  font-size: 18px !important;
  pointer-events:none !important;
}

.pe-search__clear{
  -webkit-appearance:none !important;
  appearance:none !important;

  position:absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  border: 1px solid #eee !important;
  background:#fff !important;
  cursor:pointer !important;

  font-size: 18px !important;
  line-height: 1 !important;
  opacity: .8 !important;
}
.pe-search__clear:hover{
  opacity:1 !important;
  background:#fafafa !important;
}

/* =========================
   LISTA / CARDS
========================= */
.pe-exams-list{
  display:block;
}

.pe-exam-card{
  background:#fff !important;
  border-radius: 14px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.06) !important;
  overflow:hidden !important;
  border: 1px solid #f0f0f0 !important;
}

.pe-exam-card:hover{
  transform: translateY(-1px);
  transition: transform .12s ease;
}

/* IMPORTANTÍSSIMO: reset do botão (tema quebrava tudo) */
.pe-exam-summary{
  -webkit-appearance:none !important;
  appearance:none !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  text-decoration: none !important;
  font: inherit !important;

  width: 100% !important;
  cursor: pointer !important;
  padding: 16px !important;

  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 12px !important;
  align-items: start !important;
  text-align: left !important;
}

.pe-exam-summary:hover,
.pe-exam-summary:active{
  background: transparent !important;
}

.pe-exam-summary:focus{ outline: none !important; }
.pe-exam-summary:focus-visible{
  outline: 3px solid rgba(13,110,253,.20) !important;
  outline-offset: 2px !important;
  border-radius: 14px !important;
}

.pe-exam-summary__main{
  min-width: 0 !important;
}

.pe-exam-name{
  font-size: 15px !important;
  font-weight: 900 !important;
  margin-bottom: 8px !important;
  color: #111 !important;
  word-break: break-word !important;
}

.pe-exam-sub{
  display:flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  align-items:center !important;
}

.pe-chip{
  font-size: 12px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: rgba(13,110,253,.10) !important;
  color:#0d6efd !important;
  font-weight: 800 !important;
}

.pe-muted{
  font-size: 13px !important;
  color:#666 !important;
  white-space: nowrap !important;
  overflow:hidden !important;
  text-overflow: ellipsis !important;
  max-width: 420px !important;
}

.pe-exam-summary__side{
  display:flex !important;
  align-items:center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.pe-date{
  font-size: 13px !important;
  color:#555 !important;
}

.pe-chevron{
  display:inline-flex !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  align-items:center !important;
  justify-content:center !important;
  border: 1px solid #eee !important;
  background:#fff !important;
  transition: transform .18s ease !important;
  font-size: 12px;
}

.pe-exam-card.is-open .pe-chevron{
  transform: rotate(180deg);
}

/* =========================
   DETALHES / ARQUIVOS
========================= */
.pe-exam-details{
  padding: 14px 16px 16px !important;
  border-top: 1px solid #f0f0f0 !important;
  background:#fcfcfd !important;
}

.pe-files{
  display:flex !important;
  flex-direction:column !important;
  gap: 10px !important;
}

.pe-file{
  display:flex !important;
  align-items:center !important;
  gap: 10px !important;
  padding: 12px 12px !important;
  border-radius: 12px !important;
  border: 1px solid #eee !important;
  background:#fff !important;
  text-decoration:none !important;
  color:#111 !important;
}

.pe-file:hover{
  background:#f8fbff !important;
  border-color: rgba(13,110,253,.18) !important;
}

.pe-file__icon{
  opacity: .75;
}

.pe-file__name{
  flex: 1 !important;
  min-width: 0 !important;
  font-weight: 700 !important;
  overflow:hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pe-file__action{
  font-size: 12px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  background:#0d6efd !important;
  color:#fff !important;
  font-weight: 800 !important;
}

/* =========================
   EMPTY STATES
========================= */
.pe-empty{
  padding: 16px !important;
  border-radius: 14px !important;
  background:#fff !important;
  border: 1px dashed #e8e8e8 !important;
  color:#444 !important;
}

.pe-empty__title{
  font-weight: 900 !important;
  margin-bottom: 4px !important;
}

.pe-empty__text{
  font-size: 13px !important;
  color:#666 !important;
}

/* =========================
   PAGINAÇÃO
========================= */
#pe-pagination{
  display:flex !important;
  gap: 8px !important;
  margin-top: 18px !important;
  justify-content:center !important;
}

#pe-pagination button{
  -webkit-appearance:none !important;
  appearance:none !important;

  padding: 9px 12px !important;
  border-radius: 12px !important;
  border: 1px solid #e6e6e6 !important;
  background:#fff !important;
  cursor:pointer !important;
  font-weight: 800 !important;
}

#pe-pagination button:hover{
  background:#fafafa !important;
}

#pe-pagination button.active{
  background:#0d6efd !important;
  color:#fff !important;
  border-color:#0d6efd !important;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 700px){
  .pe-toolbar{
    flex-direction:column !important;
    align-items:stretch !important;
  }
  .pe-toolbar__meta{
    text-align:right !important;
  }
  .pe-muted{
    max-width: 220px !important;
  }
}

@media (max-width: 520px){
  .pe-exam-summary{
    grid-template-columns: 1fr !important;
  }
  .pe-exam-summary__side{
    justify-content: space-between !important;
    width: 100% !important;
  }
}

/* =========================
   INFO BOX - "Como funciona"
========================= */
.pe-info{
  background:#fff;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  overflow:hidden;
  margin-bottom: 18px;
}

/* Cabeçalho clicável */
.pe-info__head{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  border:0;
  background: linear-gradient(0deg, #ffffff 0%, #f7fbff 100%);
  padding: 14px 16px;
  display:flex;
  align-items:center;
  gap: 10px;
  cursor:pointer;
  font: inherit;
  text-align:left;
}

.pe-info__head:hover{
  background: linear-gradient(0deg, #ffffff 0%, #f2f8ff 100%);
}

/* foco acessível */
.pe-info__head:focus{ outline:none; }
.pe-info__head:focus-visible{
  outline: 3px solid rgba(13,110,253,.20);
  outline-offset: 2px;
}

/* ícone */
.pe-info__icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(13,110,253,.10);
  color:#0d6efd;
  flex: 0 0 auto;
}

/* título */
.pe-info__title{
  font-weight: 900;
  color:#1b1b1b;
}

/* chevron */
.pe-info__chev{
  margin-left:auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid #eee;
  background:#fff;
  transition: transform .18s ease;
  font-size:12px;
}

/* aberto */
.pe-info.is-open .pe-info__chev{
  transform: rotate(180deg);
}

/* corpo */
.pe-info__body{
  padding: 14px 16px 16px;
  color:#444;
  font-size: 14px;
  background:#fff;
  border-top: 1px solid #f0f0f0;
}

/* parágrafo e lista */
.pe-info__body p{
  margin: 0 0 12px;
  color:#444;
}

.pe-info__list{
  margin: 0;
  padding-left: 18px;
  color:#555;
}

.pe-info__list li{
  margin: 8px 0;
}

/* Fechado por padrão via CSS (caso você não use style="display:none") */
.pe-info:not(.is-open) .pe-info__body{
  display:none;
}

/* =========================
   FIX: "Como funciona" quebrado (botão não ocupa 100%)
========================= */

.pe-info{
  width: 100% !important;
  display: block !important;
  background:#fff !important;
  border: 1px solid #edf0f4 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.05) !important;
  overflow: hidden !important;
  margin-bottom: 18px !important;
}

/* Cabeçalho clicável - precisa ocupar TODO o card */
.pe-info__head{
  -webkit-appearance:none !important;
  appearance:none !important;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;

  border: 0 !important;
  background: linear-gradient(0deg, #ffffff 0%, #f7fbff 100%) !important;

  padding: 16px 18px !important;
  cursor: pointer !important;
  text-align: left !important;

  margin: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  font: inherit !important;
}

/* hover */
.pe-info__head:hover{
  background: linear-gradient(0deg, #ffffff 0%, #f2f8ff 100%) !important;
}

/* foco */
.pe-info__head:focus{ outline:none !important; }
.pe-info__head:focus-visible{
  outline: 3px solid rgba(13,110,253,.20) !important;
  outline-offset: 2px !important;
}

/* ícone alinhado */
.pe-info__icon{
  width: 40px !important;
  height: 40px !important;
  border-radius: 14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background: rgba(13,110,253,.10) !important;
  color:#0d6efd !important;
  flex: 0 0 auto !important;
  font-size: 18px !important;
}

/* título não estoura e ocupa o espaço disponível */
.pe-info__title{
  font-weight: 900 !important;
  color:#1b1b1b !important;
  font-size: 16px !important;
  line-height: 1.2 !important;

  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* chevron vai pro canto direito sempre */
.pe-info__chev{
  margin-left: auto !important;

  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;

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

  border: 1px solid #eee !important;
  background:#fff !important;
  transition: transform .18s ease !important;

  flex: 0 0 auto !important;
}

.pe-info.is-open .pe-info__chev{
  transform: rotate(180deg) !important;
}

/* corpo */
.pe-info__body{
  padding: 14px 18px 18px !important;
  color:#444 !important;
  font-size: 14px !important;
  background:#fff !important;
  border-top: 1px solid #f0f0f0 !important;
}

/* fechado por padrão */
.pe-info:not(.is-open) .pe-info__body{
  display:none !important;
}

/* lista */
.pe-info__body p{
  margin: 0 0 12px !important;
}

.pe-info__list{
  margin: 0 !important;
  padding-left: 18px !important;
}

.pe-info__list li{
  margin: 8px 0 !important;
}

/* Mobile */
@media (max-width: 520px){
  .pe-info__head{
    padding: 14px 14px !important;
  }
  .pe-info__title{
    font-size: 15px !important;
  }
}

/* Badge de status no card */
.pe-badge{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #eee;
  line-height: 1;
}

.pe-badge.is-done{
  background: rgba(25,135,84,.12);
  border-color: rgba(25,135,84,.20);
  color:#198754;
}

.pe-badge.is-pending{
  background: rgba(255,193,7,.14);
  border-color: rgba(255,193,7,.25);
  color:#9a6b00;
} 

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

.pe-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
}

.pe-file__info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pe-file__name {
    font-size: 14px;
    font-weight: 500;
}

.pe-file__actions {
    display: flex;
    gap: 8px;
}

.pe-file__btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}

.pe-file__btn:hover {
    background: #eee;
}

.pe-file__btn.pe-view {
    border-color: #0d6efd;
    color: #0d6efd;
}

.pe-file__btn.pe-download {
    border-color: #198754;
    color: #198754;
}


#pe-pagination{
  display:flex;
  gap: 10px;
  margin-top: 18px;
  justify-content:center;
  flex-wrap: wrap; /* garante que não quebra feio */
}

#pe-pagination button{
  -webkit-appearance:none;
  appearance:none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background:#fff;
  cursor:pointer;
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
}

#pe-pagination button:hover{
  background:#fafafa;
}

#pe-pagination button.active{
  background:#0d6efd;
  color:#fff;
  border-color:#0d6efd;
}

#pe-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.pe-page-ellipsis{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 24px;
  color:#888;
  font-weight: 900;
}

button:hover, button:focus{
    color:#0d6efd!important;
}

.pe-search__clear{
    padding:5px!important;
}


/* ==========================================================
   PE — PATCH FINAL (Mobile + consistência)
   Cole no FINAL do CSS
   ========================================================== */

/* 1) Touch targets e consistência de botões */
.pe-info__head,
.pe-exam-summary,
.pe-search__clear,
.pe-file__btn,
#pe-pagination button{
  min-height: 44px;
}

/* 2) Corrige o hover global que está afetando TODOS os botões do site
      (isso aqui é perigoso: button:hover, button:focus ...)
      Vamos limitar só ao plugin */
.pe-patient-area button:hover,
.pe-patient-area button:focus{
  color:#0d6efd !important;
}

/* 3) Search clear: centraliza corretamente */
.pe-search__clear{
  padding: 0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* 4) Topbar (mobile) */
@media (max-width: 700px){
  .pe-topbar{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 14px !important;
  }

  .pe-topbar__right a,
  .pe-topbar__right .pe-logout{
    width: 100% !important;
    justify-content: center !important;
  }

  .pe-title{
    font-size: 16px !important;
    white-space: normal !important;
  }
}

/* 5) Toolbar (busca + contador) */
@media (max-width: 700px){
  .pe-toolbar{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .pe-toolbar__meta{
    text-align: right !important;
    font-size: 12px !important;
  }
}

/* 6) Card do exame: lado direito em linha de baixo no mobile */
@media (max-width: 700px){

  .pe-exam-summary{
    grid-template-columns: 1fr !important;
  }

  .pe-exam-summary__side{
    width: 100% !important;
    margin-top: 6px !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .pe-exam-name{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  .pe-date{ order: 1; }
  .pe-badge{ order: 2; }

  .pe-chevron{
    margin-left: auto !important;
    order: 3;
  }

  /* Médico pode quebrar linha sem estourar */
  .pe-muted{
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
  }
}

/* 7) Arquivos: “Ver / Baixar” em grid no mobile (bem clicável) */
@media (max-width: 520px){
  .pe-exam-details{
    padding: 12px 12px 14px !important;
  }

  .pe-file{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .pe-file__info{
    width: 100% !important;
    min-width: 0 !important;
  }

  .pe-file__name{
    max-width: 100% !important;
    overflow:hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .pe-file__actions{
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .pe-file__btn{
    width: 100% !important;
    min-height: 44px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
  }
}

/* 8) Info box: título quebra bonitinho no mobile */
@media (max-width: 520px){
  .pe-info__title{
    white-space: normal !important;
  }
}

/* 9) Paginação: menor no mobile */
@media (max-width: 520px){
  #pe-pagination{
    gap: 8px !important;
  }

  #pe-pagination button{
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
  }
}

/* ==========================================================
   MOBILE: arquivos em 2 linhas (nome em cima, botões embaixo)
   ========================================================== */
@media (max-width: 520px){

  .pe-file{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;

    padding: 12px !important;
    border-radius: 12px !important;
  }

  /* linha do nome */
  .pe-file__info{
    width: 100% !important;
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .pe-file__icon{
    flex: 0 0 auto !important;
    width: 24px !important;
    text-align: center !important;
  }

  /* nome em 1 linha, sem empurrar botões */
  .pe-file__name{
    flex: 1 1 auto !important;
    min-width: 0 !important;

    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* linha dos botões */
  .pe-file__actions{
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .pe-file__btn{
    width: 100% !important;
    min-height: 44px !important;

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

    border-radius: 12px !important;
    font-weight: 800 !important;
  }
}