:root{--orange-700:#b9520c;--orange-600:#d9620f;--orange-500:#e8711a;--orange-100:#fde7d4;--orange-50:#fff5ec;--gray-900:#1d2125;--gray-800:#2b3035;--gray-700:#444b53;--gray-600:#5d656e;--gray-500:#79818a;--gray-300:#c8cdd3;--gray-200:#e1e4e8;--gray-100:#eef0f2;--gray-50:#f5f6f8;--green-600:#1e7f4d;--green-50:#e8f5ee;--blue-600:#2f5f8a;--blue-50:#e9f0f7;--violet-600:#6b4fa0;--violet-50:#f1edf8;--red-600:#c0362c;--red-50:#fdecea;--bg:var(--gray-50);--surface:#fff;--text:var(--gray-900);--text-muted:var(--gray-600);--border:var(--gray-200);--accent:var(--orange-500);--accent-strong:var(--orange-600);--radius-sm:8px;--radius:12px;--radius-lg:16px;--shadow:0 1px 2px #1d21250f, 0 1px 3px #1d21250f;--shadow-lg:0 8px 24px #1d21251f;--tap:52px;--content-max:760px;--font:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;margin:0;font-size:17px;line-height:1.45}h1,h2,h3{margin:0;line-height:1.2}button,input,select{font:inherit;color:inherit}a{color:inherit;text-decoration:none}:focus-visible{outline:3px solid var(--orange-100);outline-offset:2px}.muted{color:var(--text-muted)}.small{font-size:.875rem}.pad{padding:16px 4px}.app{flex-direction:column;min-height:100vh;display:flex}.main{width:100%;max-width:var(--content-max);padding:16px 16px calc(96px + env(safe-area-inset-bottom));flex:1;margin:0 auto}.page{flex-direction:column;gap:14px;display:flex}.topbar{z-index:20;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0}.topbar__inner{max-width:var(--content-max);justify-content:space-between;align-items:center;gap:12px;margin:0 auto;padding:10px 16px;display:flex}.brand{align-items:center;gap:10px;min-width:0;display:flex}.brand__logo{width:auto;height:36px}.brand__logo-slot{border:1.5px dashed var(--gray-300);border-radius:var(--radius-sm);width:40px;height:36px;color:var(--gray-500);text-transform:uppercase;letter-spacing:.04em;flex-shrink:0;place-items:center;font-size:.65rem;display:grid}.brand__name{color:var(--gray-800);white-space:nowrap;font-size:1.15rem}.brand__name strong{color:var(--accent)}.user-chip{align-items:center;gap:8px;min-width:0;font-size:.9rem;display:flex}.user-chip__name{text-overflow:ellipsis;white-space:nowrap;color:var(--gray-700);overflow:hidden}.demo-banner{background:var(--orange-50);color:var(--orange-700);text-align:center;border-top:1px solid var(--orange-100);margin:0;padding:5px 16px;font-size:.78rem}.tabbar{z-index:20;background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);justify-content:center;display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar__item{max-width:160px;min-height:62px;color:var(--gray-500);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-size:.75rem;display:flex}.tabbar__item.active{color:var(--accent-strong);font-weight:600}@media (width<=420px){.user-chip__name{display:none}}@media (width>=900px){.main{padding-top:28px}}.btn{border-radius:var(--radius);cursor:pointer;text-align:center;white-space:nowrap;background:0 0;border:1.5px solid #0000;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:0 16px;font-weight:600;display:inline-flex}.btn--lg{min-height:var(--tap);padding:0 20px;font-size:1.05rem}.btn--block{width:100%}.btn--primary{background:var(--accent);color:#fff}.btn--primary:hover{background:var(--accent-strong)}.btn--outline{border-color:var(--gray-300);background:var(--surface);color:var(--gray-800)}.btn--outline:hover{border-color:var(--accent);color:var(--accent-strong)}.btn--ghost{color:var(--gray-700);background:var(--gray-100)}.btn--danger{background:var(--red-600);color:#fff}.btn--badge{border-color:var(--accent);color:var(--accent-strong)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn svg{width:20px;height:20px}.icon-btn{border-radius:var(--radius);background:var(--surface);width:44px;height:44px;color:var(--gray-700);cursor:pointer;box-shadow:var(--shadow);border:none;flex-shrink:0;place-items:center;display:grid}.icon-btn--danger{color:var(--red-600);box-shadow:none;background:0 0}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.card__title{margin-bottom:10px;font-size:1.05rem}.card__title-row{justify-content:space-between;align-items:baseline;display:flex}.page-header{align-items:center;gap:12px;display:flex}.page-header__text{flex:1;min-width:0}.page-header h1{font-size:1.4rem}.page-header p{color:var(--text-muted);margin:2px 0 0;font-size:.92rem}.home-greeting{margin-top:4px;font-size:1.6rem}.home-sub{margin:-10px 0 4px}.tiles{grid-template-columns:1fr 1fr;gap:12px;display:grid}.tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);min-height:150px;box-shadow:var(--shadow);flex-direction:column;gap:6px;padding:18px 16px;transition:transform .1s,box-shadow .15s;display:flex}.tile:hover{box-shadow:var(--shadow-lg)}.tile:active{transform:scale(.98)}.tile__icon{border-radius:14px;place-items:center;width:52px;height:52px;margin-bottom:auto;display:grid}.tile__icon svg{width:28px;height:28px}.tile__label{text-transform:uppercase;letter-spacing:.02em;font-size:1.15rem;font-weight:700}.tile__hint{color:var(--text-muted);font-size:.85rem}.tile--entrada .tile__icon{background:var(--green-50);color:var(--green-600)}.tile--salida .tile__icon{background:var(--orange-50);color:var(--orange-600)}.tile--stock .tile__icon{background:var(--gray-100);color:var(--gray-800)}.tile--historial .tile__icon{background:var(--blue-50);color:var(--blue-600)}.links{flex-direction:column;gap:8px;display:flex}.link-row{min-height:var(--tap);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--gray-800);align-items:center;gap:12px;padding:0 16px;font-weight:600;display:flex}.link-row svg{color:var(--gray-600)}.link-row span{flex:1}.demo-switch{border:1.5px dashed var(--gray-300);border-radius:var(--radius);margin-top:12px;padding:16px}.demo-switch h2{font-size:.95rem}.demo-switch p{margin:4px 0 12px;font-size:.85rem}.segmented{background:var(--gray-100);border-radius:var(--radius);gap:4px;padding:4px;display:flex}.segmented button{border-radius:var(--radius-sm);min-height:42px;color:var(--gray-600);cursor:pointer;background:0 0;border:none;flex:1;font-size:.9rem;font-weight:600}.segmented button.is-active{background:var(--surface);color:var(--accent-strong);box-shadow:var(--shadow)}.role-badge,.type-badge,.phase-badge{white-space:nowrap;border-radius:999px;padding:3px 9px;font-size:.75rem;font-weight:700;display:inline-block}.role-badge--admin{background:var(--orange-100);color:var(--orange-700)}.role-badge--operario{background:var(--blue-50);color:var(--blue-600)}.role-badge--consulta{background:var(--gray-100);color:var(--gray-700)}.type-badge{text-transform:uppercase;letter-spacing:.03em}.type-badge--entrada{background:var(--green-50);color:var(--green-600)}.type-badge--salida{background:var(--orange-50);color:var(--orange-700)}.type-badge--traspaso{background:var(--blue-50);color:var(--blue-600)}.type-badge--ajuste{background:var(--violet-50);color:var(--violet-600)}.phase-badge{background:var(--gray-100);color:var(--gray-600)}.form-section{flex-direction:column;gap:14px;display:flex}.field{flex-direction:column;gap:6px;min-width:0;display:flex}.field__label{color:var(--gray-800);font-size:.95rem;font-weight:600}.field select,.field input,.line__format{min-height:var(--tap);border:1.5px solid var(--gray-300);border-radius:var(--radius);background:var(--surface);width:100%;padding:0 14px}.field select:focus,.field input:focus,.line__format:focus,.stepper input:focus,.search input:focus{border-color:var(--accent);outline:none}.search{min-height:var(--tap);background:var(--surface);border:1.5px solid var(--gray-300);border-radius:var(--radius);color:var(--gray-500);align-items:center;gap:10px;padding:0 14px;display:flex}.search:focus-within{border-color:var(--accent)}.search input{min-height:48px;color:var(--text);background:0 0;border:none;outline:none;flex:1}.search--sticky{z-index:5;box-shadow:var(--shadow);position:sticky;top:92px}.lines{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.line{border:1.5px solid var(--border);border-radius:var(--radius);background:var(--gray-50);padding:12px}.line--error{border-color:var(--red-600);background:var(--red-50)}.line__head{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.line__name{font-weight:600}.line__meta{color:var(--text-muted);font-size:.85rem}.line__warn{color:var(--red-600);font-size:.85rem;font-weight:600}.line__controls{flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px;display:flex}.line__format{flex:1;width:auto;min-width:150px}.line__unit{color:var(--text-muted);font-weight:600}.line__calc{color:var(--accent-strong);margin-top:8px;font-weight:700}.stepper{border:1.5px solid var(--gray-300);border-radius:var(--radius);background:var(--surface);align-items:stretch;display:flex;overflow:hidden}.stepper button{background:var(--gray-100);width:48px;color:var(--gray-800);cursor:pointer;border:none;place-items:center;display:grid}.stepper input{text-align:center;border:none;width:80px;min-height:50px;font-size:1.15rem;font-weight:700}.alert{border-radius:var(--radius);background:var(--red-50);color:var(--red-600);border:1px solid #f3c4bf;gap:10px;padding:14px;display:flex}.alert svg{flex-shrink:0}.alert ul{margin:0;padding-left:18px}.actions-bar{gap:10px;display:flex}.actions-bar .btn{flex:1}.actions-inline{flex-wrap:wrap;gap:10px;display:flex}.stack{flex-direction:column;gap:10px;width:100%;max-width:360px;display:flex}.sheet-backdrop{z-index:50;background:#1d212573;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{width:100%;max-width:var(--content-max);max-height:88vh;padding:16px 16px calc(16px + env(safe-area-inset-bottom));background:var(--surface);border-radius:var(--radius-lg) var(--radius-lg) 0 0;box-shadow:var(--shadow-lg);flex-direction:column;gap:12px;display:flex}.sheet__head{justify-content:space-between;align-items:center;display:flex}.sheet__head h2{font-size:1.2rem}.pick-list{margin:0;padding:0;list-style:none;overflow-y:auto}.pick-item{border:none;border-bottom:1px solid var(--gray-100);text-align:left;cursor:pointer;background:0 0;align-items:center;gap:12px;width:100%;min-height:60px;padding:10px 6px;display:flex}.pick-item:hover:not(:disabled){background:var(--orange-50)}.pick-item:disabled{opacity:.5;cursor:default}.pick-item__main{flex-direction:column;flex:1;display:flex}.pick-item__name{font-weight:600}.pick-item__meta{color:var(--text-muted);font-size:.85rem}.pick-item__action{color:var(--accent-strong);font-size:.85rem;font-weight:600}@media (width>=700px){.sheet-backdrop{align-items:center}.sheet{border-radius:var(--radius-lg);max-width:560px;max-height:80vh}}.summary__grid{grid-template-columns:auto 1fr;gap:8px 16px;margin:0;display:grid}.summary__grid dt{color:var(--text-muted)}.summary__grid dd{margin:0;font-weight:600}.summary-lines{margin:0;padding:0;list-style:none}.summary-lines li{border-bottom:1px solid var(--gray-100);justify-content:space-between;gap:12px;padding:10px 0;display:flex}.summary-lines li:last-child{border-bottom:none}.summary-lines__qty{text-align:right;white-space:nowrap}.summary-lines__qty small{color:var(--text-muted)}.done{text-align:center;flex-direction:column;align-items:center;gap:10px;padding:40px 0;display:flex}.done__icon{background:var(--green-50);width:80px;height:80px;color:var(--green-600);border-radius:50%;place-items:center;display:grid}.done h1{font-size:1.5rem}.stock-list{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin:0;padding:0;list-style:none;overflow:hidden}.stock-list li+li{border-top:1px solid var(--gray-100)}.stock-row{align-items:center;gap:12px;min-height:64px;padding:10px 12px 10px 16px;display:flex}.stock-row:hover{background:var(--orange-50)}.stock-row__main{flex-direction:column;flex:1;min-width:0;display:flex}.stock-row__name{font-weight:600}.stock-row__code{color:var(--text-muted);font-size:.82rem}.stock-row__qty{flex-direction:column;align-items:flex-end;line-height:1.15;display:flex}.stock-row__qty strong{font-size:1.2rem}.stock-row__qty small{color:var(--text-muted);font-size:.78rem}.stock-row__chevron{color:var(--gray-300);flex-shrink:0}.total-card{background:linear-gradient(135deg, var(--orange-500), var(--orange-600));color:#fff;border:none;flex-direction:column;align-items:center;display:flex}.total-card__label{opacity:.9;text-transform:uppercase;letter-spacing:.05em;font-size:.9rem}.total-card__value{font-size:2.6rem;font-weight:800;line-height:1.1}.total-card__unit{opacity:.9}.facts{gap:10px;margin:0;display:grid}.facts div{justify-content:space-between;gap:12px;display:flex}.facts dt{color:var(--text-muted)}.facts dd{text-align:right;margin:0;font-weight:600}.wh-table{border-collapse:collapse;width:100%}.wh-table th,.wh-table td{border-bottom:1px solid var(--gray-100);padding:12px 4px}.wh-table th{text-align:left;font-weight:500}.wh-table td{text-align:right}.wh-table .qty strong{font-size:1.1rem}.wh-table .qty small{color:var(--text-muted)}.wh-table__sub th{color:var(--gray-700);padding-left:20px}.wh-table__group th,.wh-table__group td{background:var(--gray-50);font-weight:700}.wh-table__total th,.wh-table__total td{color:var(--accent-strong);border-bottom:none;font-weight:800}.filters{flex-direction:column;gap:12px;display:flex}.filters__grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.filters__wide{grid-column:1/-1}@media (width>=700px){.filters__grid{grid-template-columns:repeat(3,1fr)}}.product-summary__grid{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.product-summary__grid div{background:var(--gray-50);border-radius:var(--radius-sm);flex-direction:column;padding:10px;display:flex}.product-summary__grid span{color:var(--text-muted);font-size:.8rem}.ops{flex-direction:column;gap:10px;display:flex}.op{background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--gray-300);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.op--entrada{border-left-color:var(--green-600)}.op--salida{border-left-color:var(--orange-500)}.op--traspaso{border-left-color:var(--blue-600)}.op--ajuste{border-left-color:var(--violet-600)}.op__head{text-align:left;cursor:pointer;background:0 0;border:none;grid-template-columns:auto 1fr auto;grid-template-areas:"badge title chevron""meta meta chevron";align-items:center;gap:6px 10px;width:100%;padding:14px;display:grid}.op__head .type-badge{grid-area:badge}.op__title{grid-area:title;min-width:0;font-weight:700}.op__meta{color:var(--text-muted);grid-area:meta;font-size:.85rem}.op__chevron{color:var(--gray-500);grid-area:chevron;transition:transform .15s}.op--open .op__chevron{transform:rotate(90deg)}.op__body{border-top:1px solid var(--gray-100);padding:0 14px 10px}.op__reason{margin:10px 0 0;font-size:.92rem}.admin-list{gap:8px;margin:0;padding:0;list-style:none;display:grid}.admin-item{justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;display:flex}.admin-item__name{font-weight:600}.empty{text-align:center;flex-direction:column;align-items:center;gap:12px;padding:48px 16px;display:flex}@media (width>=700px){.tiles{grid-template-columns:repeat(2,1fr);gap:16px}.tile{min-height:170px;padding:22px}.links{flex-direction:row}.link-row{flex:1}}
