.pv-panel-account-links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.pv-panel-home { padding:28px 0 12px; text-align:center; }
.pv-panel-home-logo { display:flex; align-items:center; justify-content:center; min-height:100px; margin:0 auto 24px; color:var(--pv-ink); }
.pv-panel-home-logo img { display:block; width:auto; height:auto; max-width:min(240px, 80%); max-height:140px; }
.pv-panel-home-logo .pv-header-logo-text { font-size:36px; letter-spacing:.04em; }
.pv-panel-home h2 { margin:0 0 8px; color:var(--pv-ink); font-size:25px; }
.pv-panel-home > p { margin:0 0 24px; color:var(--pv-muted); }
.pv-panel-home .pv-panel-tabs { position:static; grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:0; background:none; }
.pv-panel-home .pv-panel-tab { min-height:126px; padding:18px 8px; gap:12px; font-size:17px; }
.pv-panel-home .pv-panel-tab .dashicons { width:32px; height:32px; font-size:32px; }
.pv-panel-home .pv-panel-tab:hover { background:var(--pv-green-soft); border-color:var(--pv-green); }
.pv-panel-home .pv-panel-tab:focus-visible { outline:3px solid var(--pv-green); outline-offset:3px; }

:root {
    --pv-bg: #f7f5ef;
    --pv-card: #ffffff;
    --pv-ink: #173f2d;
    --pv-green: #528737;
    --pv-green-soft: #eef5e9;
    --pv-line: #dfe5da;
    --pv-muted: #66736b;
    --pv-warn: #9a6800;
    --pv-danger: #a33a35;
}

* { box-sizing: border-box; }
body.pv-panel-standalone-page { margin:0; background:var(--pv-bg); color:#27352d; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
body.pv-panel-standalone-page a { color:inherit; }
#pv-panel-root { min-height:100vh; }

.pv-panel-app { width:min(100%, 760px); margin:0 auto; padding:18px 14px 92px; }
.pv-panel-app-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:6px 2px 16px; }
.pv-panel-app-header h1 { margin:2px 0 2px; font-size:25px; line-height:1.1; color:var(--pv-ink); }
.pv-panel-app-header p { margin:0; color:var(--pv-muted); font-size:14px; }
.pv-panel-eyebrow,.pv-panel-kicker { font-size:11px; font-weight:800; letter-spacing:.15em; color:var(--pv-green); }
.pv-panel-account,.pv-back-link { text-decoration:none; font-weight:700; color:var(--pv-green); }
.pv-panel-account { padding:9px 12px; border:1px solid var(--pv-line); border-radius:999px; background:#fff; font-size:13px; }

.pv-panel-tabs { position:sticky; top:0; z-index:40; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:7px; padding:8px 0 12px; background:linear-gradient(var(--pv-bg) 80%, rgba(247,245,239,0)); }
.pv-panel-tab { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:56px; padding:7px 4px; text-decoration:none; border:1px solid var(--pv-line); border-radius:14px; background:#fff; color:#506057; font-size:12px; font-weight:700; }
.pv-panel-tab .dashicons { font-size:20px; width:20px; height:20px; }
.pv-panel-tab.is-active { background:var(--pv-ink); color:#fff; border-color:var(--pv-ink); box-shadow:0 8px 20px rgba(23,63,45,.12); }

.pv-panel-content { padding-top:8px; }
.pv-panel-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:10px 2px 16px; }
.pv-panel-section-head h2 { margin:2px 0 3px; color:var(--pv-ink); font-size:24px; line-height:1.1; }
.pv-panel-section-head p { margin:0; color:var(--pv-muted); font-size:14px; line-height:1.45; }
.pv-editor-head { align-items:flex-start; }
.pv-back-link { display:inline-block; margin-bottom:9px; font-size:14px; }

.pv-panel-primary,.pv-panel-secondary,.pv-card-action,.pv-panel-search button,.pv-order-stage-form button { appearance:none; border:0; text-decoration:none; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; min-height:43px; padding:10px 15px; border-radius:12px; font-weight:800; font-size:14px; }
.pv-panel-primary,.pv-panel-search button,.pv-order-stage-form button { background:var(--pv-green); color:#fff !important; }
.pv-panel-secondary,.pv-card-action { background:#fff; color:var(--pv-ink) !important; border:1px solid var(--pv-line); }

.pv-mobile-list { display:grid; gap:10px; }
.pv-mobile-card { display:grid; grid-template-columns:74px minmax(0,1fr) auto; gap:11px; align-items:center; padding:11px; background:#fff; border:1px solid var(--pv-line); border-radius:16px; box-shadow:0 5px 18px rgba(23,63,45,.04); }
.pv-mobile-thumb { width:74px; height:60px; border-radius:12px; overflow:hidden; background:#f0f1ed; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#899289; }
.pv-mobile-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.pv-mobile-thumb small { font-size:10px; margin-top:2px; }
.pv-mobile-card-main { min-width:0; }
.pv-mobile-card-title { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:4px; }
.pv-mobile-card-title strong { color:var(--pv-ink); font-size:15px; line-height:1.2; }
.pv-mobile-card-main p { margin:0 0 5px; color:var(--pv-muted); font-size:12px; }
.pv-mobile-meta { display:flex; flex-wrap:wrap; gap:9px; font-size:12px; color:#56665c; }
.pv-card-action { min-height:37px; padding:8px 10px; font-size:12px; }
.pv-pill { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:10px; font-weight:800; background:#edf0ed; color:#59665e; white-space:nowrap; }
.pv-pill.is-ok { background:#e8f4e3; color:#2f6f24; }
.pv-pill.is-warn { background:#fff2d7; color:#875d00; }
.pv-pill.is-muted { background:#eeeeec; color:#6d706d; }

.pv-panel-form { display:grid; gap:11px; }
.pv-mobile-editor { background:#fff; border:1px solid var(--pv-line); border-radius:16px; overflow:hidden; }
.pv-mobile-editor > summary { list-style:none; cursor:pointer; padding:15px 16px; color:var(--pv-ink); font-weight:800; font-size:15px; display:flex; align-items:center; justify-content:space-between; }
.pv-mobile-editor > summary::-webkit-details-marker { display:none; }
.pv-mobile-editor > summary::after { content:'+'; font-size:21px; color:var(--pv-green); font-weight:500; }
.pv-mobile-editor[open] > summary::after { content:'–'; }
.pv-mobile-editor.is-static > .pv-editor-body { border-top:0; }
.pv-editor-body { display:grid; gap:13px; padding:15px; border-top:1px solid var(--pv-line); }
.pv-editor-body label > span:first-child { display:block; margin-bottom:6px; color:#34453a; font-size:12px; font-weight:800; }
.pv-editor-body input[type=text],.pv-editor-body input[type=number],.pv-editor-body input[type=search],.pv-editor-body select,.pv-editor-body textarea,.pv-panel-search input,.pv-order-stage-form select { width:100%; min-height:46px; border:1px solid #cfd8cf; border-radius:11px; padding:10px 11px; background:#fff; color:#25342b; font:inherit; font-size:15px; box-shadow:none; }
.pv-editor-body textarea { min-height:92px; resize:vertical; }
.pv-two-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pv-checkline { display:flex !important; align-items:center; gap:9px; min-height:44px; padding:9px 11px; background:#f7f9f5; border-radius:11px; }
.pv-checkline span { margin:0 !important; }
.pv-help { margin:0; font-size:12px; line-height:1.5; color:var(--pv-muted); }
.pv-format-pills { display:flex; gap:7px; }
.pv-format-pills span { display:inline-flex; align-items:center; justify-content:center; min-width:44px; height:35px; border-radius:999px; background:var(--pv-green-soft); color:var(--pv-ink); font-weight:800; }

.pv-flavor-checks { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pv-flavor-chip { min-width:0; display:grid; grid-template-columns:auto 35px minmax(0,1fr); gap:7px; align-items:center; padding:8px; border:1px solid var(--pv-line); border-radius:12px; background:#fff; font-size:12px; }
.pv-flavor-chip input { margin:0; }
.pv-flavor-thumb { width:35px; height:30px; border-radius:7px; background:#f1f2ef; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pv-flavor-thumb img { width:100%; height:100%; object-fit:cover; }
.pv-flavor-chip small { grid-column:3; color:var(--pv-warn); }

.pv-panel-media-preview { width:100%; aspect-ratio:4/3; border-radius:14px; background:#f1f2ef; border:1px dashed #ccd5ca; overflow:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:#7d887f; }
.pv-panel-media-preview img { width:100%; height:100%; object-fit:cover; display:block; }
.pv-panel-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.pv-product-gallery-preview { aspect-ratio:4/3; border-radius:10px; overflow:hidden; background:#f1f2ef; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#899289; font-size:10px; }
.pv-product-gallery-preview img { width:100%; height:100%; object-fit:cover; }
.pv-panel-video-preview { min-height:90px; border-radius:12px; background:#f1f2ef; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; overflow:hidden; color:#7d887f; }
.pv-panel-video-preview video { width:100%; max-height:220px; display:block; }
.pv-panel-button-row { display:flex; gap:8px; flex-wrap:wrap; }
.pv-panel-button-row .button { min-height:42px; border:1px solid #cfd8cf; border-radius:10px; background:#fff; padding:8px 12px; font-weight:700; color:var(--pv-ink); }
.pv-panel-button-row .button-primary { background:var(--pv-green); border-color:var(--pv-green); color:#fff; }

.pv-production-fields .pv-admin-card,.pv-production-fields .pv-recipe-box { padding:0 !important; margin:0 !important; border:0 !important; box-shadow:none !important; }
.pv-production-fields .pv-card-title { margin-bottom:10px; }
.pv-production-fields .pv-card-title .dashicons { display:none; }
.pv-production-fields .pv-card-title h2,.pv-production-fields .pv-recipe-box h3 { margin:0 0 3px; color:var(--pv-ink); font-size:15px; }
.pv-production-fields .pv-card-title p,.pv-production-fields .pv-recipe-box p { font-size:12px; }

.pv-panel-checklist { display:grid; gap:7px; }
.pv-panel-checklist label { display:flex; align-items:center; gap:9px; min-height:43px; padding:9px 10px; border:1px solid var(--pv-line); border-radius:10px; }
.pv-panel-checklist input { margin:0; }
.pv-panel-savebar { position:sticky; bottom:10px; z-index:35; display:flex; gap:8px; padding:10px; border:1px solid rgba(207,216,207,.9); border-radius:15px; background:rgba(255,255,255,.95); backdrop-filter:blur(10px); box-shadow:0 10px 28px rgba(23,63,45,.15); }
.pv-panel-savebar > * { flex:1; }

.pv-panel-alert { margin:7px 0 13px; padding:11px 13px; border-radius:12px; font-size:13px; }
.pv-panel-alert.is-success { background:#e8f4e3; color:#2f6f24; border:1px solid #c9dfbf; }
.pv-panel-alert.is-error { background:#fff0ee; color:#8e302c; border:1px solid #efc7c3; }
.pv-panel-empty { text-align:center; padding:34px 20px; background:#fff; border:1px dashed #ccd6cc; border-radius:16px; color:var(--pv-muted); }
.pv-panel-empty .dashicons { font-size:32px; width:32px; height:32px; color:var(--pv-green); }
.pv-panel-empty h3,.pv-panel-empty h2 { margin:8px 0 5px; color:var(--pv-ink); }

.pv-order-counter-row { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-bottom:10px; }
.pv-order-counter-row a { text-decoration:none; display:flex; flex-direction:column; gap:2px; padding:10px 8px; background:#fff; border:1px solid var(--pv-line); border-radius:12px; text-align:center; }
.pv-order-counter-row span { font-size:10px; color:var(--pv-muted); }
.pv-order-counter-row strong { font-size:20px; color:var(--pv-ink); }
.pv-order-filter-tabs { display:flex; gap:7px; overflow-x:auto; padding:2px 0 10px; scrollbar-width:none; }
.pv-order-filter-tabs::-webkit-scrollbar { display:none; }
.pv-order-filter-tabs a { flex:0 0 auto; text-decoration:none; padding:8px 11px; border-radius:999px; background:#fff; border:1px solid var(--pv-line); color:#56645c; font-size:12px; font-weight:700; }
.pv-order-filter-tabs a.is-active { background:var(--pv-ink); color:#fff; border-color:var(--pv-ink); }
.pv-panel-search { display:grid; grid-template-columns:1fr auto; gap:7px; margin-bottom:12px; }
.pv-panel-search button { min-height:46px; }

.pv-orders-mobile-list { gap:12px; }
.pv-order-mobile-card { background:#fff; border:1px solid var(--pv-line); border-left:5px solid #95a299; border-radius:16px; overflow:hidden; box-shadow:0 6px 20px rgba(23,63,45,.05); }
.pv-order-mobile-card.pv-stage-nuevo { border-left-color:#d99c2b; }
.pv-order-mobile-card.pv-stage-confirmado { border-left-color:#6192bf; }
.pv-order-mobile-card.pv-stage-produccion { border-left-color:#835faa; }
.pv-order-mobile-card.pv-stage-listo { border-left-color:var(--pv-green); }
.pv-order-mobile-card.pv-stage-entregado { border-left-color:#758078; opacity:.88; }
.pv-order-mobile-top { display:flex; justify-content:space-between; gap:10px; padding:13px 13px 9px; }
.pv-order-number-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pv-order-number-row > strong { color:var(--pv-ink); font-size:18px; }
.pv-order-mobile-top small { display:block; margin-top:3px; color:var(--pv-muted); font-size:11px; }
.pv-order-price { text-align:right; }
.pv-order-price > strong { display:block; color:var(--pv-ink); font-size:16px; }
.pv-order-price span { font-size:11px; font-weight:800; }
.pv-order-price .is-paid { color:#39722e; }.pv-order-price .is-unpaid { color:var(--pv-warn); }
.pv-order-schedule-mobile { display:grid; grid-template-columns:1.4fr .9fr .8fr; gap:5px; padding:0 13px 11px; }
.pv-order-schedule-mobile span { display:flex; align-items:center; gap:4px; min-width:0; padding:7px 7px; border-radius:9px; background:#f6f7f3; color:#45544a; font-size:10px; font-weight:700; }
.pv-order-schedule-mobile .dashicons { font-size:15px; width:15px; height:15px; color:var(--pv-green); }
.pv-order-customer-mobile { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; border-top:1px solid #eef0ec; border-bottom:1px solid #eef0ec; }
.pv-order-customer-mobile small { display:block; color:var(--pv-muted); font-size:10px; }.pv-order-customer-mobile strong { color:var(--pv-ink); font-size:14px; }
.pv-order-customer-mobile a { text-decoration:none; padding:7px 9px; border-radius:9px; background:var(--pv-green-soft); color:#2f6f24; font-size:11px; font-weight:800; }
.pv-order-address-mobile { display:flex; gap:6px; padding:9px 13px; background:#fbfbf8; color:#536158; font-size:11px; }
.pv-order-items-mobile { padding:8px 13px; }
.pv-order-item-mobile { display:grid; grid-template-columns:1fr auto; gap:9px; padding:8px 0; border-bottom:1px solid #eef0ec; }
.pv-order-item-mobile:last-child { border-bottom:0; }.pv-order-item-mobile strong { display:block; color:#2d3d33; font-size:13px; }.pv-order-item-mobile span,.pv-order-item-mobile small { display:block; margin-top:2px; color:var(--pv-muted); font-size:10px; }.pv-order-item-mobile b { color:var(--pv-ink); }
.pv-order-note-mobile { margin:0 13px 10px; padding:9px 10px; border-radius:10px; background:#fff8e9; color:#705317; font-size:11px; }
.pv-order-more { margin:0 13px 11px; border:1px solid #e5e9e3; border-radius:10px; overflow:hidden; }
.pv-order-more summary { cursor:pointer; padding:9px 10px; font-size:11px; font-weight:800; color:#516056; }.pv-order-more > div { padding:0 10px 9px; font-size:11px; color:#57655c; }.pv-order-more p { margin:6px 0; }.pv-production-note { padding:8px; background:var(--pv-green-soft); border-radius:8px; }
.pv-order-stage-form { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; padding:11px 13px 13px; background:#fafaf7; border-top:1px solid #eef0ec; }
.pv-order-stage-form label > span { display:block; margin-bottom:4px; color:var(--pv-muted); font-size:10px; font-weight:800; }.pv-order-stage-form select { min-height:42px; padding:7px 9px; font-size:12px; }.pv-order-stage-form button { min-height:42px; padding:8px 11px; font-size:12px; opacity:.78; }.pv-order-stage-form.is-dirty button { opacity:1; }

.pv-panel-login-shell { min-height:100vh; display:grid; place-items:center; padding:20px; background:var(--pv-bg); }
.pv-panel-login-card { width:min(100%, 390px); padding:24px; background:#fff; border:1px solid var(--pv-line); border-radius:22px; box-shadow:0 18px 50px rgba(23,63,45,.11); }
.pv-panel-brandmark { width:52px; height:52px; display:grid; place-items:center; margin-bottom:13px; border-radius:15px; background:var(--pv-ink); color:#fff; font-size:26px; font-weight:900; }
.pv-panel-login-card h1 { margin:4px 0 6px; color:var(--pv-ink); font-size:26px; }.pv-panel-login-card > p { margin:0 0 18px; color:var(--pv-muted); }
#pv-panel-loginform p { margin:0 0 12px; }#pv-panel-loginform label { display:block; margin-bottom:5px; font-size:12px; font-weight:800; color:#415047; }#pv-panel-loginform input[type=text],#pv-panel-loginform input[type=password] { width:100%; min-height:47px; border:1px solid #cfd8cf; border-radius:11px; padding:10px; font-size:16px; }#pv-panel-loginform .login-remember label { display:flex; align-items:center; gap:8px; font-weight:600; }#pv-panel-loginform .button-primary { width:100%; min-height:47px; border:0; border-radius:12px; background:var(--pv-green); color:#fff; font-size:15px; font-weight:800; cursor:pointer; }

@media (max-width:520px) {
    .pv-panel-app { padding-left:10px; padding-right:10px; }
    .pv-panel-section-head { align-items:flex-start; }
    .pv-mobile-card { grid-template-columns:64px minmax(0,1fr); }
    .pv-mobile-thumb { width:64px; height:56px; }
    .pv-card-action { grid-column:1 / -1; width:100%; }
    .pv-two-fields { grid-template-columns:1fr; }
    .pv-flavor-checks { grid-template-columns:1fr; }
    .pv-order-stage-form { grid-template-columns:1fr; }
    .pv-order-stage-form button { width:100%; }
}

/* ============================================================
   PANEL MÓVIL · PRODUCCIÓN
   La lógica y los datos siguen en el módulo Producción existente.
   Esta capa solo adapta la operación al frontend móvil.
   ============================================================ */

:root {
    --pv-border: var(--pv-line);
    --pv-white: var(--pv-card);
    --pv-green-dark: var(--pv-ink);
    --pv-cream: var(--pv-bg);
}

.pv-panel-production-date {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:end;
    margin:0 0 12px;
    padding:12px;
    background:#fff;
    border:1px solid var(--pv-line);
    border-radius:14px;
}
.pv-panel-production-date label > span {
    display:block;
    margin-bottom:5px;
    color:var(--pv-muted);
    font-size:11px;
    font-weight:800;
}
.pv-panel-production-date input,
.pv-panel-production-settings input[type=time] {
    width:100%;
    min-height:44px;
    border:1px solid #cfd8cf;
    border-radius:10px;
    padding:8px 10px;
    background:#fff;
    color:#25342b;
    font:inherit;
}
.pv-panel-production-date button {
    min-height:44px;
    border:0;
    border-radius:11px;
    padding:9px 13px;
    background:var(--pv-ink);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.pv-panel-production-status {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
    margin-bottom:12px;
    padding:13px;
    background:#fff;
    border:1px solid var(--pv-line);
    border-radius:15px;
}
.pv-panel-production-state {
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.pv-panel-production-state strong,
.pv-panel-production-state small { display:block; }
.pv-panel-production-state strong { color:var(--pv-ink); font-size:14px; }
.pv-panel-production-state small { margin-top:3px; color:var(--pv-muted); font-size:11px; line-height:1.35; }
.pv-panel-production-status form { margin:0; }
.pv-panel-production-status .pv-panel-primary,
.pv-panel-production-status .pv-panel-secondary { min-height:40px; padding:8px 11px; font-size:12px; }

.pv-panel-production-summary {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    margin-bottom:12px;
}
.pv-panel-production-summary > div {
    min-width:0;
    padding:11px 9px;
    border-radius:13px;
    background:var(--pv-ink);
    color:#fff;
}
.pv-panel-production-summary span,
.pv-panel-production-summary strong { display:block; }
.pv-panel-production-summary span { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; opacity:.72; }
.pv-panel-production-summary strong { margin-top:4px; font-size:19px; line-height:1.05; overflow-wrap:anywhere; }

/* La vista original usa dos columnas en escritorio. En el panel siempre priorizamos celular. */
.pv-panel-content .pv-production-products { grid-template-columns:1fr; gap:10px; }
.pv-panel-content .pv-production-product { padding:14px; border-radius:14px; }
.pv-panel-content .pv-production-product-head h2 { font-size:17px; }
.pv-panel-content .pv-production-note { margin-bottom:10px; font-size:12px; line-height:1.45; }
.pv-panel-content .pv-production-supplies { margin-top:12px; }

.pv-panel-production-settings { margin-top:12px; }
.pv-panel-production-settings form { display:grid; gap:10px; }
.pv-panel-production-settings label > span { display:block; margin-bottom:5px; color:#34453a; font-size:12px; font-weight:800; }
.pv-panel-production-settings .pv-panel-primary { width:100%; }

.pv-panel-production-orders { margin-top:14px; }
.pv-panel-production-subhead { display:flex; align-items:center; justify-content:space-between; margin:0 2px 8px; }
.pv-panel-production-subhead h3 { margin:0; color:var(--pv-ink); font-size:16px; }
.pv-panel-production-order-list { display:grid; gap:7px; }
.pv-panel-production-order {
    display:grid;
    grid-template-columns:auto auto minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
    padding:11px 12px;
    border:1px solid var(--pv-line);
    border-radius:12px;
    background:#fff;
    text-decoration:none;
    font-size:12px;
}
.pv-panel-production-order strong { color:var(--pv-ink); }
.pv-panel-production-order span { min-width:0; color:#58665d; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pv-panel-production-order b { color:var(--pv-green); font-size:11px; }

.pv-panel-production-late {
    margin-top:15px;
    padding:13px;
    border:1px solid #f0d69e;
    border-radius:14px;
    background:#fff7e7;
}
.pv-panel-production-late > h3 { margin:0 0 4px; color:#6f5318; }
.pv-panel-production-late > p { margin:0; color:#745f31; font-size:12px; line-height:1.45; }

@media (max-width:520px) {
    .pv-panel-tab { font-size:10.5px; padding-left:2px; padding-right:2px; }
    .pv-panel-production-date { grid-template-columns:1fr; }
    .pv-panel-production-date button { width:100%; }
    .pv-panel-production-status { grid-template-columns:1fr; }
    .pv-panel-production-status form,
    .pv-panel-production-status .pv-panel-primary,
    .pv-panel-production-status .pv-panel-secondary { width:100%; }
    .pv-panel-production-order { grid-template-columns:auto 1fr auto; }
    .pv-panel-production-order span:nth-of-type(2) { grid-column:1 / -1; }
}

/* ============================================================
   PANEL PORTAVIDA · CIERRE MOBILE-FIRST
   Ajustes de operación táctil. No modifica lógica ni datos.
   ============================================================ */

html:has(body.pv-panel-standalone-page) {
    background:var(--pv-bg);
    overscroll-behavior-y:none;
}

body.pv-panel-standalone-page {
    min-width:320px;
    min-height:100vh;
    min-height:100dvh;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
    -webkit-text-size-adjust:100%;
    -webkit-tap-highlight-color:rgba(82,135,55,.12);
}

body.pv-panel-standalone-page button,
body.pv-panel-standalone-page a,
body.pv-panel-standalone-page input,
body.pv-panel-standalone-page select,
body.pv-panel-standalone-page textarea,
body.pv-panel-standalone-page summary {
    touch-action:manipulation;
}

#pv-panel-root {
    min-height:100vh;
    min-height:100dvh;
}

.pv-panel-app {
    width:min(100%,760px);
    padding-top:max(10px,env(safe-area-inset-top));
    padding-bottom:calc(94px + env(safe-area-inset-bottom));
}

.pv-panel-app-header {
    align-items:center;
    padding:4px 2px 10px;
}

.pv-panel-app-header h1 {
    font-size:22px;
    letter-spacing:-.02em;
}

.pv-panel-app-header p {
    margin-top:2px;
    font-size:12px;
}

.pv-panel-account {
    flex:0 0 auto;
    min-height:40px;
    padding:9px 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.pv-panel-tabs {
    top:0;
    margin:0 -14px 4px;
    padding:7px 14px 9px;
    background:rgba(247,245,239,.96);
    border-bottom:1px solid rgba(223,229,218,.9);
    box-shadow:0 7px 16px rgba(23,63,45,.04);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
}

.pv-panel-tab {
    min-height:52px;
    border-radius:13px;
    transition:transform .12s ease,background-color .12s ease,border-color .12s ease;
}

.pv-panel-tab:active {
    transform:scale(.97);
}

.pv-panel-tab.is-active {
    box-shadow:0 5px 14px rgba(23,63,45,.14);
}

.pv-panel-content {
    padding-top:4px;
}

.pv-panel-section-head {
    margin-top:8px;
    margin-bottom:12px;
}

.pv-panel-section-head h2 {
    font-size:22px;
}

.pv-panel-primary,
.pv-panel-secondary,
.pv-card-action,
.pv-panel-search button,
.pv-order-stage-form button {
    min-height:44px;
}

.pv-mobile-card,
.pv-order-mobile-card,
.pv-mobile-editor,
.pv-panel-production-date,
.pv-panel-production-status,
.pv-panel-production-order {
    box-shadow:0 4px 14px rgba(23,63,45,.035);
}

.pv-mobile-card:active,
.pv-panel-production-order:active {
    border-color:#c6d5c2;
}

/* La página operativa no debe mostrar elementos comerciales flotantes
   de la tienda aunque otro plugin los inyecte globalmente. */
body.pv-panel-standalone-page #portavida-finalizar-compra,
body.pv-panel-standalone-page #portavida-cart-toast-ajax,
body.pv-panel-standalone-page .ast-sticky-add-to-cart,
body.pv-panel-standalone-page .woocommerce-store-notice {
    display:none !important;
}

@media (max-width:520px) {
    .pv-panel-app {
        padding-left:10px;
        padding-right:10px;
        padding-top:max(7px,env(safe-area-inset-top));
    }

    .pv-panel-app-header {
        min-height:52px;
        padding:2px 1px 8px;
    }

    .pv-panel-eyebrow {
        font-size:9px;
        letter-spacing:.13em;
    }

    .pv-panel-app-header h1 {
        margin-top:1px;
        font-size:19px;
    }

    .pv-panel-app-header p {
        font-size:11px;
    }

    .pv-panel-account {
        min-height:38px;
        padding:7px 10px;
        font-size:12px;
    }

    .pv-panel-tabs {
        margin-left:-10px;
        margin-right:-10px;
        padding-left:8px;
        padding-right:8px;
        padding-top:6px;
        padding-bottom:7px;
        gap:5px;
    }

    .pv-panel-tab {
        min-height:50px;
        padding:6px 2px;
        border-radius:12px;
        font-size:10px;
        line-height:1.1;
    }

    .pv-panel-tab .dashicons {
        width:18px;
        height:18px;
        font-size:18px;
    }

    .pv-panel-section-head {
        gap:8px;
        margin:7px 1px 11px;
    }

    .pv-panel-section-head h2 {
        font-size:20px;
    }

    .pv-panel-section-head p {
        font-size:12px;
        line-height:1.35;
    }

    .pv-panel-section-head > .pv-panel-primary {
        flex:0 0 auto;
        min-height:40px;
        padding:8px 11px;
        border-radius:11px;
        font-size:12px;
    }

    .pv-mobile-list {
        gap:8px;
    }

    .pv-mobile-card {
        padding:9px;
        gap:9px;
        border-radius:14px;
    }

    .pv-card-action {
        min-height:42px;
    }

    .pv-panel-savebar {
        bottom:calc(8px + env(safe-area-inset-bottom));
        margin-left:-2px;
        margin-right:-2px;
    }
}

@media (max-width:360px) {
    .pv-panel-tab {
        font-size:9px;
    }
    .pv-panel-tab .dashicons {
        width:17px;
        height:17px;
        font-size:17px;
    }
}


.pv-panel-alert.is-warning {
    background: #fff8dd;
    color: #6f5700;
    border: 1px solid #eadc9b;
}

.pv-panel-alert.is-warning strong {
    color: #4f3e00;
}

.pv-production-diagnostic-dates {
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

/* ============================================================
   PRODUCCIÓN SIMPLE · v8.3
   Pedido confirmado + fecha de entrega = producción automática.
   ============================================================ */
.pv-production-quick-nav {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    margin:0 0 10px;
}
.pv-production-quick-nav a {
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 10px;
    border:1px solid var(--pv-line);
    border-radius:12px;
    background:#fff;
    color:var(--pv-ink);
    text-decoration:none;
    font-size:12px;
    font-weight:800;
}
.pv-production-quick-nav a.is-active {
    background:var(--pv-ink);
    border-color:var(--pv-ink);
    color:#fff;
}
.pv-production-simple-date {
    margin-bottom:10px;
}
.pv-production-upcoming {
    margin-top:10px;
}
.pv-production-upcoming-list {
    display:grid;
    gap:8px;
}
.pv-production-upcoming-day {
    min-height:62px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    border:1px solid var(--pv-line);
    border-radius:14px;
    background:#fff;
    text-decoration:none;
    box-shadow:0 4px 14px rgba(23,63,45,.035);
}
.pv-production-upcoming-day span,
.pv-production-upcoming-day strong,
.pv-production-upcoming-day small {
    display:block;
}
.pv-production-upcoming-day strong {
    color:var(--pv-ink);
    font-size:14px;
}
.pv-production-upcoming-day small {
    margin-top:3px;
    color:var(--pv-muted);
    font-size:11px;
}
.pv-production-upcoming-day b {
    flex:0 0 auto;
    color:var(--pv-green);
    font-size:15px;
}
.pv-production-simple-empty {
    margin-top:0;
}

@media (max-width:520px) {
    .pv-production-quick-nav a {
        min-height:40px;
        padding:7px 5px;
        font-size:11px;
    }
    .pv-production-upcoming-day {
        min-height:58px;
        padding:10px 12px;
    }
}


/* ============================================================
   PEDIDOS · RECEPCIÓN ABIERTA / CERRADA · v8.4
   Mismo control de Configuración, expuesto en el panel móvil.
   ============================================================ */
.pv-panel-orders-reception {
    margin:0 0 10px;
    padding:14px;
    border:1px solid var(--pv-line);
    border-radius:16px;
    background:#fff;
    box-shadow:0 4px 14px rgba(23,63,45,.035);
}
.pv-panel-orders-reception-main {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.pv-panel-orders-reception h3 {
    margin:0 0 7px;
    color:var(--pv-ink);
    font-size:15px;
    line-height:1.2;
}
.pv-panel-orders-status {
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:6px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    line-height:1;
}
.pv-panel-orders-status.is-open {
    background:#edf6e8;
    color:#386627;
}
.pv-panel-orders-status.is-closed {
    background:#fff0ee;
    color:#9b2c20;
}
.pv-panel-orders-toggle {
    min-height:42px;
    padding:0 15px;
    border:0;
    border-radius:12px;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
}
.pv-panel-orders-toggle.is-close-action {
    background:#f2f3ef;
    color:var(--pv-ink);
    border:1px solid var(--pv-line);
}
.pv-panel-orders-toggle.is-open-action {
    background:var(--pv-green);
    color:#fff;
}
.pv-panel-orders-reception > p {
    margin:10px 0 0;
    color:var(--pv-muted);
    font-size:11px;
    line-height:1.45;
}
@media (max-width:420px) {
    .pv-panel-orders-reception-main {
        align-items:stretch;
    }
    .pv-panel-orders-reception-main form {
        display:flex;
        align-items:center;
    }
    .pv-panel-orders-toggle {
        min-height:44px;
        padding:0 13px;
    }
}
