/* Identidade oficial — ÍNTEGROS · III Campori de Líderes APV */
:root {
  --integros-blue:       #0D2B6E; /* azul escudo */
  --integros-blue-glow:  #1ABFCF; /* azul glow */
  --integros-gold:       #D4A017; /* dourado */
  --integros-gold-light: #F5C830; /* dourado claro */
  --integros-green:      #2D6A2A; /* verde natureza */
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  overscroll-behavior: none;
  margin: 0;
}

#app { min-height: 100dvh; background: #f0f4f8; }

/* ── MODAIS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.center { align-items: center; padding: 1rem; }
.modal-content {
  background: #fff;
  border-radius: 1.5rem 1.5rem 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 1.5rem;
}
.modal-overlay.center .modal-content { border-radius: 1.5rem; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge-pending  { background: #fef3c7; color: #92400e; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.badge-approved { background: #d1fae5; color: #065f46; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.badge-rejected { background: #fee2e2; color: #991b1b; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.badge-fiscal   { background: #e3f0e2; color: #1f4d1c; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }

/* ── UPLOAD ─────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: .875rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.upload-area:hover  { border-color: var(--integros-blue); background: #eff6ff; }
.upload-area.filled { border-color: #16a34a; background: #f0fdf4; border-style: solid; }
input[type="file"] { display: none; }

/* ── TABS ───────────────────────────────────────────────────── */
.tab-btn {
  flex: 1;
  padding: .75rem .25rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  color: #6b7280;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn.active { color: var(--integros-blue); border-bottom-color: var(--integros-blue); }

/* ── SPINNER ────────────────────────────────────────────────── */
.spinner {
  width: 2rem; height: 2rem;
  border: 3px solid #e2e8f0;
  border-top-color: var(--integros-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CARD ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ── BOTÕES % (fiscal) ──────────────────────────────────────── */
.pct-btn {
  padding: .35rem .55rem;
  border-radius: .5rem;
  border: 1.5px solid #e2e8f0;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  background: #f8fafc;
  color: #475569;
  transition: all .15s;
}
.pct-btn.sel { background: var(--integros-green); color: #fff; border-color: var(--integros-green); }

/* ── INTERAÇÃO ──────────────────────────────────────────────── */
button:active { opacity: .85; transform: scale(.97); }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* ── PRINT ──────────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  #app { background: #fff; }
}

/* ── PAINEL ADMIN: menu lateral responsivo ───────────────────── */
/* Mobile (padrão): sidebar é uma gaveta oculta, abre com o botão ☰. */
/* Desktop (>=960px): sidebar fica sempre visível e fixa, sem overlay. */
.admin-shell { display: flex; min-height: 100dvh; }
.admin-main  { flex: 1; min-width: 0; }

.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 60;
  background: linear-gradient(180deg, var(--integros-blue), #123a8f);
  color: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.admin-sidebar.open { transform: translateX(0); }

.admin-sidebar-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.admin-sidebar-overlay.open { opacity: 1; pointer-events: auto; }

.sidebar-link {
  display: flex; align-items: center; gap: .625rem;
  padding: .75rem .875rem; border-radius: .75rem;
  color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 600;
  background: none; border: none; text-align: left; cursor: pointer;
  width: 100%;
}
.sidebar-link:hover   { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active  { background: rgba(255,255,255,.16); color: #fff; }
.sidebar-link .count  {
  margin-left: auto; background: #ef4444; color: #fff; font-size: .65rem; font-weight: 700;
  padding: .1rem .4rem; border-radius: 999px;
}

.admin-hamburger {
  background: #fff; border: 1.5px solid #e2e8f0; color: var(--integros-blue);
  width: 2.5rem; height: 2.5rem; border-radius: .75rem; cursor: pointer;
  font-size: 1.1rem; flex-shrink: 0;
}

@media (min-width: 960px) {
  .admin-sidebar         { position: sticky; transform: translateX(0); }
  .admin-sidebar-overlay { display: none; }
  .admin-hamburger       { display: none; }
}
