:root{
  --green:#123b32;--green2:#1d5948;--green3:#28745a;--gold:#f4b544;--gold-soft:#fff1ce;
  --ink:#17241f;--muted:#687870;--line:#dce6df;--paper:#f3f6f2;--white:#fff;
  --red:#a12828;--shadow:0 14px 40px rgba(18,59,50,.08);--shadow-hover:0 20px 48px rgba(18,59,50,.13);
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--paper)}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 78% -8%,rgba(244,181,68,.14),transparent 32%),radial-gradient(ellipse at 4% 28%,rgba(40,116,90,.07),transparent 28%),var(--paper);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.5}
button,input,select,textarea{font:inherit}
button{cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease}
button:disabled{opacity:.55;cursor:wait}
a{color:var(--green)}
::selection{background:#f4b54466;color:var(--green)}
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;position:relative;overflow:hidden;background:radial-gradient(circle at 15% 18%,rgba(244,181,68,.22),transparent 25%),radial-gradient(circle at 85% 82%,rgba(40,116,90,.16),transparent 30%),linear-gradient(145deg,#edf4ee,#f9f6ed 58%,#e7f0e9)}
.login-page:before,.login-page:after{content:"";position:fixed;border:1px solid rgba(18,59,50,.09);border-radius:50%;pointer-events:none}
.login-page:before{width:430px;height:430px;top:-240px;left:-140px;box-shadow:0 0 0 38px rgba(18,59,50,.025),0 0 0 78px rgba(18,59,50,.02)}
.login-page:after{width:560px;height:560px;right:-280px;bottom:-340px;box-shadow:0 0 0 45px rgba(244,181,68,.04),0 0 0 95px rgba(244,181,68,.025)}
.login-card{position:relative;z-index:1;width:min(100%,440px);background:rgba(255,255,255,.88);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.9);border-radius:26px;padding:38px;box-shadow:0 28px 85px rgba(18,59,50,.15),0 2px 8px rgba(18,59,50,.04)}
.brand-mark{width:62px;height:62px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,var(--green2),#0d2c26);font-size:31px;color:white;margin:0 auto 20px;box-shadow:0 9px 22px rgba(18,59,50,.2),inset 0 1px rgba(255,255,255,.16)}
.small-mark{width:42px;height:42px;font-size:22px;margin:0;flex:none;border-radius:14px;box-shadow:0 6px 15px #071d182e}
.eyebrow{font-size:10px;font-weight:850;letter-spacing:.16em;color:var(--green2);margin:0 0 9px}
.login-card h1{text-align:center;font-size:33px;letter-spacing:-.045em;line-height:1.12;margin:0 0 8px}
.muted,.small{color:var(--muted)}.small{font-size:12px}.login-card label,label{display:block;font-size:12px;font-weight:800;letter-spacing:.01em;margin:16px 0 7px}
input,select,textarea{width:100%;padding:12px 13px;border:1px solid #cbd8cf;border-radius:11px;background:#fff;color:var(--ink);min-width:0;transition:border-color .18s ease,box-shadow .18s ease}
input:hover,select:hover,textarea:hover{border-color:#a9bdb0}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--green3);box-shadow:0 0 0 4px rgba(40,116,90,.12)}
.primary,.secondary{border:1px solid transparent;border-radius:11px;padding:11px 16px;font-weight:800;letter-spacing:.005em}
.primary{background:linear-gradient(135deg,var(--green2),var(--green));color:white;box-shadow:0 5px 12px rgba(18,59,50,.13)}
.primary:hover{background:linear-gradient(135deg,var(--green3),var(--green2));box-shadow:0 8px 18px rgba(18,59,50,.19);transform:translateY(-1px)}
.secondary{background:#eef4ef;color:var(--green);border-color:#dbe7dd}.secondary:hover{background:#e2eee4;border-color:#c6d9ca}
.full{width:100%;margin-top:20px;padding:13px}.message{font-size:13px;min-height:18px}.message.error,.error-box{color:var(--red)}.message.success{color:#176b42}.login-link{display:block;text-align:center;margin-top:18px;font-size:13px;font-weight:750}
.app-shell{min-height:100vh;display:flex}
.sidebar{width:258px;background:radial-gradient(ellipse at 10% 0%,rgba(244,181,68,.13),transparent 35%),linear-gradient(165deg,#17483b 0%,#10362e 55%,#0b2a25 100%);color:white;display:flex;flex-direction:column;padding:24px 15px 18px;flex:none;position:relative;isolation:isolate;box-shadow:8px 0 30px rgba(14,45,37,.07)}
.sidebar:after{content:"";position:absolute;z-index:-1;inset:0;opacity:.16;pointer-events:none;background-image:radial-gradient(rgba(255,255,255,.45) .6px,transparent .6px);background-size:18px 18px;mask-image:linear-gradient(to bottom,black,transparent 70%)}
.side-brand{display:flex;gap:12px;align-items:center;padding:0 8px 29px;border-bottom:1px solid #ffffff18;margin-bottom:20px}
.side-brand strong,.side-brand small{display:block}.side-brand strong{font-size:16px;letter-spacing:-.02em}.side-brand small{color:#c2d8cb;font-size:11px;margin-top:2px;letter-spacing:.04em}
.sidebar nav{display:grid;gap:6px}.nav-item{display:flex;align-items:center;gap:12px;border:1px solid transparent;background:transparent;color:#d5e6dc;text-align:left;padding:12px 13px;border-radius:12px;font-weight:680;font-size:13px;min-height:44px}
.nav-item>span:first-child{min-width:18px}.nav-item:hover{background:#ffffff0f;color:white;border-color:#ffffff0b;transform:translateX(2px)}
.nav-item.active{background:linear-gradient(100deg,rgba(244,181,68,.2),rgba(255,255,255,.09));color:#fff;border-color:rgba(244,181,68,.25);box-shadow:inset 3px 0 var(--gold)}
.sidebar-bottom{margin-top:auto;padding-top:20px;display:grid;gap:12px;border-top:1px solid #ffffff18}
.role-pill{width:max-content;max-width:100%;font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#ffe4a4;background:#f4b54418;border:1px solid #f4b54435;padding:6px 10px;border-radius:20px;margin:0 8px}
#signout{color:#d3e2d9}
.main-area{min-width:0;flex:1}
.topbar{min-height:96px;display:flex;align-items:center;gap:17px;padding:19px 32px;background:rgba(255,255,255,.84);backdrop-filter:blur(16px);border-bottom:1px solid rgba(209,222,213,.8);position:sticky;top:0;z-index:5}
.topbar .eyebrow{margin-bottom:4px;color:#74867a;font-size:9px}
.topbar h1{font-size:27px;letter-spacing:-.045em;line-height:1.15;margin:0;font-weight:850}
.user-chip{margin-left:auto;display:flex;align-items:center;gap:11px;max-width:290px;padding:7px 11px 7px 7px;background:#f7faf7;border:1px solid #e7eee8;border-radius:16px}
.user-chip strong,.user-chip small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-chip strong{font-size:12px}.user-chip small{color:var(--muted);font-size:11px;margin-top:2px}
.avatar{width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,#fff0c9,#f6d98b);color:#5e4718;font-weight:900;display:grid;place-items:center;flex:none}
.icon-button{display:none;background:white;border:1px solid var(--line);border-radius:10px;padding:9px 11px;color:var(--green)}
.content-area{padding:30px;max-width:1680px;margin:auto}
.global-message{margin:0 30px}.global-message.error{padding:12px 15px;background:#fff0ef;color:var(--red);border:1px solid #f2d4d1;border-radius:11px}.global-message.success{padding:12px 15px;background:#edf8f0;color:#176b42;border:1px solid #d4ebd9;border-radius:11px}
.welcome{display:flex;justify-content:space-between;align-items:center;gap:24px;background:radial-gradient(ellipse at 88% 8%,rgba(244,181,68,.26),transparent 34%),linear-gradient(120deg,#e4f0e6 0%,#f5f2e7 65%,#f9f6ec 100%);border:1px solid #dce8d9;padding:29px;border-radius:22px;margin-bottom:23px;position:relative;overflow:hidden;box-shadow:0 8px 25px rgba(18,59,50,.045)}
.welcome:after{content:"🔥";position:absolute;right:22%;top:50%;transform:translateY(-50%) rotate(-10deg);font-size:92px;opacity:.07;pointer-events:none}
.welcome h2{font-size:27px;letter-spacing:-.045em;line-height:1.2;margin:0 0 8px}.welcome p:not(.eyebrow){margin:0;color:#63746a;max-width:660px;font-size:13px}.welcome .eyebrow{color:#8b651b}
.quick-actions{display:flex;gap:9px;flex-wrap:wrap;position:relative;z-index:1}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:28px}
.stat-card,.panel{background:rgba(255,255,255,.94);border:1px solid #e0e9e2;border-radius:17px;box-shadow:0 5px 20px rgba(18,59,50,.035)}
.stat-card{padding:20px;position:relative;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.stat-card:after{content:"";position:absolute;right:-23px;top:-28px;width:86px;height:86px;border-radius:50%;background:linear-gradient(135deg,#f4b54426,#28745a0d)}
.stat-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#ccdfd0}
.stat-label{font-size:11px;color:#718076;font-weight:800;letter-spacing:.045em;text-transform:uppercase}
.stat-value{font-size:32px;line-height:1.15;letter-spacing:-.045em;font-weight:900;margin:10px 0 5px;color:var(--green)}
.stat-note{font-size:11px;color:var(--muted)}
.section-head,.panel-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}
.section-head h2,.panel h2,.panel-head h2{font-size:18px;letter-spacing:-.025em;margin:0}.panel-head p{margin:5px 0 0}
.panel{padding:23px;margin-bottom:21px;box-shadow:0 5px 20px rgba(18,59,50,.035)}.panel>h2{margin-bottom:8px}
.toolbar{display:flex;gap:10px;margin:17px 0;align-items:center}.toolbar input{flex:1}.toolbar select{max-width:240px}
.table-wrap{width:100%;overflow:auto;border:1px solid #e3ebe5;border-radius:12px}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px;background:white}
th,td{text-align:left;padding:13px 15px;border-bottom:1px solid #edf2ed;font-size:12px;vertical-align:top}
th{font-size:10px;text-transform:uppercase;letter-spacing:.075em;color:#708076;background:#f5f8f5;white-space:nowrap}
thead th:first-child{border-top-left-radius:10px}thead th:last-child{border-top-right-radius:10px}
tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#f8fbf8}
.subtle{font-size:11px;color:var(--muted);margin-top:4px}
.pill{display:inline-block;border-radius:20px;background:#e8f3e9;color:#1d6445;padding:5px 9px;font-size:10px;font-weight:850;white-space:nowrap}.pill.low{background:#fff2d4;color:#805800}.pill.out{background:#fde9e7;color:#a12828}
.empty{padding:34px;text-align:center;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.span-2{grid-column:span 2}
.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
.alert{background:#f4f7f3;border:1px solid #e2eae2;border-radius:11px;padding:12px 14px;color:var(--muted);font-size:12px;margin-top:15px}
.inline-actions{display:flex;gap:6px;flex-wrap:wrap}.inline-actions button{font-size:11px;padding:7px 9px}
.loading{padding:44px;text-align:center;color:var(--muted)}
.error-box{padding:18px;border:1px solid #f0c5c1;background:#fff7f6;border-radius:12px}
.modal-backdrop{position:fixed;inset:0;z-index:10;background:rgba(8,29,23,.72);backdrop-filter:blur(6px);display:grid;place-items:center;padding:20px;overflow:auto}
.modal{width:min(100%,650px);max-height:90vh;overflow:auto;background:#fff;border:1px solid #ffffffa8;border-radius:20px;padding:26px;box-shadow:0 30px 90px #0004}
.modal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.modal-top h2{margin:0;letter-spacing:-.03em}
.close{border:0;background:#f0f4f0;border-radius:10px;font-size:22px;width:37px;height:37px;color:var(--green)}.close:hover{background:#e2ebe3}
.password-panel{max-width:520px;margin:30px auto}.hint{font-size:12px;color:var(--muted)}
.scan-field{display:flex;gap:8px;align-items:stretch}.scan-field input{flex:1;min-width:0}.scan-field button{white-space:nowrap}
.scanner-modal{width:min(100%,620px)}#barcode-reader{width:100%;min-height:180px;margin:12px 0;border:1px dashed #cbd9cf;border-radius:12px;overflow:hidden;background:#f7faf7}#barcode-reader video{max-width:100%;border-radius:8px}.scanner-modal .message{margin:8px 0}
.scan-field select{flex:1;min-width:0}.scan-field select+button{white-space:nowrap}
.scanner-host{position:relative;z-index:10001}.scanner-host .modal-backdrop{z-index:10002}.scanner-host .scanner-modal{position:relative;max-height:90vh;overflow:auto}
.po-modal{width:min(980px,96vw);max-height:90vh;overflow:auto}.po-line{border:1px solid var(--line);border-radius:13px;padding:13px;margin:10px 0}.po-modal .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 8px}.po-modal .section-head h3{margin:0}.po-modal .table-wrap{margin:12px 0}.po-modal input[type=number]{min-width:80px}
@media(max-width:1100px){.sidebar{width:235px}.content-area{padding:22px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{padding:17px 22px}}
@media(max-width:720px){.sidebar{position:fixed;z-index:8;inset:0 auto 0 0;width:270px;transform:translateX(-105%);transition:transform .22s;overflow:auto}.sidebar.open{transform:translateX(0);box-shadow:0 0 0 100vmax #0007}.topbar{gap:11px;min-height:78px;padding:13px 14px}.topbar h1{font-size:21px}.topbar .eyebrow{font-size:8px}.user-chip{max-width:124px;padding:5px}.user-chip small{display:none}.avatar{width:34px;height:34px;border-radius:11px}.icon-button{display:block}.content-area{padding:14px}.welcome{padding:21px;display:block;border-radius:18px}.welcome h2{font-size:23px}.welcome:after{right:8%;font-size:74px}.quick-actions{margin-top:18px}.stats-grid{gap:9px;margin-bottom:20px}.stat-card{padding:14px;border-radius:14px}.stat-value{font-size:27px}.stat-label{font-size:10px}.panel{padding:15px;border-radius:15px}.panel-head{align-items:flex-start;flex-wrap:wrap}.toolbar{flex-wrap:wrap}.toolbar input,.toolbar select{max-width:none;flex-basis:100%}.form-grid{grid-template-columns:1fr}.span-2{grid-column:span 1}.global-message{margin:0 14px}.login-card{padding:29px 23px;border-radius:23px}.modal{padding:19px;border-radius:17px}.form-actions{flex-wrap:wrap}.form-actions button{flex:1}.scan-field{flex-wrap:wrap}.scan-field button{width:100%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Cook meal report: print only the selected report details. */
@media print{
 body.printing-meal-report *{visibility:hidden!important}
 body.printing-meal-report #mr-detail,body.printing-meal-report #mr-detail *{visibility:visible!important}
 body.printing-meal-report #mr-detail{position:absolute!important;left:0!important;top:0!important;width:100%!important;margin:0!important;padding:0!important;background:#fff!important;color:#000!important}
 body.printing-meal-report #mr-detail .panel{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important}
 body.printing-meal-report #mr-detail button,body.printing-meal-report #mr-detail textarea,body.printing-meal-report #mr-detail .form-actions,body.printing-meal-report #mr-detail #mr-action-message{display:none!important}
 body.printing-meal-report #mr-detail table{width:100%!important;border-collapse:collapse!important}
 body.printing-meal-report #mr-detail th,body.printing-meal-report #mr-detail td{border:1px solid #999!important;padding:6px!important;color:#000!important}
}

/* Print only the selected employee inventory or products/list report. */
@media print {
 body.printing-selected-section * { visibility:hidden!important; }
 body.printing-selected-section #employee-inventory-print,
 body.printing-selected-section #employee-inventory-print *,
 body.printing-selected-section #products-list-print,
 body.printing-selected-section #products-list-print *,
 body.printing-selected-section #reports-history-print,
 body.printing-selected-section #reports-history-print * { visibility:visible!important; }
 body.printing-selected-section #employee-inventory-print,
 body.printing-selected-section #products-list-print,
 body.printing-selected-section #reports-history-print { position:absolute!important; left:0!important; top:0!important; width:100%!important; margin:0!important; padding:0!important; border:0!important; box-shadow:none!important; background:#fff!important; color:#000!important; }
 body.printing-selected-section .no-print,
 body.printing-selected-section #products-list-print .toolbar,
 body.printing-selected-section #products-list-print #addlist,
 body.printing-selected-section #reports-history-print .quick-actions,
 body.printing-selected-section #reports-history-print .toolbar { display:none!important; }
 body.printing-selected-section table { width:100%!important; border-collapse:collapse!important; }
 body.printing-selected-section th, body.printing-selected-section td { border:1px solid #999!important; padding:6px!important; color:#000!important; }
}
