.admin-entity-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 1px solid #e5e8ed;
  border-radius: 26px;
  color: #182332;
  background: #f6f8fb;
  box-shadow: 0 28px 110px #07142445;
  overflow: auto;
  overscroll-behavior: contain;
  font: inherit;
}
.admin-entity-dialog::backdrop { background: #091321a8; backdrop-filter: blur(5px); }
.admin-entity-dialog *, .admin-entity-dialog *::before, .admin-entity-dialog *::after { box-sizing: border-box; }
.admin-entity-dialog button { font: inherit; cursor: pointer; }
.admin-entity-dialog button:focus-visible, .admin-entity-dialog a:focus-visible, .admin-entity-dialog summary:focus-visible { outline: 3px solid #ff9200; outline-offset: 3px; }
.entity-header { padding: 28px 30px; display: flex; justify-content: space-between; gap: 20px; background: linear-gradient(115deg, #121b26, #203047); color: #fff; border-bottom: 4px solid #ff6b00; }
.entity-header-main { display: flex; align-items: center; gap: 20px; min-width: 0; }
.entity-avatar { width: 78px; height: 78px; flex-shrink: 0; display: grid; place-items: center; border-radius: 20px; background: #ffffff15; border: 1px solid #ffffff24; font-size: 32px; color: #ff9d4a; overflow: hidden; }
.entity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.entity-eyebrow { display: block; margin-bottom: 7px; color: #ffac67; letter-spacing: .1em; font-size: 10px; font-weight: 800; }
.entity-header h2 { margin: 0; font-size: clamp(20px, 3vw, 29px); line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.entity-header p { margin: 9px 0 0; color: #c5d0dd; font-size: 13px; display: flex; gap: 6px; }
.entity-close { border: 1px solid #ffffff33; color: #fff; background: #ffffff12; border-radius: 12px; height: 42px; width: 42px; flex-shrink: 0; display: grid; place-items: center; font-size: 26px !important; }
.entity-close:hover { background: #ffffff25; }
.entity-identity-line { padding: 15px 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #6a7787; font-size: 12px; background: #fff; border-bottom: 1px solid #ebeff4; }
.entity-status { border-radius: 30px; background: #fff1d8; color: #936007; padding: 5px 11px; font-size: 11px; font-weight: 800; }
.entity-status.is-active { background: #e3f6ee; color: #087855; }
.entity-tabs { display: flex; gap: 5px; padding: 10px 24px 0; background: #fff; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid #dce2ea; }
.entity-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; padding: 15px 19px; font-size: 13px; font-weight: 700; color: #617187; background: transparent; display: flex; gap: 8px; align-items: center; }
.entity-tabs button[aria-selected="true"] { color: #bd4b00; border-bottom-color: #ff6b00; background: #fff4e9; }
.entity-content { padding: 26px 30px; min-height: 260px; }
.entity-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.entity-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 15px; border: 1px solid #d8e0e9; border-radius: 12px; background: #fff; color: #23344b; font-size: 12px !important; font-weight: 750 !important; text-decoration: none; transition: box-shadow .15s, background .15s; }
.entity-button:hover { background: #eef3f9; box-shadow: 0 3px 10px #2030470d; }
.entity-button.is-primary { border-color: #f76b00; background: #ff6b00; color: #fff; }
.entity-button.is-primary:hover { background: #e85f00; }
.entity-button.is-dark { background: #182332; border-color: #182332; color: #fff; }
.entity-button.is-danger { background: #fff6f6; border-color: #f4cfd2; color: #b32f40; }
.entity-summary-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.entity-section { margin-bottom: 18px; padding: 22px; border: 1px solid #e1e7ee; border-radius: 18px; background: #fff; }
.entity-section-heading { margin-bottom: 18px; }
.entity-section-heading h3 { margin: 0; font-size: 15px; font-weight: 800; color: #172b45; }
.entity-section-heading p { margin: 7px 0 0; font-size: 12px; color: #778393; line-height: 1.55; }
.entity-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; margin: 0; }
.entity-data-grid dt { margin-bottom: 5px; color: #7a8797; font-size: 11px; font-weight: 500; }
.entity-data-grid dd { margin: 0; color: #23354b; font-size: 12px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.entity-data-grid a { color: #2062b4; }
.entity-wide { grid-column: 1 / -1; }
.entity-help { color: #788697; font-size: 12px; line-height: 1.6; margin: 13px 0; }
.entity-description { white-space: pre-wrap; overflow-wrap: anywhere; color: #465971; font-size: 13px; line-height: 1.75; margin: 0 0 20px; }
.entity-readonly, .entity-inline-warning { padding: 13px 16px; background: #eef4ff; color: #486486; border: 1px solid #dbe7fb; border-radius: 12px; font-size: 12px; line-height: 1.6; }
.entity-inline-warning { background: #fff8ec; border-color: #f5dfbd; color: #895f2c; }
.entity-more { border: 1px solid #e1e7ee; background: #fff; border-radius: 14px; padding: 15px 20px; }
.entity-more summary { color: #53657c; font-size: 12px; font-weight: 700; cursor: pointer; }
.entity-more > div { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.entity-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.entity-product { border: 1px solid #e7ebf1; overflow: hidden; border-radius: 15px; }
.entity-product .entity-photo { height: 145px; border-radius: 0; }
.entity-product > div:last-child { padding: 14px; }
.entity-product h4 { font-size: 13px; line-height: 1.5; margin: 5px 0 9px; font-weight: 750; }
.entity-product small { font-size: 10px; color: #8190a2; }
.entity-product strong { font-size: 13px; color: #ba5109; }
.entity-photo { display: grid; place-items: center; overflow: hidden; background: #edf2f7; color: #a5b4c6; font-size: 28px; }
.entity-photo img { width: 100%; height: 100%; object-fit: cover; }
.entity-photo.is-image-missing::after { content: 'Imagen no disponible'; color: #708198; font-size: 11px; text-align: center; padding: 15px; }
.entity-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.entity-gallery .entity-photo { height: 130px; border-radius: 12px; }
.entity-profile-list { display: grid; gap: 18px; }
.entity-profile { display: flex; gap: 18px; padding: 18px; border: 1px solid #e2e8ef; border-radius: 15px; }
.entity-profile > .entity-photo { width: 86px; height: 86px; flex-shrink: 0; border-radius: 16px; }
.entity-profile > div:last-child { flex: 1; min-width: 0; }
.entity-profile h4 { margin: 0 0 5px; font-size: 15px; }
.entity-profile p { color: #66778c; font-size: 12px; line-height: 1.6; }
.entity-profile small { font-size: 11px; color: #237253; }
.entity-offerings { padding: 0; margin: 14px 0; list-style: none; border-top: 1px solid #eef1f5; }
.entity-offerings li { display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eef1f5; font-size: 12px; }
.entity-offerings strong { white-space: nowrap; color: #2f557d; }
.entity-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 20px; color: #7c8ba0; }
.entity-empty > i { font-size: 35px; margin-bottom: 16px; color: #91a8c0; }
.entity-empty h3, .entity-empty h4 { color: #33485f; font-size: 17px; margin: 0 0 10px; }
.entity-empty p { max-width: 480px; font-size: 13px; line-height: 1.65; }
.entity-spinner { width: 34px; height: 34px; border: 3px solid #e2e9f1; border-top-color: #ff6b00; border-radius: 50%; animation: entity-spin .8s linear infinite; margin-bottom: 22px; }
.entity-commercial { border: 1px solid #e1e7ef; border-radius: 22px; background: linear-gradient(150deg, #fff, #f1f6fc); text-align: center; padding: 36px 22px; }
.entity-commercial-icon { display: inline-grid; place-items: center; height: 64px; width: 64px; background: #fff0e3; color: #e46300; border-radius: 20px; font-size: 28px; margin-bottom: 20px; }
.entity-commercial h3 { font-size: 21px; line-height: 1.4; margin: 0 0 12px; color: #172d49; }
.entity-commercial > p { max-width: 570px; margin: 0 auto 20px; font-size: 13px; line-height: 1.7; color: #6c7e94; }
.entity-commercial-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 24px 0; }
.entity-commercial-points span { display: flex; gap: 8px; color: #426181; font-size: 12px; }
.entity-commercial > small { display: block; color: #8190a3; margin-top: 18px; font-size: 11px; }
.entity-campaigns { display: grid; gap: 14px; }
.entity-campaign { padding: 18px; border: 1px solid #e1e7ee; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.entity-campaign h4 { margin: 0 0 8px; font-size: 14px; }
.entity-campaign p { margin: 0 0 8px; font-size: 13px; color: #47617f; }
.entity-campaign small { font-size: 11px; color: #71849c; }
.entity-campaign-control { display: flex; align-items: end; gap: 10px; }
.entity-campaign label { display: grid; gap: 6px; font-size: 11px; color: #64758a; }
.entity-campaign select { font: inherit; font-size: 12px; color: #23344b; background: #fff; border: 1px solid #d8e0e9; border-radius: 10px; min-height: 43px; padding: 8px 12px; }
.admin-entity-dialog button:disabled, .admin-entity-dialog select:disabled { cursor: wait; opacity: .55; }
.entity-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 30px; background: #fff; border-top: 1px solid #e2e8f0; }
.entity-footer > span { font-size: 11px; color: #8a96a6; }
@keyframes entity-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .entity-spinner { animation-duration: 2s; } .entity-button { transition: none; } }
@media (max-width: 650px) {
  .admin-entity-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .entity-header { padding: 21px 18px; gap: 10px; }
  .entity-header-main { gap: 12px; }
  .entity-avatar { width: 55px; height: 55px; border-radius: 15px; }
  .entity-header h2 { font-size: 20px; }
  .entity-header p { font-size: 11px; }
  .entity-close { width: 36px; height: 36px; }
  .entity-identity-line { padding: 12px 18px; }
  .entity-identity-line > span:last-child { font-size: 10px; }
  .entity-tabs { padding: 6px 10px 0; gap: 2px; }
  .entity-tabs button { flex: 1; justify-content: center; padding: 13px 7px; font-size: 11px; gap: 5px; }
  .entity-tabs button > i { display: none; }
  .entity-content { padding: 18px 14px; }
  .entity-summary-grid { grid-template-columns: 1fr; gap: 0; }
  .entity-section { padding: 18px; }
  .entity-actions { gap: 8px; }
  .entity-actions .entity-button { flex: 1 1 42%; }
  .entity-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .entity-product .entity-photo { height: 120px; }
  .entity-gallery { grid-template-columns: repeat(2, 1fr); }
  .entity-profile { padding: 14px; flex-direction: column; }
  .entity-profile > .entity-photo { width: 65px; height: 65px; }
  .entity-commercial { padding: 28px 18px; }
  .entity-commercial h3 { font-size: 19px; }
  .entity-commercial-points { flex-direction: column; align-items: center; }
  .entity-campaign { flex-direction: column; align-items: stretch; }
  .entity-campaign-control { flex-wrap: wrap; }
  .entity-campaign-control > label { flex: 1; }
  .entity-footer { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
}
