/* Store-only Rev05 management layer. Shared framework components are unchanged. */
.mg-page { --mg-accent:#12568f; --mg-tint:#eaf3fc; color:#192c40; background:#f5f7fa; }
.mg-page[data-cr-backbone="dev"] { --mg-accent:#166534; --mg-tint:#edf7ef; }
.mg-page[data-cr-backbone="admin"] { --mg-accent:#9a3412; --mg-tint:#fff1e8; }
.mg-page [data-cr-backbone] { --cr-brand:var(--mg-accent); --cr-brand-700:var(--mg-accent); }
.mg-page *, .mg-header * { box-sizing:border-box; }
.mg-header { display:flex; align-items:center; gap:24px; min-height:72px; padding:12px 32px; background:white; border-bottom:1px solid #dce5ee; position:relative; z-index:100; }
.mg-brand { display:flex; align-items:center; gap:9px; color:#192c40; text-decoration:none; font-weight:700; }
.mg-brand img { width:112px; height:32px; object-fit:contain; }
.mg-areas { display:flex; flex-wrap:wrap; gap:4px; }
.mg-areas a { padding:9px 12px; color:#506174; text-decoration:none; border-radius:6px; font-size:14px; }
.mg-areas a[aria-current] { background:var(--mg-tint); color:var(--mg-accent); font-weight:650; }
.mg-account { margin-left:auto; position:relative; font-size:14px; max-width:35%; }
.mg-account summary { cursor:pointer; overflow-wrap:anywhere; }
.mg-account > div { position:absolute; right:0; top:32px; width:200px; padding:8px; background:white; border:1px solid #dce5ee; border-radius:8px; box-shadow:0 8px 24px #192c4015; }
.mg-account a { display:block; padding:10px; color:#192c40; text-decoration:none; }
.mg-page .main-content { padding:0; margin:0; max-width:none; min-height:calc(100vh - 72px); }
.mg-shell { display:grid; grid-template-columns:240px minmax(0,1fr); gap:32px; padding:24px 32px 40px; align-items:start; }
.mg-sidebar { position:sticky; top:16px; max-height:calc(100vh - 32px); overflow-y:auto; font-size:14px; }
.mg-context { display:block; font-size:12px; color:#506174; margin:0 0 16px; padding:0 8px 16px; border-bottom:1px solid #dce5ee; }
.mg-context label { display:block; margin-bottom:6px; font-weight:650; }
.mg-group { margin:0 0 10px; }
.mg-group summary { padding:10px 8px; font-weight:650; cursor:pointer; color:#506174; font-size:12px; }
.mg-group a { display:block; padding:10px 12px; margin:2px 0; border-radius:6px; color:#31445a; text-decoration:none; }
.mg-group a:hover { background:#e9eef4; }
.mg-group a[aria-current] { background:var(--mg-tint); color:var(--mg-accent); font-weight:650; box-shadow:inset 3px 0 var(--mg-accent); }
.mg-store-return { display:block; border-top:1px solid #dce5ee; margin-top:16px; padding:16px 8px; color:#506174; text-decoration:none; }
.mg-content { min-width:0; overflow-wrap:anywhere; }
.mg-content > .container, .mg-content .adm-page, .mg-content .reports-page { max-width:none!important; width:100%; margin:0!important; padding:0!important; }
.mg-content .adm-sectionnav { display:none; }
.mg-content :is(.cr-card,.adm-panel,.app-card,.license-card,.order-card) { border:1px solid #dce5ee; box-shadow:none!important; border-radius:8px; background:white; }
.mg-content :is(.app-card,.license-card,.order-card) { padding:20px; margin-bottom:16px; }
.mg-content .app-card:hover { transform:none; }
.mg-content .app-header { display:flex; gap:16px; align-items:center; margin-bottom:16px; }
.mg-content .app-icon { width:56px; height:56px; border-radius:8px; background:var(--mg-tint); color:var(--mg-accent); display:grid; place-items:center; flex-shrink:0; }
.mg-content .app-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.mg-content .btn-action { display:inline-flex; padding:8px 14px; gap:8px; align-items:center; border-radius:6px; border:1px solid #dce5ee; text-decoration:none; }
.mg-content .btn-primary-action { background:var(--mg-accent); color:white; }
.mg-content .btn-secondary-action { background:white; color:#31445a; }
.mg-content .license-info { padding:16px; background:#f5f7fa; border-radius:6px; margin-top:16px; }
.mg-content .license-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.mg-content .data-table { width:100%; border-collapse:collapse; background:white; font-size:14px; }
.mg-content .data-table :is(th,td) { padding:12px 16px; text-align:left; border-bottom:1px solid #dce5ee; vertical-align:top; }
.mg-content .data-table th { background:#f1f5f9; color:#31445a; font-weight:650; white-space:nowrap; }
.mg-table-scroll { max-width:100%; overflow-x:auto; border:1px solid #dce5ee; border-radius:8px; margin-block:16px; }
.mg-content :is(.adm-table-wrap,.table-responsive) { max-width:100%; }
.mg-content :is(input,select,textarea) { max-width:100%; }
.mg-content .adm-page-header__sub { max-width:70ch; }
.mg-content .manage-app .cr-wizard__panel > form { max-width:800px; }
.mg-content .manage-app .cr-wizard { margin-bottom:20px; background:transparent; padding:0; }
.mg-content .manage-app .cr-wizard__steps { display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; }
.mg-content .manage-app .cr-wizard__steps > li { flex:0 0 auto; }
.mg-content .manage-app .cr-step { padding:10px 16px; border:1px solid #dce5ee; border-radius:6px; background:white; color:#31445a; }
.mg-content .manage-app .cr-step.is-active { background:var(--mg-tint); color:var(--mg-accent); border-color:var(--mg-accent); }
.mg-content .manage-app :is(.cr-step__num,.cr-wizard__steps > li::after) { display:none; }
.mg-content .mg-stat-grid { display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; }
.mg-page :is(a,button,summary,input,select,textarea):focus-visible { outline:3px solid var(--mg-accent); outline-offset:3px; }
.mg-menu-toggle,.mg-menu-close { display:none; }
@media(max-width:1100px) {
 .mg-shell { gap:24px; padding-inline:24px; grid-template-columns:220px minmax(0,1fr); }
 .mg-header { padding-inline:24px; gap:16px; }
 .mg-content .mg-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
}
@media(max-width:900px) {
 .mg-shell { display:block; padding:20px 24px; }
 .mg-menu-toggle,.mg-menu-close { display:inline-flex; align-items:center; gap:8px; padding:9px 12px; border:1px solid #dce5ee; background:white; border-radius:6px; color:#192c40; }
 .mg-sidebar { display:none; position:fixed; top:0; bottom:0; left:0; z-index:302; width:min(300px,85vw); max-height:100dvh; padding:20px; background:white; }
 .mg-page.mg-menu-open .mg-sidebar { display:block; }
 .mg-menu-close { margin-bottom:20px; }
 .mg-backdrop:not([hidden]) { position:fixed; inset:0; z-index:301; background:#192c4070; }
 .mg-header { flex-wrap:wrap; }
 .mg-areas { order:4; width:100%; }
 .mg-account { max-width:45%; }
}
@media(max-width:480px) {
 .mg-shell { padding:16px; }
 .mg-header { padding:12px 16px; gap:12px; }
 .mg-brand img { width:86px; }
 .mg-brand span { display:none; }
 .mg-account { font-size:12px; max-width:38%; }
 .mg-content .mg-stat-grid { grid-template-columns:1fr!important; }
 .mg-content :is(.cr-wizard__panel,.adm-panel__body) { padding:16px!important; }
 .mg-content .manage-app [style*="min-width"] { min-width:0!important; }
 .mg-content .manage-app .cr-step { padding:9px 12px; }
}
/* Public catalog navigation: all entries remain reachable without horizontal discovery. */
@media(max-width:600px) {
 body:not(.mg-page) .rv-nav__bar { flex-wrap:wrap; overflow:visible; gap:0 12px; padding-block:6px; }
 body:not(.mg-page) .rv-nav__bar > a, body:not(.mg-page) .rv-nav__bar > button { padding-block:10px; }
 body:not(.mg-page) .rv-nav__instance { margin-left:0; }
}

.rv-publisher .profile-hero { background:#edf4fb!important; color:#192c40!important; border:1px solid #dce5ee; border-radius:12px; box-shadow:none!important; }
.rv-publisher .hero-background { display:none!important; }
.rv-publisher .profile-hero :is(h1,h2,p,.profile-subtitle) { color:#192c40!important; }
.rv-publisher :is(.achievement-badge,.developer-about,.developer-stats) { box-shadow:none!important; border:1px solid #dce5ee; border-radius:8px; }

.mg-workspace-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:24px; border-bottom:1px solid #dce5ee; padding-bottom:12px; }
.mg-workspace-tabs a { padding:9px 14px; border-radius:6px; color:#506174; text-decoration:none; }
.mg-workspace-tabs a[aria-current] { background:var(--mg-tint); color:var(--mg-accent); font-weight:650; }

.rv-pricing { padding-block:32px; }.rv-pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:24px;margin-block:24px; }.rv-pricing-grid section { background:white;border:1px solid #dce5ee;border-radius:10px;padding:24px; }.mg-product-actions form { max-width:800px; }.mg-product-actions summary { cursor:pointer; }

.mg-content .manage-app .cr-step::after { display:none!important; }
.mg-page[data-cr-backbone="admin"] { --adm-accent:#9a3412; }

/* Shared legacy-page adapters: Rev05 surfaces and accessible controls. */
.mg-content :is(.stat-card,.filters-section,.table-section) { background:white!important; color:#192c40!important; border:1px solid #dce5ee; border-radius:8px!important; box-shadow:none!important; }
.mg-content .stat-icon { background:var(--mg-tint)!important; color:var(--mg-accent)!important; border-radius:8px; flex-shrink:0; }
.mg-content :is(.stat-label,.pagination-info,.page-description,.empty-state p) { color:#506174!important; }
.mg-content .form-control { display:block; width:100%; min-height:42px; padding:9px 12px; border:1px solid #b9c7d5; border-radius:6px; background:white; color:#192c40; font:inherit; font-size:14px; }
.mg-content .btn-secondary { background:white!important; color:#31445a!important; border:1px solid #b9c7d5!important; }
.mg-content :is(.mg-page-heading,.mg-filter-actions) { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.mg-content .mg-page-heading { justify-content:space-between; margin-bottom:24px; }
.mg-content .mg-filter-actions > * { min-width:0; max-width:100%; }
.mg-content .mg-filter-actions select { flex:1 1 160px; min-height:42px; }
.mg-content .mg-filter-actions button { min-height:42px; padding:9px 14px; border:1px solid #b9c7d5; border-radius:6px; }
.mg-content .app-card { min-width:0; }
.mg-content .filters-section { padding:24px; }
.mg-content .filter-row { gap:16px; }
.mg-content .filter-group { min-width:0; }
.mg-content .table-header { flex-wrap:wrap; gap:12px; }
.mg-content .mg-billing-scope { color:#506174; font-size:14px; margin:0 0 20px; padding:12px 16px; border-left:3px solid var(--mg-accent); background:var(--mg-tint); }
.ins-page .ins-card,.ins-page .ins-terminal { min-width:0; max-width:100%; }
.ins-page .ins-terminal pre { max-width:100%; overflow-x:auto; }
@media(max-width:600px) {
 .mg-content .mg-filter-actions { width:100%; }
 .mg-content .filters-section { padding:16px; }
 .ins-page .ins-grid { grid-template-columns:minmax(0,1fr); }
}

@media(min-width:901px) { .mg-content .mg-billing-scope { display:none; } }

.mg-content .manage-app .cr-wizard__steps li::after { display:none!important; }
.mg-content .instance-card { background:white; border:1px solid #dce5ee!important; border-radius:8px!important; box-shadow:none!important; }
.mg-content .adm-table a:not([class]) { color:var(--mg-accent); text-decoration-thickness:1px; text-underline-offset:3px; }
.mg-content .mg-home-content .adm-form-grid { max-width:800px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.mg-content .mg-home-content .adm-form-grid > * { min-width:0; }
@media(max-width:600px) { .mg-content .mg-home-content .adm-form-grid { grid-template-columns:minmax(0,1fr); } .mg-content .mg-home-content .adm-form-grid > * { grid-column:auto!important; } }
