/* Touch layouts for iPhone and Android, without changing the desktop worksheet. */
.gvk,.gvk-login{-webkit-text-size-adjust:100%;text-size-adjust:100%}.gvk-quick-open{display:none!important}.gvk-scroll{-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.gvk-scroll:focus-visible{outline:3px solid #b9cde7;outline-offset:3px}.gvk-quick-dialog{box-sizing:border-box;width:min(520px,calc(100vw - 24px));max-width:520px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border:0;border-radius:18px;padding:20px;color:#20334c;background:#fff;box-shadow:0 18px 65px #162e4a45;overflow:auto;overscroll-behavior:contain}.gvk-quick-dialog::backdrop{background:#13283f99}.gvk-quick-dialog h3{font-size:19px;line-height:1.35;overflow-wrap:anywhere;margin:0 36px 6px 0}.gvk-quick-dialog .gvk-quick-close{position:absolute;right:12px;top:12px;width:44px;height:44px;min-width:44px;border:0;font-size:24px;line-height:1;padding:0}.gvk-quick-meta{font-size:13px;color:#617084;margin-bottom:16px}.gvk-quick-dialog label{display:block;margin-bottom:12px;font-size:14px}.gvk-quick-dialog label input{display:block;margin-top:5px;min-height:48px;font-size:18px!important;padding:12px!important}.gvk-quick-dialog .gvk-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.gvk-quick-dialog .gvk-quick-grid label{min-width:0}.gvk-quick-dialog details{margin-bottom:12px}.gvk-quick-dialog summary{font-size:13px;padding:8px 0;cursor:pointer}.gvk-quick-dialog .gvk-quick-error{font-size:13px;color:#a13126;min-height:0}.gvk-quick-dialog .gvk-quick-error:empty{display:none}.gvk-quick-result{background:#f0f5fb;border-radius:10px;padding:12px 14px;font-size:14px;margin-bottom:12px}.gvk-quick-result b{color:#2f4f78;font-size:19px}.gvk-quick-actions{display:flex;gap:8px;justify-content:space-between}.gvk-quick-actions button{flex:1;min-height:46px;font-size:14px!important;padding:10px 8px!important}.gvk-quick-hint{font-size:12px;color:#617084;margin:12px 0 0!important}.gvk-scroll-hint{display:none;font-size:12px;color:#617084;margin:0 0 10px!important}
@media(max-width:1100px){.gvk button,.gvk select{min-height:44px}.gvk input:not([type=checkbox]),.gvk textarea,.gvk select,.gvk .gvk-unit-cell input,.gvk .gvk-entry-table input{font-size:16px!important}.gvk .gvk-unit-cell button{min-height:44px}.gvk .gvk-unit-cell input{min-height:44px}.gvk-entry-table input::-webkit-inner-spin-button,.gvk-entry-table input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.gvk-entry-table input[type=number]{-moz-appearance:textfield;appearance:textfield}.gvk-page{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.gvk-quick-open{display:flex!important;width:fit-content;align-items:center;justify-content:center;font-size:12px!important;min-height:44px!important;padding:6px 11px!important;margin-top:5px;border-color:#b9cde7!important;background:#edf3fb!important}.gvk-quick-actions .gvk-primary{width:auto!important}.gvk-entry-scroll{max-height:60vh;max-height:60svh}.gvk table.gvk-entry-table{border-collapse:separate;border-spacing:0}.gvk-entry-table td:first-child,.gvk-entry-table thead th:first-child{position:sticky;left:0;z-index:2;background:#fff}.gvk-entry-table td:nth-child(2),.gvk-entry-table thead th:nth-child(2){position:sticky;left:var(--gvk-stt-width,34px);z-index:2;background:#fff;box-shadow:3px 0 5px #233e5e0d}.gvk-entry-table thead th:first-child,.gvk-entry-table thead th:nth-child(2){z-index:5;background:#edf2f7}.gvk .gvk-entry-table td:first-child,.gvk .gvk-entry-table th:first-child{width:34px;min-width:34px;padding-left:4px;padding-right:4px}.gvk-entry-table th:nth-child(2){width:148px}.gvk-entry-table th:nth-child(3){width:50px}.gvk-entry-table th:nth-child(4){width:78px}.gvk-entry-table th:nth-child(5),.gvk-entry-table th:nth-child(6){width:96px}.gvk-entry-table th:last-child{width:120px}.gvk .gvk-entry-table input{min-height:44px;padding:8px 6px}.gvk-entry-table .gvk-group-row th{position:static;width:auto!important;min-width:0;box-shadow:none;background:#e7eef7;white-space:normal}.gvk-entry-table .is-entered td:first-child,.gvk-entry-table .is-entered td:nth-child(2){background:#f2f7fd}.gvk-entry-table .is-saved td:first-child,.gvk-entry-table .is-saved td:nth-child(2){background:#fafcfb}.gvk-scroll-hint{display:block}.gvk-history summary>span:first-child{min-width:0;overflow-wrap:anywhere}.gvk-history .gvk-badge{flex-shrink:0}.gvk-history p{overflow-wrap:anywhere}.gvk-entry-heading .gvk-save-count{display:none}.gvk-count-savebar{position:fixed;bottom:0;left:0;right:0;z-index:50;margin:0!important;background:#fff;border-top:1px solid #d7e0ec;box-shadow:0 -4px 18px #20334c12;padding:9px max(12px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:block}.gvk-count-savebar .gvk-note{display:none}.gvk-count-savebar .gvk-save-count{width:100%;min-height:48px;font-size:16px}.gvk:has(#gvk-count-form){padding-bottom:90px}.gvk.typing .gvk-count-savebar{display:none}.gvk-quick-dialog{position:fixed;inset:auto 0 8px;margin:0 auto;border-radius:18px 18px 12px 12px;padding:20px 16px max(18px,env(safe-area-inset-bottom))}.gvk-topbar{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}.gvk-login{max-width:440px;width:100%}.gvk-login input[type=text],.gvk-login input[type=password]{min-height:48px}.gvk-login .login-submit input{min-height:48px}.gvk-login .login-remember label{display:flex;align-items:center;min-height:44px}.gvk-login .login-remember input{width:20px;height:20px;flex-shrink:0}}
@media(max-width:700px){.gvk{max-width:100%;padding:10px 8px;margin:8px 0;border-radius:12px}.gvk-header{gap:8px;margin-bottom:14px}.gvk h1{font-size:22px;line-height:1.3}.gvk-header p{display:none}.gvk-person{max-width:100px;font-size:12px;overflow-wrap:anywhere}.gvk-brand{margin-bottom:7px}.gvk-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:12px}.gvk-stats article{min-width:0;padding:10px 8px}.gvk-stats article:last-child{grid-column:auto}.gvk-stats article>span{font-size:11px;display:block;line-height:1.4}.gvk-stats strong{font-size:26px}.gvk-stats .gvk-date{font-size:12px;white-space:nowrap;line-height:2.9}.gvk-stats small{font-size:10px;line-height:1.35}.gvk-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:6px;margin-bottom:12px;padding:0}.gvk-tabs button{font-size:12px;padding:8px 5px;white-space:normal;min-height:44px;line-height:1.25}.gvk-panel{padding:12px 10px}.gvk-title{gap:10px}.gvk-title label{flex-wrap:wrap;max-width:100%}.gvk-title h2{font-size:19px}.gvk-entry-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:11px}.gvk-entry-controls>label{width:100%;min-width:0}.gvk-entry-controls input[type=date]{width:100%;min-width:0;box-sizing:border-box;-webkit-appearance:none;appearance:none}.gvk-shifts{display:grid;grid-template-columns:1fr 1fr;gap:7px}.gvk-shifts button{width:100%;min-height:44px}.gvk-entry-controls #gvk-sheet-status{padding:0;font-size:12px}.gvk-entry-heading{margin-bottom:12px}.gvk-entry-heading h3{font-size:17px;line-height:1.35}.gvk .gvk-entry-table{min-width:722px}.gvk-entry-table.show-advanced{min-width:950px}.gvk-entry-scroll{max-height:58vh;max-height:58svh;scroll-padding-left:184px;scroll-padding-top:45px}.gvk .gvk-entry-table td,.gvk .gvk-entry-table th{padding:8px 6px}.gvk .gvk-entry-table td:first-child,.gvk .gvk-entry-table th:first-child{padding-left:3px;padding-right:3px}.gvk-entry-table td:nth-child(2){font-size:12px;line-height:1.35}.gvk-entry-table td:nth-child(2) b{font-weight:650}.gvk-entry-footer{font-size:12px}.gvk-toolbar{gap:10px}.gvk-toolbar input[type=search]{width:100%;max-width:100%}.gvk-fields,.gvk .gvk-fields:has(input[name=adjustment]){grid-template-columns:1fr}.gvk-unit-cell{min-width:170px}.gvk .gvk-unit-cell input{width:106px}.gvk-message,.gvk-alert,.gvk-note{overflow-wrap:anywhere}.gvk-topbar{gap:8px;flex-wrap:wrap}.gvk-topbar a{display:inline-block;min-height:30px;line-height:30px}.gvk-login{margin:16px auto;padding:24px 20px 18px}.gvk-login h1{font-size:25px}.gvk-login .sub{font-size:14px}.gvk-login .help{line-height:1.7}.gvk-quick-dialog .gvk-quick-grid{grid-template-columns:1fr 1fr}}
@media(orientation:landscape) and (max-width:1100px){.gvk{padding:10px;margin:8px 0}.gvk-panel{padding:12px}.gvk-header{margin-bottom:8px}.gvk-header h1{font-size:21px}.gvk-header p{display:none}.gvk-stats{grid-template-columns:1fr 1fr 1fr;gap:8px;margin-bottom:10px}.gvk-stats article{padding:8px 12px}.gvk-stats article:last-child{grid-column:auto}.gvk-stats strong{font-size:22px;display:inline-block}.gvk-stats .gvk-date{font-size:15px;line-height:1.5}.gvk-stats small{font-size:10px}.gvk-tabs{display:flex;gap:7px;margin-bottom:10px}.gvk-tabs button{flex:1;min-height:44px;font-size:13px}.gvk-entry-controls{display:flex;align-items:end;gap:12px;padding:10px}.gvk-entry-controls>label{min-width:180px;max-width:220px}.gvk-shifts{display:flex;gap:6px}.gvk-entry-controls #gvk-sheet-status{width:auto;flex:1;padding-bottom:10px}.gvk table.gvk-entry-table{min-width:0;width:100%;table-layout:fixed}.gvk-entry-table th:first-child{width:5%}.gvk-entry-table th:nth-child(2){width:22%}.gvk-entry-table th:nth-child(3){width:7%}.gvk-entry-table th:nth-child(4){width:11%}.gvk-entry-table th:nth-child(5),.gvk-entry-table th:nth-child(6){width:17%}.gvk-entry-table th:last-child{width:21%}.gvk .gvk-entry-table th{white-space:normal;font-size:11px;line-height:1.3}.gvk-entry-table td:first-child,.gvk-entry-table td:nth-child(2),.gvk-entry-table thead th:first-child,.gvk-entry-table thead th:nth-child(2){position:static;left:auto;box-shadow:none}.gvk-entry-table thead th:first-child,.gvk-entry-table thead th:nth-child(2){position:sticky;top:0}.gvk-entry-table.show-advanced{min-width:930px}.gvk-entry-scroll{max-height:65vh;max-height:65dvh}.gvk-entry-footer{flex-direction:row}.gvk .gvk-quick-open{min-height:44px!important;padding:5px 10px!important}.gvk-quick-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 20px);padding:14px 20px}.gvk-quick-dialog .gvk-quick-grid{grid-template-columns:1fr 1fr}.gvk-quick-dialog label{margin-bottom:8px}.gvk-quick-dialog .gvk-quick-meta{margin-bottom:10px}.gvk-quick-dialog .gvk-quick-hint{display:none}}
@media(prefers-reduced-motion:reduce){.gvk *{scroll-behavior:auto!important}}

/* Familiar worksheet: direct entry, normal page scrolling, two save buttons. */
.gvk:has(.gvk-classic-sheet){padding-bottom:24px}
.gvk-classic-sheet .gvk-entry-scroll{max-height:none}
.gvk-classic-sheet .gvk-entry-heading .gvk-save-count{display:inline-flex;align-items:center;justify-content:center;width:auto!important;flex-shrink:0}
.gvk-classic-meta{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#617084}
.gvk-classic-sheet .gvk-classic-meta #gvk-sheet-status{padding:0}
.gvk-classic-add{margin:0 0 14px}
.gvk-classic-sheet>.gvk-shifts{margin-bottom:14px}
.gvk-classic-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 8px;font-size:13px;color:#617084}
.gvk-classic-footer button{flex-shrink:0;width:auto!important}
.gvk-classic-progress{display:block;font-size:12px;color:#617084;margin:4px 0 14px}
.gvk-classic-extra{border-top:1px solid #e1e7ef;padding-top:12px;font-size:13px}
.gvk-classic-extra summary{cursor:pointer;padding:6px 0;margin-bottom:8px}
.gvk-classic-extra>label{display:block;margin:8px 0}
.gvk-classic-extra input[type=checkbox]{width:auto;margin-right:5px}
.gvk-classic-sheet .gvk-opening input{background:#f2f5f8;color:#617084;cursor:default}
@media(max-width:700px){.gvk:has(.gvk-classic-sheet){padding-bottom:12px}.gvk-classic-sheet .gvk-entry-heading{align-items:flex-start;flex-wrap:wrap}.gvk-classic-sheet .gvk-entry-heading .gvk-save-count{min-height:44px}.gvk-classic-meta{flex-direction:row;flex-wrap:wrap;justify-content:space-between;font-size:12px}.gvk-classic-footer{flex-direction:column;align-items:stretch;gap:12px}.gvk-classic-footer button{width:100%!important;min-height:46px}.gvk-classic-extra textarea{width:100%;box-sizing:border-box}}

@media(max-width:1100px){.gvk table.gvk-entry-table{min-width:722px}.gvk table.gvk-entry-table.show-advanced{min-width:950px}}
@media(orientation:landscape) and (max-width:1100px){.gvk table.gvk-entry-table{min-width:0}.gvk table.gvk-entry-table.show-advanced{min-width:930px}}

/* Compact six-column count sheet; usage stays with its ingredient. */
.gvk .gvk-classic-sheet table.gvk-entry-table{min-width:570px;width:100%;table-layout:fixed}
.gvk .gvk-classic-sheet .gvk-entry-table thead th{width:auto!important;min-width:0!important;white-space:normal}
.gvk-classic-sheet .gvk-col-stt{width:38px}.gvk-classic-sheet .gvk-col-name{width:148px}.gvk-classic-sheet .gvk-col-unit{width:54px}
.gvk .gvk-classic-sheet .gvk-entry-table td:nth-child(2),.gvk .gvk-classic-sheet .gvk-entry-table thead th:nth-child(2){text-align:left;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.gvk-classic-sheet .gvk-entry-table td:nth-child(2)>b{display:block;white-space:normal;line-height:1.4}
.gvk .gvk-classic-sheet .gvk-entry-table .gvk-used-detail{display:block;margin-top:6px;font-size:11px;line-height:1.45;color:#617084;white-space:normal}
.gvk .gvk-classic-sheet .gvk-entry-table .gvk-row-used{font-weight:700;color:#2f4f78}.gvk .gvk-classic-sheet .gvk-entry-table .gvk-row-used.is-negative{color:#b7382b}
.gvk-classic-sheet .gvk-entry-table col.gvk-extra{display:none}.gvk-classic-sheet .gvk-entry-table.show-advanced col.gvk-extra{display:table-column;width:100px}
.gvk .gvk-classic-sheet table.gvk-entry-table.show-advanced{min-width:770px}
@media(max-width:700px){.gvk .gvk-classic-sheet table.gvk-entry-table{min-width:520px}.gvk-classic-sheet .gvk-col-stt{width:30px}.gvk-classic-sheet .gvk-col-name{width:112px}.gvk-classic-sheet .gvk-col-unit{width:44px}.gvk-classic-sheet .gvk-entry-scroll{scroll-padding-left:142px}.gvk .gvk-classic-sheet table.gvk-entry-table.show-advanced{min-width:720px}}

/* Ingredient cards: three quantities always share one row. */
.gvk-card-list{display:flex;flex-direction:column;gap:12px;min-width:0}
.gvk-card-group{margin:10px 0 0;padding:9px 12px;background:#e7eef7;border-radius:8px;font-size:13px;color:#2f4f78}
.gvk-ingredient-card{border:1px solid #dfe6ef;border-radius:12px;background:#fff;padding:16px;min-width:0}
.gvk-card-top{display:grid;grid-template-columns:36px minmax(0,1fr) 74px;align-items:start;gap:10px}
.gvk-card-number{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:7px;background:#edf2f7;color:#2f4f78;font-size:13px;font-weight:700}
.gvk-card-top h4{font-size:16px;line-height:1.4;text-align:center;margin:2px 0 0;overflow-wrap:anywhere;color:#20334c}
.gvk-card-unit{text-align:right;font-size:11px;color:#617084;overflow-wrap:anywhere;line-height:1.4}.gvk-card-unit strong{display:block;font-size:13px;color:#2f4f78}
.gvk-card-status{font-size:11px;color:#617084;margin-top:8px}.gvk-card-status:empty{display:none}.is-saved .gvk-card-status{color:#347657}
.gvk-card-quantities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.gvk .gvk-card-quantities label,.gvk .gvk-card-adjustments label{min-width:0;font-size:13px;line-height:1.4;color:#52637b}
.gvk .gvk-ingredient-card input{display:block;margin-top:6px;min-width:0;min-height:44px;padding:10px 8px;text-align:right;font-size:16px}
.gvk .gvk-ingredient-card input:disabled{background:#f5f7fa;color:#617084}
.gvk-card-adjustments{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.show-advanced .gvk-card-adjustments{display:grid}
.gvk-card-usage{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e7edf4;margin-top:14px;padding-top:12px;color:#617084;font-size:12px;line-height:1.5}
.gvk-card-usage>strong{color:#2f4f78;font-size:16px;flex-shrink:0}.gvk-card-usage .is-negative{color:#b7382b}
@media(max-width:700px){.gvk-ingredient-card{padding:12px}.gvk-card-top{grid-template-columns:30px minmax(0,1fr) 60px;gap:6px}.gvk-card-top h4{font-size:14px}.gvk-card-quantities{gap:8px}.gvk .gvk-card-quantities label{font-size:12px}.gvk-card-usage{align-items:flex-start;flex-direction:column;gap:5px;font-size:11px}.gvk-card-usage>strong{font-size:15px}}

/* v2.0.8: editable opening for managers while preserving locked historical entries */
.gvk-classic-sheet .gvk-opening input:not([readonly]){background:#fff;color:#20334c;cursor:text;border-color:#b6cbe0}
.gvk-ingredient-card .gvk-card-status{line-height:1.45;overflow-wrap:anywhere}
