/* Administración JP usa el mismo lenguaje visual de los comercios, pero sus
   datos siguen viniendo exclusivamente de las tablas privadas super_office_*.
   Esta hoja se carga al final para aislar los cambios del resto del sistema. */
.super-mode .super-dashboard.super-office-active {
  --jp-admin-bg: #002f35;
  --jp-admin-panel: #003b43;
  --jp-admin-card: #043f49;
  --jp-admin-line: #087489;
  --jp-admin-text: #f4fbff;
  --jp-admin-muted: #b9d2df;
  background:
    radial-gradient(circle at 8% 0, rgba(0, 194, 184, .17), transparent 31rem),
    radial-gradient(circle at 100% 100%, rgba(0, 137, 190, .14), transparent 38rem),
    var(--jp-admin-bg);
}

.super-mode .super-dashboard.super-office-active .super-main-content {
  padding: 18px;
  background: transparent;
}

.super-mode .super-dashboard.super-office-active .super-office-panel {
  min-height: calc(100dvh - 104px);
  border: 1px solid rgba(8, 151, 171, .55);
  border-radius: 18px;
  background: rgba(0, 38, 45, .87);
  box-shadow: 0 24px 60px rgba(0, 15, 24, .28);
}

.super-mode .super-dashboard.super-office-active .super-office-panel-body {
  gap: 0;
  padding: 0;
}

.super-mode .super-office-commerce-head {
  padding: 20px 24px;
  border: 0;
  border-bottom: 1px solid rgba(22, 131, 148, .4);
  border-radius: 17px 17px 0 0;
  background: linear-gradient(112deg, rgba(0, 95, 93, .65), rgba(0, 42, 54, .88) 62%);
  box-shadow: none;
}

.super-mode .super-office-commerce-logo {
  color: #fff;
  background: linear-gradient(135deg, #00a98f, #0878d8);
  box-shadow: 0 8px 20px rgba(0, 180, 166, .2);
}

.super-mode .super-office-commerce-head p { color: #21efe0; }
.super-mode .super-office-commerce-head h2 { color: #fff; }
.super-mode .super-office-commerce-head h2 + span { color: #c8dde7; }
.super-mode .super-office-commerce-head .ghost-button {
  color: #fff;
  border-color: #16869c;
  background: #022f3b;
}

.super-mode .super-office-commerce-head .primary-button,
.super-mode .super-office-client-directory-heading .primary-button {
  color: #fff;
  border-color: #00d2bd;
  background: linear-gradient(135deg, #069e8b, #08b8a3);
  box-shadow: 0 10px 24px rgba(0, 202, 181, .18);
}

.super-mode .super-office-commerce-nav {
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid rgba(16, 128, 147, .38);
  border-radius: 0;
  background: rgba(0, 33, 42, .86);
}

.super-mode .super-office-commerce-nav button {
  color: #b8d3df;
  border: 1px solid transparent;
}

.super-mode .super-office-commerce-nav button:hover {
  color: #fff;
  border-color: rgba(19, 151, 169, .5);
  background: rgba(5, 82, 94, .55);
}

.super-mode .super-office-commerce-nav button.active {
  color: #fff;
  border-color: #00d1be;
  background: linear-gradient(135deg, #007e73, #05a997);
}

.super-mode .super-office-commerce-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 395px);
  gap: 15px;
  padding: 16px;
}

.super-mode .super-office-commerce-catalog {
  border-color: rgba(10, 129, 149, .58);
  background: rgba(0, 47, 57, .84);
  box-shadow: none;
}

.super-mode .super-office-commerce-catalog > .search-box,
.super-mode .super-office-search {
  border-color: #147f95;
  background: #063b47;
  box-shadow: none;
}

.super-mode .super-office-commerce-catalog .search-box span,
.super-mode .super-office-search > span { color: #fff; }
.super-mode .super-office-commerce-catalog input,
.super-mode .super-office-search input { color: #fff; }
.super-mode .super-office-commerce-catalog input::placeholder,
.super-mode .super-office-search input::placeholder { color: #a9c4d1; }
.super-mode .super-office-commerce-catalog .inventory-meta strong { color: #fff; }
.super-mode .super-office-commerce-catalog .inventory-meta span { color: var(--jp-admin-muted); }

.super-mode .super-office-commerce-catalog .product-card {
  border-color: rgba(18, 137, 154, .65);
  background: linear-gradient(155deg, rgba(3, 72, 81, .98), rgba(0, 47, 57, .98));
  box-shadow: 0 10px 22px rgba(0, 20, 29, .18);
}

.super-mode .super-office-commerce-catalog .product-name,
.super-mode .super-office-commerce-catalog .price { color: #fff; }
.super-mode .super-office-commerce-catalog .product-category { color: #66e8d8; }
.super-mode .super-office-commerce-catalog .product-barcode { color: #b7ced9; }
.super-mode .super-office-commerce-catalog .stock-warning { color: #f7df57; }
.super-mode .super-office-commerce-catalog .add-product-btn {
  color: #fff;
  border-color: #00cdb8;
  background: #058f80;
}
.super-mode .super-office-commerce-catalog .edit-product-btn {
  color: #fff;
  border-color: #16869a;
  background: #00343e;
}

.super-mode .super-office-commerce-document {
  border-color: #d8e4ea;
  background: #fff;
  box-shadow: 0 14px 35px rgba(0, 15, 24, .22);
}

.super-mode .super-office-commerce-document .invoice-head,
.super-mode .super-office-commerce-document .customer-field,
.super-mode .super-office-commerce-document .super-office-workspace-dates,
.super-mode .super-office-commerce-document .cart-list,
.super-mode .super-office-commerce-document .totals,
.super-mode .super-office-commerce-document .checkout-actions,
.super-mode .super-office-commerce-document .form-feedback { color: #102444; }
.super-mode .super-office-commerce-document input,
.super-mode .super-office-commerce-document select { color: #102444; background: #fff; }

.super-mode .super-office-search {
  width: auto;
  margin: 16px 16px 0;
}

.super-mode .super-office-records {
  margin: 0;
  padding: 16px;
  color: var(--jp-admin-text);
  background: transparent;
}

/* Directorio de clientes: misma jerarquía de resumen, tabla y tarjetas que
   el módulo Clientes de cada comercio. */
.super-mode .super-office-client-directory {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.super-mode .super-office-client-directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

.super-mode .super-office-client-directory-heading p {
  margin: 0 0 3px;
  color: #21efe0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.super-mode .super-office-client-directory-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 31px;
  letter-spacing: -.035em;
}
.super-mode .super-office-client-directory-heading small {
  color: #c4d9e3;
  font-size: 13px;
}

.super-office-client-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.super-office-client-summary article {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid #097b8d;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(0, 79, 83, .72), rgba(0, 44, 53, .9));
}
.super-office-client-summary article > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #31f0dc;
  background: rgba(0, 168, 146, .28);
  font-size: 24px;
}
.super-office-client-summary .is-phone { border-color: #0879d4; background: linear-gradient(145deg, rgba(0, 76, 137, .42), rgba(0, 43, 59, .92)); }
.super-office-client-summary .is-phone > span { color: #fff; background: #076ccc; }
.super-office-client-summary .is-without { border-color: #7f681e; background: linear-gradient(145deg, rgba(100, 66, 5, .35), rgba(0, 43, 48, .92)); }
.super-office-client-summary .is-without > span { color: #ffae39; background: rgba(193, 102, 6, .34); }
.super-office-client-summary article div { display: grid; gap: 4px; }
.super-office-client-summary small { color: #c6dbe4; font-size: 13px; }
.super-office-client-summary strong { color: #fff; font-size: 27px; }

.super-office-client-table {
  overflow: hidden;
  border: 1px solid #08778a;
  border-radius: 14px;
  background: rgba(0, 45, 55, .72);
}
.super-office-client-table-head,
.super-office-client-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(135px, .85fr) minmax(180px, 1fr) 105px 105px;
  align-items: center;
  gap: 13px;
}
.super-office-client-table-head {
  min-height: 48px;
  padding: 0 17px;
  color: #d4e7ef;
  background: rgba(5, 82, 96, .72);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.super-office-client-row {
  min-height: 78px;
  padding: 12px 17px;
  border-top: 1px solid rgba(12, 112, 129, .55);
  color: #eaf6fa;
}
.super-office-client-person { display: flex; min-width: 0; align-items: center; gap: 11px; }
.super-office-client-avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #006a99;
  background: linear-gradient(135deg, #e0f7ff, #9fd9ff);
  font-size: 14px;
  font-weight: 900;
}
.super-office-client-person > div { display: grid; min-width: 0; gap: 3px; }
.super-office-client-person strong { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.super-office-client-person small,
.super-office-client-contact { overflow: hidden; color: #b9d1dc; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.super-office-client-phone { display: flex; align-items: center; gap: 7px; color: #d9edf4; font-size: 12px; }
.super-office-client-phone > span { color: #1ce5cc; }
.super-office-client-state > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #24efc9;
  background: rgba(0, 169, 134, .2);
  font-size: 10px;
  font-weight: 850;
}
.super-office-client-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.super-office-client-state .is-legacy { color: #d7e4ea; background: rgba(126, 154, 166, .18); }
.super-office-client-actions { display: flex; justify-content: flex-end; }
.super-office-client-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #0698eb;
  border-radius: 9px;
  color: #56c4ff;
  background: rgba(0, 86, 142, .18);
  font-weight: 800;
}
.super-office-client-actions small { color: #9eb9c5; }
.super-office-client-footer { color: #bdd3dd; font-size: 12px; }

@media (max-width: 980px) {
  .super-mode .super-office-commerce-workspace { grid-template-columns: minmax(0, 1fr) 330px; }
  .super-office-client-table-head,
  .super-office-client-row { grid-template-columns: minmax(180px, 1.2fr) 130px minmax(150px, 1fr) 95px; }
  .super-office-client-table-head span:nth-child(3),
  .super-office-client-contact { display: none; }
}

@media (max-width: 720px) {
  .super-mode .super-dashboard.super-office-active .super-main-content { padding: 0; }
  .super-mode .super-dashboard.super-office-active .super-office-panel {
    min-height: calc(100dvh - 142px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .super-mode .super-office-panel-body { padding: 0 0 18px; }
  .super-mode .super-office-commerce-head {
    display: grid;
    gap: 13px;
    padding: 17px 15px 15px;
    border-radius: 0;
  }
  .super-mode .super-office-commerce-head > div:first-child { align-items: flex-start; }
  .super-mode .super-office-commerce-logo { width: 42px; height: 42px; border-radius: 11px; }
  .super-mode .super-office-commerce-head h2 { font-size: 25px; }
  .super-mode .super-office-commerce-head h2 + span { display: block; max-width: 290px; line-height: 1.4; }
  .super-mode .super-office-commerce-head > div:last-child { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .super-mode .super-office-commerce-head > div:last-child button { width: 100%; min-height: 44px; }
  .super-mode .super-office-commerce-nav { padding: 8px 12px; }
  .super-mode .super-office-commerce-nav button { min-height: 42px; padding: 0 12px; }
  .super-mode .super-office-commerce-workspace { display: grid; grid-template-columns: 1fr; padding: 12px; }
  .super-mode .super-office-commerce-catalog,
  .super-mode .super-office-commerce-document { border-radius: 13px; }
  .super-mode .super-office-commerce-catalog { padding: 12px; }
  .super-mode .super-office-commerce-catalog .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .super-mode .super-office-commerce-document { position: static; width: 100%; }
  .super-mode .super-office-search { margin: 12px 12px 0; }
  .super-mode .super-office-records { padding: 14px 12px; }
  .super-mode .super-office-client-directory-heading { align-items: flex-end; }
  .super-mode .super-office-client-directory-heading h3 { font-size: 27px; }
  .super-mode .super-office-client-directory-heading small { display: block; max-width: 220px; line-height: 1.4; }
  .super-mode .super-office-client-directory-heading .primary-button { min-width: 126px; min-height: 42px; padding: 0 12px; }
  .super-office-client-summary { grid-template-columns: 1fr; gap: 9px; }
  .super-office-client-summary article { min-height: 76px; padding: 12px; }
  .super-office-client-summary article > span { width: 42px; height: 42px; }
  .super-office-client-summary strong { font-size: 23px; }
  .super-office-client-table { overflow: visible; border: 0; background: transparent; }
  .super-office-client-table-head { display: none; }
  .super-office-client-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #08778a;
    border-radius: 13px;
    background: linear-gradient(155deg, rgba(3, 70, 80, .98), rgba(0, 45, 55, .98));
  }
  .super-office-client-person { grid-column: 1; grid-row: 1; }
  .super-office-client-state { grid-column: 2; grid-row: 1; align-self: center; }
  .super-office-client-phone { grid-column: 1 / -1; grid-row: 2; padding-top: 10px; border-top: 1px solid rgba(15, 119, 135, .5); }
  .super-office-client-contact { display: block; grid-column: 1 / -1; grid-row: 3; white-space: normal; overflow-wrap: anywhere; }
  .super-office-client-actions { grid-column: 1 / -1; grid-row: 4; }
  .super-office-client-actions button { width: 100%; }
}

@media (max-width: 430px) {
  .super-mode .super-office-commerce-catalog .product-grid { grid-template-columns: 1fr; }
  .super-mode .super-office-client-directory-heading { display: grid; }
  .super-mode .super-office-client-directory-heading .primary-button { width: 100%; }
}

/* Barra superior equivalente a la navegación principal de los comercios. */
.super-mode .super-office-commerce-head {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
}

.super-mode .super-office-commerce-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.super-mode .super-office-commerce-brand > div,
.super-mode .super-office-commerce-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.super-mode .super-office-commerce-brand strong,
.super-mode .super-office-commerce-identity strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.super-mode .super-office-commerce-brand small,
.super-mode .super-office-commerce-identity small {
  overflow: hidden;
  color: #a9cbd6;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.super-mode .super-office-commerce-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 12px;
}

.super-mode .super-office-commerce-identity {
  justify-self: center;
  text-align: center;
}

.super-mode .super-office-commerce-head .super-office-commerce-nav {
  display: flex;
  width: auto;
  align-items: center;
  gap: 5px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.super-mode .super-office-commerce-head .super-office-commerce-nav > button,
.super-mode .super-office-operations-menu > summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d9edf3;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.super-mode .super-office-commerce-head .super-office-commerce-nav > button span,
.super-mode .super-office-operations-menu > summary span { font-size: 13px; }

.super-mode .super-office-commerce-head .super-office-commerce-nav > button:hover,
.super-mode .super-office-operations-menu > summary:hover {
  color: #fff;
  border-color: rgba(18, 178, 181, .55);
  background: rgba(0, 105, 100, .46);
}

.super-mode .super-office-commerce-head .super-office-commerce-nav > button.active,
.super-mode .super-office-operations-menu.active > summary,
.super-mode .super-office-operations-menu[open] > summary {
  color: #fff;
  border-color: #00d2bd;
  background: linear-gradient(135deg, #07998a, #08b9a5);
  box-shadow: 0 7px 16px rgba(0, 205, 183, .16);
}

.super-office-operations-menu {
  position: relative;
  flex: 0 0 auto;
}

.super-office-operations-menu > summary { list-style: none; }
.super-office-operations-menu > summary::-webkit-details-marker { display: none; }
.super-office-operations-menu > summary b { margin-left: 2px; font-size: 11px; }
.super-office-operations-menu[open] > summary b { transform: rotate(180deg); }

.super-office-operations-menu > div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: grid;
  width: 205px;
  gap: 5px;
  padding: 8px;
  border: 1px solid #087b90;
  border-radius: 11px;
  background: #003842;
  box-shadow: 0 18px 35px rgba(0, 15, 23, .38);
}

.super-office-operations-menu > div button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: #dceef4;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.super-office-operations-menu > div button:hover,
.super-office-operations-menu > div button.active {
  color: #fff;
  background: #057f78;
}

@media (max-width: 1120px) {
  .super-mode .super-office-commerce-head {
    grid-template-columns: auto 1fr;
  }
  .super-mode .super-office-commerce-identity { justify-self: end; }
  .super-mode .super-office-commerce-head .super-office-commerce-nav {
    grid-column: 1 / -1;
    width: 100%;
  }
  .super-mode .super-office-commerce-head .super-office-commerce-nav > button { flex: 1 1 auto; }
}

@media (max-width: 720px) {
  .super-mode .super-office-commerce-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .super-mode .super-office-commerce-brand > div { display: grid; }
  .super-mode .super-office-commerce-identity { max-width: 125px; }
  .super-mode .super-office-commerce-identity small { display: none; }
  .super-mode .super-office-commerce-head .super-office-commerce-nav {
    grid-column: 1 / -1;
    width: calc(100vw - 24px);
    gap: 4px;
    padding: 0 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .super-mode .super-office-commerce-head .super-office-commerce-nav::-webkit-scrollbar { display: none; }
  .super-mode .super-office-commerce-head .super-office-commerce-nav > button,
  .super-mode .super-office-operations-menu > summary {
    min-height: 39px;
    padding: 0 10px;
    font-size: 10px;
  }
  .super-mode .super-office-commerce-head .super-office-commerce-nav > button { flex: 0 0 auto; }
  .super-office-operations-menu > div {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    padding: 10px;
  }
  .super-office-operations-menu > div button { min-height: 46px; }
}
