:root{ 
  --bg1:#0b1020;
  --bg2:#111b3a;
  --card:#0f1733cc;
  --stroke:#26335f;
  --text:#e9ecff;
  --muted:#aab3dd;
  --ok:#2bd576;
  --warn:#ffd166;
  --danger:#ff5d6c;
  --btn:#4f7cff;
  --btn2:#2a3a70;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: "Arial Narrow","Roboto Condensed",Arial,sans-serif;
  color:var(--text);
  min-height:100vh;
  background:
    radial-gradient(1200px 800px at 15% 15%, #2a3a70 0%, transparent 60%),
    radial-gradient(900px 700px at 85% 35%, #273a86 0%, transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.wrap{
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px 18px 50px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo{
  width:40px;
  height:40px;
  border-radius:12px;
  overflow:hidden;
  background:#ffffff;
  box-shadow: 0 12px 24px rgba(79,124,255,.25);
  flex:0 0 40px;

  display:flex;
  align-items:center;
  justify-content:center;
}

.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.title{ line-height:1.1; }
.title h1{ margin:0; font-size:18px; letter-spacing:.3px; }
.title .sub{ margin-top:4px; font-size:12px; color:var(--muted); }

.userchip{
  display:none;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  background: rgba(15,23,51,.55);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(43,213,118,.12);
}

.userchip .meta{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.userchip .meta b{ font-size:12px; }
.userchip .meta span{ font-size:11px; color:var(--muted); }

.userchip button{
  margin-left:6px;
  border:1px solid var(--stroke);
  background: var(--btn2);
  color: var(--text);
  padding:8px 10px;
  border-radius: 999px;
  cursor:pointer;
}

/* Layout base usado em algumas telas */
.grid{
  display:grid;
  grid-template-columns: 430px 1fr;
  gap: 18px;
  align-items: start;
}

/* Cards */
.card{
  border:1px solid var(--stroke);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card .head{
  padding:16px 16px 10px;
  border-bottom: 1px solid rgba(38,51,95,.65);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.card .head h2{
  margin:0;
  font-size:14px;
  letter-spacing:.2px;
}

.card .body{ padding:16px; }

/* Texto */
.muted{ color:var(--muted); font-size:12px; }
.hint{ color:var(--muted); font-size:12px; margin-top:8px; }

/* Fields */
.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin: 10px 0;
}

label{
  font-size:12px;
  color:var(--muted);
}

input, select{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid rgba(38,51,95,.95);
  background: rgba(10,14,30,.55);
  color: var(--text);
  outline:none;
}

input:focus, select:focus{
  border-color: rgba(79, 91, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(79,124,255,.15);
}

/* Rows */
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

/* Botões */
.btn{
  border:1px solid rgba(79,124,255,.65);
  background: linear-gradient(180deg, rgba(79,124,255,.95), rgba(68,103,220,.95));
  color: #fff;
  padding:12px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 700;
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.btn.ghost{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.btn.mini{
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

.btn:active{ transform: translateY(1px); }

/* Botão secundário antigo */
.btn2{
  border:1px solid var(--stroke);
  background: rgba(42,58,112,.55);
  color: var(--text);
  padding:12px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 700;
}

/* Pílula */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted);
  font-size:12px;
  background: rgba(10,14,30,.35);
}

/* Status */
.status{
  margin-top:10px;
  font-size:12px;
  color: var(--muted);
}

.status.ok{ color: rgba(43,213,118,.95); }
.status.bad{ color: rgba(255,93,108,.95); }

.right{ text-align:right; }
.center{ text-align:center; }
.sigla{ font-weight: 800; letter-spacing:.3px; }

/* =========================
   Tabelas globais
   ========================= */
table{
  width:100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td{
  padding:10px 10px;
  border-bottom: 1px solid rgba(38,51,95,.65);
  text-align:left;
  font-size:12px;
}

th{
  color: var(--muted);
  font-weight: 700;
  background: rgba(10,14,30,.35);
}

tr:hover td{
  background: rgba(10,14,30,.25);
}

/* Tags */
.tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  border:1px solid rgba(38,51,95,.85);
  background: rgba(10,14,30,.35);
  color: var(--text);
}

.tag.ok{ border-color: rgba(43,213,118,.55); color: rgba(43,213,118,.95); }
.tag.warn{ border-color: rgba(255,209,102,.55); color: rgba(255,209,102,.95); }
.tag.bad{ border-color: rgba(255,93,108,.55); color: rgba(255,93,108,.95); }
.tag.lqd{ border-color: rgba(255,209,102,.55); color: rgba(255,209,102,.95); }
.tag.pgt{ border-color: rgba(43,213,118,.55); color: rgba(43,213,118,.95); }
.tag.fct{ border-color: rgba(79,124,255,.55); color: rgba(79,124,255,.95); }

/* btnmini antigo */
.btnmini{
  border:1px solid rgba(255,209,102,.55);
  background: rgba(255,209,102,.10);
  color: rgba(255,209,102,.95);
  padding:8px 10px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 800;
  font-size: 12px;
}

.app{ display:none; }

/* remove setinhas do input number */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

input[type=number]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Responsivo base */
@media (max-width: 980px){
  .grid{
    grid-template-columns: 1fr;
  }
}

/* quando logado, ocupa mais */
body.logged-in .grid{
  grid-template-columns: 1fr;
}

body.logged-in #appCard{
  width: 100%;
}

body.logged-in .card .body{
  padding: 22px;
}

body.logged-in table th,
body.logged-in table td{
  font-size: 13px;
  padding: 12px 12px;
}

/* =========================
   MENU GLOBAL (menuHost)
   ========================= */
#menuHost{
  margin: 8px 0 14px;
}

#menuHost nav,
#menuHost .menu,
#menuHost .nav,
#menuHost ul{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin:0;
  padding:0;
  list-style:none;
}

#menuHost a,
#menuHost button,
#menuHost .item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--stroke);
  background: rgba(10,14,30,.35);
  color: var(--text);
  padding:10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  text-decoration:none;
  user-select:none;
}

#menuHost a:hover,
#menuHost button:hover,
#menuHost .item:hover{
  background: rgba(255,255,255,.06);
}

#menuHost a.active,
#menuHost button.active,
#menuHost .item.active,
#menuHost a[aria-current="page"],
#menuHost button[aria-current="page"]{
  border-color: rgba(79,124,255,.95);
  box-shadow: 0 0 0 4px rgba(79,124,255,.15);
  background: rgba(10,14,30,.35);
}

#menuHost li{
  margin:0;
  padding:0;
}

#menuHost li a{
  width:100%;
}

/* impressão */
.print-only-header{
  display:none;
  text-align:center;
  font-weight:900;
  font-size:16px;
  margin-bottom:10px;
  letter-spacing:.3px;
}

@media print{

  @page{
    size: A4 portrait;
    margin: 1.8cm;
  }

  .print-only-header{
    display:block !important;
    color:#000 !important;
  }

  html,
  body,
  .wrap,
  .card,
  .body,
  .table-wrap,
  .fornecedores-lista,
  .diario-body-scroll{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }

  body{
    background:#fff !important;
    color:#000 !important;
  }

  table{
    width:100% !important;
    border-collapse:collapse !important;
    page-break-inside:auto !important;
    break-inside:auto !important;
  }

  thead{
    display:table-header-group !important;
  }

  tfoot{
    display:table-footer-group !important;
  }

  tbody{
    display:table-row-group !important;
  }

  tr,
  td,
  th{
    page-break-inside:avoid !important;
    break-inside:avoid !important;
  }
}
.topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.btn-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(10,14,30,.35);
  color:var(--text);
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  font-family:"Arial Narrow","Roboto Condensed",Arial,sans-serif;
  white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, transform .05s ease;
}

.btn-back:hover{
  background:rgba(255,255,255,.06);
}

.btn-back:active{
  transform:translateY(1px);
}

.btn-back:focus{
  outline:none;
  border-color:rgba(79,124,255,.95);
  box-shadow:0 0 0 4px rgba(79,124,255,.15);
}

@media (max-width: 640px){
  .topbar{
    flex-wrap:wrap;
  }

  .topbar-left{
    width:100%;
  }

  .btn-back{
    height:36px;
    padding:0 12px;
  }
}

@media print{
  .btn-back,
  .topbar-left{
    display:none !important;
  }
}
.btn-back-icon{
  width:40px;
  height:40px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:0;
  line-height:1;

  border-radius:10px;
  border:1px solid var(--stroke);
  background: rgba(10,14,30,.35);
  color: var(--text);

  font-size:18px;   /* 👈 BAIXA ISTO */
  transform: translateX(-1px); /* 👈 AJUSTE FINO */

  cursor:pointer;
}

.btn-back-icon:hover{
  background: rgba(255,255,255,.08);
  transform: translateX(-2px);
}

.btn-back-icon:active{
  transform: translateX(-1px) scale(0.98);
}

@media print{
  .btn-back-icon{
    display:none !important;
  }
}.topbar-left{
  display:flex;
  align-items:center;
  gap:6px; /* 👈 controla a distância */
}
/* =========================
   RELATÓRIOS DO DASHBOARD
========================= */

.report-title-font{
  font-family:"Arial Narrow","Roboto Condensed",Arial,sans-serif !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:normal !important;
  letter-spacing:.2px !important;
}