/* MakerSystem · design system (VENDE+ / Admin) */

:root {
  --brand-900: #191635; --brand-800: #241f4d; --brand-700: #3730a3;
  --brand-600: #4f46e5; --brand-500: #6366f1; --brand-300: #a5b4fc;
  --brand-100: #e0e7ff; --brand-50: #eef2ff;

  --green-700: #047857; --green-600: #059669; --green-100: #d1fae5;
  --amber-600: #d97706; --amber-100: #fef3c7;
  --red-600: #dc2626; --red-100: #fee2e2;
  --blue-600: #0284c7; --blue-100: #e0f2fe;
  --violet-600: #7c3aed; --pink-600: #db2777;

  --ink-900: #0f172a; --ink-700: #334155; --ink-500: #64748b; --ink-400: #94a3b8;
  --ink-300: #cbd5e1; --ink-200: #e2e8f0; --ink-100: #f1f5f9; --ink-50: #f8fafc;

  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 14px 38px rgba(15,23,42,.16);
  --sidebar: 250px; --sidebar-min: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--ink-50); color: var(--ink-900); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); background-clip: content-box; }

/* ===== MARCA ===== */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-500), var(--violet-600)); color: #fff; font-size: 14px; font-weight: 800; flex: 0 0 34px; }
.brand-mark.adm { background: linear-gradient(140deg, #0f766e, #0891b2); }
.brand-name { font-size: 17px; white-space: nowrap; }
.brand-name b { color: var(--brand-600); }
.brand-sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); font-weight: 600; }

/* ===== AUTENTICAÇÃO ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: linear-gradient(155deg, var(--brand-900), var(--brand-700) 58%, var(--violet-600));
  color: #fff; padding: 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art.adm { background: linear-gradient(155deg, #0b3d3a, #0f766e 58%, #0891b2); }
.auth-art::after { content: ''; position: absolute; right: -150px; bottom: -190px; width: 480px; height: 480px; border-radius: 50%; background: rgba(255,255,255,.07); }
.auth-art::before { content: ''; position: absolute; right: 70px; top: -130px; width: 270px; height: 270px; border-radius: 50%; background: rgba(255,255,255,.05); }
.auth-art h1 { font-size: 33px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; position: relative; z-index: 1; }
.auth-art p { color: rgba(255,255,255,.82); font-size: 15px; max-width: 430px; position: relative; z-index: 1; }
.auth-feats { list-style: none; margin-top: 28px; display: grid; gap: 11px; position: relative; z-index: 1; }
.auth-feats li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.9); font-size: 14px; }
.auth-feats li b { color: #fff; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.auth-card .sub { color: var(--ink-500); margin: 6px 0 24px; }
.hint { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700);
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 18px; }
.hint.teal { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
@media (max-width: 940px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ===== SHELL ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--brand-900); color: #fff;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 45; transition: width .18s, transform .2s; }
.sidebar.adm { background: #0b3d3a; }
.sidebar-top { padding: 16px 16px 10px; display: flex; align-items: center; gap: 10px; }
.sidebar-top .brand-name { color: #fff; }
.sidebar-top .brand-name b { color: var(--brand-300); }
.sidebar.adm .sidebar-top .brand-name b { color: #5eead4; }
.collapse-btn { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: none; background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.7); display: grid; place-items: center; cursor: pointer; flex: 0 0 26px; }
.collapse-btn:hover { background: rgba(255,255,255,.18); color: #fff; }

.empresa-chip { margin: 4px 12px 8px; padding: 9px 11px; background: rgba(255,255,255,.08); border-radius: 10px;
  display: flex; align-items: center; gap: 9px; cursor: pointer; }
.empresa-chip:hover { background: rgba(255,255,255,.14); }
.empresa-chip .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-600); display: grid; place-items: center; flex: 0 0 26px; font-size: 11px; font-weight: 700; }
.empresa-chip .b { min-width: 0; flex: 1; }
.empresa-chip .n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empresa-chip .s { font-size: 10.5px; color: rgba(255,255,255,.55); white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 18px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
.nav-item > a, .nav-item > button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: rgba(255,255,255,.76); font-weight: 500; font-size: 13.5px; margin-bottom: 2px; border: none; background: none;
  cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.nav-item > a:hover, .nav-item > button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item > a.active { background: var(--brand-600); color: #fff; box-shadow: 0 2px 12px rgba(79,70,229,.45); }
.sidebar.adm .nav-item > a.active { background: #0d9488; box-shadow: 0 2px 12px rgba(13,148,136,.45); }
.nav-item > button.open { color: #fff; }
.nav-item .ico { flex: 0 0 18px; display: grid; place-items: center; }
.nav-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; }
.nav-item .arw { transition: transform .16s; opacity: .55; flex: 0 0 14px; }
.nav-item > button.open .arw { transform: rotate(90deg); }
.nav-badge { background: rgba(255,255,255,.18); font-size: 10.5px; padding: 1px 7px; border-radius: 20px; font-weight: 700; }
.nav-badge.hot { background: var(--red-600); }
.subnav { display: none; margin: 1px 0 5px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.13); margin-left: 20px; }
.subnav.open { display: block; }
.subnav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: 12.5px;
  color: rgba(255,255,255,.62); margin-bottom: 1px; }
.subnav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.subnav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav-sep { height: 1px; background: rgba(255,255,255,.09); margin: 10px 11px; }

.sidebar-foot { padding: 10px 12px 14px; border-top: 1px solid rgba(255,255,255,.09); }
.plan-card { background: rgba(255,255,255,.07); border-radius: 10px; padding: 11px; }
.plan-card .t { font-size: 11px; color: rgba(255,255,255,.55); }
.plan-card .n { font-weight: 700; margin: 1px 0 7px; font-size: 13px; }
.plan-bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--brand-300); }
.plan-card .u { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 6px; }

/* colapsado */
.app.mini .sidebar { width: var(--sidebar-min); flex-basis: var(--sidebar-min); }
.app.mini .sidebar .brand-name, .app.mini .nav-item .lbl, .app.mini .nav-item .arw,
.app.mini .nav-badge, .app.mini .sidebar-foot, .app.mini .empresa-chip .b { display: none; }
.app.mini .subnav { display: none !important; }
.app.mini .nav-item > a, .app.mini .nav-item > button { justify-content: center; padding: 10px 0; }
.app.mini .sidebar-top { justify-content: center; padding: 16px 8px 10px; }
.app.mini .collapse-btn { margin: 0; position: absolute; right: -12px; top: 20px; background: var(--brand-600); border: 2px solid var(--ink-50); width: 24px; height: 24px; }
.app.mini .empresa-chip { justify-content: center; padding: 8px; margin: 4px 8px 8px; }
.app.mini .main { margin-left: var(--sidebar-min); }
.sidebar { position: fixed; }
.app.mini .sidebar .collapse-btn .chv { transform: rotate(180deg); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; transition: margin-left .18s; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.topbar .crumb { color: var(--ink-400); font-size: 12px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.search-box input { border: 1px solid var(--ink-200); border-radius: 20px; padding: 7px 14px 7px 32px; width: 220px; background: var(--ink-50); outline: none; transition: .15s; }
.search-box input:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px var(--brand-50); width: 270px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ink-200); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-500); position: relative; }
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red-600); border: 2px solid #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: 0 0 34px; }
.avatar.sm { width: 26px; height: 26px; flex: 0 0 26px; font-size: 10.5px; }
.avatar.lg { width: 46px; height: 46px; flex: 0 0 46px; font-size: 16px; }
.avatar.sq { border-radius: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 20px; }
.user-chip:hover { background: var(--ink-100); }
.user-chip .n { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-chip .r { font-size: 11.5px; color: var(--ink-500); }
.view { padding: 20px 22px 60px; flex: 1; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main, .app.mini .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .search-box { display: none; }
  .view { padding: 14px 12px 50px; }
  .topbar { padding: 0 12px; }
}

/* ===== COMPONENTES ===== */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .t { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.page-head .d { color: var(--ink-500); font-size: 13px; margin-top: 2px; }
.page-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid transparent; background: var(--brand-600); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .12s; white-space: nowrap; }
.btn:hover { background: var(--brand-700); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; border-color: var(--ink-200); color: var(--ink-700); }
.btn.ghost:hover { background: var(--ink-100); }
.btn.soft { background: var(--brand-50); color: var(--brand-700); }
.btn.soft:hover { background: var(--brand-100); }
.btn.green { background: var(--green-600); } .btn.green:hover { background: var(--green-700); }
.btn.amber { background: var(--amber-600); }
.btn.danger { background: var(--red-600); }
.btn.teal { background: #0d9488; } .btn.teal:hover { background: #0f766e; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { padding: 13px 16px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 10px; }
.card-head .t { font-weight: 700; font-size: 14.5px; }
.card-head .d { font-size: 12px; color: var(--ink-500); }
.card-head .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 16px; }

.grid { display: grid; gap: 15px; }
.g5 { grid-template-columns: repeat(5, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1300px) { .g5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) { .g-2-1, .g-1-2, .g3, .g2, .g5 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .g4 { grid-template-columns: 1fr; } }

.kpi { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); position: relative; }
.kpi .lbl { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 3px; }
.kpi .sub { font-size: 12px; color: var(--ink-500); }
.kpi-ico { position: absolute; right: 13px; top: 13px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--green-600); } .trend.down { color: var(--red-600); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); font-weight: 700;
  padding: 10px 13px; border-bottom: 1px solid var(--ink-200); background: var(--ink-50); white-space: nowrap; }
td { padding: 10px 13px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--brand-50); }
tfoot td { font-weight: 700; background: var(--ink-50); border-top: 2px solid var(--ink-200); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; } .muted { color: var(--ink-500); } .tiny { font-size: 12px; }
.pos { color: var(--green-600); font-weight: 600; } .neg { color: var(--red-600); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; background: var(--ink-100); color: var(--ink-700); }
.badge.green { background: var(--green-100); color: var(--green-700); }
.badge.amber { background: var(--amber-100); color: var(--amber-600); }
.badge.red { background: var(--red-100); color: var(--red-600); }
.badge.blue { background: var(--blue-100); color: var(--blue-600); }
.badge.indigo { background: var(--brand-100); color: var(--brand-700); }
.badge.violet { background: #ede9fe; color: var(--violet-600); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 9px 11px; outline: none; background: #fff; transition: .12s; color: var(--ink-900); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.field input[readonly] { background: var(--ink-50); color: var(--ink-500); }
.field textarea { min-height: 74px; resize: vertical; }
.field .help { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.t3 { grid-template-columns: 1fr 1fr 1fr; }
.field-row.t4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 680px) { .field-row, .field-row.t3, .field-row.t4 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-700); }
.check input { width: auto; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { border: 1px solid var(--ink-200); border-radius: 9px; padding: 8px 11px; background: #fff; outline: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.toolbar .grow { flex: 1; min-width: 180px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 9px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink-500);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--ink-900); }
.tabs button.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }

.pill-list { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 5px 11px; border-radius: 20px; border: 1px solid var(--ink-200); background: #fff; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink-700); user-select: none; }
.pill:hover { border-color: var(--brand-300); }
.pill.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.bar { height: 7px; border-radius: 5px; background: var(--ink-100); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--brand-600); transition: width .4s; }
.bar.green i { background: var(--green-600); } .bar.amber i { background: var(--amber-600); } .bar.red i { background: var(--red-600); }

.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.rank-row:last-child { border-bottom: none; }
.rank-row .info { flex: 1; min-width: 0; }
.rank-row .nm { font-weight: 600; font-size: 13.5px; }
.rank-row .mt { font-size: 11.5px; color: var(--ink-500); }
.rank-row .vl { text-align: right; }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); display: grid; place-items: center;
  z-index: 100; padding: 18px; animation: fade .14s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column; animation: pop .16s; }
.modal.wide { max-width: 880px; } .modal.full { max-width: 1180px; } .modal.slim { max-width: 420px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 10px; }
.modal-head .t { font-weight: 700; font-size: 16px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--ink-400); background: none; border: none; padding: 4px; border-radius: 6px; }
.modal-head .x:hover { background: var(--ink-100); color: var(--ink-900); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--ink-200); display: flex; gap: 8px; justify-content: flex-end; background: var(--ink-50); border-radius: 0 0 14px 14px; flex-wrap: wrap; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink-900); color: #fff; padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; display: flex; align-items: center; gap: 9px; animation: slide .18s; max-width: 350px; }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }
.toast.ok { background: #065f46; } .toast.err { background: #991b1b; }

.empty { text-align: center; padding: 42px 20px; color: var(--ink-400); }
.empty .t { font-weight: 600; color: var(--ink-700); margin: 8px 0 3px; }
.skeleton { background: linear-gradient(90deg, var(--ink-100), var(--ink-200), var(--ink-100)); background-size: 200% 100%;
  animation: sk 1.1s infinite; border-radius: 6px; height: 15px; }
@keyframes sk { to { background-position: -200% 0; } }
.loading-rows { display: grid; gap: 9px; padding: 16px; }

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 14px; font-size: 13px; }
.dl dt { color: var(--ink-500); } .dl dd { font-weight: 500; }
.detail-head { display: flex; gap: 13px; align-items: center; }

.chart-box { width: 100%; }
.chart { width: 100%; display: block; }
.chart-labels { display: flex; margin-top: 5px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--ink-500); }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 140px; display: grid; gap: 7px; }
.donut-legend .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.donut-legend .row i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.donut-legend .row .v { margin-left: auto; font-weight: 600; }

.switch { position: relative; width: 40px; height: 22px; flex: 0 0 40px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: var(--ink-300); border-radius: 22px; transition: .18s; }
.switch .sl::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: var(--shadow-sm); }
.switch input:checked + .sl { background: var(--green-600); }
.switch input:checked + .sl::before { transform: translateX(18px); }

/* ===== PDV ===== */
.pdv { display: grid; grid-template-columns: 1fr 372px; gap: 15px; align-items: start; }
@media (max-width: 1080px) { .pdv { grid-template-columns: 1fr; } }
.pdv-busca { display: flex; gap: 8px; margin-bottom: 12px; }
.pdv-busca .wrap { position: relative; flex: 1; }
.pdv-busca .wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.pdv-busca input { width: 100%; border: 2px solid var(--brand-200, var(--ink-200)); border-radius: 10px; padding: 12px 14px 12px 38px; font-size: 15px; outline: none; }
.pdv-busca input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.prod-card { border: 1px solid var(--ink-200); border-radius: 11px; background: #fff; padding: 11px; cursor: pointer; transition: .12s; }
.prod-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.prod-card .th { height: 70px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 9px; color: #fff; }
.prod-card .nm { font-weight: 650; font-size: 12.5px; line-height: 1.3; min-height: 32px; }
.prod-card .rf { font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.prod-card .pr { font-weight: 700; color: var(--brand-700); margin-top: 6px; font-size: 14px; }
.prod-card .st { font-size: 11px; color: var(--ink-500); }

.grade { display: flex; gap: 6px; flex-wrap: wrap; }
.grade-btn { min-width: 46px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--ink-200); background: #fff;
  cursor: pointer; text-align: center; font-size: 12px; font-weight: 600; }
.grade-btn:hover:not(:disabled) { border-color: var(--brand-500); background: var(--brand-50); }
.grade-btn .q { display: block; font-size: 10px; color: var(--ink-400); font-weight: 500; }
.grade-btn:disabled { opacity: .35; cursor: not-allowed; }
.grade-btn.sel { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.grade-btn.sel .q { color: rgba(255,255,255,.75); }

.cupom { position: sticky; top: 74px; }
.cupom-itens { max-height: 320px; overflow-y: auto; }
.citem { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--ink-100); align-items: center; }
.citem:last-child { border-bottom: none; }
.citem .b { flex: 1; min-width: 0; }
.citem .n { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.citem .m { font-size: 11px; color: var(--ink-500); }
.citem .qt { display: flex; align-items: center; gap: 3px; }
.citem .qt button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--ink-200); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink-600, var(--ink-700)); }
.citem .qt button:hover { background: var(--ink-100); }
.citem .qt span { min-width: 20px; text-align: center; font-weight: 700; font-size: 12.5px; }
.citem .tv { font-weight: 700; font-size: 13px; min-width: 68px; text-align: right; }
.citem .rm { border: none; background: none; color: var(--ink-300); cursor: pointer; padding: 2px; }
.citem .rm:hover { color: var(--red-600); }

.total-box { background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; border-radius: var(--radius); padding: 15px; }
.total-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; color: rgba(255,255,255,.8); }
.total-row.big { font-size: 25px; font-weight: 700; color: #fff; border-top: 1px solid rgba(255,255,255,.2); margin-top: 8px; padding-top: 10px; letter-spacing: -.02em; }
.total-row.big span:first-child { font-size: 14px; font-weight: 600; align-self: center; color: rgba(255,255,255,.8); }

.pag-forma { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--ink-100); font-size: 13px; }
.pag-forma:last-child { border-bottom: none; }
.pag-forma .rm { border: none; background: none; color: var(--ink-300); cursor: pointer; }
.pag-forma .rm:hover { color: var(--red-600); }

.stat-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.stat-chip { background: #fff; border: 1px solid var(--ink-200); border-radius: 10px; padding: 9px 13px; box-shadow: var(--shadow-sm); }
.stat-chip .l { font-size: 11px; color: var(--ink-500); font-weight: 600; }
.stat-chip .v { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }

.emp-card { border: 1px solid var(--ink-200); border-radius: var(--radius); background: #fff; padding: 16px; cursor: pointer;
  transition: .13s; box-shadow: var(--shadow-sm); display: flex; gap: 13px; align-items: center; }
.emp-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.emp-card .b { flex: 1; min-width: 0; }
.emp-card .n { font-weight: 700; font-size: 15px; }
.emp-card .d { font-size: 12.5px; color: var(--ink-500); margin-top: 1px; }
.emp-card .f { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

.timeline { border-left: 2px solid var(--ink-200); margin-left: 7px; padding-left: 16px; }
.timeline .item { position: relative; padding-bottom: 15px; }
.timeline .item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-600); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-100); }

.demo-flag { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 90; background: rgba(15,23,42,.85);
  color: #fff; font-size: 11px; padding: 4px 12px; border-radius: 20px; backdrop-filter: blur(4px); pointer-events: none; }
@media print { .sidebar, .topbar, .demo-flag, .page-head .acts, .toolbar { display: none !important; } .main { margin: 0 !important; } .view { padding: 0; } }

/* ===== ajustes de topo no mobile ===== */
@media (max-width: 900px) {
  .topbar { gap: 8px; }
  .topbar > div:nth-child(2) { min-width: 0; flex: 1; }
  .topbar h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .crumb { display: none; }
  .topbar-actions { gap: 6px; }
  .user-chip > div:not(.avatar) { display: none; }
  .user-chip { padding: 3px; }
  #btnPdv span { display: none; }
  #btnPdv { padding: 8px 11px !important; }
  .page-head .t { font-size: 18px; }
  .stat-strip { gap: 8px; }
  .stat-chip { flex: 1; min-width: 128px; padding: 8px 11px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .cupom { position: static; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
