/* ═══════════════════════════════════════════════════════
   LM INFORMÁTICA — PORTAL DE GESTÃO
   style.css — variáveis globais, reset, layout base
   ═══════════════════════════════════════════════════════ */

/* ── VARIÁVEIS ── */
:root {
  /* Paleta LM */
  --lm1: #00296b;
  --lm2: #003f88;
  --lm3: #00509d;
  --lm4: #ffd500;
  --lm-light: #e8f1fb;
  --lm-lighter: #f4f8fd;

  /* Superfícies */
  --bg-page:    #f0f4f9;
  --bg-card:    #ffffff;
  --bg-sidebar: #00296b;

  /* Texto */
  --text-primary:   #0d1b2e;
  --text-secondary: #4a5a72;
  --text-muted:     #8a99ae;
  --text-on-dark:   #ffffff;
  --text-accent:    #ffd500;

  /* Bordas */
  --border:      #dce4ef;
  --border-soft: rgba(0,41,107,0.08);

  /* Status */
  --status-aberto:     #2563eb;
  --status-aberto-bg:  #eff6ff;
  --status-manut:      #d97706;
  --status-manut-bg:   #fffbeb;
  --status-pronta:     #059669;
  --status-pronta-bg:  #ecfdf5;
  --status-cancel:     #6b7280;
  --status-cancel-bg:  #f3f4f6;

  /* Dimensões */
  --sidebar-w:   220px;
  --topbar-h:    56px;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   14px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0,41,107,0.08);
  --shadow-md:  0 4px 16px rgba(0,41,107,0.10);
  --shadow-lg:  0 8px 32px rgba(0,41,107,0.14);

  /* Transição padrão */
  --transition: 0.18s ease;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ── LAYOUT PRINCIPAL ── */
body {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,213,0,0.15);
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--lm4);
  color: var(--lm1);
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.logo-name {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-on-dark);
  line-height: 1.2;
}
.logo-tag {
  display: block;
  font-size: 10px;
  color: rgba(255,213,0,0.65);
  letter-spacing: 0.3px;
}

/* Navegação */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255,213,0,0.08);
  color: rgba(255,255,255,0.9);
  border-left-color: rgba(255,213,0,0.4);
}
.nav-item.active {
  background: rgba(255,213,0,0.12);
  color: var(--lm4);
  border-left-color: var(--lm4);
  font-weight: 600;
}
.nav-icon {
  font-style: normal;
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* Footer da sidebar */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  background: var(--lm4);
  color: var(--lm1);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-on-dark);
}
.user-role {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}

/* ═══════════════════════════════════════════════════════
   CONTEÚDO PRINCIPAL
   ═══════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 22px;
}
.topbar-menu-btn span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
}
.topbar-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--lm1);
  letter-spacing: 0.3px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #059669;
}
.sync-dot.offline { background: #e11d48; }
.sync-dot.syncing { background: #d97706; animation: pulse 1s infinite; }
.topbar-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* Área de página */
.page-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Loading */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 16px;
  color: var(--text-muted);
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--lm3);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ═══════════════════════════════════════════════════════
   COMPONENTES REUTILIZÁVEIS
   ═══════════════════════════════════════════════════════ */

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--lm1);
}
.card-body {
  padding: 16px 20px;
}

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid transparent;
  transition: box-shadow var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card.blue  { border-top-color: var(--status-aberto); }
.kpi-card.amber { border-top-color: var(--status-manut); }
.kpi-card.green { border-top-color: var(--status-pronta); }
.kpi-card.gray  { border-top-color: var(--text-muted); }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.kpi-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Badges de status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.aberto   { background: var(--status-aberto-bg);  color: var(--status-aberto); }
.badge.manutencao { background: var(--status-manut-bg); color: var(--status-manut); }
.badge.pronta   { background: var(--status-pronta-bg);  color: var(--status-pronta); }
.badge.cancelada { background: var(--status-cancel-bg); color: var(--status-cancel); }

/* Tabelas */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  background: var(--lm-lighter);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-size: 13px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--lm-lighter); }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--lm2);
  color: white;
}
.btn-primary:hover { background: var(--lm1); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--lm-lighter); color: var(--lm2); }

.btn-accent {
  background: var(--lm4);
  color: var(--lm1);
}
.btn-accent:hover { background: #e6c000; }

/* Inputs de busca e filtro */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 36px;
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--lm3); }
.search-bar input {
  border: none;
  outline: none;
  background: none;
  flex: 1;
  color: inherit;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* Grids de seção */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--lm1);
}

/* ═══════════════════════════════════════════════════════
   UTILITÁRIOS
   ═══════════════════════════════════════════════════════ */
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary  { color: var(--text-primary); }
.text-accent   { color: var(--lm4); }
.text-sm       { font-size: 12px; }
.text-xs       { font-size: 11px; }
.fw-600        { font-weight: 600; }
.fw-700        { font-weight: 700; }
.mt-4          { margin-top: 4px; }
.mt-8          { margin-top: 8px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.mb-16         { margin-bottom: 16px; }
.mb-24         { margin-bottom: 24px; }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.flex-1        { flex: 1; }

/* ═══════════════════════════════════════════════════════
   ANIMAÇÕES
   ═══════════════════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.22s ease forwards;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar-menu-btn {
    display: flex;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-area {
    padding: 16px;
  }
}

/* ── BOTÃO LOGOUT ── */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Barlow', sans-serif;
}
.btn-logout:hover {
  background: rgba(225,29,72,0.15);
  border-color: rgba(225,29,72,0.3);
  color: #fca5a5;
}


/* ══════════════════════════════════════════════════
   TELA DE LOGIN
══════════════════════════════════════════════════ */
#login-screen { position:fixed;inset:0;z-index:9999;background:var(--lm1); }
.login-bg { display:flex;height:100vh;width:100vw; }
.login-left { flex:1;background:linear-gradient(145deg,#00296b 0%,#003f88 50%,#00509d 100%);display:flex;flex-direction:column;justify-content:space-between;padding:48px;position:relative;overflow:hidden; }
.login-left::before { content:'';position:absolute;width:400px;height:400px;background:rgba(255,213,0,0.05);border-radius:50%;top:-100px;right:-100px; }
.login-left-content { position:relative;z-index:1; }
.login-logo { width:80px;height:80px;object-fit:contain;border-radius:16px;background:white;padding:6px;margin-bottom:24px;box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.login-brand { font-family:'Barlow Condensed',sans-serif;font-size:36px;font-weight:700;color:white;margin:0 0 6px; }
.login-tagline { font-size:14px;color:var(--lm4);font-weight:600;margin:0 0 40px;letter-spacing:1px;text-transform:uppercase; }
.login-features { display:flex;flex-direction:column;gap:16px; }
.login-feature { display:flex;align-items:center;gap:12px;color:rgba(255,255,255,0.75);font-size:14px; }
.login-feature-icon { font-size:18px;width:36px;height:36px;background:rgba(255,255,255,0.08);border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.login-left-footer { position:relative;z-index:1;font-size:11px;color:rgba(255,255,255,0.35);border-top:1px solid rgba(255,255,255,0.1);padding-top:20px; }
.login-right { width:460px;background:#f0f4f9;display:flex;align-items:center;justify-content:center;padding:40px 32px; }
.login-card { width:100%;max-width:360px; }
.login-mobile-logo { display:none;align-items:center;gap:10px;margin-bottom:28px;font-weight:700;color:var(--lm1);font-size:16px; }
.login-mobile-img { width:36px;height:36px;object-fit:contain;border-radius:6px; }
.login-title { font-family:'Barlow Condensed',sans-serif;font-size:28px;font-weight:700;color:var(--lm1);margin:0 0 8px; }
.login-subtitle { font-size:13px;color:var(--text-sec);margin:0 0 32px;line-height:1.5; }
.btn-ms-login { width:100%;display:flex;align-items:center;justify-content:center;gap:12px;background:var(--lm1);color:white;border:none;border-radius:8px;padding:14px 20px;font-size:14px;font-weight:600;font-family:'Barlow',sans-serif;cursor:pointer;transition:all 0.2s;box-shadow:0 4px 14px rgba(0,41,107,0.3); }
.btn-ms-login:hover { background:var(--lm2);transform:translateY(-1px); }
.login-loading { display:none;align-items:center;justify-content:center;gap:10px;margin-top:16px;color:var(--text-sec);font-size:13px; }
.login-loading.visible { display:flex; }
.login-spinner { width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--lm3);border-radius:50%;animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.login-error { display:none;align-items:flex-start;gap:10px;background:#fee2e2;border:1px solid #fca5a5;border-radius:8px;padding:12px 14px;margin-top:16px;font-size:13px;color:#991b1b; }
.login-error.visible { display:flex; }
.login-error-icon { font-size:16px;flex-shrink:0;margin-top:1px; }
.login-error strong { display:block;margin-bottom:2px; }
.login-error p { margin:0;font-size:12px;opacity:0.85; }
.login-divider { display:flex;align-items:center;gap:12px;margin:24px 0 16px;color:var(--text-sec);font-size:11px; }
.login-divider::before,.login-divider::after { content:'';flex:1;height:1px;background:var(--border); }
.login-ms-badge { display:flex;align-items:center;justify-content:center;gap:8px;background:white;border:1px solid var(--border);border-radius:6px;padding:8px 14px;font-size:12px;font-weight:500;color:var(--text-sec); }
.login-info { text-align:center;font-size:11px;color:var(--text-sec);margin:16px 0 0;line-height:1.6; }
.login-domain-badge { margin-top:20px;text-align:center;background:var(--lm-light);border:1px solid var(--border);border-radius:6px;padding:8px;font-size:12px;color:var(--lm2); }
@media (max-width:700px) { .login-left{display:none;} .login-right{width:100%;padding:32px 24px;} .login-mobile-logo{display:flex;} }

/* ── PÁGINA ENTREGAS ── */
.ent-label {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--text-sec); text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 5px;
}
.ent-input {
  width: 100%; padding: 8px 10px; font-size: 13px;
  border: 0.5px solid var(--border); border-radius: 6px;
  background: var(--lm-lighter); color: var(--text);
  font-family: 'Barlow', sans-serif;
}
.ent-input:focus { outline: none; border-color: var(--lm3); box-shadow: 0 0 0 2px rgba(0,80,157,.12); }
.ent-sel {
  padding: 9px 6px; border: 0.5px solid var(--border);
  border-radius: 6px; background: var(--lm-lighter);
  color: var(--text-sec); font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: center; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow', sans-serif;
}
.ent-sel:hover { border-color: var(--lm3); color: var(--lm3); }
.ent-sel.on { background: var(--lm3); color: white; border-color: var(--lm3); }
.ent-tipo-btn { flex-direction: column !important; gap: 4px !important; padding: 10px 4px !important; }
.ent-consulta-box {
  background: var(--lm-lighter); border: 0.5px solid var(--border);
  border-radius: 6px; padding: 10px;
}
.ent-crow {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 4px 0; border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}
.ent-crow:last-child { border-bottom: none; }
.ent-ckey { color: var(--text-sec); }
.ent-cval { font-weight: 500; color: var(--text); text-align: right; max-width: 200px; }
.ent-note {
  font-size: 12px; color: var(--text-sec);
  background: var(--lm-lighter); border-radius: 6px;
  padding: 10px 12px; margin-top: 8px;
}

/* ITENS DA LISTA DE ENTREGAS */
.ent-item {
  padding: 12px 16px; border-bottom: 0.5px solid var(--border-soft);
  display: grid; grid-template-columns: 52px 1fr auto;
  gap: 10px; align-items: center; cursor: default;
}
.ent-item:last-child { border-bottom: none; }
.ent-num {
  width: 52px; height: 52px; background: var(--lm-light);
  border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500; color: var(--lm2);
  line-height: 1.3; text-align: center;
}
.ent-num b { font-size: 14px; }
.ent-cli { font-size: 13px; font-weight: 500; color: var(--text); }
.ent-meta { font-size: 11px; color: var(--text-sec); margin-top: 2px; }
.ent-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.etag { font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 500; }
.et-emp   { background: var(--lm-light); color: var(--lm1); }
.et-carro { background: #e6eef7; color: #00296b; }
.et-moto  { background: #fff3b0; color: #7a5c00; }
.et-transp{ background: #ede9fe; color: #5b21b6; }
.et-cli   { background: #d1fae5; color: #065f46; }
.et-turno { background: var(--lm-lighter); color: var(--text-sec); }
.et-cobr  { background: #fee2e2; color: #991b1b; }
.et-maq   { background: #dbeafe; color: #1e40af; }
.ent-sact { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ent-sbadge { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.es-pend { background: #fef3cd; color: #92600a; }
.es-rota { background: #dbeafe; color: #1e40af; }
.es-ent  { background: #d1fae5; color: #065f46; }
.es-loja { background: #f3f4f6; color: #6b7280; }
.ent-sbtn {
  font-size: 11px; padding: 4px 8px;
  border: 0.5px solid var(--border); border-radius: 6px;
  background: none; color: var(--text-sec); cursor: pointer;
  font-family: 'Barlow', sans-serif;
}
.ent-sbtn:hover { background: var(--lm-lighter); }

/* ── GRUPOS DE ENTREGAS ── */
.ent-grupo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--lm-light);
  color: var(--lm1);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-top: 0.5px solid var(--border-soft);
  border-bottom: 0.5px solid var(--border-soft);
}
.ent-grupo-header:first-child { border-top: none; }
.ent-grupo-count {
  background: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ── BOTÃO EXCLUIR ENTREGA ── */
.ent-sbtn-del {
  color: #dc2626 !important;
  border-color: #fecaca !important;
  font-size: 13px !important;
  padding: 2px 8px !important;
  line-height: 1;
}
.ent-sbtn-del:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* ── MODAL EDITAR ENTREGA ── */
.hist-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.hist-modal-box {
  background: white;
  border-radius: 12px;
  width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.hist-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--lm1);
}
.hist-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-sec);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.hist-modal-close:hover { background: var(--lm-lighter); }
.hist-modal-body { padding: 16px 20px; }
.hist-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.hist-edit-row { margin-bottom: 12px; }

/* ── DASHBOARD LAYOUT (sidebar + main) ── */
#dashboard {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

/* ── BOTÃO LOGOUT NA SIDEBAR ── */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Barlow', sans-serif;
}
.btn-logout:hover {
  background: rgba(225,29,72,0.15);
  border-color: rgba(225,29,72,0.3);
  color: #fca5a5;
}
