* {
  box-sizing: border-box;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
:root {
  --turquoise: #00c2a8;
  --blue: #0057d9;
  --dark: #0a1f44;
  --muted: #5a6b8c;
  --light: #f7faff;
  --border: #e5ebf4;
  --gradient: linear-gradient(135deg, #00c2a8 0%, #0057d9 100%);
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  background: linear-gradient(135deg, #fff 0%, #f7faff 100%);
  color: var(--dark);
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: auto -160px -220px auto;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.11), transparent 68%);
  pointer-events: none;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: clamp(210px, 18vw, 320px);
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  z-index: 3;
  backdrop-filter: blur(16px);
}
.sidebar:hover {
  scrollbar-color: #c5d2e4 transparent;
}
.sidebar::-webkit-scrollbar {
  width: 7px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.sidebar:hover::-webkit-scrollbar-thumb {
  background-color: #c5d2e4;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #93a8c4;
}
.brand {
  padding: 2px 12px 28px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.Zorion-Logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 18px;
}

.logo-placeholder:after {
  content: "";
  position: absolute;
  width: 26px;
  height: 5px;
  background: rgba(255, 255, 255, 0.42);
  transform: rotate(-43deg);
  left: 8px;
  top: 11px;
  border-radius: 99px;
}
.brand-name {
  font-size: 22px;
  letter-spacing: -0.7px;
}
.brand-name strong {
  color: var(--dark);
}
.brand-name span {
  background: var(--turquoise);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tagline {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0 53px;
  letter-spacing: 0.1px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-btn {
  border: 0;
  background: transparent;
  color: #30456d;
  text-align: left;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.nav-btn:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 0;
  width: 3px;
  border-radius: 8px;
  background: var(--gradient);
  transform: translateY(-50%);
  transition: height 0.25s ease;
}
.nav-btn:hover {
  background: #f1f6ff;
  color: var(--blue);
  transform: translateX(3px);
}
.nav-btn.active {
  background: linear-gradient(90deg, #eef6ff, #f8fbff);
  color: var(--blue);
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(0, 87, 217, 0.04);
}
.nav-btn.active:before {
  height: 55%;
}
.logo-space {
  margin: 16px 6px 12px;
  padding: 0px 0px;
  border: 1.5px dashed #cbd6e7;
  border-radius: 18px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.logo-space-mark {
  width: 42px;
  height: 42px;
  border: 2px solid #b8c4d6;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #9aa9c0;
  font-weight: 900;
  font-size: 23px;
  margin-bottom: 8px;
}
.logo-space strong {
  font-size: 12px;
  color: #91a0b7;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.logo-space span {
  font-size: 10px;
  color: #a0aec1;
  margin-top: 5px;
}
.sidebar-footer {
  margin-top: auto;
  color: #8a9ab3;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
}
.main {
  flex: 1;
  padding: 30px 34px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.main:after {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -150px;
  width: 330px;
  height: 260px;
  background: linear-gradient(
    145deg,
    rgba(0, 194, 168, 0.08),
    rgba(0, 87, 217, 0.07)
  );
  border-radius: 60% 40% 50% 20%;
  pointer-events: none;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  position: relative;

  font-size: 10px;
  letter-spacing: 2.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--turquoise);

  text-shadow:
    0 0 5px var(--turquoise),
    0 0 15px rgba(0, 255, 220, 0.6);

  animation: cyberFlicker 3s infinite;
}

@keyframes cyberFlicker {
  0%,
  85%,
  100% {
    transform: translateX(0);
    opacity: 1;
    text-shadow:
      0 0 5px var(--turquoise),
      0 0 15px rgba(0, 255, 220, 0.6);
  }

  86% {
    transform: translateX(-2px);
    text-shadow:
      2px 0 #00ffff,
      -2px 0 #ff00aa,
      0 0 15px var(--turquoise);
  }

  87% {
    transform: translateX(2px);
  }

  88% {
    transform: translateX(-1px);
    opacity: 0.7;
  }

  89% {
    transform: translateX(0);
    opacity: 1;
  }
}

.topbar h1 {
  margin: 4px 0 5px;
  font-size: 29px;
  letter-spacing: -0.8px;
  color: var(--dark);
}
.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.search-top {
  position: relative;
  height: 43px;
  width: 255px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: #9aa7bb;
  box-shadow: 0 4px 16px rgba(10, 31, 68, 0.035);
  transition: border-color 0.2s ease;
}
.search-top:focus-within {
  border-color: #7fb0f5;
  box-shadow: 0 0 0 4px rgba(0, 87, 217, 0.08);
}
.search-icon {
  font-size: 14px;
}
.search-top input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--dark);
  font-family: inherit;
  min-width: 0;
}
.search-top input::placeholder {
  color: #9aa7bb;
}
.search-top kbd {
  font-size: 9px;
  background: #f3f6fa;
  border: 1px solid #e7ecf3;
  border-radius: 5px;
  padding: 3px 5px;
  color: #8492a8;
  flex-shrink: 0;
}
.global-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(10, 31, 68, 0.16);
  padding: 8px;
  max-height: 340px;
  overflow: auto;
  z-index: 30;
}
.global-results.hidden {
  display: none;
}
.gs-group + .gs-group {
  margin-top: 6px;
}
.gs-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 6px 8px 2px;
}
.gs-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
  transition: background 0.15s ease;
}
.gs-item:hover,
.gs-item:focus-visible {
  background: #eef6ff;
}
.gs-empty {
  padding: 14px 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.icon-btn {
  height: 43px;
  width: 43px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 11px;
  color: var(--dark);
  cursor: pointer;
  transition: 0.22s ease;
}
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: #bcd0ee;
  color: var(--blue);
  box-shadow: 0 8px 20px rgba(0, 87, 217, 0.09);
}
.primary {
  border: 0;
  background: var(--gradient);
  color: #fff;
  border-radius: 10px;
  padding: 11px 17px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 87, 217, 0.16);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}
.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 87, 217, 0.22);
  filter: saturate(1.08);
}
.primary:active {
  transform: translateY(0) scale(0.98);
}
.view {
  display: none;
  animation: viewIn 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.view.active {
  display: block;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.card,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(10, 31, 68, 0.045);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card:after {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  right: -42px;
  top: -44px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(0, 194, 168, 0.1),
    rgba(0, 87, 217, 0.07)
  );
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(10, 31, 68, 0.08);
  border-color: #d7e3f4;
}
.card-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.card-value {
  font-size: 28px;
  font-weight: 850;
  margin-top: 9px;
  color: var(--dark);
}
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel {
  overflow: hidden;
}
.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f6;
}
.panel-head h2 {
  margin: 0;
  font-size: 17px;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  padding: 10px 12px;
  border: 1px solid #d6deea;
  border-radius: 9px;
  background: #fff;
  outline: none;
  transition: 0.2s;
}
.toolbar input {
  min-width: 260px;
  flex: 1;
}
.toolbar select {
  min-width: 170px;
}
.toolbar input:focus,
.toolbar select:focus {
  border-color: #7fb0f5;
  box-shadow: 0 0 0 4px rgba(0, 87, 217, 0.08);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf1f6;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: #7889a5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td {
  font-size: 14px;
  color: #263c64;
}
tr {
  transition: background 0.2s ease;
}
tbody tr:hover {
  background: #f8fbff;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}
.actions button {
  border: 1px solid #e2e8f1;
  background: #fff;
  color: #536580;
  border-radius: 7px;
  padding: 6px 9px;
  margin-right: 4px;
  cursor: pointer;
  transition: 0.18s;
}
.actions button:hover {
  color: var(--blue);
  border-color: #bdd3f3;
  transform: translateY(-1px);
}
.empty {
  padding: 35px;
  text-align: center;
  color: #94a3b8;
}
.list-item {
  padding: 15px 20px;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  transition: background 0.2s;
}
.list-item:hover {
  background: #f9fbff;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-title {
  font-weight: 700;
  color: var(--dark);
}
.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 68, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
  backdrop-filter: blur(6px);
  animation: overlayIn 0.25s ease;
}
.modal.hidden {
  display: none;
}
.modal.closing {
  animation: overlayOut 0.2s ease forwards;
}
.modal-box {
  background: #fff;
  width: min(520px, 100%);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 25px 80px rgba(10, 31, 68, 0.25);
  animation: modalIn 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.contact-detail-box {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.contact-summary {
  display: flex;
  align-items: center;
  gap: 13px;
}
.contact-summary h3,
.detail-form h3,
.timeline h3 {
  margin: 0;
  color: var(--dark);
}
.contact-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.contact-monogram {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: var(--gradient);
}
.contact-info {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: #52627b;
  font-size: 13px;
}
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.detail-metrics div {
  padding: 12px;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 3px;
}
.detail-metrics div:last-child {
  border-right: 0;
}
.detail-metrics strong {
  color: var(--dark);
  font-size: 16px;
}
.detail-metrics span {
  font-size: 11px;
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.detail-form {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px;
  display: grid;
  gap: 9px;
}
.detail-form h3 {
  font-size: 14px;
}
.detail-form input,
.detail-form select,
.detail-form textarea {
  width: 100%;
  border: 1px solid #d6deea;
  border-radius: 8px;
  padding: 9px;
  font: inherit;
  font-size: 12px;
  resize: vertical;
}
.detail-form textarea {
  min-height: 72px;
}
.detail-form .secondary {
  padding: 8px 10px;
  font-size: 12px;
}
.timeline {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.timeline h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.timeline article {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f6;
}
.timeline p {
  margin: 0;
  font-size: 13px;
  color: #263c64;
}
.timeline small {
  color: var(--muted);
  font-size: 11px;
}
.timeline-kind {
  background: #eef6ff;
  color: var(--blue);
  height: max-content;
  padding: 4px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.modal.closing .modal-box {
  animation: modalOut 0.2s ease forwards;
}
@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes overlayOut {
  to {
    opacity: 0;
  }
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.94) rotateX(3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}
@keyframes modalOut {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin: 0;
  color: var(--dark);
}
.modal-head button {
  border: 0;
  background: #f4f7fb;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
  transition: 0.2s;
}
.modal-head button:hover {
  background: #edf4ff;
  color: var(--blue);
  transform: rotate(90deg);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 13px;
  font-weight: 700;
  color: #475a7a;
}
.field input,
.field select {
  padding: 11px;
  border: 1px solid #d6deea;
  border-radius: 9px;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}
.field input:focus,
.field select:focus {
  border-color: #75a8f0;
  box-shadow: 0 0 0 4px rgba(0, 87, 217, 0.08);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.secondary {
  border: 1px solid #d6deea;
  background: #fff;
  color: #52627b;
  border-radius: 9px;
  padding: 10px 15px;
  cursor: pointer;
  transition: 0.2s;
}
.secondary:hover {
  background: #f7faff;
  border-color: #bfd0e8;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.done {
  text-decoration: line-through;
  color: #94a3b8;
}
@media (max-width: 1100px) {
  .search-top {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 210px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .inbox-layout {
    grid-template-columns: 270px minmax(380px, 1fr);
    overflow-x: auto;
  }
}
@media (max-width: 650px) {
  .app {
    display: block;
  }
  .sidebar {
    width: 100%;
    padding: 12px;
    position: relative;
    height: auto;
  }
  .brand {
    padding: 4px 8px 12px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav-btn {
    min-width: max-content;
  }
  .logo-space {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  .main {
    padding: 18px;
  }
  .topbar {
    align-items: flex-start;
  }
  .topbar h1 {
    font-size: 23px;
  }
  .top-actions .icon-btn {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .automation-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .inbox-layout {
    display: block;
    min-height: auto;
  }
  .inbox-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 250px;
    overflow: auto;
  }
  .thread-messages {
    min-height: 260px;
  }
  .inbox-compose {
    grid-template-columns: 1fr;
  }
  .inbox-compose textarea {
    height: 62px;
  }
  .inbox-compose .primary {
    justify-self: end;
  }
  .reports-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .stage-report-row {
    grid-template-columns: 1fr auto;
  }
  .stage-report-row .report-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .seller-row {
    grid-template-columns: 1.4fr 0.7fr 0.7fr 1fr;
    font-size: 10px;
    gap: 4px;
  }
}

/* --- Usuario en sidebar footer --- */
.sidebar-footer {
  margin-top: auto;
  padding: 8px 10px 0;
  border-top: 1px solid var(--border);
}
.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.logout-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #8a9ab3;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: 0.2s;
}
.logout-btn:hover {
  color: var(--blue);
  background: #eef6ff;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}
.user-role {
  font-size: 11px;
  color: var(--muted);
}
.footer-note {
  color: #8a9ab3;
  font-size: 10.5px;
  line-height: 1.4;
  padding-bottom: 6px;
}

/* --- Contador de resultados --- */
.results-count {
  font-size: 12.5px;
  color: var(--muted);
  margin: -6px 0 12px 2px;
}

/* --- Embudo de ventas --- */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(208px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 4px;
}
.pipeline-column {
  background: #f4f8ff;
  border: 1px solid var(--border);
  border-radius: 13px;
  min-height: 250px;
  overflow: hidden;
}
.pipeline-column > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 13px;
  border-bottom: 1px solid #e4ebf5;
}
.pipeline-column h3 {
  margin: 0;
  font-size: 13px;
  color: var(--dark);
}
.pipeline-column header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.pipeline-column header strong {
  color: var(--blue);
  font-size: 11px;
  white-space: nowrap;
}
.pipeline-dropzone {
  padding: 9px;
  min-height: 185px;
  transition:
    background 0.18s,
    outline 0.18s;
}
.pipeline-dropzone.drag-over {
  background: #e4f7f5;
  outline: 2px dashed var(--turquoise);
  outline-offset: -5px;
}
.pipeline-card {
  background: #fff;
  border: 1px solid #e0e8f2;
  border-radius: 9px;
  padding: 11px;
  box-shadow: 0 4px 10px rgba(10, 31, 68, 0.04);
  cursor: grab;
  margin-bottom: 8px;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.pipeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(10, 31, 68, 0.1);
}
.pipeline-card.dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.pipeline-card-title {
  font-weight: 750;
  font-size: 13px;
  color: var(--dark);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-card-value {
  font-weight: 800;
  color: var(--blue);
  font-size: 13px;
  margin: 7px 0;
}
.pipeline-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.pipeline-card-footer button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px 3px;
  cursor: pointer;
}
.pipeline-card-footer button:hover {
  color: var(--blue);
}
.pipeline-empty {
  color: #93a1b7;
  font-size: 11px;
  text-align: center;
  margin: 35px 4px;
  line-height: 1.4;
}

/* --- Automatizaciones --- */
.automation-intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.automation-intro h2 {
  margin: 0;
  font-size: 19px;
}
.automation-intro p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.automation-list {
  display: grid;
  gap: 12px;
  max-width: 850px;
}
.automation-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(10, 31, 68, 0.04);
}
.automation-card.is-paused {
  opacity: 0.58;
}
.automation-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e4f7f5;
  font-size: 18px;
}
.automation-content {
  flex: 1;
  min-width: 0;
}
.automation-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.automation-title-row h3 {
  margin: 0;
  font-size: 14px;
  color: var(--dark);
}
.automation-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.automation-card p strong {
  color: #52627b;
}
.automation-card p b {
  margin: 0 5px;
  color: var(--turquoise);
}
.automation-delete {
  border: 0;
  background: transparent;
  color: #8a9ab3;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
}
.automation-delete:hover {
  color: #d64545;
}
.automation-toggle {
  display: inline-flex;
  cursor: pointer;
}
.automation-toggle input {
  position: absolute;
  opacity: 0;
}
.automation-toggle span {
  width: 34px;
  height: 20px;
  border-radius: 99px;
  background: #cbd6e7;
  position: relative;
  transition: 0.2s;
}
.automation-toggle span:after {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}
.automation-toggle input:checked + span {
  background: var(--turquoise);
}
.automation-toggle input:checked + span:after {
  transform: translateX(14px);
}

/* --- Bandeja multicanal --- */
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(400px, 1fr);
  min-height: 570px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(10, 31, 68, 0.045);
}
.inbox-sidebar {
  border-right: 1px solid var(--border);
  background: #fbfdff;
}
.inbox-sidebar-head {
  padding: 16px;
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--border);
}
.inbox-sidebar-head h2 {
  font-size: 16px;
  margin: 0;
}
.inbox-sidebar select {
  width: 100%;
  border: 1px solid #d6deea;
  border-radius: 8px;
  padding: 8px;
  color: #52627b;
  background: #fff;
  font: inherit;
  font-size: 12px;
}
.conversation-item {
  width: 100%;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: transparent;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--dark);
}
.conversation-item:hover,
.conversation-item.active {
  background: #eef6ff;
}
.conversation-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 11px;
  font-weight: 800;
}
.conversation-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}
.conversation-copy strong {
  font-size: 12px;
}
.conversation-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.conversation-item time {
  color: #94a3b8;
  font-size: 10px;
}
.inbox-thread {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.thread-head {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.thread-head h2 {
  margin: 0;
  font-size: 16px;
}
.thread-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.thread-head .secondary {
  padding: 7px 10px;
  font-size: 12px;
}
.thread-messages {
  flex: 1;
  min-height: 330px;
  padding: 17px;
  background: #f8fbff;
  overflow: auto;
}
.message {
  max-width: min(78%, 520px);
  padding: 10px 12px;
  margin: 0 0 10px;
  border-radius: 11px 11px 11px 2px;
  background: #fff;
  border: 1px solid #e1e9f3;
}
.message.outgoing {
  margin-left: auto;
  border-radius: 11px 11px 2px 11px;
  background: #e4f7f5;
  border-color: #c8ece6;
}
.message p {
  margin: 5px 0;
  font-size: 13px;
  color: #263c64;
  white-space: pre-wrap;
}
.message-channel {
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
}
.message time {
  color: var(--muted);
  font-size: 10px;
}
.inbox-compose {
  display: grid;
  grid-template-columns: 125px 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.inbox-compose select,
.inbox-compose textarea {
  border: 1px solid #d6deea;
  border-radius: 8px;
  padding: 9px;
  font: inherit;
  font-size: 12px;
}
.inbox-compose textarea {
  min-height: 39px;
  height: 39px;
  resize: vertical;
}
.inbox-compose .primary {
  padding: 8px 10px;
  font-size: 12px;
}
.inbox-placeholder {
  margin: auto;
  text-align: center;
  color: var(--muted);
}
.inbox-placeholder span {
  font-size: 30px;
}
.inbox-placeholder h2 {
  color: var(--dark);
  font-size: 16px;
}
.inbox-placeholder p {
  font-size: 13px;
}

/* --- Reportes --- */
.reports-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.reports-intro h2 {
  margin: 0;
  font-size: 19px;
}
.reports-intro p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.report-cards {
  margin-bottom: 18px;
}
.report-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.report-money {
  font-size: clamp(19px, 2.2vw, 27px);
}
.report-cycle {
  font-size: 23px;
}
.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.report-content {
  padding: 16px;
}
.stage-report-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(90px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}
.stage-report-row:last-child {
  border-bottom: 0;
}
.stage-report-label {
  display: grid;
  gap: 3px;
}
.stage-report-label span {
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
}
.stage-report-label small {
  color: var(--muted);
  font-size: 10px;
}
.report-bar {
  height: 8px;
  border-radius: 99px;
  background: #eaf0f7;
  overflow: hidden;
}
.report-bar i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--gradient);
}
.stage-report-row strong {
  font-size: 11px;
  color: var(--blue);
  white-space: nowrap;
}
.seller-table {
  display: grid;
}
.seller-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.5fr) 0.7fr 0.7fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 12px;
  color: #52627b;
}
.seller-row:last-child {
  border-bottom: 0;
}
.seller-row strong {
  color: var(--dark);
}
.seller-head {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35px;
  color: #8190a7;
  padding-top: 0;
}

/* --- Estado vacío con icono --- */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
}
.empty:before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border: 2px dashed #cbd6e7;
  border-radius: 50%;
}

/* --- Toasts --- */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}
.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--turquoise);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--dark);
  box-shadow: 0 14px 34px rgba(10, 31, 68, 0.16);
  min-width: 220px;
  animation: toastIn 0.25s ease;
}
.toast.toast-danger {
  border-left-color: #e2504f;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* --- Importador CSV --- */
.hidden-file-input {
  display: none;
}
.import-box {
  width: min(640px, 100%);
}
.import-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}
.import-hint code {
  background: #f3f6fa;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 12px;
}
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  border: 2px dashed #cbd6e7;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  transition: 0.2s;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--blue);
  background: #f4f8ff;
  color: var(--blue);
}
.dropzone-icon {
  font-size: 26px;
}
.import-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.import-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
}
.import-chip.warn {
  background: #fdf3e0;
  color: #a4680b;
}
.import-preview {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.import-preview table {
  width: 100%;
  border-collapse: collapse;
}
.import-preview th,
.import-preview td {
  padding: 8px 10px;
  font-size: 12.5px;
  border-bottom: 1px solid #edf1f6;
  white-space: nowrap;
}
.import-preview tr.row-error td {
  background: #fdecec;
  color: #b13232;
}
.import-row-error-msg {
  font-size: 11px;
  color: #b13232;
}
