/* =============================================
   KATEC ERP — CSS Completo
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:          #f8fafc;
  --bg-2:        #ffffff;
  --bg-3:        #f1f5f9;
  --bg-4:        #e2e8f0;
  --border:      #e2e8f0;
  --text:        #1e293b;
  --text-2:      #475569;
  --text-3:      #94a3b8;
  --accent:      #dc2626; /* Premium Katec Red */
  --accent-l:    rgba(220,38,38,.1);
  --green:       #059669; /* Emerald */
  --green-l:     rgba(5,150,105,.15);
  --blue:        #2563eb;
  --blue-l:      rgba(37,99,235,.15);
  --yellow:      #d97706; /* Amber */
  --yellow-l:    rgba(217,119,6,.15);
  --purple:      #7c3aed;
  --purple-l:    rgba(124,58,237,.15);
  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 2px 10px rgba(0,0,0,.05);
  --font:        'Outfit', system-ui, -apple-system, sans-serif;
  --sidebar-w:   240px;
  --topbar-h:    56px;
  --t:           .15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
a { text-decoration: none; color: inherit; }
input, select, textarea {
  font-family: var(--font);
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  width: 100%;
  font-size: 13.5px;
  outline: none;
  transition: all var(--t);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-l), inset 0 1px 3px rgba(0,0,0,0.02);
}
label { display: block; font-size: 11px; font-weight: 700; color: var(--text-3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.form-group { margin-bottom: 14px; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== LOGIN ===== */
.login-screen {
  position: fixed; inset: 0;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--bg-2);
  z-index: 1000;
}

/* --- Painel de marca (esquerda) --- */
.login-brand-panel {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 56px 40px;
  background: linear-gradient(150deg, #b91c1c 0%, var(--accent) 45%, #991b1b 100%);
  color: #fff;
  overflow: hidden;
}
.login-brand-panel::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.10) 1px, transparent 0);
  background-size: 26px 26px;
}
.login-brand-panel::after {
  content: ''; position: absolute;
  width: 480px; height: 480px; right: -180px; top: -160px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.login-brand-panel > * { position: relative; z-index: 1; }

.brand-panel-logo { display: flex; align-items: center; gap: 14px; }
.brand-panel-mark {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 26px; color: #fff;
}
.brand-panel-name { font-size: 22px; font-weight: 900; letter-spacing: 2px; line-height: 1; }
.brand-panel-tag { font-size: 12px; font-weight: 500; opacity: .8; letter-spacing: 1px; margin-top: 3px; text-transform: uppercase; }

.brand-headline { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; margin-bottom: 16px; }

/* --- Illustration (Left Panel) --- */
.brand-illustration { position: relative; width: 100%; max-width: 340px; height: 260px; margin-top: 20px; perspective: 1000px; }
.illu-card {
  position: absolute; width: 240px; height: 170px; left: 20px; top: 30px;
  background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px;
  display: flex; flex-direction: column; padding: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.1); z-index: 2;
}
.illu-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.illu-circle { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.illu-line { height: 7px; background: rgba(255,255,255,0.18); border-radius: 4px; }
.illu-line.short { width: 40%; }
.illu-body { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.illu-line.long { height: 6px; }
.illu-btn { height: 28px; width: 100%; background: rgba(255,255,255,0.2); border-radius: 6px; margin-top: auto; }
.illu-credit {
  position: absolute; width: 150px; height: 95px; right: 0; bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); border-radius: 12px;
  box-shadow: -8px 16px 32px rgba(130, 0, 0, 0.3); padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotate(-12deg); z-index: 3;
}
.illu-credit::before { content: ''; position: absolute; inset: 0; border-radius: 12px; border: 1px solid rgba(255,255,255,0.8); }
.illu-credit-chip { width: 26px; height: 18px; background: #fbbf24; border-radius: 4px; position: relative; z-index: 1; }
.illu-credit-stripe { height: 6px; background: #cbd5e1; border-radius: 3px; width: 75%; position: relative; z-index: 1; }
.illu-badge {
  position: absolute; width: 54px; height: 54px; left: -5px; top: 10px; background: #10b981; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(16, 185, 129, 0.4); border: 3.5px solid #fff; z-index: 4;
}
.illu-ring { position: absolute; width: 110px; height: 110px; border: 2px dashed rgba(255,255,255,0.15); border-radius: 50%; right: 20px; top: -10px; z-index: 1; }
.illu-dot { position: absolute; width: 8px; height: 8px; background: rgba(255,255,255,0.4); border-radius: 50%; }
.illu-dot.d1 { right: 40px; bottom: 60px; }
.illu-dot.d2 { left: 40px; top: -20px; }

.brand-panel-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; opacity: .8; }
.brand-secure { display: inline-flex; align-items: center; gap: 7px; }

/* --- Formulário (direita) --- */
.login-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--bg);
}
.login-card {
  width: 100%; max-width: 380px;
  background: transparent;
}
.login-card-head { margin-bottom: 28px; }
.login-card-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--text); margin-bottom: 6px; }
.login-card-head p { font-size: 14px; color: var(--text-3); }

/* Inputs com ícone */
.input-icon-wrap { position: relative; display: flex; align-items: center; }
.input-icon-wrap .input-ico {
  position: absolute; left: 13px; color: var(--text-3); pointer-events: none;
}
.input-icon-wrap input {
  padding-left: 42px; height: 48px; font-size: 15px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}
.input-icon-wrap input:focus + .input-ico,
.input-icon-wrap input:focus ~ .input-ico { color: var(--accent); }

.btn-login {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent);
  color: white;
  padding: 15px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.4px;
  transition: var(--t);
  margin-top: 8px;
  box-shadow: 0 6px 18px rgba(220,38,38,.30);
}
.btn-login svg { transition: transform var(--t); }
.btn-login:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(220,38,38,.38); }
.btn-login:hover svg { transform: translateX(3px); }

.login-error { color: var(--accent); font-size: 13px; min-height: 18px; margin: 10px 0; font-weight: 600; }
.login-footer { margin-top: 32px; font-size: 12px; color: var(--text-3); text-align: center; }


/* ===== ERP SHELL ===== */
.erp-shell { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 10px rgba(0,0,0,0.02);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px; border-bottom: 1px solid var(--border); }
.brand-mark-sm { width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent) 0%, #991b1b 100%); box-shadow: 0 4px 12px rgba(220,38,38,0.3); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: white; flex-shrink: 0; }
.sidebar-title { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-group { margin-bottom: 20px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; margin-bottom: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-lg); color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: all var(--t); cursor: pointer; margin-bottom: 2px; border-left: 3px solid transparent; }
.nav-item svg { flex-shrink: 0; stroke: var(--text-3); transition: stroke var(--t); }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item:hover svg { stroke: var(--text); }
.nav-item.active { background: linear-gradient(90deg, var(--accent-l) 0%, transparent 100%); color: var(--accent); border-left-color: var(--accent); }
.nav-item.active svg { stroke: var(--accent); }
.nav-item.danger { color: var(--accent); }
.nav-item.danger svg { stroke: var(--accent); }
.sidebar-footer { padding: 12px 12px; border-top: 1px solid var(--border); }
.user-badge { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-3); }

/* MAIN */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.topbar { height: var(--topbar-h); background: var(--bg-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.02); z-index: 10; }
.page-breadcrumb { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-date { font-size: 13px; font-weight: 500; color: var(--text-3); }
.api-status { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-l); padding: 4px 10px; border-radius: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.green { background: var(--green); animation: pulse 2s infinite; }
.dot.red { background: var(--accent); }
@keyframes pulse { 0%,100%{opacity:1; transform: scale(1)} 50%{opacity:.4; transform: scale(0.85)} }
.page-container { flex: 1; overflow-y: auto; padding: 32px; }

/* ===== BOTÕES ===== */
.btn { padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--t); border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--bg-3); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-4); color: var(--text); }
.btn-success { background: var(--green-l); color: var(--green); border-color: rgba(45,212,160,.3); }
.btn-danger { background: var(--accent-l); color: var(--accent); border-color: rgba(224,49,49,.3); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== CARDS / KPIS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.kpi-label { font-size: 13px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-sub { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.kpi-green .kpi-value { color: var(--green); }
.kpi-red .kpi-value { color: var(--accent); }
.kpi-blue .kpi-value { color: var(--blue); }
.kpi-yellow .kpi-value { color: var(--yellow); }

/* ===== TABELAS ===== */
.table-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.table-title { font-size: 15px; font-weight: 800; color: var(--text); }
.table-actions { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 9px 12px; transition: border var(--t); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-l); }
.search-box input { border: none; background: none; padding: 0; font-size: 13.5px; width: 220px; box-shadow: none; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th { text-align: left; padding: 14px 24px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; background: var(--bg-3); border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 24px; border-bottom: 1px solid var(--border); font-size: 13.5px; transition: background var(--t); }
.data-table tbody tr:hover td { background: var(--bg-3); }
.data-table tbody tr:last-child td { border-bottom: none; }
.badge { display: inline-flex; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-green { background: var(--green-l); color: var(--green); }
.badge-red { background: var(--accent-l); color: var(--accent); }
.badge-yellow { background: var(--yellow-l); color: var(--yellow); }
.badge-blue { background: var(--blue-l); color: var(--blue); }
.badge-purple { background: var(--purple-l); color: var(--purple); }

/* ===== MODAIS ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 500; }
.modal { background: var(--bg-2); border: none; border-radius: 14px; padding: 32px; width: 100%; max-width: 560px; box-shadow: 0 24px 48px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.05); animation: mIn .3s cubic-bezier(0.16, 1, 0.3, 1); max-height: 90vh; overflow-y: auto; }
@keyframes mIn { from{transform:scale(.95) translateY(10px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { color: var(--text-3); font-size: 18px; transition: color var(--t); }
.modal-close:hover { color: var(--accent); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ===== DASHBOARD — HERO ===== */
.dash-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #991b1b 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; position: relative;
}
.dash-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
}
.dash-hero-content { position: relative; z-index: 1; }
.dash-hero-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.dash-hero-value { font-size: 48px; font-weight: 900; color: white; line-height: 1; letter-spacing: -1px; margin-bottom: 12px; }
.dash-hero-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.8); flex-wrap: wrap; }
.dash-hero-badge { background: rgba(255,255,255,0.2); color: white; padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px; }
.dash-hero-sep { color: rgba(255,255,255,0.4); }
.dash-trend { font-weight: 700; }
.trend-up { color: #6ee7b7; }
.trend-down { color: #fca5a5; }
.dash-trend-neutral { color: rgba(255,255,255,0.5); }
.dash-hero-chart { position: relative; z-index: 1; opacity: 0.8; flex-shrink: 0; }
.dash-hero-decor { position: absolute; right: -50px; top: -150px; width: 400px; height: 400px; pointer-events: none; z-index: 0; opacity: 0.6; }
.dash-hero-decor svg { width: 100%; height: 100%; }
.dash-hero-right { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.dash-hero-statblock { background: rgba(255,255,255,0.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); padding: 12px 16px; border-radius: var(--radius); width: 220px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* KPI cards com ícone */
.kpi-icon { font-size: 20px; margin-bottom: 8px; }

/* ===== DASHBOARD — LAYOUT ===== */
.section-title { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.charts-row { display: flex; gap: 16px; margin-bottom: 20px; }
.chart-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; flex: 1; min-width: 0; }
.chart-title { font-size: 13px; font-weight: 700; margin-bottom: 16px; color: var(--text); }

/* Gráfico de barras melhorado */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; cursor: default; }
.bar-val { font-size: 9px; color: var(--text-3); margin-bottom: 2px; white-space: nowrap; }
.bar {
  width: 100%; background: var(--accent-l); border: 1px solid rgba(220,38,38,.15);
  border-radius: 5px 5px 0 0; transition: height .5s cubic-bezier(.4,0,.2,1), background .15s; min-height: 4px;
}
.bar:hover { background: rgba(220,38,38,.25); }
.bar-today { background: var(--accent) !important; border-color: var(--accent) !important; }
.bar-label { font-size: 10px; color: var(--text-3); }
.bar-label-today { color: var(--accent) !important; font-weight: 700; }

/* Top produtos */
.top-list { display: flex; flex-direction: column; gap: 12px; }
.top-item { display: flex; align-items: center; gap: 10px; }
.top-rank { width: 22px; height: 22px; border-radius: 5px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-3); flex-shrink: 0; }
.top-name { flex: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.top-bar { width: 100%; height: 3px; background: var(--bg-4); border-radius: 2px; overflow: hidden; }
.top-val { font-size: 12px; font-weight: 700; color: var(--green); flex-shrink: 0; }

/* Formas de pagamento */
.pay-chips { display: flex; flex-direction: column; gap: 12px; }
.pay-chip { display: flex; align-items: center; gap: 10px; }
.pay-name { width: 72px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.pay-bar-track { flex: 1; height: 7px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.pay-bar-fill { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.pay-val { font-size: 12px; font-weight: 700; width: 72px; text-align: right; }

/* ===== ESTOQUE MINIMO ALERT ===== */
.alert-card { background: var(--yellow-l); border: 1px solid rgba(252,211,77,.3); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.alert-icon { font-size: 18px; }
.alert-text { font-size: 13px; font-weight: 600; color: var(--yellow); }

/* ===== PAGINAÇÃO ===== */
.pagination { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--border); }
.page-btn { width: 28px; height: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-3); color: var(--text-2); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: var(--t); cursor: pointer; }
.page-btn:hover, .page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-info { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--text-3); font-size: 13px; gap: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; font-size: 13px; font-weight: 600; z-index: 9999; animation: mIn .2s ease; box-shadow: var(--shadow); max-width: 320px; }
.toast.success { border-left: 3px solid var(--green); color: var(--green); }
.toast.error { border-left: 3px solid var(--accent); color: var(--accent); }
.toast.info { border-left: 3px solid var(--blue); color: var(--blue); }

/* Empty state */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; gap: 10px; color: var(--text-3); }
.empty svg { stroke: var(--text-3); opacity: .3; }
.empty p { font-size: 14px; font-weight: 600; }

/* Financeiro cards */
.fin-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-title, .nav-label, .nav-item span, .user-name, .user-role, .sidebar-footer .user-badge > div { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .charts-row { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* Sidebar loja CNPJ */
.sidebar-loja-cnpj { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: .3px; font-weight: 500; }

/* Gráfico por hora */
.hour-chart { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-bottom: 20px; position: relative; }
.hour-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; height: 100%; position: relative; }
.hour-bar-inner { width: 100%; border-radius: 3px 3px 0 0; min-height: 3px; transition: height .4s cubic-bezier(.4,0,.2,1); }
.hour-label { position: absolute; bottom: -18px; font-size: 9px; color: var(--text-3); white-space: nowrap; }

/* Badge purple já existe — garantindo */
.badge-purple { background: var(--purple, #7048e8)22; color: var(--purple, #7048e8); }

/* KPI sub links */
.kpi-sub span { display: inline; }

/* Ícones SVG inline (substituem emojis) */
.ico { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.ico-sm { display: inline-block; vertical-align: -1px; }
.ct-flex { display: inline-flex; align-items: center; gap: 7px; }
.chart-title .ct-flex .ico { color: var(--accent); }
.kpi-icon .ico { width: 22px; height: 22px; }
.alert-icon .ico { color: var(--accent); width: 20px; height: 20px; }

/* Bolinha de cor da forma de pagamento */
.pay-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pay-name { display: flex; align-items: center; }

/* Ranking medalhado (top produtos) */
.top-rank { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.top-rank-1 { background: linear-gradient(135deg, #ffd43b, #f59f00); color: #5c3c00; }
.top-rank-2 { background: linear-gradient(135deg, #ced4da, #adb5bd); color: #343a40; }
.top-rank-3 { background: linear-gradient(135deg, #ffa94d, #e8590c); color: #5c2400; }
.top-rank-n { background: var(--bg-3); color: var(--text-3); }
