.storefront-category-master-button { margin-top: 8px; width: 100%; }
.storefront-foundation-dialog { width: min(920px, calc(100vw - 28px)); max-height: 88vh; border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 70px rgba(15, 35, 75, .28); }
.storefront-foundation-dialog::backdrop { background: rgba(7, 22, 48, .55); }
.storefront-foundation-dialog-head, .storefront-registration-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.storefront-foundation-dialog-head { padding: 20px 22px; border-bottom: 1px solid #dce6f6; }
.storefront-foundation-dialog-head h2, .storefront-registration-head h3 { margin: 0; }
.storefront-foundation-dialog-head p, .storefront-registration-head p { margin: 5px 0 0; color: #64748b; }
.storefront-foundation-dialog-head > button { border: 0; background: #edf3ff; border-radius: 50%; width: 36px; height: 36px; font-size: 24px; }
.storefront-category-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 22px; }
.storefront-category-form label { display: grid; gap: 6px; font-weight: 700; }
.storefront-category-form input, .storefront-category-form textarea { width: 100%; }
.storefront-category-form .is-wide { grid-column: 1 / -1; }
.storefront-category-form .storefront-check { display: flex; align-items: center; gap: 8px; }
.storefront-category-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.storefront-foundation-message { margin: 0 22px 12px; min-height: 20px; color: #16724d; }
.storefront-category-actions .storefront-foundation-message { display: none; flex: 1 1 220px; min-height: 42px; margin: 0; align-items: center; border: 1px solid #b9e4cf; border-radius: 10px; padding: 9px 12px; background: #eefbf4; font-weight: 700; }
.storefront-category-actions .storefront-foundation-message.is-visible { display: inline-flex; }
.storefront-category-actions .storefront-foundation-message.is-busy { border-color: #bfd4ff; background: #eef5ff; color: #2456aa; }
.storefront-foundation-message.is-error { border-color: #f1b9b5; background: #fff3f2; color: #b42318; }
#storefrontCategorySaveBtn { min-width: 165px; }
#storefrontCategorySaveBtn.is-saving .bi { animation: storefront-category-save-spin .8s linear infinite; }
@keyframes storefront-category-save-spin { to { transform: rotate(360deg); } }
.storefront-category-list { display: grid; gap: 8px; padding: 0 22px 22px; overflow: auto; }
.storefront-category-list article, .storefront-registration-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #dce6f6; border-radius: 12px; background: #fff; }
.storefront-category-list article > div:first-of-type { flex: 1; display: grid; gap: 3px; }
.storefront-category-list article > div:last-child, .storefront-registration-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.storefront-category-icon-preview { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #edf5ff; font-size: 24px; }
.storefront-category-list small, .storefront-registration-card small { color: #64748b; }
.storefront-registration-panel { margin-bottom: 18px; padding: 16px; border: 1px solid #cfe0fb; border-radius: 14px; background: #f8fbff; }
#storefrontRegistrationList { display: grid; gap: 9px; margin-top: 14px; }
.storefront-registration-card > div:first-child { flex: 1; }
.storefront-registration-card strong { display: block; margin-top: 6px; }
.storefront-registration-card p { margin: 4px 0; }
.storefront-registration-status { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #fff3cd; color: #765b00; text-transform: capitalize; font-size: 12px; font-weight: 800; }
.storefront-registration-status.is-approved { background: #dcfce7; color: #166534; }
.storefront-registration-status.is-rejected { background: #fee2e2; color: #991b1b; }
.storefront-registration-status.is-active { background: #dcfce7; color: #166534; }
.storefront-registration-status.is-suspended { background: #fee2e2; color: #991b1b; }
.storefront-registration-review-dialog { width: min(880px, calc(100vw - 28px)); max-height: 90vh; padding: 0; border: 0; border-radius: 20px; color: #10234c; box-shadow: 0 28px 80px rgba(12, 31, 68, .3); }
.storefront-registration-review-dialog::backdrop { background: rgba(7, 22, 48, .62); backdrop-filter: blur(2px); }
.storefront-registration-review-form { max-height: 90vh; overflow: auto; background: #fff; }
.storefront-registration-review-form header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #dce6f6; background: linear-gradient(135deg, #f4f8ff, #fff); }
.storefront-registration-review-form header h2 { margin: 2px 0 0; font-size: 24px; }
.storefront-registration-review-form header p { margin: 5px 0 0; color: #64748b; }
.storefront-registration-review-close { flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eaf1fd; color: #18386e; font-size: 26px; line-height: 1; cursor: pointer; }
.storefront-registration-name-note { display: flex; gap: 12px; margin: 18px 22px 0; padding: 13px 15px; border: 1px solid #bcd4fa; border-radius: 12px; background: #eef5ff; }
.storefront-registration-name-note > i { margin-top: 2px; color: #1769d2; font-size: 18px; }
.storefront-registration-name-note p { margin: 4px 0 0; color: #53627b; line-height: 1.45; }
.storefront-registration-original-summary { margin: 12px 22px 0; color: #64748b; font-size: 12px; }
.storefront-registration-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 22px; }
.storefront-registration-review-grid label { display: grid; align-content: start; gap: 6px; font-weight: 700; }
.storefront-registration-review-grid label.is-wide { grid-column: 1 / -1; }
.storefront-registration-review-grid label > span em { color: #d03232; font-style: normal; }
.storefront-registration-review-grid input,
.storefront-registration-review-grid textarea { width: 100%; border: 1px solid #cddbf0; border-radius: 10px; padding: 11px 12px; color: #10234c; background: #fff; }
.storefront-registration-review-grid input:focus,
.storefront-registration-review-grid textarea:focus { border-color: #1769d2; outline: 3px solid rgba(23, 105, 210, .12); }
.storefront-registration-review-grid input[aria-invalid="true"] { border-color: #d43b32; outline-color: rgba(212, 59, 50, .12); }
.storefront-registration-review-grid small { color: #64748b; font-weight: 500; line-height: 1.4; }
.storefront-registration-review-message { margin: 0 22px 14px; padding: 10px 12px; border: 1px solid #b9e4cf; border-radius: 10px; color: #16724d; background: #eefbf4; font-weight: 700; }
.storefront-registration-review-message.is-error { border-color: #f1b9b5; color: #b42318; background: #fff3f2; }
.storefront-registration-review-form footer { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; padding: 15px 22px; border-top: 1px solid #dce6f6; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
#storefrontRegistrationApproveBtn[aria-busy="true"] .bi { animation: storefront-category-save-spin .8s linear infinite; }
@media (max-width: 700px) { .storefront-category-form { grid-template-columns: 1fr; } .storefront-category-form .is-wide { grid-column: auto; } .storefront-category-list article, .storefront-registration-card, .storefront-registration-head { align-items: stretch; flex-direction: column; } }

@media (max-width: 700px) {
  .storefront-registration-review-dialog { width: 100vw; max-width: none; max-height: 100vh; margin: 0; border-radius: 0; }
  .storefront-registration-review-form { max-height: 100vh; }
  .storefront-registration-review-form header { padding: 16px; }
  .storefront-registration-name-note { margin: 14px 16px 0; }
  .storefront-registration-original-summary { margin: 10px 16px 0; }
  .storefront-registration-review-grid { grid-template-columns: 1fr; padding: 16px; }
  .storefront-registration-review-grid label.is-wide { grid-column: auto; }
  .storefront-registration-review-message { margin: 0 16px 12px; }
  .storefront-registration-review-form footer { grid-template-columns: 1fr 1fr; padding: 12px 16px; }
  .storefront-registration-review-form footer > span { display: none; }
  #storefrontRegistrationUseSuggestion,
  #storefrontRegistrationApproveBtn { grid-column: 1 / -1; }
}

.storefront-category-master-page { max-width: 1280px; margin: 0 auto; }
.storefront-category-page-head,
.storefront-category-editor-title,
.storefront-registration-setting { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.storefront-category-page-head { padding-bottom: 18px; border-bottom: 1px solid #dce6f6; }
.storefront-category-page-head h2,
.storefront-category-editor-title h3,
.storefront-registration-setting h3 { margin: 0; }
.storefront-category-page-grid { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.45fr); gap: 18px; margin-top: 18px; align-items: start; }
.storefront-category-editor-card,
.storefront-category-page-grid .storefront-category-list { border: 1px solid #dce6f6; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(34, 67, 124, .06); }
.storefront-category-editor-card { position: sticky; top: 14px; overflow: hidden; }
.storefront-category-editor-title { padding: 18px 20px; background: linear-gradient(135deg, #f4f8ff, #fff); border-bottom: 1px solid #dce6f6; }
.storefront-category-editor-title p,
.storefront-registration-setting p { margin: 5px 0 0; color: #64748b; }
.storefront-category-image-field { display: grid; gap: 7px; font-weight: 700; }
.storefront-category-image-control { display: flex; gap: 13px; align-items: center; padding: 12px; border: 1px dashed #bdd0ec; border-radius: 13px; background: #f8fbff; }
.storefront-category-image-control > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.storefront-category-image-control small { flex-basis: 100%; color: #64748b; font-weight: 500; line-height: 1.45; }
.storefront-category-image-preview { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: #eaf2ff; color: #2f65bf; font-size: 24px; }
.storefront-category-image-preview img,
.storefront-category-icon-preview img { width: 100%; height: 100%; object-fit: contain; }
.storefront-category-list { padding: 12px; max-height: 690px; }
.storefront-category-list article > div:nth-child(2) p { margin: 5px 0 0; color: #53627b; font-size: 12px; }
.storefront-category-library-card { min-width: 0; }
.storefront-category-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.storefront-category-library-head h3 { margin: 0; }
.storefront-category-library-head p { margin: 5px 0 0; color: #64748b; }
.storefront-category-library-card > .storefront-category-list { margin-top: 12px; }
.storefront-category-editor-card .storefront-category-actions .storefront-foundation-message { margin: 0; }
.storefront-category-search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; border: 1px solid #d5e1f3; border-radius: 10px; background: #fff; }
.storefront-category-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.storefront-registration-setting { align-items: center; padding: 14px; margin-bottom: 16px; border: 1px solid #bcd4fa; border-radius: 12px; background: #eef5ff; }
.storefront-registration-setting .designer-toggle { margin-left: auto; }
.item-master-storefront-section { border-color: #bad4fb; background: linear-gradient(180deg, #f7fbff, #fff); }
.item-master-storefront-section > summary > span { display: inline-flex; align-items: center; gap: 8px; }
.item-master-storefront-section > summary small { padding: 2px 7px; border-radius: 999px; color: #1e5da8; background: #e5f0ff; font-size: 10px; }
.item-master-storefront-intro { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 16px; padding: 13px; border-radius: 12px; background: #edf5ff; }
.item-master-storefront-intro p { margin: 4px 0 0; color: #60708a; font-size: 12px; }

@media (max-width: 800px) {
  .storefront-category-page-grid { grid-template-columns: 1fr; }
  .storefront-category-editor-card { position: static; }
  .storefront-registration-setting { align-items: stretch; flex-direction: column; }
  .storefront-registration-setting .designer-toggle { margin-left: 0; }
}

@media (max-width: 680px) {
  #tab-item-categories { padding: 0; }
  .storefront-category-master-page { min-height: 100dvh; border: 0; border-radius: 0; padding: 14px 12px 90px; }
  .storefront-category-page-head { position: sticky; top: 0; z-index: 4; margin: -14px -12px 14px; padding: 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
  .storefront-category-page-head .eyebrow,
  .storefront-category-page-head .helper-text { display: none; }
  .storefront-category-page-head h2 { font-size: 20px; }
  .storefront-category-page-head .action-cluster .secondary-btn { min-width: 42px; font-size: 0; }
  .storefront-category-page-head .action-cluster .secondary-btn i { font-size: 16px; margin: 0; }
  .storefront-category-page-head .action-cluster { gap: 7px; }
  .storefront-category-page-grid { margin-top: 0; gap: 14px; }
  .storefront-category-form { padding: 14px; }
  .storefront-category-actions { align-items: stretch; flex-direction: column; }
  #storefrontCategorySaveBtn { width: 100%; }
  .storefront-category-actions .storefront-foundation-message { flex-basis: auto; width: 100%; }
  .storefront-category-editor-title { padding: 14px; }
  .storefront-category-list { max-height: none; padding: 8px; }
  .storefront-category-list article { display: grid; grid-template-columns: 48px minmax(0, 1fr); }
  .storefront-category-list article > div:last-child { grid-column: 1 / -1; }
  .storefront-category-library-card .storefront-registration-head { flex-direction: row; }
  .storefront-category-library-head { align-items: stretch; flex-direction: column; }
  .storefront-category-image-control { align-items: flex-start; }
  .item-master-storefront-intro { align-items: stretch; flex-direction: column; }
  .item-master-storefront-section textarea { min-height: 150px; }
  .item-master-storefront-section .item-image-uploader { align-items: stretch; }
}

.storefront-customer-admin-panel { grid-column: 1 / -1; padding: 24px; }
.storefront-customer-admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.storefront-customer-admin-head h3 { margin: 3px 0 6px; font-size: 1.45rem; }
.storefront-customer-admin-head p:last-child { margin: 0; color: var(--muted, #64748b); }
.storefront-customer-admin-message { margin: 0 0 14px; padding: 10px 12px; color: #075985; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; }
.storefront-customer-admin-message:empty,
.storefront-customer-admin-message[hidden] { display: none; }
.storefront-customer-admin-message.is-error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.storefront-customer-admin-list { display: grid; gap: 12px; }
.storefront-customer-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 18px; background: #fff; border: 1px solid #dbe7f7; border-radius: 14px; box-shadow: 0 8px 22px rgba(15, 43, 91, .05); }
.storefront-customer-card-main { min-width: 0; }
.storefront-customer-card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.storefront-customer-card-title strong { font-size: 1rem; color: #102a5b; }
.storefront-customer-card p { margin: 6px 0; color: #475569; }
.storefront-customer-card small { color: #64748b; }
.storefront-customer-card-actions,
.storefront-customer-mapping { display: flex; align-items: end; gap: 10px; flex: 0 0 auto; }
.storefront-customer-mapping label { display: grid; gap: 5px; }
.storefront-customer-mapping label span { font-size: .75rem; font-weight: 700; color: #475569; }
.storefront-customer-mapping select { min-width: 170px; max-width: 260px; }
.storefront-mapping-pill { padding: 4px 8px; color: #92400e; background: #fffbeb; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.storefront-mapping-pill.is-mapped { color: #166534; background: #ecfdf5; }
.storefront-customer-empty { display: grid; justify-items: center; gap: 7px; padding: 46px 20px; text-align: center; color: #64748b; border: 1px dashed #bfd1ea; border-radius: 14px; }
.storefront-customer-empty i { font-size: 2rem; color: #2563eb; }
.storefront-customer-empty strong { color: #102a5b; }
.storefront-customer-empty p { margin: 0; }
.storefront-ledger-choice { display: grid; gap: 10px; padding: 14px; border: 1px solid #cddcf2; border-radius: 12px; }
.storefront-ledger-choice legend { padding: 0 6px; font-weight: 800; color: #102a5b; }
.storefront-ledger-choice label { display: flex; align-items: center; gap: 8px; }
.storefront-registration-settings-card .action-row { margin-top: 12px; }

@media (max-width: 900px) {
  .storefront-customer-admin-head,
  .storefront-customer-card,
  .storefront-customer-mapping { align-items: stretch; flex-direction: column; }
  .storefront-customer-card-actions { width: 100%; }
  .storefront-customer-card-actions button,
  .storefront-customer-mapping button,
  .storefront-customer-mapping select { width: 100%; max-width: none; }
}
