/* MenuNexa catalog/admin polish — compact marketplace layout, mobile first. */
:root{
  --market-yellow:#ffc244;
  --market-green:#00a082;
  --market-red:#ef4444;
  --market-ink:#f8fafc;
  --market-muted:rgba(232,241,238,.66);
  --market-line:rgba(255,255,255,.14);
  --market-pane:linear-gradient(145deg,rgba(12,35,42,.58),rgba(11,28,28,.38));
}

body.products-page,body.categories-page,body.recipes-page,body.live-orders-page{
  display:block !important;
  min-height:100vh;
  color:var(--market-ink);
  font-family:'Plus Jakarta Sans','Poppins',system-ui,sans-serif !important;
}

:where(.products-page,.categories-page,.recipes-page,.live-orders-page) :where(button,input,select,textarea,a){
  font-family:inherit;
}

/* ── Shared page rhythm ─────────────────────────────────────── */
.categories-page .main,.recipes-page .main{
  width:min(100% - 32px,1060px);
  max-width:none;
  margin:0 auto;
  padding:118px 0 56px;
}
.categories-page .page-header,.recipes-page .page-header{
  margin:0 0 22px;
}
.categories-page .page-title,.recipes-page .page-title{
  font-family:'Plus Jakarta Sans',system-ui,sans-serif;
  font-size:clamp(30px,5vw,44px);
  line-height:1.08;
  letter-spacing:-.045em;
  font-weight:850;
}
.categories-page .page-title span,.recipes-page .page-title span{
  color:inherit;
  font-style:normal;
}
.categories-page .page-subtitle,.recipes-page .page-subtitle{
  max-width:580px;
  margin-top:8px;
  color:var(--market-muted);
  font-size:14px;
  line-height:1.55;
}

/* ── Products admin ─────────────────────────────────────────── */
.products-page .dashboard-section{
  width:min(100% - 32px,1120px) !important;
  min-height:0 !important;
  margin:0 auto;
  padding:118px 0 60px !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
.products-page .dashboard-container{
  max-width:none;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
.products-page .admin-header{
  display:block;
  margin:0 0 22px;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}
.products-page .admin-header h1{
  margin:0 !important;
  text-align:left;
  font-size:clamp(30px,5vw,44px) !important;
  line-height:1.08;
  letter-spacing:-.045em;
  text-shadow:none;
}
.products-page .admin-subtitle{
  margin:8px 0 0;
  color:var(--market-muted);
  font-size:14px;
}
.products-page .product-form-card{
  padding:22px;
  border:1px solid var(--market-line);
  border-radius:24px;
  background:var(--market-pane) !important;
  box-shadow:0 24px 58px -34px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.11);
  backdrop-filter:blur(24px) saturate(150%);
  -webkit-backdrop-filter:blur(24px) saturate(150%);
}
.products-page #formTitle{
  margin:0 0 18px !important;
  font-size:20px !important;
  letter-spacing:-.02em;
}
.products-page .form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:0;
}
.products-page .product-field{
  min-width:0;
}
.products-page .product-wide{grid-column:1/-1}
.products-page .product-field label,.products-page .product-image-label{
  display:block;
  margin:0 0 7px;
  color:var(--market-muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.products-page :where(input,select){
  min-height:50px;
  margin:0 !important;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--market-line) !important;
  background:rgba(3,17,20,.48) !important;
}
.products-page .category-container{
  display:block;
  margin:0;
  grid-column:1/-1;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.products-page .category-container .product-field{min-width:0}
.products-page .product-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 7px}
.products-page .product-label-row label{margin:0}
.products-page .manage-categories{
  min-height:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  background:transparent;
  color:#7ce5d0;
  text-decoration:none;
  font-size:11px;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
  white-space:nowrap;
}
.products-page .manage-categories::after{content:' →';margin-left:3px}
.products-page .product-image-field{margin-top:14px}
.products-page #imageInput{width:100%;min-height:50px}
.products-page .preview{width:76px;height:76px;margin:12px 0 0;border-radius:16px;padding:4px}
.products-page .main-btn{
  margin-top:16px;
  min-height:52px;
  border-radius:16px;
  background:var(--brand-primary,var(--market-yellow)) !important;
  color:#101816;
  font-weight:850;
  box-shadow:0 16px 34px -20px color-mix(in srgb,var(--brand-primary,var(--market-yellow)) 70%,transparent);
}
.products-page .cancel-edit-btn{min-height:48px;border-radius:14px}
.products-page #productsList{margin-top:20px}
.products-page .white-table-container{
  margin-top:0;
  border-radius:22px;
  border:1px solid var(--market-line);
  background:var(--market-pane) !important;
  box-shadow:0 24px 58px -34px rgba(0,0,0,.85);
}
.products-page .table-top-bar{padding:16px 18px;background:rgba(255,255,255,.035) !important}
.products-page .table-title{font-size:16px}
.products-page .table-filter select{min-height:38px;padding:7px 12px}
.products-page .catalog-empty{
  display:grid;
  place-items:center;
  gap:8px;
  min-height:180px;
  padding:28px;
  color:var(--market-muted);
  text-align:center;
}
.products-page .catalog-empty b{color:#fff;font-size:17px}

/* ── Categories ─────────────────────────────────────────────── */
.categories-page .form-card{
  padding:22px;
  border-radius:24px;
  margin-bottom:18px;
}
.categories-page .form-card-title{font-size:19px;margin-bottom:18px}
.categories-page .form-grid{gap:14px}
.categories-page .translations-panel{
  margin:0 0 14px;
  padding:0 14px;
  border:1px solid var(--market-line);
  border-radius:15px;
  background:rgba(255,255,255,.025);
}
.categories-page .translations-panel summary{
  padding:13px 0;
  cursor:pointer;
  color:var(--market-muted);
  font-size:12px;
  font-weight:800;
  list-style:none;
}
.categories-page .translations-panel summary::-webkit-details-marker{display:none}
.categories-page .translations-panel summary::after{content:'+';float:right;color:var(--market-yellow);font-size:17px}
.categories-page .translations-panel[open] summary::after{content:'−'}
.categories-page .translations-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 0 14px}
.categories-page .form-label{font-size:11px;color:var(--market-muted)}
.categories-page .form-input{
  min-height:50px;
  border-radius:14px;
  background:rgba(3,17,20,.48) !important;
}
.categories-page .img-row{
  padding:12px;
  border:1px dashed rgba(255,255,255,.17);
  border-radius:16px;
  background:rgba(255,255,255,.028) !important;
}
.categories-page .img-preview{width:64px;height:64px}
.categories-page .btn-upload{min-height:40px;padding:8px 14px}
.categories-page .form-footer{margin-top:4px}
.categories-page .btn-primary{
  min-height:48px;
  padding:11px 22px;
  border-radius:14px;
  background:var(--brand-primary,var(--market-yellow)) !important;
  color:#101816;
  box-shadow:none;
}
.categories-page .table-card{border-radius:22px}
.categories-page .table-header{padding:16px 18px;gap:12px}
.categories-page .search-bar{min-width:0}
.categories-page .search-bar input{min-width:0}

/* ── Recipes ────────────────────────────────────────────────── */
.recipes-page .search-bar{margin-bottom:14px}
.recipes-page .search-input{
  min-height:52px;
  border-radius:16px;
  background:rgba(3,17,20,.46) !important;
}
.recipes-page .category-filters{
  flex-wrap:nowrap;
  overflow-x:auto;
  padding:2px 0 8px;
  margin-bottom:14px;
  scrollbar-width:none;
}
.recipes-page .category-filters::-webkit-scrollbar{display:none}
.recipes-page .cat-btn{flex:0 0 auto}
.recipes-page .loading{
  min-height:180px;
  display:grid;
  place-items:center;
  padding:26px;
  border:1px solid var(--market-line);
  border-radius:20px;
  background:var(--market-pane) !important;
  color:var(--market-muted);
  backdrop-filter:blur(22px);
}
.recipes-page .products-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}

/* ── Live orders ────────────────────────────────────────────── */
.live-orders-page .page{
  width:min(100% - 32px,1280px);
  max-width:none;
  margin:0 auto;
  padding:118px 0 56px;
}
.live-orders-page .live-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
}
.live-orders-page .live-eyebrow{color:#86efac;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.live-orders-page .live-page-title{margin:4px 0 0;font-size:clamp(30px,5vw,44px);line-height:1.08;letter-spacing:-.045em}
.live-orders-page .live-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.live-orders-page .live-actions button{min-height:42px;border-radius:13px;padding:8px 13px}
.live-orders-page .stats-banner{
  padding:12px;
  border:1px solid var(--market-line);
  background:var(--market-pane) !important;
  box-shadow:0 24px 58px -34px rgba(0,0,0,.85) !important;
}
.live-orders-page .stats-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.live-orders-page .stat-item{
  min-width:0;
  padding:13px 8px;
  border:1px solid rgba(255,255,255,.09) !important;
  border-radius:14px;
  background:rgba(255,255,255,.035) !important;
}
.live-orders-page .stat-num{font-size:24px}
.live-orders-page .stat-label{font-size:10px;line-height:1.3}
.live-orders-page .controls-row{padding:16px;border:1px solid var(--market-line);box-shadow:none}
.live-orders-page .filter-bar{
  flex-wrap:nowrap;
  overflow-x:auto;
  padding:10px;
  scrollbar-width:none;
  box-shadow:none;
}
.live-orders-page .filter-bar::-webkit-scrollbar{display:none}
.live-orders-page .filter-tab{flex:0 0 auto}
.live-orders-page .no-orders{
  min-height:220px;
  display:grid;
  place-items:center;
  align-content:center;
  border:1px solid var(--market-line);
  border-radius:22px;
  background:var(--market-pane) !important;
}

@media(max-width:760px){
  .categories-page .main,.recipes-page .main,.products-page .dashboard-section{
    width:min(100% - 24px,680px) !important;
    padding-top:24px !important;
    padding-bottom:34px !important;
  }
  .live-orders-page .page{
    width:min(100% - 24px,680px) !important;
    padding-top:96px !important;
    padding-bottom:34px !important;
  }
  .products-page .admin-header{margin-bottom:16px}
  .products-page .admin-header h1{font-size:29px !important;letter-spacing:-.04em}
  .products-page .admin-subtitle{font-size:13px;line-height:1.45}
  .products-page .product-form-card,.categories-page .form-card{padding:16px;border-radius:19px}
  .products-page #formTitle{font-size:18px !important;margin-bottom:15px !important}
  .products-page .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .categories-page .form-grid{grid-template-columns:1fr}
  .products-page .category-container{grid-column:1/-1}
  .products-page .product-wide{grid-column:1/-1}
  .products-page :where(input,select){min-height:46px;padding:10px 12px;border-radius:12px;font-size:13px}
  .products-page .product-field label,.products-page .product-image-label{margin-bottom:6px;font-size:10px}
  .products-page .product-image-field{margin-top:12px}
  .products-page #imageInput{min-height:46px;font-size:12px}
  .products-page .main-btn{min-height:48px;margin-top:13px;border-radius:13px;font-size:14px}
  .products-page .table-top-bar{align-items:flex-start;flex-direction:column}
  .products-page .table-filter,.products-page .table-filter select{width:100%}

  /* Products become Glovo-like cards instead of a squeezed 9-column table. */
  .products-page .table-scroll-wrapper{overflow:visible}
  .products-page .custom-table{display:block;min-width:0}
  .products-page .custom-table thead{display:none}
  .products-page .custom-table tbody{display:grid;gap:10px;padding:12px}
  .products-page .custom-table tbody tr{
    display:grid;
    grid-template-columns:58px minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:4px 12px;
    padding:13px;
    border:1px solid rgba(255,255,255,.11) !important;
    border-radius:17px;
    background:rgba(255,255,255,.04) !important;
  }
  .products-page .custom-table td{display:block;padding:0;border:0;min-width:0}
  .products-page .custom-table td:nth-child(1){grid-column:3;grid-row:1;align-self:center}
  .products-page .custom-table td:nth-child(2){grid-column:1;grid-row:1/4;align-self:center}
  .products-page .custom-table td:nth-child(3){grid-column:2;grid-row:2;color:var(--market-muted);font-size:11px}
  .products-page .custom-table td:nth-child(4){grid-column:2;grid-row:1;font-size:15px}
  .products-page .custom-table td:nth-child(5){display:none}
  .products-page .custom-table td:nth-child(6){grid-column:2;grid-row:3}
  .products-page .custom-table td:nth-child(7){display:none}
  .products-page .custom-table td:nth-child(8){grid-column:3;grid-row:3;align-self:end}
  .products-page .custom-table td:nth-child(9){grid-column:3;grid-row:2;align-self:center}
  .products-page .td-id{justify-content:flex-end;font-size:0;gap:0}
  .products-page .drag-icon{display:none}
  .products-page .td-img img{width:56px;height:56px;border-radius:14px}
  .products-page .img-badge{display:none}
  .products-page .td-name svg{display:none}
  .products-page .extras-btn{width:34px;height:34px;padding:0;font-size:0;justify-content:center}

  /* Categories become compact cards; secondary translations stay out of the way. */
  .categories-page .table-header{flex-direction:column;align-items:stretch}
  .categories-page .search-bar{width:100%}
  .categories-page .search-bar input{width:100%}
  .categories-page .table-card>div[style*="overflow-x"]{overflow:visible !important}
  .categories-page .tbl{display:block}
  .categories-page .tbl thead{display:none}
  .categories-page .tbl tbody{display:grid;gap:10px;padding:12px}
  .categories-page .tbl tbody tr{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) auto;
    grid-template-rows:auto auto;
    gap:5px 11px;
    padding:12px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:16px;
    background:rgba(255,255,255,.04) !important;
  }
  .categories-page .tbl td{display:block;padding:0;border:0;min-width:0}
  .categories-page .tbl td:nth-child(1),.categories-page .tbl td:nth-child(2),
  .categories-page .tbl td:nth-child(5),.categories-page .tbl td:nth-child(6){display:none}
  .categories-page .tbl td:nth-child(3){grid-column:1;grid-row:1/3}
  .categories-page .tbl td:nth-child(4){grid-column:2;grid-row:1;align-self:end;font-size:15px}
  .categories-page .tbl td:nth-child(7){grid-column:2;grid-row:2;font-size:11px}
  .categories-page .tbl td:nth-child(7)::before{content:'Maximum : ';color:var(--market-muted)}
  .categories-page .tbl td:nth-child(8){grid-column:3;grid-row:1/3;align-self:center;width:auto}
  .categories-page .tbl-empty{display:block !important;grid-column:1/-1 !important;padding:30px 12px !important}
  .categories-page .translations-grid{grid-template-columns:1fr}

  .live-orders-page .live-page-head{align-items:flex-start;flex-direction:column}
  .live-orders-page .live-actions{width:100%;justify-content:stretch}
  .live-orders-page .live-actions button{flex:1}
  .live-orders-page .stats-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .live-orders-page .stat-item:nth-child(4),.live-orders-page .stat-item:nth-child(5){grid-column:span 1}
  .live-orders-page .controls-row{align-items:stretch;flex-direction:column}
  .live-orders-page .toggle-label{line-height:1.45}
  .live-orders-page .verify-btn{width:100%;min-height:44px}
  .live-orders-page .orders-grid{grid-template-columns:1fr}
}

@media(max-width:390px){
  .live-orders-page .stats-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .categories-page .img-row{align-items:flex-start}
}
