/* Rumo — CRM */
.rm-top { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 20px; max-width: 1600px; margin: 0 auto; }
.rm-top .kd-nav { margin-right: auto; }
.rm-main { max-width: 1600px; margin: 0 auto; padding: 24px 20px 32px; display: grid; gap: 16px; min-width: 0; }
.rm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rm-search .kd-input { width: 320px; border-radius: 100px; }
.rm-hint { margin-top: -4px; }
.rm-hint--touch { display: none; }
@media (hover: none) { .rm-hint--touch { display: inline; } }

/* Quadro */
.rm-board { display: grid; grid-template-columns: repeat(6, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity; }
.rm-col { background: color-mix(in srgb, var(--soft) 70%, transparent); border-radius: 18px; padding: 10px; display: grid; gap: 10px; align-content: start; min-height: 240px; scroll-snap-align: start; border: 1px dashed transparent; transition: border-color .2s, background .2s; }
.rm-col.is-over { border-color: var(--fg); background: color-mix(in srgb, var(--soft) 100%, transparent); }
.rm-col__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 6px 2px; border-top: 3px solid var(--fg); padding-top: 10px; }
.rm-col--ganho .rm-col__head { border-color: var(--ok); }
.rm-col--perdido .rm-col__head { border-color: var(--line); }
.rm-col__head strong { font-family: var(--f-display); font-weight: 500; font-size: 15px; }
.rm-col__head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rm-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 100px; background: var(--surface); font-size: 12px; margin-left: 4px; }
.rm-col__cards { display: grid; gap: 8px; min-height: 120px; align-content: start; }

/* Card */
.rm-card { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: box-shadow .25s, border-color .25s; touch-action: manipulation; }
.rm-card:hover { border-color: var(--fg); box-shadow: var(--shadow); }
.rm-card__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rm-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.rm-card__company { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-card__title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.rm-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rm-card__value { font-family: var(--f-display); font-weight: 500; }
.rm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rm-tag { font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 100px; padding: 2px 8px; }
.rm-col--ganho .rm-card { border-left: 3px solid var(--ok); }
.rm-col--perdido .rm-card { opacity: .65; }

/* Arrastando */
.rm-card.is-dragging { position: fixed; z-index: 1200; pointer-events: none; cursor: grabbing; box-shadow: 0 24px 50px rgba(0,0,0,.25); transform: rotate(2deg); }
.rm-placeholder { border: 2px dashed var(--fg); border-radius: 14px; opacity: .35; }
.rm-dragging, .rm-dragging * { cursor: grabbing !important; user-select: none !important; }
.rm-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 1300; }
.rm-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Negócio */
.rm-deal { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.rm-deal > * { min-width: 0; display: grid; gap: 16px; }
@media (max-width: 1000px) { .rm-deal { grid-template-columns: minmax(0, 1fr); } }
.rm-stage-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rm-stage-bar button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 8px; font-size: 13px; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.rm-stage-bar button:hover { border-color: var(--fg); }
.rm-stage-bar button[aria-current="step"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rm-stage-bar button.is-past { background: var(--soft); }
.rm-stage-bar .is-won[aria-current="step"] { background: var(--ok); border-color: var(--ok); }
@media (max-width: 760px) { .rm-stage-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rm-timeline { list-style: none; display: grid; gap: 2px; }
.rm-timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rm-timeline li:last-child { border-bottom: 0; }
.rm-timeline small { display: block; color: var(--muted); font-size: 12px; }
.rm-task { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rm-task:last-child { border-bottom: 0; }
.rm-task form { display: contents; }
.rm-task button.rm-check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; flex: none; display: grid; place-items: center; font-size: 12px; }
.rm-task.is-done { opacity: .5; }
.rm-task.is-done .rm-task__title { text-decoration: line-through; }
.rm-task.is-done button.rm-check { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rm-task__title { flex: 1; min-width: 0; }
.rm-task__title small { display: block; color: var(--muted); font-size: 12px; }
.rm-dl { display: grid; gap: 8px; font-size: 14px; }
.rm-dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.rm-dl dt { color: var(--muted); }
.rm-dl dd { text-align: right; overflow-wrap: anywhere; }
.rm-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.rm-inline > .kd-input, .rm-inline > .kd-select { flex: 1; min-width: 140px; }

@media (max-width: 760px) {
  .rm-top { gap: 10px; padding: 0 14px; }
  .rm-top .kd-nav { flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .rm-top .kd-nav a { padding: 8px 10px; white-space: nowrap; }
  .rm-top .kd-brand { font-size: 0; gap: 0; }
  .rm-search, .rm-search .kd-input { width: 100%; }
  .rm-board { grid-template-columns: repeat(6, 82vw); }
  .rm-main { padding: 16px 14px 24px; }
}
