/* PopVentas: panel spacing only. Load after the existing stylesheets. */
@media screen {
 body>.workspace { min-width:0; }
 body>.workspace>.security-notice {
  gap:12px; padding:10px 16px; margin:12px 0 0;
  font-size:14px; line-height:1.5;
 }
 body>.workspace>header {
  height:auto; min-height:60px; padding:8px 0; gap:12px;
  justify-content:flex-start; flex-wrap:wrap; font-size:14px;
 }
 body>.workspace>header>.client-theme-switch { margin-left:auto; }
 body>.workspace>.heading { margin:20px 0; gap:16px; align-items:center; }
 body>.workspace>.heading h1 { font-size:28px; line-height:1.2; overflow-wrap:anywhere; }
 body>.workspace>.heading .eyebrow { margin:0 0 6px; line-height:1.4; }
 body>.workspace>.heading>.primary { flex-shrink:0; min-height:44px; }
 /* The current catalog is already the new-order screen. */
 body>.workspace:has(>.shop-catalog)>.heading>a[href="?page=new-order"] { display:none; }
 body>.workspace>.shop-categories { margin-bottom:18px; gap:12px; }
 body>.workspace>.shop-categories>a { min-width:0; padding:14px 16px; }
 body>.workspace>.shop-categories>a>span:not(.shop-category-icon):not(.shop-category-count) { min-width:0; }
 body>.workspace>.shop-categories strong { overflow-wrap:anywhere; }
 body>.workspace>.shop-catalog>.shop-title { margin-bottom:16px; gap:12px; }
 body>.workspace>.shop-catalog>.shop-title h2 { font-size:22px; }
 body>.workspace>.shop-catalog>.shop-title .eyebrow { margin-bottom:4px; }
 body>.workspace>.shop-catalog>.catalog-layout-switch { gap:8px; margin-bottom:12px; }
 body>.workspace>.shop-catalog>.shop-toolbar {
  grid-template-columns:minmax(180px,2fr) minmax(140px,1fr) minmax(140px,1fr) auto;
  gap:12px; padding:16px; margin-bottom:20px;
 }
 body>.workspace>.shop-catalog>.shop-toolbar>label { min-width:0; }
 body>.workspace>.shop-catalog>.shop-toolbar :is(input,select) { width:100%; min-width:0; }
 body>.workspace>.shop-catalog>.shop-toolbar .shop-filter-button { align-self:end; }
 body.admin-shell>.workspace>.api-admin-tabs { gap:10px; margin-bottom:20px; }
 body.admin-shell>.workspace>.api-admin-tabs>a { min-width:0; padding:13px; }
 body.admin-shell>.workspace>.api-admin-tabs>a :is(strong,small) { overflow-wrap:anywhere; }
 body.admin-shell>.workspace>.card>.section-title { flex-wrap:wrap; gap:12px; }
 body.admin-shell>.workspace>.card>.section-title>h2 { margin-bottom:0; }
}
@media screen and (min-width:801px) {
 body.admin-shell>#admin-navigation { padding-top:24px; }
 body.admin-shell>#admin-navigation>.eyebrow { margin-bottom:18px; }
 body.admin-shell>#admin-navigation .admin-nav-group>summary { min-height:44px; }
}
@media screen and (max-width:1100px) {
 body>.workspace>.shop-catalog>.shop-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body>.workspace>.shop-catalog>.shop-toolbar>.shop-search { grid-column:1/-1; }
 body>.workspace>.shop-catalog>.shop-toolbar>.shop-filter-button { grid-column:1/-1; justify-self:end; }
}
@media screen and (max-width:800px) {
 body>.workspace>.security-notice { flex-direction:row; align-items:center; font-size:13px; padding:10px 12px; }
 body>.workspace>.security-notice>span { min-width:0; flex:1; }
 body>.workspace>.security-notice>a { white-space:normal; max-width:110px; }
 body>.workspace>header>span:first-child { display:none; }
 body>.workspace>header { min-height:60px; }
 body>.workspace>.heading { display:flex; flex-wrap:wrap; margin:18px 0; }
 body>.workspace>.heading>div { flex:1 1 180px; min-width:0; }
 body>.workspace>.heading h1 { font-size:26px; }
 body>.workspace>.shop-categories { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 body>.workspace>.shop-categories>a { flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:12px 8px; text-align:center; }
 body>.workspace>.shop-categories .shop-category-icon { display:none; }
 body>.workspace>.shop-categories strong { font-size:14px; line-height:1.4; }
 body>.workspace>.shop-categories small { display:none; }
 body>.workspace>.shop-categories .shop-category-count { margin-left:0; }
 body>.workspace>.shop-catalog>.shop-title { align-items:flex-start; }
 body>.workspace>.shop-catalog>.shop-title>div { min-width:0; }
 body>.workspace>.shop-catalog>.shop-title h2 { font-size:21px; }
 body>.workspace>.shop-catalog>.catalog-layout-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 body>.workspace>.shop-catalog>.catalog-layout-switch>a { justify-content:center; font-size:14px; padding:10px; }
 body>.workspace>.shop-catalog>.shop-toolbar { padding:12px; gap:12px; }
 body>.workspace>.shop-catalog>.shop-toolbar :is(input,select) { font-size:16px; }
}
@media screen and (max-width:420px) {
 body>.workspace>.shop-catalog>.shop-toolbar { grid-template-columns:minmax(0,1fr); }
 body>.workspace>.shop-catalog>.shop-toolbar>.shop-filter-button { justify-self:stretch; }
 body.admin-shell>.workspace>.api-admin-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Internal administrator screens and submenus. */
@media screen {
 body.admin-shell>#admin-navigation .admin-nav-links { margin:6px 0 10px 12px; padding-left:8px; }
 body.admin-shell>#admin-navigation .admin-nav-links>a {
  display:flex; align-items:center; min-height:44px; padding:10px 12px;
  font-size:14px; line-height:1.5; overflow-wrap:anywhere;
 }
 body.admin-shell>.workspace>.card,
 body.admin-shell>.workspace>.metrics>.card { padding:20px; margin-bottom:20px; min-width:0; }
 body.admin-shell>.workspace>.card>h2 { font-size:20px; line-height:1.4; margin:0 0 12px; }
 body.admin-shell>.workspace>.card>p { line-height:1.65; margin:10px 0 16px; }
 body.admin-shell>.workspace>.api-incidents-banner { padding:12px 16px; margin-bottom:18px; }
 body.admin-shell>.workspace>.api-admin-tabs { align-items:stretch; }
 body.admin-shell>.workspace>.api-admin-tabs>a { border-width:2px; min-height:82px; gap:6px; }
 body.admin-shell>.workspace>.api-admin-tabs>a strong { line-height:1.4; }
 body.admin-shell>.workspace>.api-admin-tabs>a small { font-size:12px; line-height:1.5; }
 body.admin-shell .workspace .form-grid { gap:4px 20px; min-width:0; }
 body.admin-shell .workspace .form-grid>label { min-width:0; margin:10px 0; line-height:1.5; }
 body.admin-shell .workspace .form-grid :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) { max-width:100%; min-width:0; }
 body.admin-shell .workspace .form-end { align-items:flex-end; gap:10px; flex-wrap:wrap; }
 body.admin-shell .workspace :is(.inline-actions,.api-alert-actions) { flex-wrap:wrap; gap:10px; align-items:center; }
 body.admin-shell .workspace .inline-actions>form { margin:0; }
 body.admin-shell .workspace .tablewrap { max-width:100%; min-width:0; overscroll-behavior-x:contain; }
 body.admin-shell .workspace table :is(th,td) { vertical-align:middle; line-height:1.5; }
 body.admin-shell .workspace td :is(.primary,.secondary,button) { white-space:normal; min-height:44px; }
 body.admin-shell .workspace pre { max-width:100%; overflow-wrap:anywhere; white-space:pre-wrap; line-height:1.6; }
 body.admin-shell .workspace>.metrics { gap:16px; }
 body.admin-shell .workspace>.metrics>.card>p { margin:0 0 10px; }
 body.admin-shell .workspace .appearance-grid { gap:16px; }
 body.admin-shell .workspace .appearance-actions { flex-wrap:wrap; gap:14px; }
 body.admin-shell .workspace .theme-card { min-width:0; }
 body.admin-shell .workspace .api-alert-item { padding:18px; }
 body.admin-shell .order-dialog { max-width:calc(100vw - 28px); max-height:calc(100dvh - 28px); overflow-y:auto; }
 body.admin-shell .order-dialog .form-grid { min-width:0; }
}
@media screen and (max-width:1000px) {
 body.admin-shell .workspace .form-grid { grid-template-columns:minmax(0,1fr); }
}
@media screen and (max-width:800px) {
 body.admin-shell>.workspace>.card,
 body.admin-shell>.workspace>.metrics>.card { padding:16px; margin-bottom:16px; }
 body.admin-shell>.workspace>.api-admin-tabs>a { padding:12px; min-height:86px; }
 body.admin-shell>.workspace>.api-admin-tabs>a strong { font-size:14px; }
 body.admin-shell .workspace .form-grid :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) { font-size:16px; }
 body.admin-shell .workspace>.metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 body.admin-shell .workspace .appearance-grid { grid-template-columns:minmax(0,1fr); }
 body.admin-shell .workspace .api-alert-actions>* { flex:1 1 150px; }
}
@media screen and (max-width:420px) {
 body.admin-shell .workspace>.metrics { grid-template-columns:minmax(0,1fr); }
 body.admin-shell>.workspace>.heading>div { flex-basis:100%; }
 body.admin-shell>.workspace>.heading>.primary { font-size:14px; padding:10px 16px; }
}

/* Order history: prevent flex stretching on unlabelled controls. */
@media screen {
 body>.workspace .order-history>form.filters {
  display:flex; flex-wrap:wrap; align-items:flex-end;
  gap:12px; margin:0 0 20px;
 }
 body>.workspace .order-history>form.filters>label {
  flex:1 1 190px; min-width:0; margin:0; font-size:13px; line-height:1.4;
 }
 body>.workspace .order-history>form.filters>label:has(select[name="service_id"]) { flex:2 1 290px; }
 body>.workspace .order-history>form.filters>label:has(input[type="date"]) { flex:1 1 155px; }
 body>.workspace .order-history>form.filters>input[type="search"] { flex:2 1 260px; }
 body>.workspace .order-history>form.filters>select { flex:1 1 170px; }
 body>.workspace .order-history>form.filters :is(input:not([type="hidden"]),select) {
  width:100%; min-width:0; height:44px; min-height:44px; max-height:44px;
  margin:6px 0 0; padding:9px 12px; font-size:14px; line-height:1.4;
 }
 body>.workspace .order-history>form.filters>:is(input[type="search"],select) { width:auto; margin:0; }
 body>.workspace .order-history>form.filters>:is(button,a.secondary) {
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  height:44px; min-height:44px; max-height:44px; margin:0;
  padding:9px 18px; font-size:14px; line-height:1.4;
 }
}
@media screen and (max-width:650px) {
 body>.workspace .order-history>form.filters>label,
 body>.workspace .order-history>form.filters>label:has(select[name="service_id"]),
 body>.workspace .order-history>form.filters>input[type="search"],
 body>.workspace .order-history>form.filters>select { flex:1 1 100%; width:100%; }
 body>.workspace .order-history>form.filters>label:has(input[type="date"]) { flex:1 1 calc(50% - 12px); }
 body>.workspace .order-history>form.filters :is(input:not([type="hidden"]),select) { font-size:16px; }
}
