.micrm-wrap {
  color: #1f2937;
}

.micrm-wrap h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 18px;
}

.micrm-global-search,
.micrm-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
}

.micrm-global-search input[type="search"] {
  width: min(680px, 100%);
  min-height: 38px;
}

.micrm-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.micrm-kpis > div,
.micrm-panel,
.micrm-kanban-column,
.micrm-calendar article {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.micrm-kpis > div {
  padding: 16px;
}

.micrm-kpis strong {
  display: block;
  color: #0f5ea8;
  font-size: 24px;
}

.micrm-kpis span {
  color: #64748b;
}

.micrm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.micrm-panel {
  padding: 16px;
}

.micrm-panel h2,
.micrm-kanban-column h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.micrm-form-grid,
.micrm-settings-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  column-gap: 22px;
  row-gap: 20px;
}

.micrm-field span {
  display: block;
  color: #334155;
  font-weight: 600;
}

.micrm-field input,
.micrm-field select,
.micrm-field textarea {
  background: #fff;
  border: 0;
  box-shadow: none;
  min-height: 26px;
  padding: 6px 10px;
  width: 100%;
}

.micrm-field textarea {
  min-height: 70px;
}

.micrm-contact-dropdown {
  position: relative;
  width: 100%;
}

.micrm-contact-dropdown-toggle {
  align-items: center;
  background: #fff;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
  color: #111827;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 400;
  justify-content: space-between;
  line-height: 1.2;
  min-height: 26px;
  outline: none;
  padding: 6px 10px;
  text-align: left;
  width: 100%;
}

.micrm-contact-dropdown.is-open .micrm-contact-dropdown-toggle {
  box-shadow: 0 0 0 2px rgba(18, 57, 91, .12);
}

.micrm-contact-dropdown .micrm-contact-checklist {
  background: #fff;
  border: 0;
  box-sizing: border-box;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
  display: none;
  gap: 0;
  left: 0;
  max-height: 220px;
  min-height: 26px;
  overflow: auto;
  padding: 6px 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: 100%;
  z-index: 20;
}

.micrm-contact-dropdown.is-open .micrm-contact-checklist {
  display: grid;
}

.micrm-contact-checklist label {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 16px minmax(0, 1fr);
  margin: 0;
  min-height: 30px;
  padding: 4px 0;
}

.micrm-contact-checklist input[type="checkbox"] {
  height: 16px;
  min-height: 16px;
  width: 16px;
}

.micrm-contact-checklist span {
  color: #111827;
  display: grid;
  font-size: 14px;
  font-weight: 400;
  gap: 2px;
  line-height: 1.25;
}

.micrm-contact-checklist strong {
  font-weight: 600;
}

.micrm-contact-checklist small {
  color: #64748b;
  font-size: 12px;
}

.micrm-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.micrm-form-grid,
.micrm-settings-form {
  background: #F2F2F2;
  border-radius: 8px;
  column-gap: 22px;
  row-gap: 20px;
  padding: 14px;
}

.micrm-tabs,
.micrm-segmented {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.micrm-tabs button,
.micrm-segmented a {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #1f2937;
  padding: 7px 11px;
  text-decoration: none;
  cursor: pointer;
}

.micrm-tabs .active,
.micrm-segmented .active {
  background: #0f5ea8;
  border-color: #0f5ea8;
  color: #fff;
}

.micrm-tab-panel {
  display: none;
}

.micrm-tab-panel.active {
  display: block;
}

.micrm-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}

.micrm-kanban-column {
  min-height: 260px;
  padding: 12px;
}

.micrm-kanban-card {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-left: 4px solid #0f5ea8;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  cursor: grab;
}

.micrm-kanban-card a,
.micrm-kanban-card span,
.micrm-kanban-card small {
  display: block;
}

.micrm-kanban-card a {
  font-weight: 700;
  text-decoration: none;
}

.micrm-calendar {
  display: grid;
  gap: 10px;
}

.micrm-calendar-month {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.micrm-calendar article {
  padding: 12px;
}

.micrm-calendar time,
.micrm-calendar span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.micrm-ranking {
  margin: 0;
}

.micrm-ranking li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.micrm-history {
  margin: 0;
}

.wp-core-ui .button,
.wp-core-ui .button-primary,
.micrm-tabs button,
.micrm-segmented a,
.micrm-export-button {
  background: #C9A227 !important;
  border: 0 !important;
  border-radius: 6px;
  box-shadow: none !important;
  color: #FFFFFF !important;
  height: 36px;
  font-weight: 700;
  line-height: 1 !important;
  min-height: 36px;
  padding: 0 14px;
}

@media (max-width: 782px) {
  .micrm-global-search,
  .micrm-filters,
  .micrm-tabs {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Capa visual tipo EspoCRM para escritorio WordPress. */
.micrm-wrap {
  color: #293846;
}

.micrm-wrap h1 {
  color: #293846;
  font-size: 24px;
  font-weight: 500;
}

.micrm-kpis > div,
.micrm-panel,
.micrm-kanban-column,
.micrm-calendar article {
  background: #fff;
  border: 1px solid #d8dde5;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(31, 41, 55, .04);
}

.micrm-kpis strong {
  color: #3d6f9f;
  font-weight: 500;
}

.micrm-panel h2,
.micrm-kanban-column h2 {
  color: #293846;
  font-weight: 500;
}

.micrm-wrap table.widefat {
  border: 1px solid #d8dde5;
  border-radius: 4px;
  border-spacing: 0;
  box-shadow: none;
  overflow: hidden;
}

.micrm-wrap table.widefat thead th {
  background: #f6f7f9;
  border-bottom: 1px solid #d8dde5;
  color: #536271;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.micrm-wrap table.widefat tbody td {
  border-bottom: 1px solid #edf0f4;
  color: #293846;
}

.micrm-checkbox-inline {
  align-items: center;
  color: #293846;
  display: inline-flex;
  gap: 8px;
  min-height: 32px;
}

.micrm-dashboard-grid .micrm-panel-wide {
  grid-column: 1 / -1;
}

.micrm-dashboard-report-list {
  margin-bottom: 18px;
}

.micrm-dashboard-report-form {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
}

.micrm-dashboard-report-form .micrm-checkbox-inline,
.micrm-dashboard-report-form p {
  grid-column: 1 / -1;
}

.micrm-dashboard-report-form .micrm-field span {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.micrm-dashboard-report-form input,
.micrm-dashboard-report-form select {
  width: 100%;
}

.micrm-record-name {
  color: #3d6f9f;
  text-decoration: none;
}

.wp-core-ui .button,
.wp-core-ui .button-primary,
.micrm-tabs button,
.micrm-segmented a,
.micrm-export-button,
.micrm-wrap .button,
.micrm-wrap button {
  background: #6f8fb2 !important;
  border: 1px solid #5e7fa4 !important;
  border-radius: 4px;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 600;
  min-height: 32px;
}

.wp-core-ui .button:hover,
.wp-core-ui .button-primary:hover,
.micrm-tabs button:hover,
.micrm-segmented a:hover,
.micrm-export-button:hover,
.micrm-wrap .button:hover,
.micrm-wrap button:hover {
  background: #5e7fa4 !important;
  color: #fff !important;
}


.micrm-campaign-contact-field .micrm-contact-dropdown-toggle {
  appearance: none;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
  height: 26px;
  line-height: 1.2;
  min-height: 26px;
  padding: 6px 10px;
}

.micrm-campaign-contact-field .micrm-contact-dropdown.is-open .micrm-contact-dropdown-toggle {
  box-shadow: none;
}

.micrm-campaign-contact-field .micrm-contact-checklist {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
  padding: 6px 10px;
}
.micrm-campaign-contact-field .micrm-contact-dropdown-toggle {
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  height: 26px !important;
  line-height: 1.2 !important;
  min-height: 26px !important;
  padding: 6px 10px !important;
}

.micrm-survey-builder-field {
  grid-column: 1 / -1;
  width: 100%;
}

.micrm-survey-builder,
.micrm-survey-questions {
  display: grid;
  gap: 12px;
  width: 100%;
}

.micrm-survey-question {
  background: #fff;
  border: 1px solid #d8dde5;
  border-radius: 4px;
  display: grid;
  gap: 10px;
  padding: 12px;
  width: 100%;
}

.micrm-survey-question-head,
.micrm-survey-option {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.micrm-survey-options {
  display: grid;
  gap: 8px;
}

.micrm-panel-title-row { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.micrm-sales-period-form { align-items: end; display: flex; flex-wrap: wrap; gap: 8px; }
.micrm-sales-period-form label { display: grid; gap: 4px; }
.micrm-sales-period-form span { color: #536271; font-size: 12px; font-weight: 700; }
.micrm-sales-period-form input { background: #fff; border: 0; height: 32px; min-width: 150px; padding: 6px 8px; }
