/* =============================================================
   Sistema de Chamada de Senhas — Estilos Globais
   Adaptado do layout InApp Inventory Dashboard
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --cor-primaria: #0d6efd;
  --sidebar-largura: 240px;
  --topbar-altura: 60px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  background-color: #f5f6fa;
  color: #212529;
}

/* ---- OVERLAY (mobile) ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(1px);
  display: none;
  z-index: 1029;
}
.overlay.show { display: block; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-largura);
  background: #fff;
  border-right: 1px solid #e9ecef;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding-top: var(--topbar-altura);
  z-index: 1030;
  transition: width .3s, left .3s;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar .logo-area {
  position: absolute;
  top: 0;
  left: 0;
  height: var(--topbar-altura);
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 17px;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 15px;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar .nav-link {
  color: #495057;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  gap: 12px;
  white-space: nowrap;
  margin: 1px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: var(--cor-primaria);
  background-color: rgba(13, 110, 253, .09);
}
.sidebar .nav-link .ti { font-size: 18px; }
.sidebar .nav-section {
  padding: 12px 16px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #adb5bd;
  font-weight: 600;
}

/* Sidebar colapsada */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .nav-link {
  margin: 0;
  padding: 10px 18px;
  justify-content: center;
}
.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section { display: none; }

/* ---- TOPBAR ---- */
.topbar {
  height: var(--topbar-altura);
  margin-left: var(--sidebar-largura);
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: margin-left .3s;
}
.topbar.full { margin-left: 60px; }

/* ---- CONTEÚDO PRINCIPAL ---- */
.content {
  margin-left: var(--sidebar-largura);
  padding-top: calc(var(--topbar-altura) + 24px);
  padding-bottom: 24px;
  min-height: 100vh;
  transition: margin-left .3s;
}
.content.full { margin-left: 60px; }

/* ---- CARDS ---- */
.card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-header { border-bottom: 1px solid #e9ecef; }

/* ---- ICON SHAPE ---- */
.icon-shape {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon-sm  { width: 36px; height: 36px; }
.icon-md  { width: 44px; height: 44px; }
.icon-lg  { width: 56px; height: 56px; }

/* ---- AVATAR ---- */
.avatar { object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }

/* ---- BADGES / STATUS ---- */
.badge-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 50px;
  font-weight: 500;
}

/* ---- SENHA EM DESTAQUE (painel de chamada) ---- */
.senha-destaque {
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

/* ---- TABLET (tela de retirada de senha) ---- */
.teclado-numerico .btn {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 16px;
  border-radius: 12px;
}

/* ---- UTILITÁRIOS ---- */
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
/* Garante que o padding-top de .content não seja sobrescrito por .py-10 */
.content.py-10 { padding-top: calc(var(--topbar-altura) + 30px); }
.mt-6  { margin-top: 3rem; }
.mb-6  { margin-bottom: 3rem; }
.border-dashed { border-style: dashed !important; }
.fs-3 { font-size: 1.4rem; }
.cursor-pointer { cursor: pointer; }

/* ---- DATATABLES ---- */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 4px 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  margin: 0 2px;
}

/* ---- RESPONSIVO ---- */
@media (max-width: 992px) {
  .sidebar {
    left: calc(-1 * var(--sidebar-largura));
  }
  .sidebar.mobile-show { left: 0; }
  .topbar,
  .content {
    margin-left: 0 !important;
  }
}

/* ---- IMPRESSÃO TÉRMICA ---- */
@media print {
  body * { visibility: hidden; }
  #area-impressao, #area-impressao * { visibility: visible; }
  #area-impressao {
    position: absolute;
    left: 0; top: 0;
    width: 80mm;
    font-family: monospace;
    font-size: 12pt;
  }
}
