:root{--green:#169447;--green-dark:#0f7436;--bg:#f5f7f6;--card:#fff;--text:#142018;--muted:#6c766f;--border:#e2e8e4;--danger:#c0392b;--shadow:0 10px 30px rgba(10,60,30,.10)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#FFF9C4;color:var(--text)}button,input,select{font:inherit}button{border:0;cursor:pointer}.hidden{display:none!important}.screen{min-height:100dvh;padding:18px;padding-bottom:96px;max-width:620px;margin:0 auto}
.login-logo-wrap{display:flex;justify-content:center;margin:4vh 0 18px}.login-logo{width:min(245px,72vw);height:auto;display:block;filter:drop-shadow(0 14px 24px rgba(10,60,30,.16))}.login-card{margin-top:0;background:rgba(255,255,255,.96);border-radius:28px;padding:28px 22px;box-shadow:var(--shadow);border:1px solid var(--border)}.login-header{text-align:center}h1,h2{margin:0}h1{color:var(--green-dark);text-align:center}.muted{color:var(--muted);margin:8px 0 24px}label{display:block;font-weight:700;margin:18px 0 8px}select,input{width:100%;border:1px solid var(--border);border-radius:14px;padding:15px 14px;background:#fff;outline:none}select:focus,input:focus{border-color:var(--green);box-shadow:0 0 0 4px rgba(22,148,71,.12)}.primary{background:linear-gradient(135deg,var(--green),var(--green-dark));color:#fff;border-radius:16px;padding:15px 18px;font-weight:800;box-shadow:0 8px 18px rgba(22,148,71,.25)}.primary:disabled{opacity:.55;cursor:not-allowed}.full{width:100%;margin-top:22px}.ghost{background:#edf7f1;color:var(--green-dark);border-radius:999px;padding:10px 14px;font-weight:800}.error{color:var(--danger);font-weight:700}
.topbar-brand{display:flex;align-items:center;gap:10px;min-width:0}.topbar-logo{width:44px;height:44px;object-fit:contain;flex:0 0 auto}.topbar{position:sticky;top:0;z-index:4;margin:-18px -18px 6px;padding:calc(16px + env(safe-area-inset-top)) 18px 16px;background:rgba(245,247,246,.92);backdrop-filter:blur(12px);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(226,232,228,.8)}.tiny{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.day-card{display:flex;justify-content:space-between;align-items:center;background:#eaf8ef;border:1px solid #d5efdf;padding:14px 16px;border-radius:18px;margin-bottom:6px}.sticky-header{position:sticky;top:0;z-index:1000;background:#FFF9C4;border-bottom-left-radius:16px;border-bottom-right-radius:16px}.tabs{display:flex;gap:8px;overflow-x:auto;padding:8px 10px 14px;margin-bottom:14px;background:#E53935;border-radius:16px;box-shadow:0 2px 8px rgba(198,40,40,.18)}.tab{border:0;border-radius:999px;padding:10px 14px;white-space:nowrap;background:#fff;color:#C62828;font-weight:700}.tab.active{background:#FFF3E0;color:#8B0000}.products{display:grid;gap:10px}.product{background:#fff;border:1px solid var(--border);border-radius:18px;padding:14px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;box-shadow:0 4px 12px rgba(20,32,24,.04)}.product-name{font-weight:850;margin-bottom:3px}.product-meta{color:var(--muted);font-size:13px}.qty{display:flex;align-items:center;gap:7px}.qty button{width:36px;height:36px;border-radius:12px;background:#eaf8ef;color:var(--green-dark);font-size:22px;font-weight:900}.qty input{width:62px;text-align:center;padding:10px 4px;border-radius:12px;font-weight:900}.product.has-qty{border-color:#9ad8ae;background:#fbfffc}.bottom-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:620px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--border);display:flex;justify-content:flex-end;box-shadow:0 -8px 24px rgba(20,32,24,.08)}.bottom-bar .primary{min-width:180px}.toast{position:fixed;left:16px;right:16px;bottom:86px;max-width:580px;margin:0 auto;background:#142018;color:#fff;padding:14px 16px;border-radius:16px;text-align:center;font-weight:800;z-index:10000}.loader{position:fixed;inset:0;background:rgba(255,255,255,.72);backdrop-filter:blur(4px);display:grid;place-content:center;gap:12px;z-index:20000;color:var(--green-dark);font-weight:900}.loader div{width:42px;height:42px;border:5px solid #cdebd7;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}#changeStoreButton{display:none!important}.topbar-actions{display:flex;gap:8px}
.admin-day-card{display:flex;align-items:center;justify-content:space-between;background:#eaf8ef;border:1px solid #d5efdf;padding:14px 16px;border-radius:18px;margin-bottom:12px}.day-nav{width:42px;height:42px;border-radius:12px;background:#E53935;color:#fff;font-size:26px;font-weight:bold}.admin-filters{display:grid;gap:12px;margin-bottom:16px}.admin-filters details{background:#fff;border-radius:16px;border:1px solid var(--border);padding:12px}.admin-filters summary{cursor:pointer;font-weight:800;margin-bottom:8px}.checkbox-list{display:grid;gap:8px;margin-top:10px}.checkbox-list label{display:flex;align-items:center;gap:10px;margin:0;font-weight:600}.checkbox-list input{width:auto}.admin-results{display:grid;gap:12px}.admin-product{background:#fff;border-radius:18px;padding:14px;border:1px solid var(--border);box-shadow:0 4px 12px rgba(20,32,24,.05)}.admin-product h3{margin:0 0 8px;color:var(--green-dark)}.admin-row{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px dashed #ececec}.admin-row:last-child{border-bottom:none}
.modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:flex-end;justify-content:center}.modal.hidden{display:none}.modal-backdrop{position:absolute;inset:0;background:rgba(20,32,24,.55);backdrop-filter:blur(3px)}.modal-card{position:relative;width:100%;max-width:620px;max-height:94dvh;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -20px 40px rgba(20,32,24,.25);display:flex;flex-direction:column}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border)}.modal-header h2{color:var(--green-dark);font-size:20px}.icon-btn{background:transparent;font-size:28px;width:36px;height:36px;border-radius:10px;color:var(--muted)}.modal-body{padding:18px 20px;overflow-y:auto}.modal-body textarea{width:100%;border:1px solid var(--border);border-radius:14px;padding:12px 14px;background:#fff;outline:none;resize:vertical;font-family:inherit}.modal-body input[type=file]{padding:12px;background:#f7faf8}.preview{margin-top:10px}.preview img{max-width:100%;max-height:220px;border-radius:12px;border:1px solid var(--border);display:block}.modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--border)}
.receive-ghost{background:#eaf8ef;color:var(--green-dark);border:1px solid #ccebd7}.receive-section,.returns-section{background:#f8fbf9;border:1px solid var(--border);border-radius:18px;padding:14px}.returns-section{margin-top:16px}.returns-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.returns-header h3{margin:0;color:var(--green-dark)}.muted-small{margin:4px 0 0;color:var(--muted);font-size:13px}.add-return-button{background:#eaf8ef;color:var(--green-dark);border-radius:12px;padding:10px 12px;font-weight:800}.receive-returns-list{display:grid;gap:12px;margin-top:14px}.receive-return-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:14px}.receive-return-card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}.receive-return-card-header strong{color:var(--green-dark)}.remove-return-button{width:34px;height:34px;border-radius:10px;background:#fdecea;color:#8B0000;font-size:22px;font-weight:900}
.received-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 16px;background:#fff;border:1px solid var(--border);border-radius:18px;padding:14px}.received-filter-field label{margin:0 0 7px;font-size:13px}.received-results{display:grid;gap:12px}.received-card,.received-empty{background:#fff;border:1px solid var(--border);border-radius:18px;padding:15px;box-shadow:0 4px 12px rgba(20,32,24,.05)}.received-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.received-card h3,.received-empty h3{margin:2px 0 3px;color:var(--green-dark)}.received-date{color:var(--muted);font-size:12px;font-weight:700}.received-supplier{font-weight:800}.returns-badge{flex:0 0 auto;background:#eaf8ef;color:var(--green-dark);border-radius:999px;padding:7px 10px;font-size:12px;font-weight:850}.returns-badge.has-returns{background:#fff1d8;color:#8a5200}.received-albaran-link,.received-photo-link{display:inline-flex;margin-top:12px;color:var(--green-dark);font-weight:800;text-decoration:none}.received-returns-details{margin-top:12px;border-top:1px solid var(--border);padding-top:12px}.received-returns-list{display:grid;gap:9px;margin-top:10px}.received-return-item{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#f8fbf9;border:1px solid var(--border);border-radius:14px;padding:11px 12px}.received-return-info p{margin:4px 0 0;color:var(--muted);font-size:13px}.received-photo-link{margin-top:0}
.store-today-received-section{margin-bottom:16px;background:#fffdf0;border:1px solid #eee4a8;border-radius:18px;padding:14px}.store-today-received-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}.store-today-received-header h3{margin:0;color:var(--green-dark)}.compact-button{padding:8px 11px;font-size:13px}.store-today-received-list{display:grid;gap:8px}.store-received-card{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--border);border-radius:14px;padding:11px 12px}.reception-actions{display:flex;gap:7px;flex:0 0 auto}.delete-reception-button{background:#fdecea;color:#8B0000;border-radius:11px;padding:9px 12px;font-weight:850}.store-received-empty{color:var(--muted);font-size:13px;padding:6px 2px}.store-received-error{color:var(--danger);font-size:13px;font-weight:750}
.owner-home{min-height:calc(100dvh - 36px);display:flex;flex-direction:column;justify-content:center;gap:26px}.owner-home-brand{display:flex;align-items:center;gap:18px;background:rgba(255,255,255,.96);border:1px solid var(--border);border-radius:24px;padding:22px;box-shadow:var(--shadow)}.owner-home-brand h1 {text-align: left;}.owner-home-logo{width:82px;height:82px;object-fit:contain}.owner-home-brand .muted{margin:7px 0 0}.owner-menu{display:grid;gap:14px}.owner-menu-card{width:100%;display:flex;align-items:center;gap:16px;text-align:left;background:#fff;border:1px solid var(--border);border-radius:20px;padding:20px;box-shadow:0 6px 18px rgba(20,32,24,.07);color:var(--text)}.owner-menu-icon{font-size:34px}.owner-menu-card span:last-child{display:grid;gap:4px}.owner-menu-card strong{color:var(--green-dark);font-size:18px}.owner-menu-card small{color:var(--muted);font-size:13px}.clear-month-panel{margin:22px 0 8px;padding:16px;background:#fff;border:1px solid #efc7c3;border-radius:18px;display:flex;align-items:center;justify-content:space-between;gap:16px}.clear-month-panel strong{color:#8B0000}.clear-month-panel p{margin:5px 0 0;color:var(--muted);font-size:13px}.danger-button{background:#b42318;color:#fff;border-radius:14px;padding:12px 14px;font-weight:850}
@media(min-width:640px){.modal{align-items:center}.modal-card{border-radius:24px}}@media(max-width:520px){.received-filters{grid-template-columns:1fr}.received-card-top,.received-return-item{align-items:flex-start}.owner-home-brand{align-items:flex-start}.owner-home-logo{width:64px;height:64px}.clear-month-panel{flex-direction:column;align-items:stretch}.danger-button{width:100%}.store-today-received-header{flex-direction:column}.store-received-card{align-items:flex-start;flex-direction:column}.reception-actions{width:100%}.reception-actions button{flex:1}}


.owner-home-brand > div{text-align:left}
.owner-home-brand h1{text-align:left;margin-left:0;margin-right:0}
