:root{--tg-bg: #ffffff;--tg-text: #1c1c1e;--tg-hint: #8e8e93;--tg-link: #2481cc;--tg-button: #2481cc;--tg-button-text: #ffffff;--tg-secondary-bg: #f2f2f7}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--tg-bg);color:var(--tg-text)}.layout{min-height:100vh;display:flex;flex-direction:column}.app-header{position:sticky;top:0;display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--tg-secondary-bg);border-bottom:1px solid rgba(0,0,0,.08);z-index:10}.app-header-title{flex:1;font-weight:600;text-align:center}.back-link{color:var(--tg-link);text-decoration:none;font-size:14px}.switch-restaurant{border:none;background:none;color:var(--tg-link);font-size:13px;cursor:pointer}.app-main{padding:12px;flex:1}.restaurant-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.restaurant-card{padding:20px 12px;border-radius:12px;border:1px solid rgba(0,0,0,.1);background:var(--tg-secondary-bg);font-size:15px;font-weight:600;cursor:pointer}.report-menu{display:flex;flex-direction:column;gap:8px}.report-menu-item{display:flex;align-items:center;gap:10px;padding:14px 16px;border-radius:12px;background:var(--tg-secondary-bg);color:var(--tg-text);text-decoration:none;font-size:15px;font-weight:500}.report-menu-icon{font-size:20px}.period-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.period-tab{padding:7px 12px;border-radius:999px;border:1px solid rgba(0,0,0,.12);background:transparent;color:var(--tg-text);font-size:13px;cursor:pointer}.period-tab-active{background:var(--tg-button);color:var(--tg-button-text);border-color:var(--tg-button)}.date-range-picker{display:flex;gap:12px;margin-bottom:12px}.date-range-picker label{display:flex;flex-direction:column;font-size:12px;color:var(--tg-hint);gap:4px}.section{margin-bottom:16px;padding:12px 14px;border-radius:12px;background:var(--tg-secondary-bg)}.section h3{margin:0 0 8px;font-size:14px;color:var(--tg-hint);font-weight:600}.section h4{margin:12px 0 4px;font-size:13px}.subsection{margin-bottom:8px}.metric-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid rgba(0,0,0,.06);font-size:14px}.metric-row:last-child{border-bottom:none}.metric-label{color:var(--tg-hint)}.metric-value{font-weight:600;text-align:right}.trend-up{color:#34c759;font-weight:600}.trend-down{color:#ff3b30;font-weight:600}.trend-flat{color:var(--tg-hint);font-weight:600}.state-message{padding:20px 0;text-align:center;color:var(--tg-hint);font-size:14px}.state-error{color:#ff3b30}.browser-login{min-height:100vh;display:grid;place-items:center;padding:20px;background:var(--tg-secondary-bg)}.browser-login-card{width:min(100%,380px);display:flex;flex-direction:column;gap:14px;padding:28px;border-radius:16px;background:var(--tg-bg);box-shadow:0 12px 36px #0000001a}.browser-login-card h1{margin:0;font-size:24px}.browser-login-card p{margin:-6px 0 4px;color:var(--tg-hint);font-size:14px}.browser-login-card label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.browser-login-card input{width:100%;padding:11px 12px;border:1px solid rgba(0,0,0,.18);border-radius:10px;background:var(--tg-bg);color:var(--tg-text);font:inherit}.browser-login-error{color:#ff3b30;font-size:13px}.optional-label{color:var(--tg-hint);font-weight:400}.auth-mode-button{border:none;background:none;color:var(--tg-link);font-size:14px;cursor:pointer}.data-table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:8px}.data-table td{padding:4px 2px;border-bottom:1px solid rgba(0,0,0,.05)}.data-table-num{text-align:right;white-space:nowrap}.bar-chart{display:flex;flex-direction:column;gap:4px}.bar-chart-row{display:grid;grid-template-columns:44px 1fr 70px;align-items:center;gap:6px;font-size:12px}.bar-chart-track{height:10px;background:#0000000f;border-radius:6px;overflow:hidden}.bar-chart-fill{height:100%;background:var(--tg-button)}.bar-chart-value{text-align:right;color:var(--tg-hint)}.primary-button{padding:10px 18px;border-radius:10px;border:none;background:var(--tg-button);color:var(--tg-button-text);font-size:14px;font-weight:600;cursor:pointer}.primary-button:disabled{opacity:.6;cursor:default}.admin-reset-result{padding:14px;margin:12px 0;border-radius:10px;background:#43a0471f;font-size:14px}.admin-reset-result code{font-size:15px;font-weight:700;-webkit-user-select:all;user-select:all}.admin-reset-result p{margin:8px 0 12px;color:var(--tg-hint);font-size:13px}.menu-engineering-period{margin:0 0 10px;color:var(--tg-hint);font-size:13px}.menu-engineering-dish-group{margin-bottom:18px}.menu-engineering-dish-group-title{margin:0 0 4px;font-size:16px}.menu-engineering-legend{margin:0 0 14px;font-size:13px;color:var(--tg-hint);display:flex;align-items:center;gap:6px}.menu-engineering-table-wrap{overflow-x:auto}.menu-engineering-table{min-width:560px}.waiters-table{min-width:720px}.waiters-settings{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin-bottom:14px}.waiters-settings label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--tg-hint);flex:1;min-width:200px}.waiters-settings input{padding:8px 10px;border-radius:8px;border:1px solid rgba(0,0,0,.15);font-size:14px}.household-table{min-width:720px;border-collapse:separate;border-spacing:0}.household-table th,.household-table td{border:1px solid rgba(0,0,0,.1);padding:5px 9px;white-space:nowrap}.household-table thead th{background:#1f4e78;color:#fff;font-weight:600;text-align:center;border-color:#ffffff40}.household-table thead th.household-col-shade{background:#17436b}.household-table thead th.household-total-col{background:#2c6ea3}.household-col-divider{border-left:2px solid rgba(0,0,0,.3)!important}.household-table thead th.household-col-divider{border-left:2px solid rgba(255,255,255,.5)!important}.household-table td.household-col-shade{background:#2481cc12}.household-date-col{min-width:68px}.household-name-col{position:sticky;left:0;z-index:2;min-width:170px;box-shadow:2px 0 4px #0000001f}.household-total-col{min-width:68px;background:#ffc10724;font-weight:600}.household-category-row{cursor:pointer;font-weight:600}.household-category-row td.household-name-col{background:#dfe9f4}.household-product-row td.household-name-col{background:var(--tg-bg)}.household-product-row .household-product-name{padding-left:24px;color:var(--tg-hint);font-weight:400}.household-total-row{font-weight:700}.household-total-row td{border-top:2px solid rgba(0,0,0,.25)}.household-total-row td.household-name-col{background:#fdf3d9}.payment-types-layout{display:flex;flex-direction:column;gap:20px}.payment-types-main,.payment-types-side{min-width:0}.payment-types-side-title{margin:0 0 8px;font-size:15px}.payment-types-main-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.payment-types-reset-button{padding:6px 14px;font-size:13px}.payment-types-table,.payment-types-repr-table{border-collapse:separate;border-spacing:0;min-width:100%}.payment-types-table th,.payment-types-table td,.payment-types-repr-table th,.payment-types-repr-table td{border:1px solid rgba(0,0,0,.1);padding:5px 9px;white-space:nowrap}.payment-types-table thead th,.payment-types-repr-table thead th{background:#1f4e78;color:#fff;font-weight:600;text-align:center;border-color:#ffffff40}.payment-types-percent{color:var(--tg-hint);font-size:12px}.payment-types-name-col{position:sticky;left:0;z-index:2;min-width:190px;background:var(--tg-bg);box-shadow:2px 0 4px #0000001f}.payment-types-table thead th.payment-types-name-col{background:#1f4e78}.payment-types-total-col{background:#ffc10724;font-weight:600}.payment-types-table thead th.payment-types-total-col{background:#2c6ea3}.payment-types-date-row{cursor:pointer;font-weight:700;background:#dfe9f4}.payment-types-date-row td.payment-types-name-col{background:#dfe9f4}.payment-types-waiter-row{cursor:pointer;font-weight:500}.payment-types-waiter-name{padding-left:22px}.payment-types-order-row{color:var(--tg-hint);cursor:pointer}.payment-types-order-row:hover{background:#2481cc14}.payment-types-order-num{padding-left:40px}.payment-types-total-row{font-weight:700}.payment-types-total-row td{border-top:2px solid rgba(0,0,0,.25)}.payment-types-total-row td.payment-types-name-col{background:#fdf3d9}.payment-types-repr-wrap{max-height:480px;overflow-y:auto;overflow-x:auto}.payment-types-repr-row{cursor:pointer}.payment-types-repr-row:hover{background:#2481cc14}.payment-types-repr-row-active{background:#2481cc38!important;font-weight:600}.payment-types-repr-amount:hover{text-decoration:underline}.payment-types-repr-total-row{font-weight:700}.payment-types-repr-total-row td{border-top:2px solid rgba(0,0,0,.25);background:#fdf3d9}.waiters-settings-saved{font-size:13px;color:#43a047}.waiters-table-total td{font-weight:700;border-top:1px solid rgba(0,0,0,.15)}.menu-engineering-download{margin-bottom:16px}.tier-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;padding:2px 6px;border-radius:6px;font-size:12px;font-weight:700;color:#fff}.tier-badge-green{background:#34c759}.tier-badge-red{background:#ff3b30}.admin-restaurant-checkboxes{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px}.admin-restaurant-checkbox{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:400;white-space:nowrap}.admin-reset-button{padding:6px 12px;border:none;border-radius:8px;background:var(--tg-button);color:var(--tg-button-text);font-size:12px;cursor:pointer}.admin-report-access-panel{margin-top:8px;padding:10px;border-radius:10px;background:#7f7f7f14}.price-spike-card{padding:10px;margin-bottom:8px;border-radius:10px;background:#ff3b3014;font-size:13px}.price-spike-title{font-weight:600;margin-bottom:4px}.price-spike-meta{color:var(--tg-hint);font-size:12px}.line-chart-wrap{width:100%}.line-chart-svg{width:100%;height:auto;display:block}.line-chart-grid{stroke:var(--tg-secondary-bg);stroke-width:1}.line-chart-axis-label{fill:var(--tg-hint);font-size:11px}.line-chart-line{stroke:var(--tg-button);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.line-chart-end-dot{fill:var(--tg-button)}.line-chart-crosshair{stroke:var(--tg-hint);stroke-width:1;stroke-dasharray:2 3}.line-chart-hover-dot{fill:var(--tg-button);stroke:var(--tg-bg);stroke-width:2}.line-chart-tooltip{margin-top:8px;font-size:13px;color:var(--tg-text);min-height:18px}.dish-cost-table-wrap{overflow-x:auto}.dish-cost-matrix-table th,.dish-cost-matrix-table td{white-space:nowrap}.dish-cost-back-link{display:inline-block;margin-bottom:12px}.link-button{border:none;background:none;padding:0;color:var(--tg-link);font-size:inherit;font-family:inherit;text-align:left;cursor:pointer}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:flex-end;justify-content:center;z-index:1000}.modal-card{background:var(--tg-bg);color:var(--tg-text);width:100%;max-width:640px;max-height:85vh;overflow-y:auto;border-radius:16px 16px 0 0;padding:16px}@media (min-width: 640px){.modal-overlay{align-items:center}.modal-card{border-radius:16px;max-height:80vh}}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.modal-title{font-size:16px;margin:0}.modal-close{border:none;background:var(--tg-secondary-bg);color:var(--tg-text);width:28px;height:28px;border-radius:50%;font-size:14px;line-height:1;cursor:pointer;flex-shrink:0}.check-detail-meta{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:12px;font-size:13px;color:var(--tg-hint)}.check-detail-total-row{font-weight:700}.check-detail-total-row td{border-top:2px solid rgba(0,0,0,.25)}.check-detail-heading{font-weight:700;margin-bottom:6px}.check-detail-block-separated{margin-top:20px;padding-top:16px;border-top:1px solid rgba(0,0,0,.15)}.tree-node-row{display:flex;align-items:center;gap:8px;width:100%;border:none;background:none;color:var(--tg-text);font-size:14px;text-align:left;padding:8px;border-radius:8px;cursor:pointer}.tree-node-row:disabled{cursor:default}.tree-node-row:not(:disabled):hover{background:var(--tg-secondary-bg)}.tree-toggle{width:14px;flex-shrink:0;color:var(--tg-hint);text-align:center}.tree-toggle-empty{visibility:hidden}.tree-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-amount{flex-shrink:0;color:var(--tg-hint);font-size:13px}.tree-children{border-left:1px solid var(--tg-secondary-bg);margin-left:16px}
