/* CRM Reduz IPTU */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600 800; font-display: swap; src: url(fonts/bricolage-grotesque-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600 800; font-display: swap; src: url(fonts/bricolage-grotesque-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1EFF, U+20A0-20C0; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1EFF, U+20A0-20C0; }

:root {
  --navy: #0B0E5C; --navy-2: #161a7a; --ink: #0F1440; --text: #2B3058; --muted: #646A8C;
  --line: #E1E4F0; --field: #F5F6FB; --surface: #fff; --bg: #EEF0F8;
  --accent: #F2A12B; --accent-ink: #1d1400; --accent-soft: #FFF3DD;
  --link: #1D24A0; --ok: #1E9E62; --error: #C53030; --error-soft: #FDECEC;
  --r: 18px; --r-s: 12px;
  --shadow: 0 1px 2px rgba(11, 14, 92, .06), 0 8px 24px -12px rgba(11, 14, 92, .18);
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 500 15px/1.45 var(--body); color: var(--text);
  background: var(--bg) url(pattern.svg) 0 0 / 320px repeat;
}
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; line-height: 1.1; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
.hidden { display: none !important; }

/* botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; background: var(--field); color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: transform .15s, background-color .15s;
}
.btn:hover { background: #E8EAF5; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #F5B04A; }
.btn-ghost-dark { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .18); }
.btn-danger { background: transparent; color: var(--error); padding: 0 10px; }
.btn-danger:hover { background: var(--error-soft); }
.btn-sm { height: 34px; padding: 0 14px; font-size: .9rem; }
.btn:focus-visible, .field:focus-visible, .card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field {
  width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-s);
  background: var(--field); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-weight: 600;
}
textarea.field { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; font-weight: 500; line-height: 1.5; }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--link); }
select.field { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23646A8C' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
label.lbl { display: block; margin: 0 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* entrar */
.login { min-height: 100vh; min-height: 100dvh;display: grid; place-items: center; padding: 24px 16px; background: var(--navy) url(pattern.svg) 0 0 / 320px; }
.login-box { width: min(420px, 100%); padding: 32px; border-radius: 28px; background: var(--surface); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); }
.login-box img { height: 34px; margin-bottom: 26px; }
.login-box h1 { font-size: 1.6rem; margin-bottom: 8px; }
.login-box p { margin: 0 0 20px; color: var(--muted); }
.login-box .field { margin-bottom: 14px; }
.login-box .btn { width: 100%; height: 48px; }
.msg-erro { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-s); background: var(--error-soft); color: var(--error); font-weight: 600; }

/* topo */
.top { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; }
.top-inner { display: flex; align-items: center; gap: 16px; padding: 14px 24px; }
.top img { height: 30px; }
.top-title { font: 700 1rem var(--display); color: #fff; opacity: .9; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .2); }
.top-sp { flex: 1; }

/* filtros */
.bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 18px 24px 4px; }
.bar > div { min-width: 170px; }
.bar .grow { flex: 1 1 220px; }
.bar .count { margin-left: auto; align-self: center; font-weight: 700; color: var(--muted); }
.bar .btn-limpar { align-self: end; }

/* quadro */
.board { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 18px; padding: 16px 24px 40px; align-items: start; }
.col { border-radius: var(--r); background: rgba(255, 255, 255, .55); backdrop-filter: blur(2px); box-shadow: inset 0 0 0 1px var(--line); min-height: 220px; display: flex; flex-direction: column; }
.col-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.col-head h2 { font-size: 1.15rem; }
.col-head .n { margin-left: auto; min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--surface); font-weight: 800; color: var(--ink); box-shadow: var(--shadow); }
.col-head .sub { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.col-list { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 16px; min-height: 120px; border-radius: var(--r); transition: background-color .15s; }
.col-list.is-over { background: rgba(242, 161, 43, .14); }
.col-empty { margin: 8px 4px; padding: 18px; border: 1.5px dashed var(--line); border-radius: var(--r-s); color: var(--muted); text-align: center; font-size: .9rem; }

.card {
  display: block; width: 100%; text-align: left; padding: 14px 14px 12px; border: 0; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); cursor: grab; position: relative;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11, 14, 92, .08), 0 14px 28px -14px rgba(11, 14, 92, .3); }
.card.is-dragging { opacity: .45; }
.card-name { display: block; font: 700 1.02rem/1.25 var(--display); color: var(--ink); padding-right: 64px; }
.card-sit { display: block; margin-top: 4px; font-size: .9rem; color: var(--text); }
.card-val { position: absolute; top: 14px; right: 14px; font-weight: 800; font-size: .78rem; color: var(--navy); }
.card-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.dot { display: inline-flex; align-items: center; gap: 6px; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #C9CDE0; }
.dot.on::before { background: var(--ok); }
.card-foot .sp { flex: 1; }

/* ficha (painel lateral) */
.shade { position: fixed; inset: 0; z-index: 20; background: rgba(8, 10, 61, .45); animation: fade .2s; }
.sheet {
  position: fixed; z-index: 21; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--surface); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column; animation: slide .25s cubic-bezier(.16, 1, .3, 1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.5rem; }
.sheet-head .when { margin-top: 4px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.x { margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--field); cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink); }
.sheet-body { flex: 1; overflow: auto; padding: 20px 24px 32px; display: grid; gap: 22px; align-content: start; }
.contato { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--accent-soft); }
.contato strong { display: block; font: 800 1.15rem var(--display); color: var(--ink); }
.contato span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.check { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; font-weight: 700; color: var(--ink); }
.check input { width: 22px; height: 22px; accent-color: var(--ok); cursor: pointer; }
.check small { display: block; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sec h3 { font-size: 1.05rem; margin-bottom: 10px; }
.saved { font-size: .8rem; color: var(--ok); font-weight: 700; margin-left: 8px; }
.docs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.docs li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--field); }
.docs a { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.docs a:hover { text-decoration: underline; }
.docs small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.drop { display: block; padding: 18px; border: 1.5px dashed #C9CDE0; border-radius: var(--r); text-align: center; color: var(--muted); font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s; }
.drop:hover, .drop.is-over { background: var(--accent-soft); border-color: var(--accent); }
.drop strong { color: var(--link); }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.sheet-foot .sp { flex: 1; }

/* aviso rápido */
.toast { position: fixed; z-index: 40; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow); animation: fade .2s; }
.toast.err { background: var(--error); }

/* diálogo de novo lead / senha */
.modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 61, .45); }
.modal-box { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px; border-radius: 24px; background: var(--surface); display: grid; gap: 14px; }
.modal-box h2 { font-size: 1.35rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

@media (max-width: 960px) {
  .board { grid-template-columns: 1fr; }
  .top-title { display: none; }
}
@media (max-width: 640px) {
  .top-inner, .bar, .board { padding-left: 16px; padding-right: 16px; }
  .bar > div { min-width: 0; flex: 1 1 45%; }
  .bar .grow { flex-basis: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .top .btn-label { display: none; }
  .top-inner { gap: 6px; }
  .top img { height: 22px; }
  .top .btn-sm { padding: 0 10px; }
}
