.ventas360-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ventas360-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.ventas360-header h2 {
  margin: 0 0 4px 0;
  font-size: 26px;
}

.ventas360-header p {
  margin: 0;
  color: #64748b;
}

.ventas360-eyebrow {
  display: inline-block;
  margin-bottom: 3px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ventas360-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
}

.ventas360-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 24px;
}

.ventas360-profile-grid p {
  margin: 0;
  font-size: 14px;
}

.ventas360-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ventas360-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}

.ventas360-card:nth-child(1) {
  border-left: 5px solid #2563eb;
}

.ventas360-card:nth-child(2) {
  border-left: 5px solid #16a34a;
}

.ventas360-card:nth-child(3) {
  border-left: 5px solid #ea580c;
}

.ventas360-card:nth-child(4) {
  border-left: 5px solid #9333ea;
}

.ventas360-card h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #475569;
}

.ventas360-card span {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.ventas360-card small {
  color: #64748b;
}

.ventas360-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px;
  background: #ffffff;
}

.ventas360-tabs button {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  color: #475569;
}

.ventas360-tabs button.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.ventas360-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ventas360-section {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  background: #ffffff;
}

.ventas360-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ventas360-section-header h3 {
  margin: 0;
}

.ventas360-section-header button,
.ventas360-quote-footer button {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

.ventas360-empty,
.ventas360-loading {
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #64748b;
}

.ventas360-loading {
  font-weight: 700;
}

.ventas360-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.ventas360-mini-row:last-child {
  border-bottom: none;
}

.ventas360-mini-row strong {
  display: block;
  color: #0f172a;
}

.ventas360-mini-row span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.ventas360-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ventas360-task {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.ventas360-quote-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #ffffff;
}

.ventas360-quote-header,
.ventas360-quote-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ventas360-status {
  background: #eff6ff;
  color: #2563eb;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.ventas360-quote-event {
  font-weight: 700;
  margin: 10px 0;
}

.ventas360-quote-details {
  display: flex;
  gap: 16px;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 12px;
}

.ventas360-crm-list {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ventas360-crm-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 920px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
}

.ventas360-crm-row:last-child {
  border-bottom: none;
}

.ventas360-crm-head {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ventas360-crm-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ventas360-crm-row button,
.ventas360-crm-row select,
.ventas360-fiscal-form input,
.ventas360-fiscal-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.ventas360-crm-row button {
  padding: 0 10px;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
}

.ventas360-crm-head .ventas360-sort-button {
  width: auto;
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-transform: uppercase;
}

.ventas360-crm-row button:disabled {
  border-color: #e5e7eb;
  color: #94a3b8;
  cursor: not-allowed;
}

.ventas360-crm-row .ventas360-icon-btn {
  width: auto;
  height: auto;
  min-width: auto;
  min-height: auto;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ventas360-crm-row .ventas360-icon-btn:hover {
  background: transparent;
  transform: scale(1.12);
  cursor: pointer;
}

.ventas360-crm-row .ventas360-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ventas360-crm-row .ventas360-icon-btn:disabled:hover {
  transform: none;
}

.ventas360-crm-row select {
  padding: 0 6px;
}

.ventas360-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.ventas360-filter-bar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.ventas360-crm-quotes .ventas360-crm-row > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
}

.ventas360-crm-quotes .ventas360-crm-row {
  min-width: 860px;
  grid-template-columns: 110px minmax(170px, 1.4fr) 105px 74px 110px 96px 116px;
  gap: 8px;
  padding: 8px 10px;
}

.ventas360-crm-quotes .ventas360-crm-row > span:nth-child(6) select {
  max-width: 96px;
  min-height: 30px;
  font-size: 12px;
}

.ventas360-crm-quotes .ventas360-icon-btn {
  font-size: 15px;
}

.ventas360-crm-contracts .ventas360-crm-row {
  min-width: 820px;
  grid-template-columns: 1.4fr 1.3fr 110px 80px 150px 90px;
}

/* Cliente 360 > Cotizaciones compact */
.ventas360-crm-quotes .ventas360-crm-row {
  min-width: 790px;
  grid-template-columns: 98px minmax(120px, 0.95fr) 96px 60px 98px 88px 112px;
  gap: 6px;
  padding: 7px 8px;
}

.ventas360-quote-event-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ventas360-crm-quotes .ventas360-crm-row > span:nth-child(6) select {
  max-width: 88px;
  min-height: 28px;
  padding: 0 4px;
  font-size: 11px;
}

.ventas360-crm-quotes .ventas360-icon-btn {
  padding: 0 3px;
  font-size: 14px;
}

/* Cliente 360 > Cotizaciones compact V2 */
.ventas360-crm-quotes .ventas360-crm-row {
  min-width: 710px;
  grid-template-columns: 88px minmax(90px, 0.72fr) 84px 48px 88px 74px 92px;
  gap: 4px;
  padding: 5px 6px;
  font-size: 12px;
}

.ventas360-crm-quotes .ventas360-crm-row > span {
  min-width: 0;
}

.ventas360-crm-quotes .ventas360-crm-row > span:nth-child(6) select {
  max-width: 74px;
  min-height: 25px;
  padding: 0 3px;
  font-size: 10px;
}

.ventas360-crm-quotes .ventas360-crm-row > span:last-child {
  gap: 2px;
}

.ventas360-crm-quotes .ventas360-icon-btn {
  padding: 0 2px;
  font-size: 13px;
}

.ventas360-status-row-archived {
  background: #f8fafc;
  color: #64748b;
}

.ventas360-status-row-archived > span:first-child::before {
  content: "Archivada";
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.ventas360-status-row-converted_to_remission {
  background: #f0fdf4;
}

.ventas360-status-row-converted_to_remission > span:first-child::before {
  content: "Remisión";
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
}

.ventas360-remissioned-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.ventas360-crm-account .ventas360-crm-row {
  min-width: 1180px;
  grid-template-columns:
    150px
    1.4fr
    130px
    120px
    120px
    120px
    110px
    90px;
}

.ventas360-account-group-row {
  background: #ffffff;
  font-weight: 700;
}

.ventas360-account-toggle {
  width: auto;
  min-width: 24px;
  min-height: 24px;
  margin-right: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 900;
}

.ventas360-account-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ventas360-account-status-pendiente {
  background: #fef3c7;
  color: #92400e;
}

.ventas360-account-status-liquidada {
  background: #dcfce7;
  color: #166534;
}

.ventas360-account-movements {
  min-width: 1180px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 0 0 28px;
}

.ventas360-account-movement-row {
  display: grid;
  grid-template-columns:
    100px
    100px
    120px
    160px
    120px
    120px
    120px
    90px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}

.ventas360-account-movement-row:last-child {
  border-bottom: none;
}

.ventas360-account-movement-head {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ventas360-crm-events .ventas360-crm-row {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.ventas360-fiscal-grid,
.ventas360-fiscal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.ventas360-fiscal-grid > div,
.ventas360-fiscal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ventas360-fiscal-grid label,
.ventas360-fiscal-form span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ventas360-fiscal-grid span {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.ventas360-fiscal-form input,
.ventas360-fiscal-form select {
  padding: 0 10px;
}

.ventas360-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.ventas360-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .ventas360-profile-grid,
  .ventas360-kpis,
  .ventas360-grid,
  .ventas360-fiscal-grid,
  .ventas360-fiscal-form {
    grid-template-columns: 1fr;
  }
}
