/* WordPress integration layer. The visual system itself lives in app.css. */
html{scroll-behavior:smooth}body.admin-bar .site-header{top:32px}.mp-wordpress-theme #wpadminbar{z-index:99999}
.mp-wordpress-theme .site-header{position:sticky;top:0;z-index:900}.mp-wordpress-theme .site-header .header-inner{min-height:72px}.mp-wordpress-theme .main-nav{min-width:0}.mp-wordpress-theme .brand-logo{max-height:44px;width:auto;max-width:190px;object-fit:contain}
.mobile-menu-toggle{display:none}.account-menu{position:relative}.account-menu>summary{list-style:none;cursor:pointer}.account-menu>summary::-webkit-details-marker{display:none}.account-dropdown{position:absolute;right:0;top:calc(100% + 8px);z-index:1000;min-width:230px;padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 20px 50px rgba(30,29,50,.16);display:grid}.account-dropdown a{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;font-size:12px}.account-dropdown a:hover{background:var(--surface-2)}.menu-badge{min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:var(--danger);color:#fff;display:grid;place-items:center;font-size:9px}
.flash-wrap{position:relative;z-index:850}.flash{margin-top:12px;padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:12px}.flash-success{border-color:color-mix(in srgb,var(--success) 40%,var(--line));}.flash-error{border-color:color-mix(in srgb,var(--danger) 45%,var(--line));}
.mp-wordpress-theme .content-page{max-width:960px;margin-inline:auto}.mp-wordpress-theme .content-page.page-template-wide{max-width:none}.mp-wordpress-theme .content-page.page-template-editorial>h1{max-width:760px;font-size:clamp(36px,6vw,70px);letter-spacing:-.05em}
.mp-wordpress-theme .prose img{max-width:100%;height:auto}.mp-wordpress-theme .prose iframe{max-width:100%}
.mp-wordpress-theme .wp-editor-wrap{margin-top:8px}.mp-wordpress-theme .wp-editor-container{border-color:var(--line)}.mp-wordpress-theme .mce-tinymce{box-shadow:none!important}.mp-wordpress-theme .quicktags-toolbar{background:var(--surface-2);border-color:var(--line)}
.featured-layout-editorial .article-card:first-child{grid-column:span 2;grid-row:span 2}.featured-layout-list{display:grid!important;grid-template-columns:1fr!important}.featured-layout-list .article-card{display:grid;grid-template-columns:minmax(180px,31%) 1fr}.featured-layout-list .article-cover{height:100%;min-height:190px}.featured-layout-compact .article-card .article-summary{display:none}.featured-layout-compact .article-card h3{font-size:16px}.featured-grid.columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}.featured-grid.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}.featured-grid.columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.mp-wordpress-theme .panel-tabs{overflow:auto;scrollbar-width:thin}.mp-wordpress-theme .editor-layout{align-items:start}.mp-wordpress-theme .cover-preview{width:100%;max-height:180px;object-fit:cover;border-radius:12px}.mp-wordpress-theme .table-list{display:grid}.mp-wordpress-theme .table-row{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:13px 0;border-top:1px solid var(--line)}.mp-wordpress-theme .table-row:first-child{border-top:0}.mp-wordpress-theme .table-row>div:first-child{display:grid;gap:3px}.mp-wordpress-theme .table-row small{color:var(--muted)}.row-actions{display:flex!important;align-items:center;gap:7px;flex-wrap:wrap}.row-actions form{margin:0}
.notification-list{display:grid;gap:10px}.notification-card{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.notification-card.unread{border-color:color-mix(in srgb,var(--primary) 45%,var(--line));background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.notification-card>div:first-child{display:grid;gap:4px}.notification-card p{margin:0;color:var(--muted);font-size:11px}.notification-card>div:last-child{display:flex;gap:7px;align-items:center}
.auth-page,.auth-shell{min-height:65vh}.auth-shell{display:grid;place-items:center;padding:48px 18px}.auth-card{width:min(100%,540px);background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:28px}.auth-card form{display:grid;gap:14px}.auth-card label,.stack-form label,.editor-main label,.editor-sidebar label{display:grid;gap:7px;font-size:11px;font-weight:700}.auth-card input,.stack-form input,.stack-form textarea,.stack-form select,.editor-main input,.editor-main textarea,.editor-sidebar input,.editor-sidebar select{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);padding:10px 11px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:1100px){.featured-grid.columns-4{grid-template-columns:repeat(2,minmax(0,1fr))}.featured-layout-editorial .article-card:first-child{grid-column:auto;grid-row:auto}}
@media(max-width:900px){body.admin-bar .site-header{top:46px}.mobile-menu-toggle{display:grid;width:40px;height:40px;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}.header-inner{flex-wrap:wrap}.main-nav{display:none!important;order:10;width:100%;padding:10px 0 4px;overflow:auto}.main-nav.is-open{display:flex!important}.header-actions{margin-left:auto}.featured-grid.columns-2,.featured-grid.columns-3,.featured-grid.columns-4{grid-template-columns:1fr 1fr}.featured-layout-list .article-card{grid-template-columns:150px 1fr}}
@media(max-width:680px){.header-actions .wallet-chip{display:none}.header-actions>.btn-primary{display:none}.featured-grid.columns-2,.featured-grid.columns-3,.featured-grid.columns-4{grid-template-columns:1fr}.featured-layout-list .article-card{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}.notification-card,.table-row{align-items:stretch;flex-direction:column}.notification-card>div:last-child{justify-content:flex-start}}

.mp-editor-local-status{font-size:11px;color:var(--muted);margin:4px 0 10px}.mp-editor-local-status.is-saved{color:var(--success)}
.mp-editor-preview[hidden]{display:none}.mp-editor-preview{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:24px}.mp-editor-preview-backdrop{position:absolute;inset:0;background:rgba(13,15,28,.72);backdrop-filter:blur(5px)}.mp-editor-preview-panel{position:relative;z-index:1;width:min(920px,96vw);max-height:88vh;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--card-radius,20px);box-shadow:0 30px 100px rgba(0,0,0,.3);padding:36px}.mp-editor-preview-panel h1{font-size:clamp(32px,5vw,54px);line-height:1.05;letter-spacing:-.04em}.mp-editor-preview-close{position:absolute;right:14px;top:14px;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--surface-2);color:var(--text);font-size:22px}
.mp-editor-preview-frame{width:100%;min-height:52vh;border:0;background:#fff;border-radius:12px}
.notification-chip{position:relative;width:38px;height:38px;border:1px solid var(--line);background:var(--surface);border-radius:11px;display:grid;place-items:center;font-weight:800}.notification-chip b{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:99px;display:grid;place-items:center;background:var(--danger);color:#fff;font-size:9px}.wallet-chip span{font-size:10px;color:var(--muted);text-transform:uppercase;font-weight:750}

/* WordPress Suite v1.0.4: system-page layout hardening.
   WordPress uses horizontal account/seller tabs instead of the legacy PHP sidebar.
   The legacy .dashboard-shell grid therefore must not reserve a 235px empty sidebar. */
.mp-wordpress-theme .dashboard-shell,
.mp-wordpress-theme .seller-shell{
  display:block!important;
  width:100%;
  min-width:0;
  padding:42px 0 72px;
  background:linear-gradient(180deg,var(--surface-2),var(--bg) 220px);
}
.mp-wordpress-theme .dashboard-shell>.container,
.mp-wordpress-theme .seller-shell>.container{
  width:min(calc(100% - 40px),var(--container));
  max-width:var(--container);
  min-width:0;
  margin-inline:auto;
}
.mp-wordpress-theme .dashboard-shell .section-head,
.mp-wordpress-theme .seller-shell .section-head{margin-top:8px}

/* Horizontal account/seller navigation: full-width, scroll-safe and no layout collapse. */
.mp-wordpress-theme .panel-tabs{
  display:flex;
  align-items:center;
  gap:7px;
  width:100%;
  min-width:0;
  margin:0 0 24px;
  padding:7px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-width:thin;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
  box-shadow:0 8px 28px rgba(37,28,70,.04);
}
.mp-wordpress-theme .panel-tabs a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:10px;
  color:var(--muted);
  font-size:11px;
  font-weight:780;
  white-space:nowrap;
}
.mp-wordpress-theme .panel-tabs a:hover{background:var(--surface-2);color:var(--text)}
.mp-wordpress-theme .panel-tabs a.active{background:var(--primary-soft);color:var(--primary)}

/* Dashboard areas that were previously relying on the old PHP sidebar layout. */
.mp-wordpress-theme .dashboard-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
  padding:26px 28px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--surface);
}
.mp-wordpress-theme .dashboard-hero h1{margin:5px 0 6px;font-size:clamp(30px,4vw,44px);letter-spacing:-.04em}
.mp-wordpress-theme .dashboard-hero p{margin:0;color:var(--muted)}
.mp-wordpress-theme .quick-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.mp-wordpress-theme .quick-grid .panel-card{min-width:0;transition:transform .18s,border-color .18s}
.mp-wordpress-theme .quick-grid .panel-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 28%,var(--line))}
.mp-wordpress-theme .quick-grid h3{margin:0 0 6px}
.mp-wordpress-theme .quick-grid p{margin:0;color:var(--muted)}

/* Seller editor: use the desktop width instead of stacking everything in the legacy first column. */
.mp-wordpress-theme .editor-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(290px,320px);
  gap:18px;
  align-items:start;
  width:100%;
  min-width:0;
}
.mp-wordpress-theme .editor-main,
.mp-wordpress-theme .editor-sidebar,
.mp-wordpress-theme .editor-sidebar>.panel-card,
.mp-wordpress-theme .wp-editor-wrap,
.mp-wordpress-theme .wp-editor-container{min-width:0;max-width:100%}
.mp-wordpress-theme .editor-main{display:grid;gap:17px;padding:24px}
.mp-wordpress-theme .editor-main>label{margin:0}
.mp-wordpress-theme .editor-main .two-col{margin:0}
.mp-wordpress-theme .editor-sidebar{
  display:block!important;
  position:sticky;
  top:calc(var(--header-h) + 22px);
  align-self:start;
}
body.admin-bar.mp-wordpress-theme .editor-sidebar{top:calc(var(--header-h) + 54px)}
.mp-wordpress-theme .editor-sidebar>.panel-card{display:grid;gap:14px;padding:20px}
.mp-wordpress-theme .editor-sidebar label{margin:0}
.mp-wordpress-theme .editor-sidebar input[type=file]{padding:8px;font-size:10px}
.mp-wordpress-theme .editor-actions{display:grid;grid-template-columns:1fr;gap:8px;width:100%}
.mp-wordpress-theme .editor-actions .btn{width:100%;min-width:0}
.mp-wordpress-theme .wp-editor-wrap iframe{width:100%!important;max-width:100%!important}
.mp-wordpress-theme .wp-editor-area{width:100%!important;max-width:100%!important}
.mp-wordpress-theme .mce-container,
.mp-wordpress-theme .mce-container-body,
.mp-wordpress-theme .mce-edit-area{max-width:100%!important}

/* General system-page resilience: long labels/content may not force a narrow or overflowing column. */
.mp-wordpress-theme .metric-grid,
.mp-wordpress-theme .two-col,
.mp-wordpress-theme .article-grid,
.mp-wordpress-theme .table-list,
.mp-wordpress-theme .notification-list{min-width:0}
.mp-wordpress-theme .metric-card,
.mp-wordpress-theme .panel-card,
.mp-wordpress-theme .table-row,
.mp-wordpress-theme .notification-card{min-width:0}
.mp-wordpress-theme .table-row>div,
.mp-wordpress-theme .notification-card>div{min-width:0}
.mp-wordpress-theme .table-row strong,
.mp-wordpress-theme .table-row small{overflow-wrap:anywhere}

@media(max-width:1020px){
  .mp-wordpress-theme .editor-layout{grid-template-columns:1fr}
  .mp-wordpress-theme .editor-sidebar{position:static}
  body.admin-bar.mp-wordpress-theme .editor-sidebar{top:auto}
  .mp-wordpress-theme .editor-sidebar>.panel-card{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .mp-wordpress-theme .editor-sidebar .cover-preview,
  .mp-wordpress-theme .editor-sidebar .mp-editor-local-status,
  .mp-wordpress-theme .editor-sidebar .editor-actions,
  .mp-wordpress-theme .editor-sidebar .mp-editor-preview{grid-column:1/-1}
  .mp-wordpress-theme .editor-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .mp-wordpress-theme .dashboard-shell,
  .mp-wordpress-theme .seller-shell{padding:28px 0 56px}
  .mp-wordpress-theme .dashboard-shell>.container,
  .mp-wordpress-theme .seller-shell>.container{width:min(calc(100% - 26px),var(--container))}
  .mp-wordpress-theme .quick-grid{grid-template-columns:1fr}
  .mp-wordpress-theme .dashboard-hero{padding:20px;align-items:flex-start}
  .mp-wordpress-theme .editor-main{padding:18px}
  .mp-wordpress-theme .editor-sidebar>.panel-card{grid-template-columns:1fr}
  .mp-wordpress-theme .editor-sidebar .cover-preview,
  .mp-wordpress-theme .editor-sidebar .mp-editor-local-status,
  .mp-wordpress-theme .editor-sidebar .editor-actions,
  .mp-wordpress-theme .editor-sidebar .mp-editor-preview{grid-column:auto}
  .mp-wordpress-theme .editor-actions{grid-template-columns:1fr}
}
@media(max-width:680px){
  .mp-wordpress-theme .metric-grid{grid-template-columns:1fr 1fr}
  .mp-wordpress-theme .two-col{grid-template-columns:1fr}
}
@media(max-width:460px){
  .mp-wordpress-theme .metric-grid{grid-template-columns:1fr}
}
