/* ============================================================
   Page screens — funil, dashboard, relatórios, cadastros, login, home, DS
   ============================================================ */
.main-area { flex: 1; min-width: 0; overflow: hidden; display: flex; }
.page { flex: 1; overflow-y: auto; min-height: 0; }
.page-inner { max-width: 1180px; margin: 0 auto; padding: 26px 30px 60px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.slash { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--green-500); font-weight: 800; }
.how-card { background: var(--green-50); border-color: var(--green-200); }
.how-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.how-list code, code { background: var(--surface-3); border-radius: 4px; padding: 1px 6px; font-family: ui-monospace, monospace; font-size: 12px; color: var(--green-500); }
.code-chip { background: var(--surface-3); border-radius: 5px; padding: 3px 8px; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; color: var(--green-500); }

/* generic table */
.tbl { width: 100%; }
.tbl-head { display: grid; gap: 14px; padding: 12px 18px; background: var(--surface-2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); border-bottom: 1px solid var(--border); }
.tbl-row { display: grid; gap: 14px; padding: 13px 18px; align-items: center; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.tbl-row:last-child { border-bottom: none; }
.tbl-row:hover { background: var(--surface-2); }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; }
.prog { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 4px; }
.prog-bar { height: 100%; background: var(--green-500); border-radius: 999px; }
.drag-handle { color: var(--text-3); cursor: grab; display: grid; place-items: center; }
.sw { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border); }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row input[type=color] { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
.mono { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-2); }

/* funil */
.funnel-card { }
.funnel-badge { background: var(--green-700); color: var(--on-green); font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 5px 12px; border-radius: 6px; }
.fk-stat { display: flex; flex-direction: column; align-items: flex-end; }
.fk-val { font-family: var(--font-title); font-weight: 800; font-size: 22px; line-height: 1; }
.fk-lbl { font-size: 11px; color: var(--text-2); }
.funnel-chart { display: flex; flex-direction: column; gap: 7px; }
.fc-row { display: flex; align-items: center; gap: 14px; }
.fc-label { width: 160px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: baseline; }
.fc-name { font-size: 13px; font-weight: 600; }
.fc-conv { font-size: 11px; color: var(--text-3); font-weight: 700; }
.fc-bar-wrap { flex: 1; }
.fc-bar { height: 30px; border-radius: 7px; display: flex; align-items: center; padding: 0 12px; min-width: 44px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.fc-count { color: #fff; font-weight: 800; font-size: 13px; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.kb-col { width: 274px; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; min-height: 200px; transition: background .15s, border-color .15s; }
.kb-col.over { background: var(--green-50); border-color: var(--green-400); }
.kb-colhead { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kb-coltitle { font-weight: 800; font-size: 13px; }
.kb-list { display: flex; flex-direction: column; gap: 9px; }
.kb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 11px; box-shadow: var(--shadow-sm); cursor: grab; }
.kb-card:active { cursor: grabbing; }
.kb-prev { margin: 0 0 8px; font-size: 12px; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 20px 0; border: 1px dashed var(--border); border-radius: 8px; }

/* dashboard */
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; display: flex; align-items: center; gap: 13px; box-shadow: var(--shadow-sm); position: relative; }
.kpi-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.kpi-val { font-family: var(--font-title); font-weight: 800; font-size: 26px; line-height: 1; }
.kpi-lbl { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.kpi-delta { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; color: var(--green-500); background: var(--green-100); padding: 2px 7px; border-radius: 999px; }
[data-theme="dark"] .kpi-delta { color: var(--green-400); }

.dash-table { overflow: hidden; }
.dt-head, .dt-row { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.2fr 1fr; align-items: center; }
.dt-head { padding: 12px 18px; gap: 10px; border-bottom: 1px solid var(--border); }
.dt-c-user { justify-self: start; }
.dt-head .dt-c-user { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.dt-pill { justify-self: center; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-align: center; }
.dt-pill.dt-total { background: var(--surface-3); color: var(--text-2); }
.dt-row { padding: 11px 18px; gap: 10px; border-bottom: 1px solid var(--border-soft); }
.dt-row:hover { background: var(--surface-2); }
.dt-cell { justify-self: center; min-width: 52px; text-align: center; padding: 7px 0; border-radius: 8px; font-weight: 800; font-size: 15px; width: 70px; }
.dt-cell.dt-total { font-family: var(--font-title); color: var(--text); }
.dt-foot { background: var(--surface-2); font-weight: 800; }
.dt-foot:hover { background: var(--surface-2); }

/* relatórios */
.rel-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; }
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.bc-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bc-fill { width: 100%; border-radius: 8px 8px 0 0; min-height: 24px; display: flex; justify-content: center; align-items: flex-start; padding-top: 6px; transition: height .5s; }
.bc-val { color: #fff; font-size: 11px; font-weight: 800; }
.bc-lbl { font-size: 12px; color: var(--text-2); font-weight: 700; }
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dl-dot { width: 11px; height: 11px; border-radius: 3px; }

/* celulares */
.dev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dev-card { }
.dev-ic { width: 42px; height: 42px; border-radius: 11px; background: #25D366; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.dev-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: var(--r); }

/* login */
.login-wrap { height: 100vh; display: flex; }
.login-left { width: 46%; min-width: 420px; background: linear-gradient(160deg, #2B3616 0%, #1E2A12 50%, #16200C 100%); color: #EAF0DC; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.ll-deco { position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(123,160,91,.25), transparent 45%), radial-gradient(circle at 10% 90%, rgba(184,146,74,.14), transparent 40%); }
.ll-content { position: relative; margin: auto 0; display: flex; flex-direction: column; gap: 16px; }
.ll-brand { font-family: var(--font-title); font-weight: 800; font-size: 22px; letter-spacing: .12em; }
.ll-brand span { color: #9CC178; }
.ll-title { font-family: var(--font-title); font-weight: 800; font-size: 42px; line-height: 1.08; letter-spacing: .01em; color: #fff; }
.ll-sub { font-size: 15px; color: #B9C4A0; line-height: 1.55; }
.ll-foot { position: relative; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #93A079; font-weight: 600; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.login-form { width: 100%; max-width: 380px; }
.lf-title { font-size: 28px; margin-bottom: 6px; }
.lf-sub { color: var(--text-2); font-size: 14px; margin: 0 0 28px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-3); padding: 8px; display: grid; place-items: center; }
.lf-link { color: var(--green-500); font-size: 13px; font-weight: 700; cursor: pointer; }
.lf-link:hover { text-decoration: underline; }
.lf-footnote { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 28px; }

/* home */
.home-inner { max-width: 1080px; }
.home-hero { display: flex; gap: 30px; align-items: center; background: linear-gradient(120deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 34px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.hh-deco { flex-shrink: 0; }
.hh-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-500); }
.hh-title { font-size: 34px; margin: 8px 0 10px; letter-spacing: -.01em; }
.hh-sub { font-size: 15px; color: var(--text-2); line-height: 1.55; margin: 0 0 20px; max-width: 540px; }
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hc-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; margin-bottom: 10px; }
[data-theme="dark"] .hc-ic { color: var(--green-400); }
.hc-label { font-weight: 800; font-size: 15px; }
.hc-desc { font-size: 12.5px; color: var(--text-2); }
.hc-n { font-size: 12px; font-weight: 700; color: var(--green-500); margin-top: 6px; }

/* design system */
.ds-grid { columns: 2; column-gap: 18px; }
.ds-block { break-inside: avoid; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.ds-block-title { padding: 11px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ds-block-body { padding: 16px; }
.ds-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-swatch { display: flex; flex-direction: column; gap: 5px; }
.ds-chip { height: 50px; border-radius: 8px; display: flex; align-items: flex-end; padding: 7px 9px; font-family: ui-monospace, monospace; font-size: 11px; font-weight: 700; }
.ds-sw-name { font-size: 12px; font-weight: 700; }
.ds-type { display: flex; flex-direction: column; gap: 4px; }
.ds-wordmark { font-family: var(--font-title); font-weight: 800; font-size: 20px; letter-spacing: .1em; }
.ds-wordmark b { color: var(--green-500); }

@media (max-width: 1100px) {
  .ds-grid { columns: 1; }
  .dash-kpis, .home-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .rel-filters { grid-template-columns: 1fr; }
}
