@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=block');

:root {
  --ink: #0a0a0a;
  --ink-2: #444;
  --muted: #8a8a8a;
  --line: #e9e9e9;
  --soft: #f4f4f4;
  --page: #f3f3f3;
  --sale: #ed4949;
  --ok: #1f9d55;
  --warn: #c98a00;
  --info: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--page); color: var(--ink); font-family: 'Open Sans', sans-serif; font-size: 13px; -webkit-font-smoothing: antialiased; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }

/* Estrutura: 1440 x 960, menu lateral + área principal */
.app { width: 1440px; height: 960px; display: flex; overflow: hidden; }
aside { width: 264px; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 26px 14px 18px; flex: none; }
aside .logo { filter: invert(1); margin: 0 10px 28px; display: block; }
aside .group { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; color: #6f6f6f; margin: 14px 12px 6px; }
.mi { height: 44px; border-radius: 9px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 13.5px; color: #a9a9a9; font-weight: 500; }
.mi.on { background: #fff; color: var(--ink); font-weight: 700; }
.mi .pill { margin-left: auto; font-size: 10.5px; font-weight: 700; background: #2a2a2a; color: #fff; border-radius: 10px; padding: 1px 7px; }
.mi.on .pill { background: var(--ink); }
.user { margin-top: auto; border-top: 1px solid #262626; padding: 16px 6px 0; display: flex; align-items: center; gap: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #2a2a2a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user b { display: block; font-size: 13px; }
.user small { color: #8f8f8f; font-size: 11.5px; }
.user svg.lucide { margin-left: auto; color: #8f8f8f; }

main { flex: 1; min-width: 0; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: none; }
.top h1 { font-size: 25px; font-weight: 800; letter-spacing: -.3px; }
.top p { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.top .actions { display: flex; align-items: center; gap: 10px; }

/* Componentes */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.pad { padding: 18px 20px; }
h2 { font-size: 15px; font-weight: 800; }
h3 { font-size: 13px; font-weight: 700; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub { color: var(--muted); font-size: 12px; }
.link { font-size: 12.5px; font-weight: 700; text-decoration: underline; }

.btn { height: 38px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d9d9d9; }
.btn.danger { background: #fff; color: var(--sale); border: 1px solid #f3c4c4; }
.btn.sm { height: 30px; font-size: 12px; padding: 0 11px; border-radius: 7px; }
.btn svg.lucide { width: 16px; height: 16px; }
.icon { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); display: inline-grid; place-items: center; background: #fff; color: var(--ink-2); }
.icon svg.lucide { width: 15px; height: 15px; }

.search { height: 38px; min-width: 240px; border: 1px solid #dcdcdc; border-radius: 9px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted); font-size: 13px; }
.search svg.lucide { width: 16px; height: 16px; color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.input { height: 36px; border: 1px solid #dcdcdc; border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 11px; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; }
.input.area { height: auto; min-height: 64px; align-items: flex-start; padding: 9px 11px; white-space: normal; line-height: 1.45; color: var(--ink-2); }
.input .muted, .muted { color: var(--muted); }
.input svg.lucide { width: 15px; height: 15px; color: var(--muted); margin-left: auto; }
.input .pre { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.toggle { width: 34px; height: 20px; border-radius: 10px; background: #d4d4d4; position: relative; flex: none; display: inline-block; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--ink); }
.toggle.on::after { left: 17px; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok { background: #e7f6ed; color: var(--ok); }
.tag.warn { background: #fdf3dc; color: var(--warn); }
.tag.bad { background: #fde8e8; color: var(--sale); }
.tag.info { background: #e6eefc; color: var(--info); }
.tag.mute { background: #efefef; color: #6b6b6b; }
.tag.dark { background: var(--ink); color: #fff; }
.tag.plain::before { display: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; border-radius: 16px; border: 1px solid #dcdcdc; background: #fff; display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip b { font-size: 11px; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on b { color: #bdbdbd; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; padding: 0 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; white-space: nowrap; }
tr.sel td { background: #f7f7f7; }
tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
td.num, th.num { text-align: right; }
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; object-position: 50% 20%; background: var(--soft); display: block; flex: none; }
.cell { display: flex; align-items: center; gap: 10px; }
.cell b { display: block; font-size: 13px; }
.cell small { color: var(--muted); font-size: 11.5px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; flex: none; }
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.kpi .ic svg.lucide { width: 22px; height: 22px; }
.kpi .lbl { font-size: 12px; color: var(--ink-2); }
.kpi .val { font-size: 23px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; }
.kpi .delta { font-size: 11.5px; font-weight: 700; color: var(--ok); }
.kpi .delta.down { color: var(--sale); }
.kpi .delta span { color: var(--muted); font-weight: 400; }

.sep { height: 1px; background: var(--line); margin: 14px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kv { display: grid; gap: 7px; font-size: 12.5px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; }
.kv span { color: var(--ink-2); }
.dropzone { border: 1.5px dashed #cfcfcf; border-radius: 10px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11.5px; gap: 4px; background: #fafafa; }
.dropzone svg.lucide { color: var(--ink-2); width: 20px; height: 20px; }
