:root{
  --orange: #ee4d2d;
  --orange2:#ff6a3d;

  --bg1:#0a0f18;
  --bg2:#0b1220;

  --card: rgba(14, 20, 32, .88);
  --stroke: rgba(255,255,255,0.10);
  --stroke2: rgba(255,255,255,0.14);

  --text: rgba(243,244,246,0.96);
  --muted: rgba(156,163,175,0.86);

  --input: rgba(10, 16, 28, 0.95);

  --shadow: 0 22px 70px rgba(0,0,0,0.55);

  --dangerBg: rgba(220, 38, 38, 0.16);
  --dangerBd: rgba(248, 113, 113, 0.32);
  --dangerTx: rgba(254, 202, 202, 0.98);
  --dangerTxStrong: rgba(254, 226, 226, 1);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* ======= LOGIN ======= */
.wrap{
  min-height:100%;
  display:grid;
  place-items:center;
  padding: 22px 14px;
}

.card{
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset: -140px -140px auto -140px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%);
  pointer-events:none;
}

.logo{
  display:flex;
  justify-content:center;
  align-items:center;
  margin: 10px 0 18px;
}

/* SVG fica perfeito aqui */
.logo img{
  width: 74px;             /* SVG maior que o .ico */
  height: 74px;
  object-fit: contain;
  display:block;
  opacity: .95;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
}

.form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.field label{
  display:block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: var(--input);
  color: var(--text);
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus{
  border-color: rgba(238, 77, 45, 0.75);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.16);
}

.btn{
  margin-top: 8px;
  width:100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(180deg, var(--orange2), var(--orange));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease;
}

.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

.btn:disabled{
  opacity: .85;
  cursor: not-allowed;
}

.btn.small{
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
  border-radius: 12px;
}

/* ======= TOAST ======= */
.toast{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;

  min-width: 240px;
  max-width: 340px;

  padding: 10px 12px;
  border-radius: 12px;

  background: var(--dangerBg);
  border: 1px solid var(--dangerBd);
  color: var(--dangerTx);

  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);

  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show{
  opacity: 1;
  transform: translateY(0);
}

.toast strong{
  display:block;
  color: var(--dangerTxStrong);
  font-size: 12.5px;
  margin-bottom: 4px;
}

.toast .tmsg{
  font-size: 12.5px;
  line-height: 1.25;
}

@media (max-width: 480px){
  .toast{
    left: 14px;
    right: 14px;
    max-width: none;
  }
}

/* ======= DASHBOARD ======= */
.dashboard-body{
  display: flex;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
}

.sidebar{
  width: 280px;
  background: var(--card);
  border-right: 1px solid var(--stroke);
  display:flex;
  flex-direction:column;
  padding: 18px;
  box-shadow: 14px 0 40px rgba(0,0,0,0.25);
}

.sidebar-header{ margin-bottom: 18px; }

/* opcional: ícone + APPS no topo */
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

.brand-icon{
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
}

.logo-text{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--text);
}

.sidebar-section{ margin-bottom: 18px; }

.sidebar-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display:block;
}

.sidebar-select{
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: var(--input);
  color: var(--text);
  outline:none;
}

.sidebar-menu{
  flex:1;
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding-top: 4px;
}

.menu-item{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  text-align:left;
  cursor:pointer;
  font-weight: 800;
  transition: background .15s ease, border-color .15s ease;
}

.menu-item:hover{
  background: rgba(238, 77, 45, 0.08);
  border-color: rgba(238, 77, 45, 0.20);
}

.menu-item.active{
  background: rgba(238, 77, 45, 0.12);
  border-color: rgba(238, 77, 45, 0.30);
}

.sidebar-footer{ margin-top:auto; }

.logout-btn{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(180deg, var(--orange2), var(--orange));
  color: #fff;
  font-weight: 900;
  cursor:pointer;
}

.logout-btn:hover{ filter: brightness(1.05); }

.dashboard-content{
  flex:1;
  padding: 32px;
}

/* pages */
.page{ display:none; }
.page.active{ display:block; }

.dashboard-content h1{
  margin: 0 0 10px;
  font-size: 34px;
}

.muted{ color: var(--muted); }

.panel{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 14px;
}

.panel-title{
  font-weight: 900;
  margin-bottom: 8px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.chart{
  width: 100%;
  height: 220px;
  display:block;
}

.textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: var(--input);
  color: var(--text);
  padding: 12px;
  outline: none;
  resize: vertical;
}

.textarea:focus{
  border-color: rgba(238, 77, 45, 0.75);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.12);
}

.actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}

/* Pedidos */
.orders-top{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap: 12px;
  margin: 14px 0 12px;
}

.kpis{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi{
  min-width: 160px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 12px 14px;
}

.kpi-label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.kpi-value{
  font-size: 26px;
  font-weight: 900;
  margin-top: 4px;
}

.filters{
  display:flex;
  gap: 10px;
  align-items:center;
}

.chip{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  padding: 10px 14px;
  cursor:pointer;
  font-weight: 800;
}

.chip:hover{
  border-color: rgba(238, 77, 45, 0.25);
  background: rgba(238, 77, 45, 0.08);
}

.chip.active{
  border-color: rgba(238, 77, 45, 0.35);
  background: rgba(238, 77, 45, 0.12);
}

.table-wrap{
  overflow:auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

.table{
  width:100%;
  border-collapse: collapse;
  min-width: 560px;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  padding: 12px 12px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}

.table tbody tr:hover td{
  background: rgba(255,255,255,0.02);
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.badge-warn{
  background: rgba(238, 77, 45, 0.10);
  border-color: rgba(238, 77, 45, 0.25);
}

.badge-ok{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}

.table-foot{
  margin-top: 10px;
  font-size: 12.5px;
}
