/* MeshCave 7.0.1 — Async Catalog + Dark Theme polish */
.catalog-is-loading{pointer-events:none}.catalog-is-loading .catalog-toolbar,.catalog-is-loading .filters{opacity:.72}
.catalog-skeleton{background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden;padding-bottom:16px}
.catalog-skeleton-media,.catalog-skeleton-line{background:linear-gradient(90deg,rgba(255,255,255,.045),rgba(255,255,255,.11),rgba(255,255,255,.045));background-size:220% 100%;animation:mcSkeleton 1.1s linear infinite}
.catalog-skeleton-media{aspect-ratio:1.3/1}.catalog-skeleton-line{height:12px;margin:14px 16px 0;border-radius:999px;width:62%}.catalog-skeleton-line.wide{width:78%}.catalog-skeleton-line.short{width:34%}
@keyframes mcSkeleton{to{background-position:-220% 0}}
.product-card,.product-card:hover{transform:none!important}.product-card:hover{border-color:rgba(145,151,180,.38)!important;box-shadow:0 12px 28px rgba(0,0,0,.20)!important}
.product-card:hover .product-thumb{transform:scale(1.02)!important;filter:brightness(1.03)}

html[data-theme="dark"] body,html[data-theme="dark"] main{color:#f2f4f8}
html[data-theme="dark"] :where(.card,.panel,.admin-card,.cockpit-card,.health-card,.operations-card,.settings-card,.dashboard-card,.collection-card,.notification-card,.library-card,.profile-card,.review-card,.modal-content,.dropdown-menu,.account-dropdown,.form-card,.summary-card,.stat-card,.table-wrap,.empty-state){background:#101827!important;color:#f2f4f8!important;border-color:#29334d!important}
html[data-theme="dark"] :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select){background:#111a2c!important;color:#f4f6fa!important;border-color:#33405f!important;box-shadow:none!important}
html[data-theme="dark"] :where(input,textarea,select)::placeholder{color:#7f899f!important}
html[data-theme="dark"] :where(label,.muted,.help-text,.field-help,small){color:#aab2c4}
html[data-theme="dark"] :where(table,th,td){color:#e9edf5;border-color:#2a3550!important}
html[data-theme="dark"] :where(th){background:#151f33!important}
html[data-theme="dark"] :where(.btn-secondary,.btn-ghost,button.secondary){background:#182238!important;color:#eef1f7!important;border-color:#34415f!important}
html[data-theme="dark"] :where(.btn-secondary,.btn-ghost,button.secondary):hover{background:#202c46!important}
html[data-theme="dark"] :where(option){background:#111a2c;color:#f4f6fa}
html[data-theme="dark"] :where(.flash,.toast,.mc-toast){border-color:#34415f}
html[data-theme="dark"] a{color:inherit}
html[data-theme="dark"] .catalog-skeleton{background:#0f1727;border-color:#29334d}

.maintenance-actions button[disabled]{opacity:.72;cursor:wait}
@media(prefers-reduced-motion:reduce){.catalog-skeleton-media,.catalog-skeleton-line{animation:none}.product-card .product-thumb{transition:none!important}}

/* 7.0.2 hotfix — complete dark surfaces audit */
html[data-theme="dark"]{
  --mc-dark-page:#080e1d;
  --mc-dark-card:#10192a;
  --mc-dark-inner:#172238;
  --mc-dark-input:#121d31;
  --mc-dark-border:#2d3a58;
  --mc-dark-text:#f2f5fa;
  --mc-dark-muted:#a5afc2;
}
html[data-theme="dark"] body{background:var(--mc-dark-page)!important;color:var(--mc-dark-text)!important}
html[data-theme="dark"] :where(.cockpit-card,.health-card,.admin-card,.dashboard-card,.operations-card,.panel,.card,.form-card,.table-wrap,.modal-content,.account-dropdown,.dropdown-menu){
  background:var(--mc-dark-card)!important;color:var(--mc-dark-text)!important;border-color:var(--mc-dark-border)!important;
}
html[data-theme="dark"] :where(.cockpit-issue,.cockpit-empty,.cockpit-metrics>div,.summary-card,.stat-card,.empty-state,.review,.notification-card,.collection-card,.library-card,.profile-card,.info-banner,.note){
  background:var(--mc-dark-inner)!important;color:var(--mc-dark-text)!important;border-color:var(--mc-dark-border)!important;
}
html[data-theme="dark"] .cockpit-progress{background:#25314a!important}
html[data-theme="dark"] .cockpit-progress::after{display:none!important}
html[data-theme="dark"] :where(.cockpit-card h1,.cockpit-card h2,.cockpit-card h3,.cockpit-metrics b,.cockpit-issue span,.cockpit-empty,.admin-head h1){color:var(--mc-dark-text)!important}
html[data-theme="dark"] :where(.cockpit-kicker,.cockpit-metrics span,.cockpit-system-list small,.muted,.help-text,.field-help,.small-note){color:var(--mc-dark-muted)!important}
html[data-theme="dark"] .cockpit-system-list>div{border-color:var(--mc-dark-border)!important}
html[data-theme="dark"] :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.filter-bar input,.filter-bar select){
  color-scheme:dark;background:var(--mc-dark-input)!important;color:var(--mc-dark-text)!important;border-color:var(--mc-dark-border)!important;
}
html[data-theme="dark"] :where(input,textarea,select):disabled{background:#0e1727!important;color:#758198!important;opacity:1!important}
html[data-theme="dark"] :where(input,textarea,select):focus{border-color:#7057e8!important;box-shadow:0 0 0 3px rgba(112,87,232,.16)!important;outline:0!important}
html[data-theme="dark"] input[type="checkbox"],html[data-theme="dark"] input[type="radio"]{accent-color:#7658ff}
html[data-theme="dark"] :where(.table,table){background:transparent!important;color:var(--mc-dark-text)!important}
html[data-theme="dark"] :where(.table th,table th){background:#151f33!important;color:#dce2ec!important;border-color:var(--mc-dark-border)!important}
html[data-theme="dark"] :where(.table td,table td){background:transparent!important;color:#e6ebf3!important;border-color:var(--mc-dark-border)!important}
html[data-theme="dark"] :where(.table tr:hover td,table tr:hover td){background:#152036!important}
html[data-theme="dark"] :where(.account-dropdown a,.account-dropdown button){color:var(--mc-dark-text)!important}
html[data-theme="dark"] :where(.account-dropdown a:hover,.account-dropdown button:hover){background:#1d2941!important}
html[data-theme="dark"] :where(.btn-fav){background:#172238!important;color:#e9edf5!important;border-color:#34425f!important}
html[data-theme="dark"] :where(.btn-fav.active){background:rgba(224,36,94,.14)!important;color:#ff5b8d!important;border-color:rgba(255,91,141,.38)!important}
html[data-theme="dark"] :where(.status-pending,.status-requested,.note-warn){background:rgba(230,166,53,.13)!important;color:#f0c56c!important}
html[data-theme="dark"] :where(.status-draft,.status-cancelled){background:#202b40!important;color:#aeb7c8!important}
html[data-theme="dark"] :where(.twofa-qr){background:#fff!important}
html[data-theme="dark"] :where(.recovery-code-grid code,.twofa-secret){background:#172238!important;color:#f2f5fa!important;border-color:#34425f!important}
html[data-theme="dark"] ::-webkit-calendar-picker-indicator{filter:invert(.85)}

/* MeshCave 7.0.3 — Catalog Experience II + dark tabs audit */
html[data-theme="dark"] .dash-tabs a,
html[data-theme="dark"] :where(.tabs a,.tab-list a,.profile-tabs a,.settings-tabs a,.library-tabs a){
  background:#111b2e!important;
  color:#c4ccdb!important;
  border-color:#2e3b59!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .dash-tabs a:hover,
html[data-theme="dark"] :where(.tabs a,.tab-list a,.profile-tabs a,.settings-tabs a,.library-tabs a):hover{
  background:#17243b!important;
  color:#f2f5fa!important;
  border-color:#465575!important;
}
html[data-theme="dark"] .dash-tabs a.active,
html[data-theme="dark"] :where(.tabs a.active,.tab-list a.active,.profile-tabs a.active,.settings-tabs a.active,.library-tabs a.active){
  background:#241a35!important;
  color:#fff!important;
  border-color:#443253!important;
}
html[data-theme="dark"] .dash-tabs a:focus-visible,
html[data-theme="dark"] :where(.tabs a,.tab-list a,.profile-tabs a,.settings-tabs a,.library-tabs a):focus-visible{
  outline:2px solid #8066ff!important;
  outline-offset:2px;
}
html[data-theme="dark"] :where(.compact-row,.purchase-row,.library-row,.order-row,.settings-section,.dashboard-section,.tab-panel){
  background:transparent!important;
  color:var(--mc-dark-text)!important;
  border-color:var(--mc-dark-border)!important;
}
html[data-theme="dark"] :where(.compact-row span,.compact-row time,.purchase-row small,.library-row small,.order-row small){color:var(--mc-dark-muted)!important}
html[data-theme="dark"] :where(.metric,.mini-card,.notice,.notice.unread,.avatar-tune-controls,.reset-sent-note){
  background:var(--mc-dark-inner)!important;
  color:var(--mc-dark-text)!important;
  border-color:var(--mc-dark-border)!important;
}
html[data-theme="dark"] :where(.metric span,.notice span,.notice time){color:var(--mc-dark-muted)!important}

.catalog-grid-fade{animation:mcCatalogFade .16s ease-out}
@keyframes mcCatalogFade{from{opacity:.72}to{opacity:1}}
.search-suggestions .recent-search-head{display:flex;justify-content:space-between;align-items:center;padding:8px 12px 5px;color:var(--muted);font-size:12px;font-weight:700}
.search-suggestions .recent-search-clear{border:0;background:transparent;color:var(--accent);font:inherit;font-size:11px;cursor:pointer;padding:2px 0}
.search-suggestions .recent-search-item small{opacity:.8}
@media(prefers-reduced-motion:reduce){.catalog-grid-fade{animation:none}}

/* MeshCave 7.0.4 — async dashboard tabs */
.dashboard-async-loading{cursor:progress}
.dashboard-panel-loading{position:relative;overflow:hidden;min-height:130px;color:transparent!important}
.dashboard-panel-loading>*{opacity:.14;pointer-events:none}
.dashboard-panel-loading::after,.dashboard-tab-skeleton i::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent);animation:mcDashShimmer 1.05s infinite}
.dashboard-tab-skeleton{position:relative;display:grid;gap:14px;padding:22px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}
.dashboard-tab-skeleton i{position:relative;display:block;height:74px;overflow:hidden;border-radius:13px;background:var(--surface-2)}
@keyframes mcDashShimmer{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.dashboard-panel-loading::after,.dashboard-tab-skeleton i::after{animation:none}}
