/* CONAGRIM BLUE: skeleton color system only.
 * Loading containers are white; image/text placeholders are neutral gray.
 * Preserve sizes, layout, markup, accessibility, APIs, and existing animations
 * where they apply to the placeholder rather than the container. */
:root {
  --cg-skeleton-surface: #FFFFFF;
  --cg-skeleton-placeholder: #E5E7EB;
  --cg-skeleton-shimmer: #F3F4F6;
  --cg-skeleton-border: #E5E7EB;
}
@keyframes cgSkeletonGrayShimmer {
  to { background-position: -200% 0; }
}
/* Native Next.js dashboard skeleton blocks. */
.skeleton:not(.skeleton--title):not(.skeleton--card):not(.skeleton--panel) {
  background:linear-gradient(90deg,var(--cg-skeleton-placeholder) 25%,var(--cg-skeleton-shimmer) 50%,var(--cg-skeleton-placeholder) 75%) 0 0/200% 100%!important;
  animation:cgSkeletonGrayShimmer 1.25s linear infinite!important;
}
:is(.skeleton--title,.skeleton--card,.skeleton--panel) {
  background:var(--cg-skeleton-surface)!important;
  background-image:none!important;
  animation:none!important;
  position:relative;
  overflow:hidden;
  border-color:var(--cg-skeleton-border);
}
:is(.skeleton--title,.skeleton--card,.skeleton--panel)::before,
:is(.skeleton--title,.skeleton--card,.skeleton--panel)::after {
  content:"";
  display:block;
  position:absolute;
  pointer-events:none;
  border-radius:8px;
  background:linear-gradient(90deg,var(--cg-skeleton-placeholder) 25%,var(--cg-skeleton-shimmer) 50%,var(--cg-skeleton-placeholder) 75%) 0 0/200% 100%;
  animation:cgSkeletonGrayShimmer 1.25s linear infinite;
}
.skeleton--title::before {left:20px;top:22px;width:60%;height:14px}
.skeleton--title::after {left:20px;top:45px;width:34%;height:10px}
.skeleton--card::before {left:18px;top:18px;width:50px;height:50px;border-radius:10px}
.skeleton--card::after {left:18px;right:18px;bottom:25px;height:12px}
.skeleton--panel::before {left:20px;top:24px;width:45%;height:16px}
.skeleton--panel::after {left:20px;right:20%;top:58px;height:12px}

/* Directory skeleton CARDS remain white; only mock photo and lines are gray. */
:is(.public-directory-card-skeleton,.directory-photo-card--skeleton,.professional-card--skeleton) {
  background:var(--cg-skeleton-surface)!important;
  background-image:none!important;
  border-color:var(--cg-skeleton-border)!important;
  animation:none!important;
  position:relative;
  overflow:hidden;
}
:is(.public-directory-card-skeleton,.directory-photo-card--skeleton)::before,
:is(.public-directory-card-skeleton,.directory-photo-card--skeleton)::after {
  content:"";
  display:block;
  position:absolute;
  pointer-events:none;
  border-radius:9px;
  background:linear-gradient(90deg,var(--cg-skeleton-placeholder) 25%,var(--cg-skeleton-shimmer) 50%,var(--cg-skeleton-placeholder) 75%) 0 0/200% 100%;
  animation:cgSkeletonGrayShimmer 1.4s linear infinite;
}
.public-directory-card-skeleton::before {left:14px;top:14px;width:64px;height:64px}
.public-directory-card-skeleton::after {left:14px;right:24%;top:96px;height:13px}
.directory-photo-card--skeleton::before {inset:0 0 31%;border-radius:inherit}
.directory-photo-card--skeleton::after {left:12px;right:24%;bottom:12%;height:12px}
.professional-card--skeleton > span,
.professional-card-visual.is-skeleton > span {
  background:linear-gradient(90deg,var(--cg-skeleton-placeholder) 25%,var(--cg-skeleton-shimmer) 50%,var(--cg-skeleton-placeholder) 75%) 0 0/200% 100%!important;
  animation:cgSkeletonGrayShimmer 1.4s linear infinite!important;
}
.professional-card-visual.is-skeleton {background:var(--cg-skeleton-surface)!important}
:is([class*="avatarSkeleton"]) {background:var(--cg-skeleton-placeholder)!important}

/* Keep accessibility reduced motion preference. */
@media(prefers-reduced-motion:reduce) {
 :is(.skeleton,.skeleton--title,.skeleton--card,.skeleton--panel,
 .public-directory-card-skeleton,.directory-photo-card--skeleton,.professional-card--skeleton)::before,
 :is(.skeleton,.skeleton--title,.skeleton--card,.skeleton--panel,
 .public-directory-card-skeleton,.directory-photo-card--skeleton,.professional-card--skeleton)::after,
 .skeleton:not(.skeleton--title):not(.skeleton--card):not(.skeleton--panel),
 .professional-card--skeleton > span,.professional-card-visual.is-skeleton > span {animation:none!important}
}

/* CG-INSTANCIA-GUIDE-REMOVAL-V1: scoped Instancia de Solicitud patch */
.guided-expedient #exp-step-instancia.guided-flow-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}
.guided-expedient #exp-step-instancia > aside.guided-help-panel {
  display: none !important;
}
.guided-expedient #exp-step-instancia > main.guided-steps {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* CG-INSTANCIA-STEPS-UI-V2 | 2026-11-01 — isolated instance view changes */
.guided-expedient #exp-step-instancia .guided-step.is-complete::before { top:20px !important; }
.guided-expedient #exp-step-instancia .guided-step.is-complete > .guided-step-body { padding-top:69px !important; }
.guided-expedient #exp-step-instancia .guided-step .guided-step-head { align-items:center !important; min-height:60px; }
.guided-expedient #exp-step-instancia .guided-step .guided-step-head > div { align-self:center !important; }
.guided-expedient #exp-step-instancia .guided-party-row,
.guided-expedient #exp-step-instancia .representation-group { background-color:#fafafa !important; }
.guided-expedient #exp-step-instancia #guided-step-03 .representation-group:not(:has(> .representation-rep)) { display:none !important; }
.guided-expedient #exp-step-instancia #guided-step-03 .representation-group,
.guided-expedient #exp-step-instancia #guided-step-03 .representation-orphans { margin-right:24px !important; }
.guided-expedient #exp-step-instancia > main.guided-steps > .guided-version-history--instancia { order:99 !important; margin-top:12px !important; }
.guided-expedient #exp-step-instancia .guided-version-history--instancia .guided-version-row.is-current { background:#fff !important; }
@media(max-width:760px) {
 .guided-expedient #exp-step-instancia .guided-step.is-complete > .guided-step-body { padding-top:65px !important; }
 .guided-expedient #exp-step-instancia #guided-step-03 .representation-group,
 .guided-expedient #exp-step-instancia #guided-step-03 .representation-orphans { margin-right:0 !important; }
}

/* CG-FORMS-FOCUS-20261101 — visual-only form dialogs.
   Labels normal; focused input border black; no green focus glow. */
:where(.guided-modal,.exp-modal,.crm-client-modal,.quote-modal,.directory-filter-modal,
 .profile-report-modal,.verification-modal,.balance-modal,.support-contact-modal,
 .app-confirm-modal,.quote-request-form--modal,[role="dialog"][aria-modal="true"])
 :is(label, label>span, label>strong, .field-label, .form-label, .form-field>span, legend) {
  font-weight:400 !important;
}
:where(.guided-modal,.exp-modal,.crm-client-modal,.quote-modal,.directory-filter-modal,
 .profile-report-modal,.verification-modal,.balance-modal,.support-contact-modal,
 .app-confirm-modal,.quote-request-form--modal,[role="dialog"][aria-modal="true"])
 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
 textarea,select,[role="combobox"],[contenteditable="true"]):is(:focus,:focus-visible) {
  border-color:#111 !important;
  box-shadow:none !important;
  outline-color:#111 !important;
}
:where(.guided-modal,.exp-modal,.crm-client-modal,.quote-modal,.directory-filter-modal,
 .profile-report-modal,.verification-modal,.balance-modal,.support-contact-modal,
 .app-confirm-modal,.quote-request-form--modal,[role="dialog"][aria-modal="true"])
 :is(.form-field,.input-wrap,.field-control,.select-wrap,.field-input):focus-within {
  border-color:#111 !important;
  box-shadow:none !important;
}
/* Keep the X control above white scrolling form containers without altering click behavior. */
:where(.guided-modal,.exp-modal,.crm-client-modal,.quote-modal,.directory-filter-modal,
 .profile-report-modal,.verification-modal,.balance-modal,.support-contact-modal,
 .app-confirm-modal)
 :is(.guided-modal-close,.quote-modal-close,.balance-modal-close,.verification-modal-close,
 .app-confirm-close,.exp-modal-head>button,.crm-client-modal>button,
 button[aria-label="Cerrar"],button[aria-label="Cerrar ventana"],
 button[aria-label="Cerrar formulario"]) {
   z-index:50 !important;
   isolation:isolate;
   pointer-events:auto !important;
}
/* Existing absolutely-positioned close buttons must retain their anchor. */
:where(.guided-modal,.quote-modal,.balance-modal,.verification-modal)
 :is(.guided-modal-close,.quote-modal-close,.balance-modal-close,.verification-modal-close) {
   position:absolute !important;
}


/* CG-INSTANCE-HEADER-UI-V1-20261101
   Scope: dashboard header + Instancia layout only. No behavior/data changes. */

/* White header profile identity area; the menu divider remains unchanged. */
.app-frame .topbar .account-menu-profile {
  background: #fff !important;
  background-color: #fff !important;
}
.app-frame .topbar .account-menu-links .account-verification-item,
.app-frame .topbar .account-menu-links .account-verification-item > span {
  font-size: inherit !important;
  font-weight: 400 !important;
}
.app-frame .topbar .account-menu-links .account-verification-item {
  font-size: 14px !important;
}

/* No colored hover surface on only the three topbar action controls. */
.app-frame .topbar .topbar-actions :is(
  .search-trigger,
  .request-inbox-button,
  .notification-wrap > .icon-button
):is(:hover, :focus-visible) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* The entire Instancia navigation column must be sticky:
   sticky on the index alone did not work because its flex parent ended early. */
@media (min-width: 1051px) {
  .guided-expedient .guided-exp-workspace > .cg-guided-context-column {
    position: sticky !important;
    top: 82px !important;
    align-self: start !important;
    max-height: calc(100vh - 94px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .guided-expedient .cg-guided-context-column > .guided-context-index {
    position: static !important;
    top: auto !important;
  }
}

/* Consistent optional tag: above/right of the optional card, not
   in its center grid cell, and separate from the action button. */
.guided-expedient #exp-step-instancia .guided-step.is-optional > .guided-step-body {
  position: relative !important;
}
.guided-expedient #exp-step-instancia .guided-step.is-optional .guided-step-state {
  position: absolute !important;
  top: 15px !important;
  right: 22px !important;
  left: auto !important;
  margin: 0 !important;
  z-index: 2;
  grid-column: auto !important;
}
@media (min-width: 681px) {
  .guided-expedient #exp-step-instancia .guided-step.is-optional > .guided-step-body > .btn {
    top: calc(50% + 24px) !important;
  }
}
@media (max-width: 680px) {
  .guided-expedient #exp-step-instancia .guided-step.is-optional > .guided-step-body {
    padding-top: 52px !important;
  }
  .guided-expedient #exp-step-instancia .guided-step.is-optional .guided-step-state {
    top: 12px !important;
    right: 16px !important;
  }
}
