/* Maknoon Admin UX Overhaul — 2026-09-30
   Navigation and workflow layer. Business logic stays in the existing files. */

:root{
  --mk-ux-bg:#f6f5f1;
  --mk-ux-card:#fff;
  --mk-ux-line:#e7e1d7;
  --mk-ux-text:#25211c;
  --mk-ux-muted:#756f66;
  --mk-ux-gold:#b48a4c;
  --mk-ux-gold-soft:#f8f2e7;
  --mk-ux-blue:#2d66a7;
  --mk-ux-green:#1f7a50;
  --mk-ux-red:#b42318;
  --mk-ux-shadow:0 10px 30px rgba(55,43,25,.06);
}

.mk-admin-brand{
  padding:4px 2px 16px;
  border-bottom:1px solid var(--mk-ux-line);
  margin-bottom:14px;
}
.mk-admin-brand h2{
  margin:0!important;
  color:var(--mk-ux-text)!important;
  text-align:right!important;
  font-size:20px!important;
}
.mk-admin-brand p{
  margin:5px 0 0;
  color:var(--mk-ux-muted);
  font-size:12px;
  line-height:1.6;
}

.mk-admin-nav-label{
  margin:16px 2px 7px;
  color:#999087;
  font-size:11px;
  font-weight:800;
  letter-spacing:.2px;
}
.mk-admin-nav{
  display:grid;
  gap:6px;
}
.mk-admin-nav .mk-nav-btn{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-start;
  padding:9px 11px!important;
  margin:0!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  background:transparent!important;
  color:#4e4841!important;
  box-shadow:none!important;
  text-align:right;
}
.mk-admin-nav .mk-nav-btn:hover{
  background:#f7f4ee!important;
  border-color:#eee8dd!important;
}
.mk-admin-nav .mk-nav-btn.is-active{
  background:var(--mk-ux-gold-soft)!important;
  border-color:#e8d8bd!important;
  color:#6f5229!important;
}
.mk-nav-icon{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  flex:0 0 28px;
  border-radius:8px;
  background:#f5f2ec;
}
.mk-nav-btn.is-active .mk-nav-icon{background:#efe0c7}
.mk-admin-side-actions{
  display:grid;
  gap:7px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--mk-ux-line);
}
.mk-admin-side-actions .btn{
  width:100%!important;
  margin:0!important;
  min-height:42px!important;
}

.mk-workspace-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
  padding:0 2px;
}
.mk-workspace-head h1{
  margin:0;
  font-size:clamp(22px,3vw,30px);
  color:var(--mk-ux-text);
}
.mk-workspace-head p{
  margin:4px 0 0;
  color:var(--mk-ux-muted);
  font-size:13px;
}
.mk-workspace-head .mk-head-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

[data-admin-view][hidden],
[data-product-view][hidden]{display:none!important}

.mk-quick-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:0 0 18px;
}
.mk-quick-card{
  min-height:88px;
  padding:14px;
  border:1px solid var(--mk-ux-line);
  border-radius:15px;
  background:var(--mk-ux-card);
  box-shadow:var(--mk-ux-shadow);
  cursor:pointer;
  text-align:right;
}
.mk-quick-card b{
  display:block;
  color:var(--mk-ux-text);
  margin-bottom:4px;
  font-size:14px;
}
.mk-quick-card span{
  color:var(--mk-ux-muted);
  font-size:12px;
  line-height:1.5;
}
.mk-quick-card:hover{border-color:#dcc7a5;transform:translateY(-1px)}

.mk-operations-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.mk-operations-grid .panel{
  margin:0!important;
  box-shadow:none!important;
  border:1px solid var(--mk-ux-line)!important;
  border-radius:15px!important;
}
.mk-section-intro{
  margin:-4px 0 16px;
  color:var(--mk-ux-muted);
  font-size:13px;
  line-height:1.8;
}

.mk-products-workspace-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid var(--mk-ux-line);
  border-radius:14px;
  background:#fff;
}
.mk-products-workspace-bar strong{font-size:15px}
.mk-products-workspace-bar span{
  color:var(--mk-ux-muted);
  font-size:12px;
}
.mk-products-workspace-bar .btn{
  width:auto!important;
  margin:0!important;
}

#product-list-panel .mk-list-toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:14px;
}
#product-list-panel .mk-list-toolbar #search-products{
  flex:1 1 260px!important;
  min-width:180px!important;
}
#product-list-panel .mk-list-toolbar .btn{
  flex:0 0 auto!important;
  min-width:0!important;
  width:auto!important;
  margin:0!important;
}

#product-form-panel{
  max-width:1100px;
  margin-inline:auto;
}
#product-form-panel #form-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#product-form-panel .translation-box{
  border:1px solid #dbe7f3!important;
  border-radius:14px!important;
  background:#f8fbfe!important;
}
#product-form-panel .recipe-tabs{
  position:sticky;
  top:8px;
  z-index:20;
  padding:8px;
  border:1px solid var(--mk-ux-line);
  border-radius:12px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);
}

#category-manager-panel,
#mk-featured-editor,
#mk-combo-editor,
#tab-banners>.panel,
#tab-promos>.panel{
  max-width:1100px;
  margin-inline:auto!important;
}

.mk-help-box{
  padding:12px 14px;
  margin:0 0 14px;
  border:1px solid #e7dcc8;
  border-radius:12px;
  background:#fbf8f2;
  color:#6b6257;
  font-size:12px;
  line-height:1.8;
}

.mk-table-shell{
  overflow:auto;
  border:1px solid var(--mk-ux-line);
  border-radius:13px;
  background:#fff;
}
.mk-table-shell table{margin:0!important}

@media(max-width:1050px){
  .mk-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mk-operations-grid{grid-template-columns:1fr}
}

@media(max-width:768px){
  .mk-admin-brand{
    display:none;
  }
  .sidebar .mk-admin-nav-label{display:none}
  .sidebar .mk-admin-nav{
    display:flex!important;
    gap:6px!important;
  }
  .sidebar .mk-nav-btn{
    flex:0 0 auto!important;
    width:auto!important;
    padding:7px 10px!important;
    min-height:40px!important;
    white-space:nowrap!important;
  }
  .sidebar .mk-nav-btn .mk-nav-icon{
    width:24px;
    height:24px;
    flex-basis:24px;
  }
  .sidebar .mk-admin-side-actions{
    display:flex!important;
    flex:0 0 auto;
    margin:0 0 0 6px!important;
    padding:0 0 0 6px!important;
    border-top:0!important;
    border-right:1px solid var(--mk-ux-line);
  }
  .sidebar .mk-admin-side-actions .btn{
    flex:0 0 auto!important;
    width:auto!important;
    white-space:nowrap!important;
    min-height:40px!important;
    padding:7px 10px!important;
  }
  .mk-workspace-head{
    align-items:flex-start;
    flex-direction:column;
    margin-top:4px;
  }
  .mk-workspace-head .mk-head-actions{width:100%}
  .mk-workspace-head .mk-head-actions .btn{flex:1}
  .mk-quick-actions{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .mk-quick-card{
    min-height:82px;
    padding:12px;
  }
  .mk-products-workspace-bar{
    align-items:flex-start;
    flex-direction:column;
  }
  .mk-products-workspace-bar .btn{width:100%!important}
  #product-list-panel .mk-list-toolbar{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  #product-list-panel .mk-list-toolbar #search-products{
    grid-column:1/-1;
    width:100%!important;
  }
  #product-list-panel .mk-list-toolbar .btn{
    width:100%!important;
  }
}

@media(max-width:430px){
  .mk-quick-actions{grid-template-columns:1fr}
  .mk-quick-card{min-height:70px}
  .mk-workspace-head h1{font-size:22px}
}

.mk-inventory-mode .mk-workspace-head{display:none!important}

.mk-admin-details{
  margin:14px 0;
  border:1px solid #dbe7f3!important;
  border-radius:14px!important;
  background:#f8fbfe!important;
  overflow:hidden;
}
.mk-admin-details>summary{
  list-style:none;
  cursor:pointer;
  padding:13px 15px;
  font-weight:800;
  color:#315f8f;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.mk-admin-details>summary::-webkit-details-marker{display:none}
.mk-admin-details>summary span{
  font-size:11px;
  padding:3px 7px;
  border-radius:999px;
  background:#eaf2fa;
  color:#5f7f9f;
}
.mk-admin-details[open]>summary{border-bottom:1px solid #dbe7f3}
.mk-admin-details .mk-details-body{padding:14px}

.mk-content-quality-summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:0 0 14px;padding:12px 14px;border:1px solid var(--mk-ux-line);border-radius:13px;background:#fff;
}
.mk-content-quality-summary>div:first-child{display:grid;gap:3px}
.mk-content-quality-summary>div:first-child span{font-size:12px;color:var(--mk-ux-muted)}
.mk-quality-gaps{display:flex;gap:6px;flex-wrap:wrap}
.mk-quality-gaps span{padding:5px 8px;border-radius:999px;background:#f6f2ea;color:#6d604d;font-size:11px}
.mk-quality-badge{display:inline-block;padding:4px 7px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.mk-quality-ready{background:#edf8f2;color:#18794e;border:1px solid rgba(24,121,78,.16)}
.mk-quality-needs{background:#fff5e8;color:#8a641d;border:1px solid rgba(138,100,29,.18)}
.mk-icon-action{min-width:38px;min-height:38px;padding:5px;border:0;background:transparent;border-radius:9px;cursor:pointer;font-size:16px}
.mk-icon-action:hover{background:#f3f1ec}

.mk-media-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-top:12px}
.mk-media-preview-card{margin:0;padding:8px;border:1px solid var(--mk-ux-line);border-radius:12px;background:#fff}
.mk-media-preview-card img{width:100%;aspect-ratio:1/1;object-fit:contain;border-radius:9px;background:#faf9f6}
.mk-media-preview-card figcaption{font-size:11px;font-weight:800;color:var(--mk-ux-muted);margin:6px 0}
.mk-media-preview-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.mk-media-preview-actions button{min-height:34px!important;border:1px solid var(--mk-ux-line)!important;border-radius:8px!important;background:#fff!important;color:#4d463e!important}
.mk-media-preview-actions button[data-media-action="remove"]{color:var(--mk-ux-red)!important}
.mk-media-empty{grid-column:1/-1;margin:0;padding:16px;border:1px dashed var(--mk-ux-line);border-radius:12px;color:var(--mk-ux-muted);text-align:center}
