/* ===============================
   DOSS — Estilo base (dark / ECO)
   Arquivo: /doss3/style.css
   =============================== */

:root{
  --bg: #05070b;
  --bg-soft: #0b0f16;
  --surface: #0f172a;
  --surface-soft: rgba(15,23,42,.9);
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-strong: #00e3a2;
  --accent-soft: rgba(34,197,94,.12);
  --danger: #ef4444;
  --danger-soft: rgba(239,68,68,.15);
  --warn: #f59e0b;
  --border: rgba(148,163,184,.35);
  --line-soft: rgba(15,23,42,.9);
  --b2: rgba(30,41,59,.9);
  --container: 1100px;
  --radius-lg: 14px;
  --shadow-soft: 0 18px 45px rgba(0,0,0,.65);
  color-scheme: dark;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

html, body{
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34,197,94,.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(59,130,246,.10), transparent 55%),
    #020617;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* ===============================
   Estrutura geral
   =============================== */

main, .wrap, .container-main{
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 12px 28px;
}

h1,h2,h3,h4{
  margin: 0 0 8px;
  font-weight: 700;
}

p{
  margin: 0 0 8px;
  color: var(--muted);
}

a{
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

/* ===============================
   Cards / painéis
   =============================== */

.card{
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
}

.card + .card{
  margin-top: 12px;
}

/* usado em várias telas do DOSS */
.kpi{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.35);
  padding: 8px 10px;
  background: rgba(15,23,42,.9);
  text-align: left;
}

.kpi b{
  display:block;
  font-size: 13px;
  opacity:.85;
  margin-bottom: 4px;
}

.kpi .v{
  font-size: 20px;
  font-weight: 700;
}

/* ===============================
   Botões
   =============================== */

.btn,
button,
input[type="button"],
input[type="submit"]{
  font-family: inherit;
  font-size: 14px;
  line-height: 1.1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,1);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: transform .08s ease-out, box-shadow .08s ease-out, background .12s ease-out, border-color .12s ease-out;
}

.btn:hover,
button:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.55);
  border-color: rgba(148,163,184,.8);
}

.btn:active,
button:active{
  transform: translateY(0);
  box-shadow: none;
}

/* primário verde */
.btn-primary{
  background: linear-gradient(180deg,#22c55e,#16a34a);
  border-color: rgba(34,197,94,.7);
  color:#020617;
  font-weight: 700;
}

.btn-primary:hover{
  filter: brightness(1.03);
  box-shadow: 0 10px 26px rgba(22,163,74,.55);
}

/* perigo */
.btn-danger{
  background: var(--danger-soft);
  border-color: rgba(239,68,68,.7);
  color: #fecaca;
}

/* botão pequeno usado em tabelas */
.btn.tiny{
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ===============================
   Inputs / selects
   =============================== */

input,
select,
textarea{
  font-family: inherit;
  font-size: 14px;
  color: var(--fg);
  background: rgba(15,23,42,.95);
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.45);
  padding: 8px 10px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus{
  outline: 2px solid rgba(34,197,94,.7);
  outline-offset: 1px;
  border-color: rgba(34,197,94,.8);
}

label{
  display:block;
  margin-bottom: 4px;
  font-size: 13px;
  opacity:.9;
}

.muted{
  color: var(--muted);
  opacity:.85;
  font-size: 13px;
}

/* ===============================
   Tabelas
   =============================== */

.table-responsive{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.4);
}

.tbl{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl th,
.tbl td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30,64,175,.55);
  min-width: 96px;
}

.tbl th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg,rgba(15,23,42,.96),rgba(15,23,42,.94));
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #9ca3af;
}

.tbl td:first-child,
.tbl th:first-child{
  min-width: 140px;
}

.tbl tbody tr:nth-child(odd){
  background: rgba(15,23,42,.90);
}

.tbl tbody tr:nth-child(even){
  background: rgba(15,23,42,.96);
}

.tbl tbody tr:hover{
  background: radial-gradient(circle at left, rgba(34,197,94,.10), transparent 55%), rgba(15,23,42,1);
}

.right{
  text-align:right;
}

/* ===============================
   Badges / chips
   =============================== */

.badge{
  display:inline-block;
  padding:.18rem .55rem;
  border-radius:999px;
  font-size:.80rem;
  font-weight:700;
  line-height:1;
  border:1px solid transparent;
}

.badge-profit{
  background:rgba(34,197,94,.14);
  color:#bbf7d0;
  border-color:rgba(34,197,94,.55);
}

.badge-loss{
  background:rgba(239,68,68,.14);
  color:#fecaca;
  border-color:rgba(239,68,68,.55);
}

.badge-void{
  background:rgba(148,163,184,.18);
  color:#cbd5e1;
  border-color:rgba(148,163,184,.45);
}

.badge-warn{
  background:rgba(245,158,11,.16);
  color:#fed7aa;
  border-color:rgba(245,158,11,.55);
}

/* chips tipo PDV */
.badge-chip{
  display:inline-flex;
  gap:.4rem;
  align-items:center;
  padding:.25rem .7rem;
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  border:1px solid transparent;
}

.chip-mesa{
  background:rgba(59,130,246,.14);
  border-color:rgba(59,130,246,.5);
  color:#bfdbfe;
}

.chip-balcao{
  background:rgba(168,85,247,.16);
  border-color:rgba(168,85,247,.5);
  color:#e9d5ff;
}

.chip-entrega{
  background:rgba(245,158,11,.16);
  border-color:rgba(245,158,11,.55);
  color:#fed7aa;
}

/* linha "anulada" */
.void-row{
  opacity:.55;
}

/* ===============================
   Layout grid / responsivo
   =============================== */

.grid{
  display:grid;
  gap:12px;
}

@media (min-width: 720px){
  .grid-2{
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px){
  .grid-3{
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

/* ===============================
   Toast (mensagem flutuante)
   =============================== */

#toast{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:9999;
  display:none;
}

#toast .msg{
  display:inline-block;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(16,185,129,.55);
  background:rgba(6,95,70,.96);
  color:#ecfdf5;
  box-shadow:0 14px 32px rgba(0,0,0,.65);
  font-weight:700;
}

/* ===============================
   Menu mobile genérico
   =============================== */

.mobile-menu{
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15,15,20,.85);
  backdrop-filter: blur(8px);
  z-index: 9000;
}

.mobile-menu.show{
  display:flex;
  justify-content:flex-end;
}

.mobile-panel{
  width:280px;
  max-width: 80%;
  background:#020617;
  border-left:1px solid rgba(148,163,184,.45);
  box-shadow: var(--shadow-soft);
  padding:14px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.mobile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(30,64,175,.75);
}

.menu-close{
  border-radius:999px;
  border:1px solid rgba(148,163,184,.55);
  background:rgba(15,23,42,1);
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

/* ===============================
   Alertas
   =============================== */

.alert{
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.6);
  background: rgba(15,23,42,.96);
  font-size: 13px;
}

.alert.ok{
  border-color: rgba(34,197,94,.65);
  background: rgba(6,95,70,.95);
  color: #ecfdf5;
}

/* ===============================
   Rodapé simples (fallback)
   =============================== */

.footer{
  max-width: var(--container);
  margin: 32px auto 18px;
  padding: 12px 0 24px;
  border-top: 1px solid rgba(148,163,184,.35);
  color: var(--muted);
  font-size: 13px;
}

.footer a{
  color: #e5e7eb;
}

.footer a:hover{
  text-decoration: underline;
}
/* FOOTER: por padrão NÃO aparece no sistema */
#dossFooter{ display:none !important; }

/* Só aparece onde você permitir */
body.has-footer #dossFooter{ display:block !important; }

/* Se alguma página tinha “espaço reservado” pro footer fixo, zera fora das páginas permitidas */
body:not(.has-footer){ padding-bottom: 0 !important; }
