/* Mahalle Steel — scoped presentation over the existing production forms. */
:root,html[data-theme] {
 --bg:#0b0e10;--gray-bg:#0b0e10;--card-bg:#1c2125;--surface:#181c1f;--card:#1c2125;--text:#f5f5f2;--text-mute:#adb5b9;
 --border:#454c50;--green:#ff702c;--green-dark:#ff752f;--red:#ff785c;
 --steel-panel:linear-gradient(135deg,#353b3f 0%,#191e22 44%,#242a2e 72%,#15191c 100%);
 color-scheme:dark;
}
html body {background:radial-gradient(ellipse at 15% 0%,#41484c55,transparent 45%),#0b0e10;color:var(--text);font-family:Arial,sans-serif;min-height:100dvh;}
body .view {max-width:520px;margin:auto;background:transparent;padding-bottom:max(24px,env(safe-area-inset-bottom));}
body .hidden {display:none!important;}
body .home-header {padding:18px 18px 10px;background:transparent;border-bottom:1px solid #ffffff12;}
.steel-logo {display:inline-block;position:relative;width:118px;aspect-ratio:2048/898;overflow:hidden;vertical-align:middle;}
.steel-logo img {position:absolute;width:125%;max-width:none;height:auto;left:-12.5%;top:-28.396%;}
.home-title {text-align:left!important;line-height:1;}
.login-logo .steel-logo {width:210px;}
body .home-sub {font-size:11px;letter-spacing:.07em;color:#aab1b5;margin-top:12px;}
body .user-bar {background:transparent;border:0;padding:10px 0;font-size:13px;}
body .role-chip,body .session-pill {background:#272e32;color:#dce1e3;border:1px solid #ffffff22;}
body .session-pill {font-size:9px;opacity:.8;}
body .lang-btn,body .logout-btn {background:#15191c;color:#ccc;border:1px solid #ffffff24;border-radius:8px;}
body .lang-btn.active {background:#444c52;color:white;}
body .section-title {color:#e9ebec;text-transform:none;font-size:17px;letter-spacing:0;}
body .topbar {background:#111619eF;border-bottom:1px solid #60686e55;backdrop-filter:blur(12px);min-height:62px;color:#eee;}
body .back-btn {color:#eee;background:transparent;min-height:44px;min-width:44px;}
body .progress-wrap.steel-progress {margin:18px 16px 22px;height:220px;position:relative;border:1px solid #ffffff1c;border-radius:22px;background:url('./assets/hero-steel.png') center/cover no-repeat,#171c20;box-shadow:0 18px 30px #0008,inset 0 1px 0 #ffffff28;overflow:hidden;}
.steel-progress:before {content:'';position:absolute;width:166px;height:166px;left:20px;top:22px;border-radius:50%;background:conic-gradient(#ff7a30 var(--progress-angle,0deg),#79858b55 0);mask:radial-gradient(transparent 66%,#000 67%);filter:drop-shadow(0 0 6px #ff782b70);}
body .steel-progress .progress-row {position:absolute;top:68px;left:24px;width:158px;display:flex;flex-direction:column-reverse;gap:14px;text-align:center;background:#111719d9;border-radius:20px;padding:6px;box-sizing:border-box;}
body .steel-progress .progress-count {font-size:35px;line-height:1.1;color:white;font-variant-numeric:tabular-nums;text-shadow:0 2px 8px #000;}
body .steel-progress .progress-label {font-size:12px;color:#d3d8da;}
.steel-progress .progress-bar {position:absolute;left:22px;right:22px;bottom:13px;height:3px;background:#ffffff15;}
body .progress-bar-fill {background:linear-gradient(90deg,#ff9b4b,#ff5c25);}
body .ops-grid {gap:8px;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 12px;}
body .op-card {min-height:115px;padding:12px 3px 10px;border-radius:15px;background:var(--steel-panel);border:1px solid #777f8544;color:#eee;box-shadow:inset 0 1px 0 #ffffff25,0 6px 14px #0005;}
body .op-icon {display:block;width:48px;height:48px;margin:0 auto 8px;background-image:url('./assets/action-icons.png');background-size:400% 100%;font-size:0;}
.op-receipt .op-icon {background-position:33.333% 0;}.op-writeoff .op-icon{background-position:66.666% 0;}.op-cash .op-icon{background-position:100% 0;}
body .op-name {font-size:11px;letter-spacing:0;color:white;}
body .op-hint {display:none;}
body .btn,body .quick-btn {min-height:48px;border-radius:13px;border:1px solid #626b724d;background:var(--steel-panel);color:#e8ebed;box-shadow:inset 0 1px 0 #ffffff16;}
body .btn-primary,body #card-save-btn {background:linear-gradient(135deg,#ff9a46,#ff5b22);color:#17110d;border:1px solid #ffbe72;font-weight:800;box-shadow:0 5px 22px #ff692c25,inset 0 1px 0 #ffd6a5;}
body .btn:disabled {opacity:.45;filter:grayscale(.6);}
body .zone-card,body .item-row,body .card-box,body .summary-stat,body .login-box,body .sec-note {background:var(--steel-panel);color:#eee;border:1px solid #61697066;border-radius:17px;box-shadow:inset 0 1px 0 #ffffff18,0 7px 18px #0004;}
body .item-row {min-height:86px;gap:12px;padding:8px 12px;margin-bottom:9px;cursor:pointer;}
body .item-row-main {min-width:0;flex:1;}
body .item-row-name {font-size:15px;font-weight:700;color:#f1f2f3;overflow-wrap:anywhere;}
body .item-row-meta {font-size:11px;color:#adb5ba;}
.steel-product {display:inline-block;width:68px;height:76px;position:relative;flex:0 0 68px;container-type:inline-size;}
.steel-product>img {width:100%;height:100%;object-fit:contain;border-radius:10px;}
.steel-jar {background:url('./assets/mahalle-jar-v2.png') center/contain no-repeat;}
.steel-jar-label {position:absolute;left:26%;top:42%;width:48%;height:34%;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;color:#171a1b;}
.steel-jar-label .steel-logo {width:92%;flex-shrink:0;filter:grayscale(1) contrast(2) invert(1);}
.steel-jar-name {font-size:5.2cqw;line-height:1.12;text-align:center;font-weight:900;overflow-wrap:anywhere;margin-top:3%;max-width:100%;}
.steel-jar-name.long {font-size:4.1cqw;}
.steel-product-stage {height:210px;display:flex;align-items:center;justify-content:center;position:relative;margin:4px -10px 16px;background:radial-gradient(ellipse at 50% 90%,#ff8a3033,transparent 53%);}
.steel-product-stage:after {content:'';position:absolute;width:62%;height:18px;bottom:8px;border:2px solid #ff8834;border-radius:50%;box-shadow:0 0 13px #ff843f,inset 0 0 7px #ff883c;z-index:0;}
.steel-product-stage .steel-product {width:215px;height:222px;flex-basis:215px;z-index:1;filter:drop-shadow(0 12px 12px #0008);}
body .card-name {font-size:25px;line-height:1.14;color:white;}
body .card-meta {font-size:12px;color:#adb5ba;}
body .card-alias {font-size:11px;color:#869196;}
body .mode-banner {background:#171d20;border:1px solid #717a8255;color:#ffac70;border-radius:10px;padding:9px 12px;}
body .mode-title {font-size:12px;color:#ffab72;}
body .mode-question {color:#c9d0d4;font-size:12px;}
body #quick-row,body #stepper-minus,body #stepper-plus {display:none;}
body .decimal-display,body .stepper-value {font-size:66px;font-weight:800;color:#f9fafb;line-height:1.05;letter-spacing:-2px;font-variant-numeric:tabular-nums;}
body .decimal-unit {font-size:22px;letter-spacing:0;color:#ced5d9;}
body .manual-link {display:flex;flex-direction:column;gap:9px;margin-top:16px;}
body #dec-manual-add,body #stepper-manual-add {order:-1;width:100%;min-height:53px;border-radius:13px;background:linear-gradient(135deg,#ff9c4c,#ff6427);border:1px solid #ffbd80;color:#17110d!important;text-decoration:none;font-size:17px;font-weight:800!important;box-shadow:0 6px 18px #ff69252c;}
body #dec-manual,body #stepper-manual {color:#d4d9dc;background:transparent;border:1px solid #ffffff33;border-radius:12px;min-height:44px;text-decoration:none;font-size:14px;}
body .unit-btn {background:#171c20;color:#aebac1;border-color:#4a555d;}
body .unit-btn.active {background:#435059;color:#fff;}
body .modal-overlay {background:#020405b8;backdrop-filter:blur(7px);}
body .modal-box,body .modal,body .keypad-box {background:linear-gradient(145deg,#30383e,#12181c);color:#f1f2f2;border:1px solid #7c888f77;border-radius:22px;box-shadow:0 25px 90px #000b;max-height:90dvh;overflow-y:auto;}
body .kp,body .keypad-btn {background:linear-gradient(145deg,#404a51,#1a2228);border:1px solid #6a747b77;color:#fff;border-radius:13px;box-shadow:inset 0 1px 0 #ffffff24;}
body input,body select,body textarea {background:#11181d!important;color:#f2f3f3!important;border:1px solid #5a656d!important;border-radius:10px;min-height:44px;font-size:16px!important;}
body .waste-row {display:flex;align-items:center;gap:12px;min-height:84px;background:var(--steel-panel);border:1px solid #66717866;border-radius:12px;padding:7px 10px;margin:7px 0;}
body .bottom-bar {background:#11171beb;backdrop-filter:blur(12px);border-top:1px solid #ffffff20;}
body .online-status-card {background:#192126;border:1px solid #58656c66;color:#dce3e6;}
body .status-chip {font-size:10px;}
body .status-done {background:#274d40;color:#adf3cf;}
.steel-intro {position:fixed;inset:0;z-index:10000;background:radial-gradient(ellipse,#343e45 0%,#090e11 65%);display:grid;place-items:center;pointer-events:none;animation:steel-intro 1.5s both;}
.steel-intro .steel-logo {width:min(58vw,300px);filter:drop-shadow(0 0 22px #ff8b3844);animation:steel-logo 1.3s cubic-bezier(.16,1,.3,1) both;}
@keyframes steel-intro {0%,65%{opacity:1}100%{opacity:0;visibility:hidden}}
@keyframes steel-logo {from{opacity:0;transform:perspective(700px) rotateY(-18deg) scale(.86)}to{opacity:1;transform:perspective(700px) rotateY(0) scale(1)}}
@media(prefers-reduced-motion:no-preference){body .view:not(.hidden){animation:steel-view .25s ease-out}body button{transition:transform .14s,filter .14s}body button:active{transform:scale(.975)}@keyframes steel-view{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}
@media(max-width:360px){body .ops-grid{gap:5px;padding:0 8px}body .op-name{font-size:10px}body .card-name{font-size:22px}body .item-row{gap:8px}.steel-product{width:56px;flex-basis:56px}}
body.role-chef .steel-progress {display:none!important;}
html {background:#0b0e10!important;}
body .steel-progress #home-progress-text {font-size:35px!important;}
body .op-card .op-icon {font-size:0!important;}
body .op-card .op-name {font-size:11px;color:#f1f3f4;letter-spacing:0;}
body .online-status-card.online {background:#172c25;color:#d6f4e7;border-color:#3d6554;}
body .online-status-card.setup {background:#302b1d;color:#f8e5b3;border-color:#75633a;}
body .online-status-card.error {background:#34221f;color:#ffd1c7;border-color:#86544a;}
body #btn-unlisted-home {background:var(--steel-panel)!important;border:1px solid #6b767c!important;color:#e3e9ec!important;}
body .lang-mini .lang-btn {background:#232c32;color:#d5dce0;}
body .lang-mini .lang-btn.active {background:#ff7935;color:#15110e;}
body .bottom-bar {max-width:520px;margin:auto;}
body .modal-sheet,body .keypad-sheet {background:linear-gradient(145deg,#30383e,#12181c);color:#edf1f3;border:1px solid #7c888f66;box-shadow:0 24px 80px #000b;max-height:92dvh;overflow-y:auto;}
body .gr-tab {background:#253038;color:#cfd8dd;border-color:#56636b;}
body .gr-tab-on {background:#ff8039;color:#17120f;border-color:#ffb37d;}
body .gr-item,body .gr-card,body .gr-part,body .gr-cand {background:#202a31;color:#e7edf0;}
body .gr-item-review {background:#322b1d;border-color:#967435;}
body .gr-item-blocked,body .gr-part-bad {background:#35221f;border-color:#965a4c;}
body .gr-item-auto,body .gr-cand-on {background:#203340;border-color:#49778f;}
body .gr-sub,body .gr-head span,body .gr-part-b,body .gr-card-l,body .gr-note,body .gr-cand small,body .gr-btns-l {color:#b4c1c8;}
body .gr-reason {color:#edc77f;}body .gr-decision,body .gr-sec,body .gr-link{color:#ffa369;}
body .gr-detail {background:#151d23;color:#e7edf1;}
body table.review-table {background:#182129;color:#e0e8ec;}
.feature-nav {display:flex;gap:7px;margin:12px 0 5px;flex-wrap:wrap;}
.feature-nav .btn {min-height:40px;padding:8px 11px;font-size:12px;flex:1;}
.feature-sheet {text-align:left;max-width:520px;width:100%;padding:20px;}
.feature-sheet h2 {font-size:20px;line-height:1.2;}
.feature-sheet label {display:block;margin:14px 0;color:#d6e0e5;font-size:14px;}
.feature-sheet input:not([type=file]),.feature-sheet textarea {display:block;width:100%;padding:12px;margin-top:6px;}
.feature-sheet input[type=file][hidden] {display:none!important;}
.feature-hint {font-size:12px;color:#aebcc5;line-height:1.5;}
.feature-avatar {height:110px;width:110px;border-radius:50%;background:linear-gradient(135deg,#66747e,#1b252c);border:2px solid #d5dce1;display:grid;place-items:center;font-size:42px;overflow:hidden;margin:0 auto 20px;}
.feature-avatar img {width:100%;height:100%;object-fit:cover;}
.feature-product-row {display:flex;align-items:center;gap:10px;border-bottom:1px solid #ffffff20;padding:10px 0;}
.feature-product-row span {flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere;}
.feature-product-row small {display:block;color:#9baab4;margin-top:3px;}
.feature-product-row button {font-size:12px;padding:8px;min-width:80px;}
.feature-total {font-size:28px;font-weight:800;margin:18px 0;}
#feature-message {color:#ffb078;font-size:14px;}
/* Mobile workflows: visible day close, centred gauge and reachable actions. */
html,html body {overflow-x:clip;}
body #view-home {padding-bottom:calc(105px + env(safe-area-inset-bottom));}
body .progress-wrap.steel-progress {height:auto;aspect-ratio:1660/948;background-size:100% 100%;margin:14px 16px 18px;}
body .steel-progress:before {width:34%;height:auto;aspect-ratio:1;left:29.5%;top:47%;transform:translate(-50%,-50%);}
body .steel-progress .progress-row {left:29.5%;top:47%;transform:translate(-50%,-50%);width:34%;gap:7px;padding:0;background:none;align-items:center;border-radius:0;}
body .steel-progress #home-progress-text {font-size:clamp(23px,6vw,34px)!important;white-space:nowrap;}
body .steel-progress .progress-label {font-size:11px;}
body .feature-nav {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
body #feature-daily {grid-column:1/-1;background:linear-gradient(115deg,#ffaf61,#ff702c);color:#20150c;border-color:#ffc392;min-height:52px;font-size:16px;}
body .ops-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
body .op-card {min-height:100px;height:auto;padding:12px;align-items:center;}
body .op-card .op-name {font-size:13px;text-align:center;}
body .op-card .op-hint {display:block;font-size:11px;line-height:1.4;color:#bac5cc;}
body .online-status-card {margin:10px 16px;padding:12px;border-radius:14px;}
.session-explanation {margin:14px 16px;padding:15px;background:linear-gradient(125deg,#343b3f,#1c242a);border:1px solid #d7985c70;border-radius:16px;}
.session-explanation strong {color:#ffc18c;font-size:15px;}
.session-explanation p {color:#c8d1d6;line-height:1.5;font-size:13px;margin:9px 0 12px;}
.session-explanation .btn {width:100%;}
body .feature-sheet {padding:22px;}
body .feature-sheet input,body .feature-sheet textarea {font-size:18px;min-height:48px;box-sizing:border-box;}
body .feature-sheet textarea {min-height:70px;resize:vertical;}
body .feature-sheet input[aria-invalid=true] {border:2px solid #ff895e;}
body .feature-total {padding:16px;border:1px solid #73818a77;border-radius:14px;background:linear-gradient(125deg,#3b444b,#151d22);font-size:25px;overflow-wrap:anywhere;}
body #feature-payments,body #feature-report-retry {margin-top:12px;}
body #feature-close {margin-top:14px;}
body #btn-devices {position:relative;padding-right:38px;}
body #btn-devices .quick-badge {right:8px;top:50%;transform:translateY(-50%);}
body #btn-stock-home,body #btn-finance-home,body #btn-gates-home {background:linear-gradient(125deg,#30393f,#141c21)!important;color:#e4ebef!important;border:1px solid #73828b88!important;box-shadow:inset 0 1px 0 #ffffff14!important;}
body .quick-btn:disabled {opacity:.45;filter:grayscale(.6);cursor:default;}
body .btn:focus-visible,body input:focus-visible,body textarea:focus-visible {outline:2px solid #ffba79;outline-offset:3px;}
@media(max-width:360px){body .feature-sheet{padding:16px;}body .quick-btn{font-size:10px;padding:10px 4px;}}

/* Read-only management reports, UI43. */
.management-section{margin:16px 0;padding:16px;border:1px solid #6668;border-radius:18px;background:linear-gradient(125deg,#34383b,#181b1d);color:#f5f5f5;overflow-wrap:anywhere}
.management-section h3{margin:0 0 12px}.management-totals{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.management-totals dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}.management-entry{border-top:1px solid #ffffff24;padding:16px 0}.management-entry p{margin:8px 0}.management-quantity{font-size:24px;font-weight:700;margin:8px 0;font-variant-numeric:tabular-nums}.management-status{color:#ffc58e}.management-quantities{padding-left:20px}.management-quantities li{padding:5px 0}.management-entry small{color:#bdc3c7}.feature-nav{flex-wrap:wrap}#feature-reports{border-color:#ff7b35;color:#ffba8b}.management-section [role=alert]{color:#ffd3b0}

.journal-range{display:grid;grid-template-columns:1fr 1fr;gap:12px}.feature-sheet select{width:100%;padding:12px;background:#202428;color:#fff;border:1px solid #596067;border-radius:10px}.management-entry details{margin:12px 0}.management-entry p,.management-entry small{overflow-wrap:anywhere}.management-entry summary{cursor:pointer;color:#ff914e}.management-totals dd{margin:0;text-align:right}.journal-range input{min-width:0;max-width:100%}

.journal-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.journal-range label{min-width:0}.management-quantity{overflow-wrap:anywhere}.feature-sheet select{box-sizing:border-box}.management-entry .btn{white-space:normal}.management-totals dt{overflow-wrap:anywhere}@media(max-width:360px){.journal-range{grid-template-columns:1fr}}

/* UI46: keep gestures in their scroll surface; avoid mobile backdrop repaint. */
html, html body { overflow-x: clip; }
html body { min-height:100svh; }
body .view, body .login-wrap { min-height:100svh; }
html:has(.modal-overlay:not(.hidden)),
body:has(.modal-overlay:not(.hidden)),
html:has(.keypad-overlay:not(.hidden)),
body:has(.keypad-overlay:not(.hidden)) { overflow:hidden; }
body .modal-sheet, body .keypad-sheet,
#waste-list, #stock-list, #fin-body, #gates-body, .gr-detail {
 overscroll-behavior-y:contain;
 -webkit-overflow-scrolling:touch;
}
body .modal-overlay, body .keypad-overlay { overscroll-behavior:contain; }
@media (hover:none), (max-width:600px) {
 body .modal-overlay, body .keypad-overlay, body .modal-sheet,
 body .topbar, body .bottom-bar {
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
 }
 html body::before { animation:none!important; }
}
