/* ==========================================================================
   Integra SYS Industrial — Design System v2 (Integra Code · Glass Premium)
   Mobile-first · 100% responsivo
   ========================================================================== */
:root {
  --blue: #2E7CF6; --blue-600: #1D4ED8; --blue-700: #1E40AF; --blue-50: #EFF6FF;
  --purple: #7C3FE4; --teal: #10D9A3; --pink: #AB0E86; --navy: #0B1533; --navy-2: #13204A;
  --text: #0F172A; --text-2: #334155; --muted: #64748B; --line: #E6ECF5; --line-2: #EEF2F8;
  --bg: #F3F6FC; --card: #FFFFFF; --glass: rgba(255,255,255,.78);
  --ok: #059669; --ok-bg: #ECFDF5; --warn: #D97706; --warn-bg: #FFFBEB; --err: #DC2626; --err-bg: #FEF2F2;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05); --sh-2: 0 4px 16px -2px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.04);
  --sh-3: 0 20px 48px -12px rgba(16,24,40,.22); --ring: 0 0 0 4px rgba(46,124,246,.16);
  --grad-brand: linear-gradient(135deg, #2E7CF6 0%, #7C3FE4 55%, #10D9A3 120%);
  --grad-pedidos: linear-gradient(135deg, #C0158F 0%, #7C3FE4 100%);
  --grad-erp: linear-gradient(135deg, #1D4ED8 0%, #0891B2 100%);
  --side-w: 272px; --head-h: 64px; --gap: 1rem;
  --font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (min-width: 1280px) { :root { --gap: 1.25rem; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); font-size: 14px; line-height: 1.5; background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--blue-600); }
h1, h2, h3, h4 { letter-spacing: -.015em; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(46,124,246,.18); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- Fundo ---------- */
.app-body::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(1200px 600px at 110% -10%, rgba(124,63,228,.10), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(16,217,163,.10), transparent 60%),
              linear-gradient(180deg, #F6F8FD 0%, #EEF3FB 100%); }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; background: #0B1533; }
.login-wrap { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.login-hero { position: relative; overflow: hidden; color: #fff; padding: 2rem 1.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: radial-gradient(800px 400px at 0% 0%, rgba(46,124,246,.55), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(171,14,134,.45), transparent 60%), #0B1533; }
.login-hero::after { content: ""; position: absolute; inset: 0; background: url('/static/img/bg-wave-dots.png') center/cover; opacity: .10; mix-blend-mode: screen; pointer-events: none; }
.login-hero > * { position: relative; z-index: 1; }
.login-hero .brand { display: flex; align-items: center; gap: .75rem; }
.login-hero .brand img { height: 44px; background: #fff; border-radius: 12px; padding: 4px 8px; }
.login-hero h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 .75rem; font-weight: 800; }
.login-hero h1 span { background: linear-gradient(90deg, #7DD3FC, #C4B5FD, #6EE7B7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: #C7D2FE; max-width: 520px; margin: 0; }
.login-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; max-width: 560px; }
.login-feats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: .75rem .9rem; font-size: .82rem; color: #E0E7FF; display: flex; gap: .55rem; align-items: center; backdrop-filter: blur(6px); }
.login-feats i { color: #6EE7B7; }
.login-client { display: inline-flex; align-items: center; gap: .6rem; background: #fff; color: var(--navy); border-radius: 999px; padding: .4rem .9rem .4rem .45rem; font-weight: 700; font-size: .8rem; width: max-content; }
.login-client img { height: 30px; }
.login-panel { background: #fff; display: grid; place-items: center; padding: 2rem 1.25rem; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { margin: 0; font-size: 1.6rem; color: var(--navy); }
.login-sub { color: var(--muted); margin: .35rem 0 1.5rem; }
.login-form { display: grid; gap: 1rem; }
.login-error { background: var(--err-bg); color: var(--err); border: 1px solid #FECACA; padding: .7rem .9rem; border-radius: var(--r); margin-bottom: 1rem; font-weight: 600; }
.login-foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 1.5rem; }
.pwd-wrap { position: relative; } .pwd-wrap .input { padding-right: 2.75rem; }
.pwd-wrap button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: .5rem; }
@media (min-width: 960px) { .login-wrap { grid-template-columns: 1.15fr 1fr; } .login-hero { padding: 3rem; } .login-panel { padding: 3rem; } }
@media (max-width: 959px) { .login-feats { display: none; } }

/* ==========================================================================
   SHELL
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-sidebar { width: var(--side-w); position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0B1533 0%, #101D45 100%); color: #CBD5E1; transition: transform .28s cubic-bezier(.4,0,.2,1); box-shadow: 8px 0 32px rgba(11,21,51,.18); }
.sidebar-head { padding: 1rem 1.1rem; display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid rgba(255,255,255,.07); min-height: var(--head-h); }
.sidebar-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; flex: 1; min-width: 0; }
.sidebar-brand .logo { width: 38px; height: 38px; border-radius: 11px; background: #fff; display: grid; place-items: center; padding: 3px; flex-shrink: 0; }
.sidebar-brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand b { display: block; font-size: 1rem; line-height: 1.1; font-weight: 800; }
.sidebar-brand small { display: block; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: #93C5FD; font-weight: 700; }
.sidebar-close { display: none; border: 0; background: rgba(255,255,255,.08); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem 1rem; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.nav-front { margin: 1.05rem .4rem .4rem; display: flex; align-items: center; gap: .5rem; font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #64748B; }
.nav-front .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nav-front.pedidos { color: #F0ABFC; } .nav-front.erp { color: #93C5FD; } .nav-front.fiscal { color: #6EE7B7; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 10px; color: #CBD5E1; text-decoration: none; font-weight: 600; font-size: .86rem; margin: 2px 0; position: relative; transition: background .15s, color .15s; }
.nav-item i { width: 18px; text-align: center; color: #7C8DB5; font-size: .95rem; transition: color .15s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; } .nav-item:hover i { color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(46,124,246,.35), rgba(124,63,228,.18)); color: #fff; box-shadow: inset 0 0 0 1px rgba(147,197,253,.18); }
.nav-item.active i { color: #93C5FD; }
.nav-item.active::before { content: ""; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad-brand); }
.nav-badge { margin-left: auto; background: #EF4444; color: #fff; font-size: .66rem; border-radius: 999px; padding: .05rem .45rem; font-weight: 800; }
.sidebar-foot { padding: .85rem; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: .6rem; }
.sidebar-client { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; background: rgba(255,255,255,.96); border-radius: 12px; }
.sidebar-client img { height: 30px; width: auto; }
.sidebar-client b { display: block; font-size: .8rem; color: var(--navy); } .sidebar-client small { color: var(--muted); font-size: .7rem; }
.sidebar-logout { border: 0; background: rgba(239,68,68,.12); color: #FCA5A5; text-align: left; padding: .55rem .75rem; font: inherit; font-weight: 700; cursor: pointer; border-radius: 10px; display: flex; gap: .5rem; align-items: center; }
.sidebar-logout:hover { background: rgba(239,68,68,.22); color: #fff; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(11,21,51,.5); backdrop-filter: blur(2px); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }

.app-content { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.global-header { position: sticky; top: 0; z-index: 40; height: var(--head-h); display: flex; align-items: center; gap: .85rem; padding: 0 1.5rem;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.sidebar-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 40px; height: 40px; cursor: pointer; color: var(--text-2); flex-shrink: 0; }
.header-title { min-width: 0; flex: 1; }
.header-title h1 { margin: 0; font-size: 1.12rem; color: var(--navy); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-title p { margin: 0; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search-wrap { position: relative; width: min(340px, 30vw); }
.global-search-wrap i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.global-search-wrap input { width: 100%; height: 40px; padding: 0 3.2rem 0 2.3rem; border: 1px solid var(--line); border-radius: 11px; background: #F8FAFD; font: inherit; }
.global-search-wrap input:focus { outline: 0; box-shadow: var(--ring); border-color: var(--blue); background: #fff; }
.global-search-wrap kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font: 600 .65rem var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: .1rem .35rem; background: #fff; }
.header-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.global-user { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.global-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .78rem; flex-shrink: 0; }
.global-user-info span { display: block; font-weight: 700; font-size: .8rem; line-height: 1.1; } .global-user-info small { color: var(--muted); font-size: .7rem; text-transform: capitalize; }
.app-main { padding: 1.5rem; flex: 1; width: 100%; max-width: 1680px; margin: 0 auto; }
.loading-screen { display: grid; place-items: center; min-height: 50vh; font-size: 1.8rem; color: var(--blue); }

/* Mobile bottom nav */
.bottom-nav { display: none; }
@media (max-width: 1080px) {
  .app-sidebar { transform: translateX(-104%); }
  body.sidebar-open .app-sidebar { transform: none; } body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .sidebar-close { display: inline-grid; place-items: center; }
  .app-content { margin-left: 0; } .sidebar-toggle { display: inline-grid; place-items: center; }
  .global-search-wrap { display: none; } .global-user-info { display: none; } .global-user { padding: .15rem; }
  .app-main { padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
  .global-header { padding: 0 1rem; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(255,255,255,.96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(16,24,40,.06); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-decoration: none; color: var(--muted); font-size: .64rem; font-weight: 700; padding: .3rem 0; border-radius: 10px; }
  .bottom-nav a i { font-size: 1.1rem; }
  .bottom-nav a.active { color: var(--blue-600); }
  .bottom-nav a.fab i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--grad-pedidos); color: #fff; margin-top: -1.1rem; box-shadow: 0 8px 20px rgba(171,14,134,.35); }
  .hide-mobile { display: none !important; }
}
@media (max-width: 520px) { .app-main { padding-left: .75rem; padding-right: .75rem; } .header-title p { display: none; } }

/* ==========================================================================
   COMPONENTES
   ========================================================================== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); min-width: 0; }
.card-pad { padding: 1.1rem 1.25rem; }
@media (max-width: 520px) { .card-pad { padding: .9rem 1rem; } }
.card-title { font-size: .95rem; font-weight: 800; color: var(--navy); margin: 0; display: flex; align-items: center; gap: .55rem; }
.card-title i { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--blue-50); color: var(--blue-600); font-size: .82rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-foot { padding: .8rem 1.25rem; border-top: 1px solid var(--line-2); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.section-gap > * + * { margin-top: var(--gap); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: var(--gap); }
.page-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.page-head p { margin: .15rem 0 0; color: var(--muted); }

/* Grids */
.grid { display: grid; gap: var(--gap); }
.grid-kpi { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .grid-kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.two-col, .split, .three-col { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .two-col { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); } }
.form-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.form-grid .span-2 { grid-column: span 2; } .form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } .form-grid.one { grid-template-columns: 1fr; } }

/* KPI */
.kpi { padding: 1rem 1.1rem; display: flex; gap: .85rem; align-items: flex-start; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.kpi-label { font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font-size: 1.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; word-break: break-word; }
.kpi-sub { font-size: .74rem; color: var(--muted); }
@media (max-width: 520px) { .kpi { flex-direction: column; gap: .5rem; padding: .85rem; } .kpi-icon { width: 36px; height: 36px; border-radius: 10px; } .kpi-value { font-size: 1.12rem; } }
.t-blue { background: #EFF6FF; color: #2563EB; } .t-green { background: #ECFDF5; color: #059669; } .t-purple { background: #F5F3FF; color: #7C3AED; }
.t-orange { background: #FFF7ED; color: #EA580C; } .t-red { background: #FEF2F2; color: #DC2626; } .t-cyan { background: #ECFEFF; color: #0891B2; }
.t-pink { background: #FDF2F8; color: #BE185D; } .t-gray { background: #F1F5F9; color: #475569; } .t-amber { background: #FFFBEB; color: #B45309; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 11px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; text-decoration: none; transition: all .15s; white-space: nowrap; user-select: none; }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 .75rem; font-size: .78rem; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 1.4rem; font-size: .95rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(180deg, #2F6FF0, #1D4ED8); color: #fff; box-shadow: 0 6px 16px -4px rgba(29,78,216,.45), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-brand { background: var(--grad-pedidos); color: #fff; box-shadow: 0 8px 20px -6px rgba(171,14,134,.5); } .btn-brand:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-success { background: linear-gradient(180deg, #10B981, #059669); color: #fff; box-shadow: 0 6px 16px -6px rgba(5,150,105,.5); }
.btn-danger { background: linear-gradient(180deg, #EF4444, #DC2626); color: #fff; }
.btn-ghost { background: #fff; color: var(--text-2); border-color: var(--line); box-shadow: var(--sh-1); } .btn-ghost:hover { background: #F8FAFD; border-color: #D5DEEB; }
.btn-soft { background: var(--blue-50); color: var(--blue-600); } .btn-soft:hover { background: #DBEAFE; }
.btn-icon { width: 40px; padding: 0; } .btn-sm.btn-icon { width: 32px; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.btn-group .btn { border-radius: 0; border: 0; box-shadow: none; height: 36px; } .btn-group .btn + .btn { border-left: 1px solid var(--line); } .btn-group .btn.active { background: var(--blue-50); color: var(--blue-600); }

/* Inputs */
.input, .select, textarea.input { width: 100%; height: 40px; padding: 0 .8rem; border: 1px solid #D5DEEB; border-radius: 10px; font: inherit; font-size: .88rem; background: #fff; color: var(--text); transition: border .15s, box-shadow .15s; }
textarea.input { height: auto; padding: .6rem .8rem; resize: vertical; }
.input:focus, .select:focus { outline: 0; border-color: var(--blue); box-shadow: var(--ring); }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; }
.input-sm { height: 34px; font-size: .82rem; }
.field { display: grid; gap: .3rem; min-width: 0; } .field > span { font-size: .72rem; font-weight: 700; color: #475569; letter-spacing: .01em; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-600); }
.input-icon { position: relative; } .input-icon i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; } .input-icon .input { padding-left: 2.2rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toolbar > .grow { flex: 1 1 220px; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line-2); align-items: center; }
.filters > * { flex: 1 1 160px; min-width: 0; } .filters > .grow { flex: 2 1 240px; } .filters > .auto { flex: 0 0 auto; }
@media (max-width: 520px) { .filters { padding: .75rem 1rem; } .filters > * { flex: 1 1 100%; } }

/* Tabelas → cards no mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.tbl th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: #FAFBFE; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; } .tbl tbody tr:hover { background: #F8FAFF; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .actions { white-space: nowrap; text-align: right; }
@media (max-width: 760px) {
  table.tbl.responsive thead { display: none; }
  table.tbl.responsive, .tbl.responsive tbody, .tbl.responsive tr, .tbl.responsive td { display: block; width: 100%; }
  .tbl.responsive tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; }
  .tbl.responsive td { padding: 0; border: 0; text-align: left !important; min-width: 0; }
  .tbl.responsive td[data-l]::before { content: attr(data-l); display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
  .tbl.responsive td.full, .tbl.responsive td.main { grid-column: 1 / -1; }
  .tbl.responsive td.main { font-size: .92rem; }
  .tbl.responsive td.actions { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-start; }
  .tbl.responsive td:empty { display: none; }
}
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8em; }
.muted { color: var(--muted); } .small { font-size: .76rem; } .strong { font-weight: 800; } .ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; background: var(--bb, #F1F5F9); color: var(--bc, #334155); line-height: 1.4; }
.badge.outline { background: #fff; border: 1px solid var(--line); }
.dot-sm { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Chips / tabs */
.chip-bar { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; height: 34px; padding: 0 .85rem; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; color: var(--text-2); white-space: nowrap; flex-shrink: 0; transition: all .15s; }
.chip b { background: #F1F5F9; border-radius: 999px; padding: 0 .45rem; font-size: .68rem; }
.chip:hover { border-color: #C7D2E3; }
.chip.active { border-color: var(--cc, var(--blue)); color: var(--cc, var(--blue-600)); background: color-mix(in srgb, var(--cc, #2E7CF6) 9%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc, #2E7CF6) 12%, transparent); }
.tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--line); padding: 0 .75rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: .9rem .9rem; border: 0; background: none; font: inherit; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: .45rem; align-items: center; margin-bottom: -1px; }
.tab:hover { color: var(--text-2); } .tab.active { color: var(--blue-600); border-color: var(--blue-600); }
.tab .badge { font-size: .64rem; padding: .05rem .45rem; }
.seg { display: inline-flex; background: #EEF2F8; padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .8rem; color: var(--muted); padding: .45rem .85rem; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: var(--sh-1); }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2.2rem; color: #CBD5E1; display: block; margin-bottom: .6rem; }
.empty b { display: block; color: var(--text-2); font-size: .95rem; margin-bottom: .2rem; }
.stat-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .85rem; } .stat-line:last-child { border: 0; }
.stat-line > :last-child { text-align: right; }
.bar { height: 8px; border-radius: 999px; background: #EEF2F8; overflow: hidden; } .bar > span { display: block; height: 100%; border-radius: inherit; background: var(--grad-brand); }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; padding: .75rem 1.25rem; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--r); border: 1px solid; font-size: .85rem; }
.alert i { margin-top: .15rem; } .alert-warn { background: var(--warn-bg); border-color: #FDE68A; color: #92400E; } .alert-info { background: var(--blue-50); border-color: #BFDBFE; color: #1E3A8A; } .alert-ok { background: var(--ok-bg); border-color: #A7F3D0; color: #065F46; } .alert-err { background: var(--err-bg); border-color: #FECACA; color: #991B1B; }

/* Hero das frentes */
.hero-fronts { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-fronts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.front-card { padding: 1.35rem 1.4rem; border-radius: var(--r-xl); color: #fff; position: relative; overflow: hidden; text-decoration: none; display: block; box-shadow: var(--sh-3); transition: transform .2s; isolation: isolate; }
.front-card:hover { transform: translateY(-3px); }
.front-card .tag { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.front-card h3 { margin: .2rem 0 .2rem; font-size: 1.2rem; font-weight: 800; }
.front-card p { margin: 0; opacity: .85; font-size: .82rem; }
.front-card .fc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.1rem; }
.front-card .fc-row div { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: .65rem .75rem; min-width: 0; }
.front-card .fc-row b { display: block; font-size: 1.2rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.front-card .fc-row span { font-size: .66rem; opacity: .9; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.front-pedidos { background: var(--grad-pedidos); } .front-erp { background: var(--grad-erp); }
.front-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); z-index: -1; }
.front-card::after { content: ""; position: absolute; right: 40px; bottom: -80px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.07); z-index: -1; }
@media (max-width: 520px) { .front-card .fc-row b { font-size: .95rem; } .front-card .fc-row { gap: .4rem; } .front-card .fc-row div { padding: .5rem; } }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.quick a, .quick button { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; padding: .85rem; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text-2); font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; transition: all .15s; text-align: left; }
.quick a:hover, .quick button:hover { border-color: #BFD3F7; box-shadow: var(--sh-2); transform: translateY(-1px); }
.quick i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: .9rem; }

/* Workflow */
.flow { display: flex; align-items: flex-start; overflow-x: auto; padding: .35rem 0 .25rem; scrollbar-width: none; }
.flow::-webkit-scrollbar { display: none; }
.flow-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 92px; flex: 1; position: relative; font-size: .7rem; font-weight: 700; color: #94A3B8; text-align: center; }
.flow-step .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #F1F5F9; color: #94A3B8; border: 2px solid #E2E8F0; z-index: 1; transition: all .2s; }
.flow-step.done .dot { background: var(--sc); color: #fff; border-color: var(--sc); } .flow-step.done { color: var(--text-2); }
.flow-step.current .dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--sc) 22%, transparent); transform: scale(1.06); }
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: #E2E8F0; }
.flow-step.done:not(:last-child)::after { background: var(--sc); }
.fase-tag { font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }

/* ==========================================================================
   NOVO PEDIDO (grade Aquarela) — responsivo
   ========================================================================== */
.pedido-layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1280px) { .pedido-layout { grid-template-columns: minmax(0, 1fr) 340px; } .resumo-pedido { position: sticky; top: calc(var(--head-h) + 1rem); } }
.stepper { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--gap); }
.stepper::-webkit-scrollbar { display: none; }
.stepper button { flex: 1 0 auto; display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: .6rem .9rem; font: inherit; font-weight: 700; font-size: .82rem; color: var(--muted); cursor: pointer; }
.stepper button b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #EEF2F8; font-size: .72rem; }
.stepper button.active { border-color: #E9A6DA; color: var(--pink); background: #FDF2F8; } .stepper button.active b { background: var(--pink); color: #fff; }
.stepper button.done b { background: var(--ok); color: #fff; }
.grade-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .75rem 0; position: sticky; top: var(--head-h); z-index: 20; background: linear-gradient(180deg, #F3F6FC 80%, rgba(243,246,252,0)); }
.grade-toolbar .input-icon { flex: 1 1 200px; }
.sec-nav { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .6rem; scrollbar-width: none; }
.sec-nav::-webkit-scrollbar { display: none; }
.sec-pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; height: 32px; padding: 0 .8rem; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--text-2); flex-shrink: 0; }
.sec-pill.has { border-color: #E9A6DA; color: var(--pink); background: #FDF2F8; }
.grade-sec { margin-bottom: .85rem; overflow: hidden; }
.grade-sec-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; cursor: pointer; gap: .75rem; user-select: none; }
.grade-sec-head h3 { margin: 0; font-size: .88rem; color: var(--navy); display: flex; align-items: center; gap: .55rem; min-width: 0; }
.grade-sec-head h3 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grade-sec-head .chev { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #F1F5F9; color: var(--muted); font-size: .7rem; flex-shrink: 0; transition: transform .2s; }
.grade-sec.open .grade-sec-head .chev { transform: rotate(90deg); background: #FDF2F8; color: var(--pink); }
.grade-sec-head .gs-tot { font-size: .82rem; font-weight: 800; color: var(--pink); white-space: nowrap; }
.grade-sec.open .grade-sec-head { border-bottom: 1px solid var(--line-2); background: linear-gradient(90deg, #FDF2F8, #F5F3FF 60%, #fff); }
.grade-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grade { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .8rem; }
.grade th { background: #FAFBFE; padding: .5rem .35rem; font-size: .66rem; color: #475569; border-bottom: 1px solid var(--line); text-align: center; line-height: 1.25; min-width: 86px; font-weight: 800; }
.grade th small { display: block; font-weight: 600; color: #94A3B8; font-size: .6rem; } .grade th .gp { display: block; color: var(--blue-600); font-size: .72rem; margin-top: 2px; }
.grade th.cor-h, .grade td.cor { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; min-width: 150px; box-shadow: 1px 0 0 var(--line-2); }
.grade th.cor-h { background: #FAFBFE; padding-left: 1rem; }
.grade td { border-bottom: 1px solid var(--line-2); padding: .25rem .3rem; text-align: center; }
.grade td.cor { font-weight: 700; white-space: nowrap; padding-left: 1rem; font-size: .78rem; }
.grade td.cor small { color: var(--muted); font-weight: 800; margin-right: .35rem; font-size: .66rem; }
.grade input.q { width: 100%; max-width: 76px; height: 34px; padding: 0 .3rem; border: 1px solid #DCE3EE; border-radius: 9px; text-align: center; font: inherit; font-weight: 800; font-size: .86rem; background: #fff; }
.grade input.q:focus { outline: 0; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(171,14,134,.15); }
.grade input.q.filled { background: #FDF2F8; border-color: #F0ABFC; color: #86198F; }
.grade .stk { display: block; font-size: .58rem; color: #94A3B8; margin-top: 2px; white-space: nowrap; } .grade .stk.low { color: var(--err); font-weight: 800; }
.grade td.na { background: repeating-linear-gradient(45deg, #FAFBFD, #FAFBFD 5px, #F3F5F9 5px, #F3F5F9 10px); }
/* Mobile: cada cor vira um card com as variações */
.grade-cards { display: none; }
@media (max-width: 760px) {
  .grade-scroll { display: none; } .grade-cards { display: grid; gap: .5rem; padding: .75rem; }
  .gc { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .75rem; background: #fff; }
  .gc.has { border-color: #F0ABFC; background: #FFFBFE; }
  .gc-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .84rem; margin-bottom: .5rem; gap: .5rem; }
  .gc-head small { color: var(--muted); font-weight: 800; font-size: .68rem; }
  .gc-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .45rem; }
  .gc-var { display: grid; gap: .2rem; font-size: .64rem; color: var(--muted); font-weight: 700; }
  .gc-var input.q { width: 100%; max-width: none; height: 42px; font-size: 1rem; border: 1px solid #DCE3EE; border-radius: 10px; text-align: center; font-weight: 800; }
  .gc-var input.q.filled { background: #FDF2F8; border-color: #F0ABFC; color: #86198F; }
  .gc-var .stk { font-size: .6rem; } .gc-var .stk.low { color: var(--err); }
}
/* Barra fixa de total no mobile */
.pedido-mbar { display: none; }
@media (max-width: 1279px) {
  .pedido-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: #0B1533; color: #fff; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); align-items: center; gap: .75rem; box-shadow: 0 -10px 30px rgba(11,21,51,.25); }
  .pedido-mbar .tot { flex: 1; min-width: 0; } .pedido-mbar .tot small { display: block; color: #93C5FD; font-size: .68rem; font-weight: 700; } .pedido-mbar .tot b { font-size: 1.15rem; }
  body.has-mbar .bottom-nav { display: none; } body.has-mbar .app-main { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  .resumo-pedido .resumo-actions { display: none; }
}
.totais .grand { font-size: 1.4rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.cliente-pick { display: grid; gap: .5rem; position: relative; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); max-height: 280px; overflow: auto; margin-top: 4px; }
.ac-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .65rem .85rem; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.ac-list button:hover { background: #F8FAFF; } .ac-list small { display: block; color: var(--muted); }

/* Kanban produção */
.kanban { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(260px, 1fr)); overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.kanban > .card { scroll-snap-align: start; }
@media (max-width: 1080px) { .kanban { grid-template-columns: repeat(4, 84vw); } }
.k-col-head { border-top: 4px solid var(--kc); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.k-card { border: 1px solid var(--line); border-radius: 14px; padding: .8rem; cursor: pointer; background: #fff; transition: all .15s; }
.k-card:hover { border-color: #C7D2E3; box-shadow: var(--sh-2); }

/* Modal / drawer */
.modal-back { position: fixed; inset: 0; background: rgba(11,21,51,.5); backdrop-filter: blur(3px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: var(--sh-3); animation: pop .2s cubic-bezier(.2,.9,.3,1.2); }
.modal.lg { max-width: 920px; } .modal.xl { max-width: 1200px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.modal-head h3 { margin: 0; font-size: 1.02rem; color: var(--navy); font-weight: 800; }
.modal-body { padding: 1.25rem; overflow: auto; flex: 1; } .modal-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .modal-back { padding: 0; align-items: flex-end; }
  .modal, .modal.lg, .modal.xl { max-width: none; max-height: 94dvh; border-radius: 22px 22px 0 0; animation: sheet .25s cubic-bezier(.2,.9,.3,1); }
  .modal-foot { padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); } .modal-foot .btn { flex: 1; }
}
.toast-root { position: fixed; right: 1rem; bottom: 1rem; z-index: 95; display: grid; gap: .5rem; max-width: calc(100vw - 2rem); }
@media (max-width: 1080px) { .toast-root { left: 1rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }
.toast { background: var(--navy); color: #fff; padding: .8rem 1rem; border-radius: 14px; box-shadow: var(--sh-3); font-weight: 600; max-width: 440px; display: flex; gap: .6rem; align-items: flex-start; animation: slide .2s; }
.toast.ok { background: #065F46; } .toast.err { background: #991B1B; }
@keyframes fade { from { opacity: 0 } } @keyframes slide { from { transform: translateY(10px); opacity: 0 } }
@keyframes pop { from { transform: scale(.96); opacity: 0 } } @keyframes sheet { from { transform: translateY(100%) } }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: .75rem; padding: .55rem 0; font-size: .82rem; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 1.3rem; bottom: -.4rem; width: 2px; background: var(--line); }
.timeline .tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: .3rem; flex-shrink: 0; box-shadow: 0 0 0 3px #fff; z-index: 1; }
.dropzone { border: 2px dashed #C7D2E3; border-radius: 16px; padding: 1.75rem 1rem; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; background: #FAFBFE; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-50); color: var(--blue-600); }
.dropzone i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.company-tabs { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; } .company-tabs::-webkit-scrollbar { display: none; }
.company-tab { flex: 0 0 auto; min-width: 200px; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: .75rem .9rem; cursor: pointer; text-align: left; font: inherit; transition: all .15s; }
.company-tab.active { border-color: var(--ec); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ec) 15%, transparent); }
.company-tab b { display: flex; align-items: center; gap: .45rem; font-size: .88rem; } .company-tab small { color: var(--muted); display: block; font-size: .72rem; margin-top: .2rem; }
.company-tab .mini { display: flex; gap: .75rem; margin-top: .5rem; font-size: .72rem; color: var(--text-2); font-weight: 700; }
.kbd-hint { font-size: .72rem; color: var(--muted); }
pre.code { margin: 0; font-size: .76rem; overflow: auto; background: #0B1533; color: #C7D2FE; padding: 1rem; border-radius: 12px; line-height: 1.55; }

/* ==========================================================================
   IMPRESSÃO — pedidos, etiquetas, DANFE
   ========================================================================== */
#print-root { display: none; }
@media print {
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; height: auto !important; overflow: visible !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; position: static; width: auto; }
  .app-body::before { display: none; }
  #print-root .labels { box-shadow: none; }
  #print-root .label { border: none !important; }
  #print-root .labels-rolo { display: block; }
  #print-root .labels-rolo .label { page-break-after: always; break-after: page; margin: 0; }
  #print-root .labels-rolo .label:last-child { page-break-after: auto; break-after: auto; }
  #print-root .labels-folha .label:nth-child(24n) { break-after: page; }
  #print-root .labels-folha .label:nth-child(24n+1), #print-root .labels-folha .label:nth-child(24n+2), #print-root .labels-folha .label:nth-child(24n+3) { break-before: auto; }
}
.doc { font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 11px; background: #fff; }
.doc h1 { font-size: 16px; margin: 0; } .doc h2 { font-size: 12px; margin: 10px 0 4px; text-transform: uppercase; border-bottom: 1.5px solid #000; padding-bottom: 2px; }
.doc table { width: 100%; border-collapse: collapse; } .doc th, .doc td { border: 1px solid #555; padding: 3px 5px; font-size: 10px; text-align: left; } .doc th { background: #EEE; }
.doc .r { text-align: right; } .doc .c { text-align: center; }
.doc .hdr { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 6px; }
.doc .hdr img { height: 46px; } .doc .kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 10px; } .doc .kv div span { display: block; font-size: 8px; text-transform: uppercase; color: #444; }
.doc .box { border: 1px solid #000; padding: 4px 6px; } .doc .lbl { font-size: 7.5px; text-transform: uppercase; display: block; color: #333; }
.doc .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; } .doc .sign div { border-top: 1px solid #000; text-align: center; padding-top: 3px; }
.doc .check-box { width: 12px; height: 12px; border: 1px solid #000; display: inline-block; }
.doc-page { page-break-after: always; } .doc-page:last-child { page-break-after: auto; }
/* Etiquetas */
.labels { display: grid; gap: 0; justify-content: start; }
.label { box-sizing: border-box; border: 1px dashed #BBB; padding: 1.5mm 2.5mm; overflow: hidden; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; display: flex; flex-direction: column; justify-content: space-between; font-family: Arial, sans-serif; color: #000; background: #fff; page-break-inside: avoid; }
.label .l-top { display: flex; justify-content: space-between; gap: 2mm; align-items: flex-start; }
.label .l-brand { font-weight: 800; font-size: 7pt; letter-spacing: .05em; }
.label .l-sku { font-weight: 800; font-size: 11pt; line-height: 1; }
.label .l-desc { font-size: 7pt; line-height: 1.15; margin-top: .5mm; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.label .l-sku, .label .l-cor { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .l-top > div:first-child { min-width: 0; overflow: hidden; }
.label .l-cor { font-weight: 800; font-size: 9pt; }
.label .l-meta { font-size: 6.5pt; display: flex; justify-content: space-between; gap: 2mm; }
.label .l-bc { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.label svg { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.label.sz-100x50 { width: 100mm; height: 50mm; } .label.sz-60x40 { width: 60mm; height: 40mm; } .label.sz-50x30 { width: 50mm; height: 30mm; }
.label.sz-100x150 { width: 100mm; height: 150mm; } .label.sz-a4-3x8 { width: 70mm; height: 37mm; border-color: transparent; }
.label.vol { font-size: 10pt; } .label.vol .v-big { font-size: 30pt; font-weight: 800; text-align: center; line-height: 1; } .label.vol .v-dest { font-size: 11pt; font-weight: 800; }
.print-preview { background: #E5E9F0; padding: 1rem; border-radius: 14px; overflow: auto; max-height: 60vh; }
.print-preview .doc, .print-preview .labels { background: #fff; margin: 0 auto; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.print-preview .doc { padding: 10mm; max-width: 210mm; }

/* ---------- v2.1 complementos ---------- */
.tbl tr.row-hl td { background: #FFFBEB; }
.dre-tbl td, .dre-tbl th { white-space: nowrap; padding: .5rem .7rem; font-size: .8rem; }
.dre-tbl td:first-child, .dre-tbl th:first-child { position: sticky; left: 0; background: inherit; z-index: 1; }
.dre-tbl tbody tr { background: #fff; }
nav.tabs.card { padding: 0 .5rem; overflow-x: auto; }
nav.tabs a.tab { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.company-tab .dot-sm { display: inline-block; }
button.card.kpi { width: 100%; }
@media (max-width: 760px) { .tbl.responsive tfoot { display: block; } .tbl.responsive tfoot tr { display: flex; justify-content: space-between; } .tbl.responsive tfoot td[colspan] { display: none; } }
