/* Tema LARANJA Praiastur */
:root{
  --primary: #ff7f32;
  --primary-600:#ff8c42;
  --primary-700:#ff6f10;
  --primary-rgb: 255,127,50;

  --soft-bg:#f6f8fb;
  --card-border:#e8edf3;
}

/* Badges de status CR com cores */
.badge-status{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .85rem;
  border: 1px solid transparent;
}

.badge-recebido{
  background: #e7f6ec;
  color: #1e7e34;
  border-color: #cfe9d9;
}

.badge-aberto{
  background: #fff7e0;
  color: #8a5b00;
  border-color: #ffe1a3;
}

.badge-atraso{
  background: #fdeaea;
  color: #b42318;
  border-color: #f6c4c4;
}


/* badges de papel do usuário */
.user-role-admin{
  background: #e6f7ee;
  color: #0f8f52;
  border: 1px solid #c9eedb;
}
.user-role-user{
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid #ffd9c2;
}


/* botão redondo de sincronizar na sidebar (versão antiga maior – mantida se precisar em outro lugar)
   OBS: a versão que realmente vale está mais abaixo, sobrescrevendo tamanho */
.btn-sync {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--laranja, #ff7f32);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.btn-sync:hover {
  transform: rotate(-12deg) scale(1.02);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.btn-sync:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* animação de “girando” quando sincronizando */
.btn-sync.syncing i {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* Botões */
.btn-primary{
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover,.btn-primary:focus{
  background-color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
}
.btn-outline-primary{ color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover{ background: rgba(var(--primary-rgb),.08) !important; color:#000 !important; }

/* Inputs marcados */
.form-check-input:checked{ background-color: var(--primary) !important; border-color: var(--primary) !important; }

/* ====== Brand + Sync ====== */

/* container da marca + botão, centralizado verticalmente e espaçado */
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

/* ícone + texto juntos */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

/* caixinha escura com o favicon dentro */
.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #111827;
  box-shadow: 0 0 12px rgba(255,127,50,0.7);
}

.brand-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

/* texto PRAIASTUR */
.brand-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: var(--laranja, #ff7f32);
}

/* Botão pequeno, redondo, colado ao texto (override da versão grande) */
.brand .btn-sync {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #eaeaea;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: var(--laranja, #ff7f32);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

.brand .btn-sync:hover {
  background: #fff8f3;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.brand .btn-sync i {
  font-size: 14px;
}

/* feedbacks */
.btn-sync.is-loading i { animation: spin 900ms linear infinite; }
.btn-sync.is-ok      { background: #e9f8ef; color: #1d7a3e; border-color: #cfeedd; }
.btn-sync.is-error   { background: #fdecec; color: #b42318; border-color: #f6d0d0; }

/* ====== Barra global de carregamento ====== */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  overflow: hidden;
  z-index: 3000; /* fica por cima de tudo */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.global-loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff7f32, #ffb46d);
  animation: loader-indeterminate 1.2s infinite;
}

/* quando estiver carregando, vamos adicionar essa classe via JS */
.global-loader.is-visible {
  opacity: 1;
}

/* animação "indeterminada" (vai e volta) */
@keyframes loader-indeterminate {
  0%   { width: 0%;   transform: translateX(-100%); }
  50%  { width: 60%;  transform: translateX(-20%); }
  100% { width: 100%; transform: translateX(100%); }
}
