@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

.rg-admin-page {
  --rg-primary: #7c00f4;
  --rg-primary-dark: #38006e;
  --rg-primary-soft: #f9f5fd;
  --rg-text: #111827;
  --rg-muted: #667085;
  --rg-border: #dce3ec;
  --rg-bg: #f1f1f3;
  --rg-row: #f2f2f2;
  --rg-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  max-width: none;
  margin: 0 20px 0 0;
  padding: 36px 15px 48px;
  color: var(--rg-text);
  font-family: "Inter", sans-serif !important;
}

body.wp-admin.toplevel_page_rg-garantias #wpcontent,
body.wp-admin.garantias_page_rg-garantias-marcas-modelos #wpcontent {
  background: var(--rg-bg);
}

.rg-admin-page *,
.rg-admin-page input,
.rg-admin-page select,
.rg-admin-page textarea,
.rg-admin-page button {
  box-sizing: border-box;
  font-family: "Inter", sans-serif !important;
}

.rg-admin-header,
.rg-detail-topbar,
.rg-detail-hero,
.rg-table-header,
.crecima-main,
.rg-actions-inline,
.rg-filter-actions,
.rg-detail-actions,
.rg-note-footer {
  display: flex;
  align-items: center;
}

.rg-admin-header,
.rg-detail-topbar,
.rg-detail-hero,
.rg-table-header {
  justify-content: space-between;
  gap: 18px;
}

.rg-admin-header {
  margin-bottom: 34px;
}

.rg-admin-header h1,
.rg-detail-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.rg-admin-header p {
  margin: 8px 0 0;
  color: var(--rg-muted);
}

.crecima-main {
  margin-left: auto;
  gap: 8px;
}

.crecima-main p {
  margin: 0;
  color: var(--rg-primary-dark);
  font-size: 10px;
  font-weight: 500;
  line-height: 160%;
}

.crecima-main svg {
  width: 66px;
  height: auto;
}

.rg-admin-section,
.rg-detail-card,
.rg-detail-hero {
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  box-shadow: var(--rg-shadow);
}

.rg-admin-section {
  margin-bottom: 28px;
  padding: 22px 20px;
}

.rg-admin-section h2,
.rg-detail-card h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.rg-search-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rg-search-form input[type="search"] {
  width: min(100%, 560px);
}

.rg-filters-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 20px 24px;
  padding: 14px 24px 20px;
  background: #f7f8fa;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
}

.rg-filters-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.rg-admin-page input,
.rg-admin-page select,
.rg-admin-page textarea {
  min-height: 44px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  /* background: #fff; */
  color: #111827;
  font-size: 14px;
}

.rg-admin-page input,
.rg-admin-page select {
  padding: 0 14px;
}

.rg-admin-page textarea {
  width: 100%;
  min-height: 108px;
  padding: 16px 18px;
  resize: vertical;
}

.rg-admin-page input:focus,
.rg-admin-page select:focus,
.rg-admin-page textarea:focus {
  box-shadow: none;
  outline: none;
  border: 0;
  border: 1px solid #cfd7e3;
}

.rg-btn,
.rg-link,
.rg-detail-pill,
.rg-back-link,
.rg-btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

.rg-btn {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 100px;
  border: 2px solid var(--rg-primary);
  background: transparent;
  color: var(--rg-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.rg-btn svg,
.rg-link svg,
.rg-detail-pill svg,
.rg-back-link svg,
.rg-pagination svg {
  width: 16px;
  height: 16px;
}

.rg-btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rg-spin 0.75s linear infinite;
}

.rg-btn.is-loading {
  cursor: wait;
  opacity: 0.88;
}

.rg-btn.is-loading .rg-btn-spinner {
  display: inline-block;
}

.rg-btn.is-loading svg {
  display: none;
}

@keyframes rg-spin {
  to {
    transform: rotate(360deg);
  }
}

.rg-btn:focus,
.rg-btn:hover {
  border-radius: 100px;
}

.rg-btn-outline:hover,
.rg-btn-outline:focus {
  background: var(--rg-primary);
  color: #fff;
  box-shadow: 4px 7px 16.5px 0 #C0BAC6;
}

.rg-btn-gradient {
  border: 0;
  background: linear-gradient(319deg, #7c00f4 23.79%, #ac5ef8 87.13%);
  color: #fff;
  /* box-shadow: 4px 7px 16px rgba(124, 0, 244, 0.22); */
}

.rg-btn-gradient:hover,
.rg-btn-gradient:focus {
  color: #fff;
  box-shadow: 4px 7px 16.5px 0 #C0BAC6;
}

.rg-link {
  color: var(--rg-primary-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rg-actions-inline,
.rg-filter-actions {
  gap: 14px;
}

.rg-filter-actions {
  grid-column: 1 / -1;
  align-items: center;
}

.rg-filter-section {
  padding: 24px 20px 20px;
}

.rg-filter-section h2 {
  margin-bottom: 22px;
}

.rg-filters-form select,
.rg-filters-form input[type="date"] {
  min-height: 50px;
}

.rg-actions-separator {
  width: 1px;
  height: 22px;
  background: #8e98a8;
}

.rg-table-section {
  padding-bottom: 20px;
}

.rg-catalog-import-section {
  border-radius: 14px;
  padding: 20px;
}

.rg-catalog-import-section h2 {
  margin-bottom: 14px;
}

.rg-catalog-import-section>p {
  margin: 0 0 16px;
}

.rg-catalog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
}

.rg-catalog-actions .rg-btn {
  min-height: 40px;
  padding: 0 18px;
}

.rg-catalog-actions .rg-btn-gradient {
  padding: 0 22px;
}

.rg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.55);
}

.rg-modal-backdrop.is-open {
  display: flex;
}

.rg-admin-modal {
  position: relative;
  width: min(604px, calc(100vw - 40px));
  padding: 36px 22px 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.32);
}

.rg-admin-modal h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.rg-modal-close {
  position: absolute;
  top: 13px;
  right: 16px;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.rg-modal-warning {
  margin: 0 0 14px;
  padding: 13px 16px;
  border-left: 4px solid #d63638;
  background: #fcf0f1;
  color: #6b2525;
  font-size: 13px;
  line-height: 1.42;
}

.rg-admin-modal p {
  margin: 0 0 14px;
}

.rg-admin-modal input[type="file"] {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.rg-admin-modal input[type="checkbox"] {
  min-height: 0;
}

.rg-admin-modal label {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.rg-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
}

.rg-link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rg-primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rg-modal-actions .rg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.rg-modal-open {
  overflow: hidden;
}

.rg-last-import-meta {
  margin-top: 18px;
  padding: 26px 14px;
  border: 1px solid var(--rg-border);
  border-radius: 8px;
  background: #f8fafc;
}

.rg-last-import-meta h3 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.rg-last-import-meta p {
  margin: 0 0 13px;
  color: #111827;
}

.rg-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rg-records-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.rg-records-table th {
  padding: 20px 30px;
  background: #390071;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.rg-records-table td {
  padding: 14px 30px;
  color: #344054;
  border-bottom: 1px solid #dce3ec;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.rg-records-table tbody tr:nth-child(odd) td {
  background: var(--rg-row);
}

.rg-detail-pill {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--rg-primary-soft);
  color: var(--rg-primary);
  font-size: 12px;
  font-weight: 600;
}

.rg-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  height: 33px;
}

.rg-status-active {
  background: #dcffe3;
  color: #0ea118 !important;
}

.rg-status-expired {
  background: #fef3f2;
  color: #b42318 !important;
}

.rg-status-unknown {
  background: #f2f4f7;
  color: #667085;
}

.rg-pagination {
  margin-bottom: 18px;
}

.rg-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  margin-left: 8px;
  padding: 0 14px;
  border: 1px solid #c4d0dc;
  border-radius: 999px;
  background: #f3f4f6;
  color: #262626;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.rg-pagination .page-numbers:hover {
  border: 2px solid #7C00F4;
  background: #FFF;
  color: #7C00F4;
}

.rg-pagination .current {
  border-color: var(--rg-primary);
  background: var(--rg-primary);
  color: #fff;
}

.rg-pagination .next,
.rg-pagination .prev {
  border: 0;
  background: transparent;
  color: #071f49;
}

.rg-detail-topbar {
  margin-bottom: 30px;
}

.rg-back-link {
  color: #475467;
  font-size: 14px;
  font-weight: 600;
}

.rg-detail-hero {
  margin: 0 -32px 24px;
  padding: 30px 54px;
  border-width: 0 0 1px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 3px 0 rgba(15, 23, 42, 0.08);
  align-items: flex-end;
}

.rg-detail-hero>div>p {
  margin: 14px 0 0;
  color: #667085;
  font-size: 15px;
}

.rg-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rg-detail-hero p strong {
  margin-right: 10px;
  color: #111827;
  font-weight: 500;
}

.rg-detail-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.rg-btn-claim {
  border: 0;
  background: linear-gradient(180deg, #808080 0%, #343434 100%);
  color: #fff;
  font-size: 12px;
}

.rg-btn-claim:hover,
.rg-btn-claim:focus {
  color: #fff;
  box-shadow: 4px 7px 16.5px 0 #C0BAC6;
}

.rg-status-claim {
  background: #F5DFDD;
  color: #CC3D42;
}

.rg-status-resolved {
  background: #dfe2fb;
  color: #4155d4;
}

.rg-claim-card {
  margin-bottom: 24px;
  overflow: hidden;
  padding: 0 !important;
}

.rg-claim-card h2 {
  margin: 0;
  padding: 22px 20px;
  border: 0;
  background: #303030;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.rg-claim-summary {
  display: flex;
  align-items: flex-end;
  gap: 58px;
  padding: 22px 24px;
}

.rg-claim-summary span,
.rg-claim-history-row span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.rg-btn-solution {
  min-width: 168px;
  border: 0;
  background: #4155d4;
  color: #fff;
}

.rg-btn-solution:hover,
.rg-btn-solution:focus {
  color: #fff;
  box-shadow: 4px 9px 19px rgba(65, 85, 212, 0.25);
}

.rg-claim-history-table {
  margin: 0 24px 24px;
  display: grid;
  gap: 14px;
}

.rg-claim-history-row {
  display: grid;
  grid-template-columns: 162px 1fr;
  gap: 20px;
  padding: 12px 20px;
  border-left: 2px solid #ff0000;
  background: #f2f2f2;
}

.rg-claim-history-row-solution {
  border-left-color: #4155d4;
}

.rg-claim-history-row>div+div {
  padding-left: 20px;
  border-left: 1px solid #c9c9c9;
}

.rg-claim-history-row .rg-claim-history-observation {
  grid-column: 1 / -1;
  padding-top: 12px;
  padding-left: 0;
  border-top: 1px solid #c9c9c9;
  border-left: 0;
}

.rg-claim-history-row strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.rg-solution-options {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.rg-solution-option {
  padding: 12px 14px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.rg-solution-option-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.rg-solution-option:hover,
.rg-solution-option:focus-within {
  border-color: var(--rg-primary);
  box-shadow: 0 0 0 3px rgba(124, 0, 244, 0.08);
}

.rg-solution-option input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
}

.rg-solution-option strong,
.rg-solution-option small {
  display: block;
}

.rg-solution-option strong {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.rg-solution-option small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.rg-solution-observation {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
}

.rg-solution-observation label {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.rg-solution-observation textarea {
  min-height: 88px;
  border-radius: 8px;
}

.rg-solution-other {
  margin-bottom: 22px;
}

.rg-card-field-full {
  grid-column: 1 / -1;
}

.rg-card-field-full strong {
  line-height: 1.6;
}

.rg-claim-modal[hidden] {
  display: none;
}

.rg-claim-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
}

.rg-claim-dialog {
  width: min(664px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.rg-claim-dialog form {
  padding: 26px 24px 24px;
}

.rg-claim-dialog h2 {
  margin: 0 -24px 22px;
  padding: 0 24px 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

.rg-claim-expired-warning {
  margin: -6px 0 24px;
  padding: 16px 18px;
  border: 1px solid #fedf89;
  border-left: 5px solid #f79009;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  color: #7a2e0e;
}

.rg-claim-expired-warning strong {
  display: block;
  margin-bottom: 5px;
  color: #9a3412;
  font-size: 14px;
  font-weight: 800;
}

.rg-claim-expired-warning p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.rg-claim-field {
  margin-bottom: 30px;
}

.rg-claim-field label {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.rg-claim-field input[type="date"] {
  width: min(298px, 100%);
  min-height: 50px;
  border-radius: 6px;
  font-size: 16px;
}

.rg-claim-field-full {
  padding-top: 22px;
  border-top: 1px solid #dce3ec;
}

.rg-claim-field textarea {
  min-height: 106px;
  border-radius: 8px;
}

.rg-claim-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.rg-claim-actions .rg-btn {
  min-width: 172px;
}

body.rg-modal-open {
  overflow: hidden;
}

.rg-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.rg-detail-card {
  padding: 26px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12);
}

.rg-detail-card h2 {
  padding-bottom: 16px;
  border-bottom: 1px solid #dce3ec;
  font-size: 17px;
  font-weight: 500;
}

.rg-card-grid {
  display: grid;
  gap: 18px 34px;
}

.rg-card-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rg-card-grid span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}

.rg-card-grid strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.rg-card-grid strong.rg-status-pill {
  width: fit-content;
  display: flex;
}

.rg-card-grid em {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #cfd7e3;
  border-radius: 4px;
  background: #f3f4f6;
  color: #344054;
  font-style: normal;
}

.rg-purple-text {
  color: var(--rg-primary) !important;
  font-weight: 800 !important;
}

.rg-success-text {
  color: #069855 !important;
}

.rg-success-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #069855;
}

.rg-note-card {
  margin-top: 48px;
}

.rg-note-footer {
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
}

.rg-note-footer p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.rg-note-history {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dce3ec;
}

.rg-note-history h3 {
  margin: 0 0 12px;
  color: #344054;
  font-size: 15px;
  font-weight: 600;
}

.rg-note-history-list {
  display: grid;
  gap: 12px;
}

.rg-note-history-item {
  padding: 14px 12px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.rg-note-history-meta,
.rg-note-history-text,
.rg-note-history-empty {
  margin: 0;
}

.rg-note-history-meta {
  color: #667085;
  font-size: 12px;
  font-weight: 500;
}

.rg-note-history-text {
  margin-top: 10px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.rg-note-history-empty {
  color: #667085;
  font-size: 13px;
}

@media (max-width: 1200px) {

  .rg-filters-form,
  .rg-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .rg-admin-page {
    margin-right: 10px;
    padding: 24px 14px 36px;
  }

  .rg-admin-header,
  .rg-detail-topbar,
  .rg-detail-hero,
  .rg-table-header,
  .rg-note-footer,
  .rg-claim-summary,
  .rg-claim-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .rg-claim-summary {
    gap: 16px;
  }

  .rg-claim-history-row {
    grid-template-columns: 1fr;
  }

  .rg-claim-history-row>div+div {
    padding-left: 0;
    padding-top: 12px;
    border-top: 1px solid #c9c9c9;
    border-left: 0;
  }

  .crecima-main {
    margin-left: 0;
  }

  .rg-search-form,
  .rg-actions-inline,
  .rg-filter-actions,
  .rg-detail-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .rg-actions-separator {
    display: none;
  }

  .rg-filters-form,
  .rg-detail-grid,
  .rg-card-grid-2 {
    grid-template-columns: 1fr;
  }

  .rg-detail-hero {
    margin: 0 -14px 24px;
    padding: 26px 18px;
  }

  .rg-btn,
  .rg-link,
  .rg-claim-actions .rg-btn {
    width: 100%;
  }
}