.app-main :where(h1,h2,h3){color:var(--cg-text);letter-spacing:-.025em}
.app-main .page-subtitle{max-width:68ch;color:var(--cg-text-secondary)}
.app-main :where(.panel-header,.section-heading) h2{font-size:1.08rem;font-weight:800}
.app-main .quick-action-card{border-radius:14px;border-color:var(--cg-border);background:var(--cg-surface)}
.inventory-results.inventory-listings-redesign{border-radius:16px;background:var(--cg-surface)}
.inventory-field-popover,.inventory-field-popover:popover-open{background:var(--cg-surface);border:1px solid var(--cg-border-strong);border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.32)}
.inventory-field-popover .inventory-editor-actions button{min-height:42px}
.batch-grid-scroll{border-radius:14px}
.batch-grid-table th{background:var(--cg-surface-soft);color:var(--cg-text-secondary);font-weight:850}
.batch-grid-table tbody tr:nth-child(even){background:var(--cg-surface-soft)}
.batch-grid-table tbody tr:hover{background:var(--cg-primary-soft)}
.batch-grid-table td{padding-block:9px}
.batch-grid-table :where(input,select,textarea){background:var(--cg-surface);border-radius:8px}
.batch-grid-save,.batch-grid-bulk{background:var(--cg-surface);border:1px solid var(--cg-border);border-radius:14px}
.app-main :where(.listing-section,.edit-section) h2{font-size:1.14rem;font-weight:850}
@media(max-width:768px){.batch-grid-table tr{border-radius:14px;padding:14px}
.batch-grid-table :where(input,select){min-height:44px}
.inventory-field-popover:popover-open{max-height:65dvh;overflow:auto}}
/* Compact seller cards on narrow desktop and tablet: the eight-column
   Inventory table must never require horizontal scrolling to reach actions.
   This changes layout only; all existing form actions and identity evidence
   remain in the DOM. */
@media (max-width:1100px){
  html body .app-main .inventory-results .table-scroll{overflow:visible;max-width:100%}
                              }

.app-main .inventory-listing-thumb-wrap.photo-zoom .inventory-photo-open{
  position:static;display:block;width:100%;height:auto;padding:0;line-height:normal;
  appearance:none;cursor:zoom-in;background:transparent;border:0;border-radius:8px;
  box-shadow:none;color:inherit;overflow:hidden;
}
.app-main .inventory-listing-thumb-wrap.photo-zoom .inventory-photo-open:hover{
  background:transparent;box-shadow:0 0 0 2px var(--cg-primary);
}
.app-main .inventory-listing-thumb-wrap.photo-zoom .inventory-photo-open:focus-visible{
  background:transparent;outline:3px solid var(--cg-primary);outline-offset:3px;
}
.app-main .inventory-listing-thumb-wrap .inventory-photo-open .photo-zoom-thumb{
  width:100%;height:88px;object-fit:contain;pointer-events:none;
}

/* Full editor information architecture: a short jump bar and readable attribute grid. */
.app-main .edit-section-nav{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  margin:12px 0 18px;padding:8px 0;
}
.app-main .edit-section-nav a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:40px;padding:8px 13px;border-radius:10px;
  border:1px solid var(--cg-border-strong);background:var(--cg-surface);
  color:var(--cg-text);font-weight:700;text-decoration:none;
}
.app-main .edit-section-nav a:hover,
.app-main .edit-section-nav a:focus-visible{
  border-color:var(--cg-primary);background:var(--cg-primary-soft);
}
.app-main .edit-listing-attributes .edit-attribute-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(195px,1fr));
  gap:10px 12px;margin:16px 0;
}
.app-main .edit-listing-attributes .edit-attribute{
  min-width:0;padding:12px 14px;border:1px solid var(--cg-border);
  border-radius:10px;background:var(--cg-surface-soft);
}
.app-main .edit-listing-attributes dt{
  margin-bottom:5px;font-size:.76rem;font-weight:800;color:var(--cg-text-secondary);
}
.app-main .edit-listing-attributes dd{
  margin:0;overflow-wrap:anywhere;font-size:.94rem;font-weight:650;color:var(--cg-text);
}
.app-main .edit-listing-attributes .edit-help{max-width:80ch;line-height:1.55}
@media(max-width:720px){
  .app-main .edit-section-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .app-main .edit-section-nav a{padding:10px;text-align:center}
  .app-main .edit-listing-attributes .edit-attribute-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){
  .app-main .edit-listing-attributes .edit-attribute-grid{grid-template-columns:minmax(0,1fr)}
}

/* Useful editor controls, not a palette-only redesign. */
.app-main .edit-field-grid .edit-sku-control{
  display:flex;flex-direction:column;gap:6px;grid-column:1/-1;
  max-width:560px;font-weight:750;
}
.app-main .edit-field-grid .edit-sku-control input{
  width:100%;min-width:0;min-height:43px;font-weight:500;
}
.app-main .edit-field-grid .edit-sku-control small{
  font-size:.79rem;font-weight:450;line-height:1.35;
}
html.edit-fullscreen-active{overflow:hidden}
.app-main .edit-description.is-fullscreen{
  position:fixed;inset:16px;z-index:1000;margin:0!important;
  display:flex;flex-direction:column;gap:12px;overflow-y:auto;
  border:1px solid var(--cg-border-strong);border-radius:14px;
  background:var(--cg-surface);color:var(--cg-text);
  padding:clamp(14px,2vw,24px);box-shadow:0 12px 60px rgba(0,0,0,.5);
}
.app-main .edit-description.is-fullscreen .edit-description-heading{
  flex:0 0 auto;
}
.app-main .edit-description.is-fullscreen textarea#description-html{
  flex:1 1 50vh;min-height:45vh;height:auto!important;max-height:none;
  resize:vertical;
}
.app-main .edit-description.is-fullscreen .description-preview{
  flex:1 1 50vh;min-height:45vh;height:auto!important;
}
.app-main .edit-description.is-fullscreen .description-template-tools{
  flex:0 0 auto;
}
@media(max-width:650px){
  .app-main .edit-description.is-fullscreen{inset:0;border-radius:0;padding:14px}
  .app-main .edit-description.is-fullscreen .edit-description-actions{
    display:flex;flex-wrap:wrap;gap:6px;
  }
  .app-main .edit-description.is-fullscreen [data-description-fullscreen]{
    min-height:42px;
  }
}

/* eBay category-aware card details: fast scan of core identity, optional fields collapsed. */
.app-main .edit-card-specifics .edit-specifics-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;
  margin:16px 0;
}
.app-main .edit-card-specifics .edit-specific-item{min-width:0}
.app-main .edit-card-specifics .edit-specific-item label,
.app-main .edit-card-specifics .edit-specific-readonly{
  display:flex;flex-direction:column;gap:6px;padding:11px 13px;
  border:1px solid var(--cg-border);border-radius:10px;
  background:var(--cg-surface-soft);font-weight:750;min-width:0;
}
.app-main .edit-card-specifics input,
.app-main .edit-card-specifics select{
  width:100%;min-width:0;height:42px;padding:8px;font-size:.94rem;
  background:var(--cg-surface);color:var(--cg-text);
}
.app-main .edit-card-specifics .edit-suggest{height:44px;font-weight:600}
.app-main .edit-card-specifics .edit-suggest-note{
  font-weight:450;color:var(--cg-text-secondary);font-size:.78rem;line-height:1.3;
}
.app-main .edit-card-specifics :is(input,select):disabled{
  opacity:.8;cursor:not-allowed;border-style:dashed;
}
.app-main .edit-card-specifics .edit-specific-readonly p{
  margin:0;overflow-wrap:anywhere;font-weight:650;
}
.app-main .edit-card-specifics .edit-specific-readonly small{
  font-weight:450;color:var(--cg-text-secondary);
}
.app-main .edit-card-specifics .edit-required{
  display:inline;font-size:.7rem;color:var(--cg-primary);font-weight:850;
}
.app-main .edit-card-specifics .edit-specifics-extra{
  border-top:1px solid var(--cg-border);padding-top:12px;margin-top:8px;
}
.app-main .edit-card-specifics .edit-specifics-extra>summary{
  cursor:pointer;font-weight:800;padding:9px 0;
}
@media(max-width:650px){
  .app-main .edit-card-specifics .edit-specifics-grid{grid-template-columns:minmax(0,1fr);gap:8px}
}

/* Card details: live "changed" feedback and the review page. Presentation only. */
.app-main .edit-card-specifics .edit-specific-item.is-changed label{
  border-color:var(--cg-primary);background:var(--cg-primary-soft);
  box-shadow:inset 4px 0 0 var(--cg-primary);
}
.app-main .edit-card-specifics .edit-specifics-status{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px;
  padding:9px 12px;border-radius:10px;background:var(--cg-primary-soft);color:var(--cg-text);
}
.app-main .edit-card-specifics .edit-specifics-status[hidden]{display:none}
.app-main .edit-card-specifics .edit-specifics-status .button{min-height:36px;margin-left:auto}
.app-main .edit-review .review-table-wrap{overflow-x:auto;margin:12px 0}
.app-main .edit-review .review-table{width:100%;border-collapse:collapse}
.app-main .edit-review .review-table th,
.app-main .edit-review .review-table td{
  text-align:left;padding:10px 12px;border-bottom:1px solid var(--cg-border);overflow-wrap:anywhere;
}
.app-main .edit-review .review-table thead th{font-size:.78rem;color:var(--cg-text-secondary)}
.app-main .edit-review .review-before{color:var(--cg-text-secondary);text-decoration:line-through;text-decoration-color:var(--cg-border-strong)}
.app-main .edit-review .review-after{font-weight:800;color:var(--cg-text);background:var(--cg-primary-soft)}
.app-main .edit-review .review-problems{background:var(--cg-danger-soft);color:var(--cg-text);border:1px solid var(--cg-danger);border-radius:10px;padding:12px 14px;margin:12px 0}
.app-main .edit-review .review-problems ul{margin:6px 0 0;padding-left:20px}
.app-main .edit-review .review-gated{background:var(--cg-warning-soft);color:var(--cg-text);border:1px solid var(--cg-warning);border-radius:10px;padding:12px 14px;margin:12px 0}
.app-main .edit-review .review-live-warning{background:var(--cg-danger-soft);color:var(--cg-text);border:1px solid var(--cg-danger);border-radius:10px;padding:12px 14px;margin:12px 0;flex:1 1 100%}
.app-main .edit-review .review-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;position:static;margin-top:16px}
.app-main .edit-review .review-actions form{display:contents}
@media(max-width:650px){
  .app-main .edit-review .review-table thead{display:none}
  .app-main .edit-review .review-table,.app-main .edit-review .review-table tbody,
  .app-main .edit-review .review-table tr,.app-main .edit-review .review-table th,
  .app-main .edit-review .review-table td{display:block;width:100%}
  .app-main .edit-review .review-table tr{border:1px solid var(--cg-border);border-radius:10px;margin-bottom:10px;overflow:hidden}
  .app-main .edit-review .review-table td::before{content:attr(data-label);display:block;font-size:.72rem;font-weight:700;color:var(--cg-text-secondary);text-decoration:none}
  .app-main .edit-review .review-actions .button{width:100%}
}

/* Listing editor: organize work by task, not by a long vertical stack.
   Desktop shows listing/card fields beside photo management while phones
   retain a simple one-column flow. Nothing here changes the save contract. */
.app-main .edit-layout{
  align-items:start;
}
.app-main .edit-layout>.edit-section{
  margin:0;min-width:0;
}
.app-main .edit-section-nav{
  scroll-margin-top:20px;
}
.app-main .edit-layout :is(#edit-listing,#edit-attributes,#edit-photos,#edit-marketplace-settings){
  scroll-margin-top:100px;
}
.app-main .edit-description:not(.is-fullscreen){
  border-top:1px solid var(--cg-border);
  margin-top:15px;padding-top:16px;
}
.app-main .edit-description:not(.is-fullscreen) textarea#description-html{
  min-height:160px;height:180px;resize:vertical;
}
.app-main .edit-description:not(.is-fullscreen) .description-preview{
  min-height:190px;height:210px;
}
.app-main .edit-photo-grid{
  grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));
  gap:12px;
}
.app-main .edit-photo-grid .edit-photo-card{
  min-width:0;padding:10px;
}
.app-main .edit-photo-grid .edit-photo-media,
.app-main .edit-photo-grid :is(.edit-photo-media img,.edit-photo-card img){
  height:170px;
}
.app-main .edit-photo-grid .edit-photo-add{
  min-height:195px;padding:16px;
}
.app-main .edit-photo-card-meta{align-items:start;flex-wrap:wrap}
@media(min-width:1350px){
  .app-main .edit-section-nav{
    position:sticky;top:0;z-index:18;
    padding:10px 8px;margin:0 0 17px;
    background:var(--cg-bg);
    border-bottom:1px solid var(--cg-border);
  }
  .app-main .edit-layout{
    display:grid;
    grid-template-columns:minmax(0,1.16fr) minmax(340px,.84fr);
    gap:18px;align-items:start;
  }
  .app-main .edit-layout>#edit-listing{grid-column:1;grid-row:1}
  .app-main .edit-layout>#edit-attributes{grid-column:1;grid-row:2}
  .app-main .edit-layout>#edit-photos{grid-column:2;grid-row:1/span 2}
  .app-main .edit-layout>#edit-marketplace-settings{
    grid-column:1/-1;grid-row:3;
  }
}
@media(max-width:768px){
  .app-main .edit-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;
  }
  .app-main .edit-photo-grid .edit-photo-media,
  .app-main .edit-photo-grid :is(.edit-photo-media img,.edit-photo-card img){
    height:165px;
  }
  .app-main .edit-photo-grid .edit-photo-add{min-height:160px}
  .app-main .edit-description:not(.is-fullscreen) textarea#description-html{
    min-height:145px;height:165px;
  }
}
@media(max-width:450px){
  .app-main .edit-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  }
  .app-main .edit-photo-grid .edit-photo-media,
  .app-main .edit-photo-grid :is(.edit-photo-media img,.edit-photo-card img){
    height:140px;
  }
}
