/* CRM ExFood — identidade visual ExFood (Munsell #ED093E, Gunmetal #10232B,
   Picton Blue #00B2FF, Jasmine #FFE786, Floral White #FFFDF5) */
:root {
  --red: #ed093e;
  --red-d: #c4072f;
  --red-t: #d6083a;
  --navy: #10232b;
  --blue: #00b2ff;
  --blue-d: #0b6e9a;
  --yellow: #ffe786;
  --cream: #fffdf5;
  --text: #10232b;
  --muted: #5f6e74;
  --line: rgba(16, 35, 43, 0.08);
  --soft: #f4f1e4;
  --green: #15803d;
  --green-b: #e7f6ec;
  --orange: #b45309;
  --orange-b: #fdf1dc;
  --red-b: #fdecef;
  --info-b: #e3f4fc;
  --yel-t: #6b4e00;
  --yel-b: #fff4c2;
  --shadow: 0 1px 2px rgba(16, 35, 43, 0.04), 0 10px 30px -18px rgba(16, 35, 43, 0.18);
  --shadow-h: 0 2px 4px rgba(16, 35, 43, 0.04), 0 18px 40px -16px rgba(16, 35, 43, 0.22);
  --hf: "Inter Tight", "DM Sans", Arial, sans-serif;
  --bf: "DM Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--bf);
  color: var(--text);
  background: radial-gradient(1100px 520px at 105% -8%, rgba(0, 178, 255, 0.13), transparent 60%), radial-gradient(900px 520px at 35% 112%, rgba(237, 9, 62, 0.08), transparent 60%), var(--cream);
  background-attachment: fixed;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red-t); }
h1, h2, h3 { font-family: var(--hf); margin: 0; letter-spacing: -0.5px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.15); } 100% { transform: translate(-20px, 20px) scale(0.95); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
@keyframes fill { from { width: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes sheen { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow: hidden auto;
  flex: 0 0 248px; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, #10232b 0%, #0c1b22 55%, #170f24 100%);
  color: var(--cream); border-radius: 0 28px 28px 0; z-index: 5;
}
.side > *:not(.blob) { position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; }
.blob.a { width: 260px; height: 260px; left: -90px; top: -70px; background: radial-gradient(circle, rgba(237, 9, 62, 0.45), transparent 70%); filter: blur(30px); animation: drift 16s ease-in-out infinite alternate; }
.blob.b { width: 300px; height: 300px; right: -150px; bottom: 60px; background: radial-gradient(circle, rgba(0, 178, 255, 0.35), transparent 70%); filter: blur(34px); animation: drift 20s ease-in-out infinite alternate-reverse; }
.logo { padding: 4px 10px 18px; }
.logo .lockup { position: relative; display: inline-block; padding-bottom: 18px; }
.logo img { display: block; width: 150px; height: auto; }
.logo .crm { position: absolute; right: -6px; bottom: -4px; font-family: "Dancing Script", cursive; font-weight: 700; font-size: 28px; line-height: 1; color: var(--red); }
.modsw { display: flex; gap: 4px; padding: 4px; margin: 0 4px 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; }
.modsw a { flex: 1; text-align: center; padding: 9px 0; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600; color: #afc0c7; }
.modsw a.on { background: linear-gradient(135deg, var(--red-d), #e8164a); color: #fff; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(237, 9, 62, 0.7); }
.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; text-decoration: none; font-size: 15px; color: var(--cream); transition: background 0.2s; }
.nav:hover { background: rgba(255, 255, 255, 0.06); }
.nav svg { color: #afc0c7; flex: 0 0 auto; }
.nav.on { background: linear-gradient(90deg, rgba(237, 9, 62, 0.3), rgba(237, 9, 62, 0.06)); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--red); }
.nav.on svg { color: var(--red); }
.nav .badge { margin-left: auto; }
.badge { min-width: 22px; height: 22px; border-radius: 11px; background: var(--red-t); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 6px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.side-foot .me { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.side-foot button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #afc0c7; font-size: 14px; border-radius: 10px; }
.side-foot button:hover { background: rgba(255, 255, 255, 0.06); }
.main { flex: 1; min-width: 0; padding: 26px 32px 60px; display: flex; flex-direction: column; gap: 20px; }
.main > * { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.main > *:nth-child(2) { animation-delay: 0.04s; } .main > *:nth-child(3) { animation-delay: 0.08s; } .main > *:nth-child(n + 4) { animation-delay: 0.12s; }
.demo-band { background: linear-gradient(90deg, var(--yel-b), #fff); border: 1px solid #e8c44055; color: var(--yel-t); border-radius: 14px; padding: 8px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head .kicker { font-size: 13px; color: var(--muted); font-weight: 600; }
.head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; background: linear-gradient(90deg, #10232b 0%, #10232b 55%, #b3123a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }

/* ---------- componentes ---------- */
.card { background: rgba(255, 255, 255, 0.86); border: 1px solid rgba(16, 35, 43, 0.06); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s; }
.card.hov:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.card h3 { font-size: 17px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { position: relative; overflow: hidden; gap: 6px; }
.kpi .glow { position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; filter: blur(6px); pointer-events: none; }
.kpi .bar { width: 36px; height: 5px; border-radius: 3px; background-size: 200% 100% !important; animation: sheen 3s linear infinite; }
.kpi .lab { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--hf); font-size: 28px; letter-spacing: -0.6px; }
.kpi .sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.9); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, filter 0.2s; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn.pri { background: linear-gradient(135deg, var(--red-d) 0%, #e8164a 100%); color: #fff; border: 0; box-shadow: 0 10px 22px -10px rgba(237, 9, 62, 0.75); }
.btn.dark { background: var(--navy); color: #fff; border: 0; }
.btn.green { background: linear-gradient(135deg, #15803d, #16a34a); color: #fff; border: 0; box-shadow: 0 10px 22px -12px rgba(22, 163, 74, 0.8); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.round { border-radius: 99px; }
.btn.danger { color: var(--red-t); }
.ibtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.9); display: inline-grid; place-items: center; color: var(--blue-d); cursor: pointer; box-shadow: 0 6px 14px -10px rgba(16, 35, 43, 0.3); }
.ibtn:hover { color: var(--red-t); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { min-height: 44px; padding: 0 12px; border-radius: 13px; background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(16, 35, 43, 0.1); box-shadow: 0 1px 2px rgba(16, 35, 43, 0.04); font-size: 14px; color: var(--text); font-weight: 500; width: 100%; }
textarea.input { padding: 10px 12px; resize: vertical; min-height: 80px; }
.input:focus { outline: 2px solid rgba(0, 178, 255, 0.35); outline-offset: 1px; }
.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 13px; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(16, 35, 43, 0.08); box-shadow: 0 1px 2px rgba(16, 35, 43, 0.04), 0 6px 16px -12px rgba(16, 35, 43, 0.25); color: var(--muted); flex: 0 1 320px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.seg { display: inline-flex; gap: 2px; background: rgba(16, 35, 43, 0.05); border: 1px solid rgba(16, 35, 43, 0.05); border-radius: 14px; padding: 3px; flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 11px; font-size: 14px; font-weight: 500; background: transparent; cursor: pointer; }
.seg button.on { background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(16, 35, 43, 0.06), 0 6px 14px -8px rgba(16, 35, 43, 0.3); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 9px; white-space: nowrap; border: 1px solid transparent; }
.chip.info { color: var(--blue-d); background: linear-gradient(135deg, var(--info-b), #fff); border-color: #0b6e9a22; }
.chip.ok { color: var(--green); background: linear-gradient(135deg, var(--green-b), #fff); border-color: #15803d22; }
.chip.warn { color: var(--orange); background: linear-gradient(135deg, var(--orange-b), #fff); border-color: #b4530922; }
.chip.bad { color: var(--red-t); background: linear-gradient(135deg, var(--red-b), #fff); border-color: #d6083a22; }
.chip.yel { color: var(--yel-t); background: linear-gradient(135deg, var(--yel-b), #fff); border-color: #6b4e0022; }
.chip.mute { color: var(--muted); background: linear-gradient(135deg, var(--soft), #fff); border-color: #5f6e7422; }
.pill { min-height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill .dot { width: 7px; height: 7px; border-radius: 4px; }
.av { border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: #fff; flex: 0 0 auto; }
.dot { width: 9px; height: 9px; border-radius: 5px; display: inline-block; flex: 0 0 auto; }
.dot.live { background: #16a34a; animation: pulse 2s infinite; }
.pbar { display: block; height: 8px; background: #eeebe1; border-radius: 99px; overflow: hidden; }
.pbar > span { display: block; height: 8px; border-radius: 99px; animation: fill 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1.5px dashed #d8d2bf; border-radius: 20px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead tr { background: linear-gradient(90deg, #fbf8ee, #fff3f6 60%, #eef9ff); }
.tbl th { text-align: left; padding: 10px; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl td { padding: 11px 10px; border-top: 1px solid rgba(16, 35, 43, 0.06); vertical-align: middle; }
.tbl tbody tr { transition: background 0.2s; }
.tbl tbody tr:hover { background: rgba(0, 178, 255, 0.05); }
.tbl tr.click { cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 100; box-shadow: 0 18px 40px -12px rgba(16, 35, 43, 0.5); animation: rise 0.3s both; max-width: 90vw; }
.toast.err { background: var(--red-t); }

/* ---------- funil ---------- */
.board { overflow-x: auto; padding-bottom: 10px; }
.board-in { display: flex; gap: 14px; align-items: flex-start; width: max-content; }
.colk { flex: 0 0 272px; background: linear-gradient(180deg, rgba(244, 241, 228, 0.95), rgba(244, 241, 228, 0.55)); border: 1px solid rgba(16, 35, 43, 0.05); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; transition: background 0.2s; }
.colk.over { background: linear-gradient(180deg, rgba(0, 178, 255, 0.14), rgba(244, 241, 228, 0.6)); }
.colk .ch { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.colk .ch b { flex: 1; font-size: 14px; }
.colk .cnt { font-size: 12px; font-weight: 700; background: #fff; border-radius: 99px; padding: 2px 9px; }
.lcard { background: #fff; border: 1px solid rgba(16, 35, 43, 0.06); border-radius: 18px; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 35, 43, 0.05), 0 8px 20px -14px rgba(16, 35, 43, 0.25); transition: transform 0.2s, box-shadow 0.2s; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.lcard.nostep { border: 1.5px solid var(--red-t); }
.lcard.dragging { opacity: 0.4; }
.lcard .t { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lcard .t b { font-size: 15px; line-height: 1.25; }
.lcard .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lcard .nx { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.lcard .nx.bad { color: var(--red-t); font-weight: 700; }
.lcard .nx.late { color: var(--orange); }

/* ---------- gaveta / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 35, 43, 0.32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 40; animation: fadein 0.2s both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(940px, 100%); background: var(--cream); box-shadow: -20px 0 60px rgba(16, 35, 43, 0.2); z-index: 41; display: flex; flex-direction: column; overflow: auto; animation: slidein 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.drawer .dh { padding: 22px 26px 16px; background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; z-index: 2; }
.drawer .db { padding: 20px 26px 40px; display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.drawer .dl { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.drawer .dr { flex: 1 1 260px; max-width: 300px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--line); padding-left: 18px; }
.stages { display: flex; gap: 3px; flex-wrap: wrap; }
.stages button { flex: 1 1 80px; min-height: 36px; border: 0; border-radius: 9px; font-size: 12px; background: var(--soft); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.stages button.past { background: #f7c9d3; font-weight: 700; }
.stages button.on { background: linear-gradient(135deg, var(--red-d), #e8164a); color: #fff; font-weight: 700; }
.hist { display: flex; gap: 12px; }
.hist .ic { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; flex: 0 0 auto; }
.hist .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hist .tx { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.track { background: linear-gradient(135deg, #eef9ff, #fff); border: 1px solid rgba(0, 178, 255, 0.18); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.track span { display: flex; justify-content: space-between; gap: 8px; }
.track b { text-align: right; word-break: break-word; }
.modal { position: fixed; z-index: 51; left: 0; right: 0; margin: 0 auto; top: 6vh; width: min(560px, 94vw); max-height: 88vh; overflow: auto; background: #fff; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -20px rgba(16, 35, 43, 0.45); animation: rise 0.25s both; }
.modal.wide { width: min(820px, 94vw); }
.modal h2 { font-size: 21px; }
.overlay.m { z-index: 50; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 500px at 20% 10%, rgba(237, 9, 62, 0.25), transparent 60%), radial-gradient(800px 500px at 90% 90%, rgba(0, 178, 255, 0.22), transparent 60%), linear-gradient(160deg, #10232b, #170f24); }
.login .box { width: min(420px, 100%); background: rgba(255, 255, 255, 0.96); border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6); animation: rise 0.4s both; }
.login .lockup { position: relative; display: inline-block; padding-bottom: 20px; align-self: center; margin-bottom: 6px; }
.login .lockup img { width: 190px; display: block; }
.login .crm { position: absolute; right: -6px; bottom: -4px; font-family: "Dancing Script", cursive; font-weight: 700; font-size: 34px; color: var(--red); }

/* ---------- responsivo ---------- */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { position: relative; height: auto; flex: none; border-radius: 0 0 24px 24px; }
  .side .navs { display: flex; flex-wrap: wrap; gap: 4px; }
  .side .nav { flex: 1 1 140px; }
  .main { padding: 18px 14px 60px; }
  .drawer .dr { max-width: none; border-left: 0; padding-left: 0; }
}
