@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e6e3dc;
  --line-strong: #d6d2c8;
  --ink: #17171c;
  --ink-2: #4b4a52;
  --ink-3: #807e88;
  --brand: #17171c;
  --accent: #d92e6f;
  --accent-soft: #fde8f0;
  --cyan: #0a9ac2;
  --yellow: #f2b705;
  --ok: #18794e;
  --ok-soft: #e3f4ea;
  --warn: #a35a00;
  --warn-soft: #fff1d6;
  --err: #c0262d;
  --err-soft: #fde4e4;
  --info: #2457c5;
  --info-soft: #e5edfd;
  --sim: #6d3fd1;
  --sim-soft: #efe8fd;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(23, 23, 28, .05), 0 4px 16px rgba(23, 23, 28, .05);
  --shadow-lg: 0 12px 40px rgba(23, 23, 28, .18);
  --sidebar: 244px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.tight { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: #17171c; color: #e9e8ee; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: grid; place-items: center; }
.brand-mark span { display: flex; gap: 2px; }
.brand-mark i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.brand b { display: block; font-size: 14px; }
.brand small { color: #9b99a6; font-size: 11px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7d7b88; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #cfced8; font-weight: 500; }
.nav a:hover { background: #24242c; color: #fff; }
.nav a.active { background: #2d2d37; color: #fff; }
.nav a svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.nav a .count { margin-left: auto; font-size: 11.5px; background: #34343f; color: #e6e5ec; border-radius: 99px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.nav a .count.hot { background: var(--accent); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #2a2a33; display: grid; gap: 8px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b5b3c0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6976; flex: none; }
.dot.on { background: #33c27f; }
.dot.off { background: #d65e5e; }
.dot.sim { background: #a685f2; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(244, 243, 239, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 12px 0 36px; }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--ink-3); }
.demo-pill { font-size: 12px; font-weight: 600; color: var(--sim); background: var(--sim-soft); border: 1px solid #d8c9fb; border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .badge-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #17171c; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.content { padding: 24px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--ink-3); }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 14px 16px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: #c9c4b8; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: #2c2c35; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #c12261; }
.btn.danger { color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.btn-group button { border: 0; background: transparent; padding: 0 12px; height: 32px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.btn-group button + button { border-left: 1px solid var(--line); }
.btn-group button.on { background: var(--ink); color: #fff; }

.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; padding: 8px 10px; outline: none; }
.input, .select { height: 36px; }
.input:focus, .select:focus, .textarea:focus { border-color: #8a86a0; box-shadow: 0 0 0 3px rgba(217, 46, 111, .12); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #eeece6; color: var(--ink-2); }
.badge svg { width: 12px; height: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.sim { background: var(--sim-soft); color: var(--sim); }
.badge.ai { background: #e6f6fb; color: #06789a; }
.badge.local { background: #eef0f3; color: #4b5563; }
.badge.outline { background: transparent; border: 1px solid var(--line-strong); }

.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-NOVO { background: #e6efff; color: #2457c5; }
.st-AGUARDANDO_INFO { background: #fff3d6; color: #9a5b00; }
.st-EM_PROCESSAMENTO { background: #efe8fd; color: #6d3fd1; }
.st-REVISAO_INTERNA { background: #e9e8fb; color: #3f3aa8; }
.st-PRONTO_ENVIO { background: #dff5f1; color: #0b7a66; }
.st-AGUARDANDO_CLIENTE { background: #fff0e0; color: #b25a00; }
.st-ALTERACAO_SOLICITADA { background: #fde6ef; color: #b81d5b; }
.st-APROVADO_CLIENTE { background: #e3f4ea; color: #18794e; }
.st-LIBERADO_PRODUCAO { background: #d9f3e6; color: #0f6b43; }
.st-EM_PRODUCAO { background: #dcf2f9; color: #06789a; }
.st-FINALIZADO { background: #ecebe7; color: #5f5d66; }
.st-ERRO { background: #fde4e4; color: #c0262d; }

.alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; border: 1px solid transparent; }
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: #6f3e00; border-color: #f6dca4; }
.alert.err { background: var(--err-soft); color: #8a1b20; border-color: #f6c4c4; }
.alert.info { background: var(--info-soft); color: #1d3f8c; border-color: #cbdaf8; }
.alert.sim { background: var(--sim-soft); color: #4c2a9b; border-color: #dccdfa; }
.alert.ok { background: var(--ok-soft); color: #11583a; border-color: #bfe5cf; }
.alert b { font-weight: 650; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; opacity: .5; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); border-top-color: currentColor; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eceae4 0%, #f5f4f0 50%, #eceae4 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; display: grid; gap: 6px; cursor: pointer; transition: border-color .12s, transform .12s; }
.kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kpi .label { color: var(--ink-3); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .label svg { width: 15px; height: 15px; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-3); }
.kpi.hot .value { color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.pipeline-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #eceae4; }
.pipeline-bar span { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 12px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: block; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.timeline li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-top: 6px; }
.timeline li + li { border-top: 1px dashed var(--line); }

/* ---------- Lista de pedidos ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 550; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { font-size: 11.5px; opacity: .7; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #fbfaf7; }
.table tr:last-child td { border-bottom: 0; }
.thumb { width: 48px; height: 56px; border-radius: 7px; background: #eceae4; object-fit: cover; flex: none; border: 1px solid var(--line); }
.thumb.ph { display: grid; place-items: center; color: var(--ink-3); }
.thumb.ph svg { width: 20px; height: 20px; }
.order-num { font-weight: 650; font-variant-numeric: tabular-nums; }
.flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.deadline { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.deadline.proximo { color: var(--warn); font-weight: 600; }
.deadline.atrasado { color: var(--err); font-weight: 650; }

/* ---------- Tela do pedido ---------- */
.order-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.order-top h1 { font-size: 20px; }
.workspace { display: grid; grid-template-columns: 330px minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel + .panel { margin-top: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.col.sticky { position: sticky; top: 74px; max-height: calc(100vh - 88px); overflow-y: auto; padding-bottom: 4px; }
.col.sticky::-webkit-scrollbar { width: 6px; }
.col.sticky::-webkit-scrollbar-thumb { background: #d9d5cc; border-radius: 9px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 550; text-align: right; }
.item-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface-2); }
.item-box + .item-box { margin-top: 8px; }
.shirt-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.shirt-tag i { width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 1px solid #cfcbc1; display: inline-block; }

.thread { display: flex; flex-direction: column; gap: 10px; padding: 14px; max-height: 520px; overflow-y: auto; background: #fbfaf8; }
.msg { max-width: 90%; border-radius: 12px; padding: 9px 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.msg.comprador { align-self: flex-start; border-top-left-radius: 4px; }
.msg.loja { align-self: flex-end; background: #17171c; color: #f3f2f6; border-color: #17171c; border-top-right-radius: 4px; }
.msg.sistema { align-self: center; background: #f1efe9; font-size: 12.5px; max-width: 100%; }
.msg.selected { box-shadow: 0 0 0 3px rgba(217, 46, 111, .35); border-color: var(--accent); }
.msg.unreviewed { border-color: #f0b44c; box-shadow: 0 0 0 3px rgba(242, 183, 5, .25); }
.msg .meta { display: flex; gap: 6px; align-items: center; font-size: 11px; margin-top: 6px; color: var(--ink-3); flex-wrap: wrap; }
.msg.loja .meta { color: #a8a6b3; }
.msg .text { white-space: pre-wrap; word-break: break-word; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 8px; }
.att { position: relative; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: repeating-conic-gradient(#e9e7e1 0% 25%, #f7f6f2 0% 50%) 50% / 12px 12px; aspect-ratio: 1; cursor: zoom-in; }
.att img { width: 100%; height: 100%; object-fit: contain; }
.att .bad { display: grid; place-items: center; height: 100%; font-size: 11px; color: var(--err); text-align: center; padding: 4px; background: var(--err-soft); }
.att.ref::after { content: 'REF'; position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.banner-unreviewed { margin: 12px 14px 0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 11px 10px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.piece-switch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 550; font-size: 13px; }
.tool:hover { border-color: #b9b3a6; }
.tool svg { width: 15px; height: 15px; }
.tool .tag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.tool .tag.ia { background: #e6f6fb; color: #06789a; }
.tool .tag.local { background: #eef0f3; color: #4b5563; }
.tool .tag.sim { background: var(--sim-soft); color: var(--sim); }
.tool:disabled { opacity: .5; cursor: not-allowed; }

.stage-wrap { padding: 14px; }
.stage { position: relative; margin: 0 auto; background: #e9eaee; border-radius: 10px; overflow: hidden; user-select: none; touch-action: none; }
.stage > img.tpl { width: 100%; height: auto; pointer-events: none; }
.print-area { position: absolute; border: 1.5px dashed rgba(217, 46, 111, .55); pointer-events: none; }
.print-area span { position: absolute; top: -20px; left: 0; font-size: 10.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.guide { position: absolute; background: var(--accent); pointer-events: none; opacity: .7; }
.guide.v { width: 1px; top: 0; bottom: 0; }
.guide.h { height: 1px; left: 0; right: 0; }
.layer { position: absolute; cursor: move; mix-blend-mode: multiply; }
.layer img { width: 100%; height: 100%; pointer-events: none; }
.layer.selected { outline: 1.5px solid var(--cyan); outline-offset: 1px; mix-blend-mode: normal; }
.layer .handle { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--cyan); border-radius: 3px; right: -7px; bottom: -7px; cursor: nwse-resize; }
.stage-info { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.stage-info b { color: var(--ink); font-variant-numeric: tabular-nums; }
.editor-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.editor-bar .field label { font-size: 11.5px; }
.editor-bar .input { height: 32px; }
.editor-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 14px; background: var(--surface-2); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.layers-list { display: flex; gap: 6px; flex-wrap: wrap; }
.layer-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 3px 8px; font-size: 12px; background: #fff; cursor: pointer; max-width: 200px; }
.layer-chip.on { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(10, 154, 194, .2); }
.layer-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checker { background: repeating-conic-gradient(#e7e5df 0% 25%, #f8f7f4 0% 50%) 50% / 18px 18px; border-radius: 10px; }
.compare { position: relative; border-radius: 10px; overflow: hidden; }
.compare .side { position: absolute; inset: 0; display: grid; place-items: center; }
.compare .side img { max-height: 100%; max-width: 100%; object-fit: contain; }
.compare input[type=range] { position: absolute; bottom: 10px; left: 10%; width: 80%; z-index: 3; }
.compare .divider { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 2; }
.compare .lbl { position: absolute; top: 10px; z-index: 2; background: rgba(23,23,28,.75); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 5px; }
.versions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.version { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.version img { aspect-ratio: 6/7; object-fit: cover; width: 100%; background: #eceae4; }
.version .vb { padding: 8px; display: grid; gap: 4px; font-size: 12px; }
.version.current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 46, 111, .15); }

.interp-piece { border: 1px solid var(--line); border-radius: 9px; padding: 10px; display: grid; gap: 8px; transition: box-shadow .15s, border-color .15s; }
.interp-piece.hl { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 46, 111, .15); }
.text-chip { display: inline-flex; align-items: center; gap: 6px; background: #f1efe9; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-weight: 600; font-size: 13px; }
.swatch { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; margin-right: 8px; }
.swatch i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.confidence { height: 6px; background: #eceae4; border-radius: 99px; overflow: hidden; }
.confidence span { display: block; height: 100%; border-radius: 99px; }
.counter { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.counter.over { color: var(--err); font-weight: 650; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-grid .full { grid-column: 1 / -1; }
.files-list { display: grid; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.file-row img { width: 44px; height: 52px; object-fit: cover; border-radius: 6px; background: #eceae4; }

/* ---------- Produção ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.prod-card .files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.prod-file { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.prod-file img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.prod-file .pf { padding: 8px; font-size: 12px; display: grid; gap: 2px; }

/* ---------- Mockups ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tpl-card img { width: 100%; aspect-ratio: 6/7; object-fit: cover; background: #e9eaee; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }

/* ---------- Configurações ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 74px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; font-weight: 550; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.settings-nav a:hover { background: #ebe9e3; }
.settings-nav a.on { background: var(--ink); color: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: #17171c; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h2 { font-size: 34px; line-height: 1.15; max-width: 460px; letter-spacing: -.02em; }
.login-art p { color: #b9b7c4; max-width: 440px; margin-top: 14px; font-size: 15px; }
.cmyk { display: flex; gap: 8px; }
.cmyk i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: 100%; max-width: 360px; display: grid; gap: 14px; }

/* ---------- Overlays ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(23, 23, 28, .45); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s ease-out; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; }
.modal.wide { max-width: 860px; }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 16px 18px; display: grid; gap: 12px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }
.lightbox { position: fixed; inset: 0; background: rgba(12, 12, 16, .92); z-index: 120; display: flex; flex-direction: column; }
.lightbox .lb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #fff; }
.lightbox .lb-bar .btn { background: #2a2a33; border-color: #3a3a45; color: #fff; }
.lightbox .lb-stage { flex: 1; overflow: hidden; position: relative; cursor: grab; background: repeating-conic-gradient(#2a2a30 0% 25%, #33333a 0% 50%) 50% / 24px 24px; }
.lightbox .lb-stage img { position: absolute; left: 50%; top: 50%; transform-origin: center; max-width: none; image-rendering: auto; }
.lightbox .lb-stage.pixel img { image-rendering: pixelated; }
.popover { position: absolute; right: 0; top: 46px; width: 380px; max-height: 480px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 50; }
.notif { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: #fff8fb; }
.notif.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: #17171c; color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: fade .15s; }
.toast.err { background: #8a1b20; }
.toast.ok { background: #11583a; }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

@media (max-width: 1360px) {
  .workspace { grid-template-columns: 310px minmax(0, 1fr); }
  .workspace > .col:last-child { grid-column: 1 / -1; }
  .col.sticky { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .workspace, .dash-grid, .settings, .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .content { padding: 16px; }
}

/* ícones inline */
.deadline svg, .badge svg, .text-chip svg, .row > svg, .small svg { width: 14px; height: 14px; flex: none; vertical-align: -2px; }
.alert svg, .card-head h2 svg, .card-head h3 svg { width: 17px; height: 17px; flex: none; }
.thread .meta .badge { height: 18px; font-size: 10.5px; }
.input, .select { padding-top: 0; padding-bottom: 0; }
select.select { padding-right: 28px; }
.settings-nav a svg { width: 16px; height: 16px; flex: none; }
.input { font-feature-settings: 'calt' 0; }
.chip svg { width: 15px; height: 15px; flex: none; }
