/* Based on the user's Attendance app src/premium.css and quick-entry styles.
   Shared presentation only: no records, calculations, permission or sync changes. */
:root{--ap-bg:#f0f3f7;--ap-text:#243247;--ap-border:#e0e6ee;--ap-blue:#2563eb;--ap-side:252px;font-family:'Segoe UI',Arial,sans-serif;color:var(--ap-text);background:var(--ap-bg)}
body{font-family:'Segoe UI',Arial,sans-serif!important;color:var(--ap-text);background:var(--ap-bg)}button,input,select,textarea{font-family:inherit!important}button,input,select,textarea{border-radius:7px}button:focus-visible,input:focus,select:focus{outline:2px solid #2457c5;outline-offset:2px}input,select,textarea{background:#fafbfd!important;border-color:#d1dae5!important;color:#243247}button:disabled{cursor:not-allowed}
/* The Attendance application shell. */
body.signed-in{padding-left:var(--ap-side)}#appSidebar{width:var(--ap-side);padding:24px 14px;background:linear-gradient(150deg,#3a4c61,#29394b);z-index:40}.side-brand{gap:10px;padding:0 12px 24px;letter-spacing:.3px}.side-brand img{width:135px;height:56px;padding:5px;object-fit:contain;border-radius:8px}.side-brand strong{display:none}.side-brand span{color:#becbda;font-size:12px}#appSidebar nav{gap:5px}#appSidebar a{min-height:44px;padding:12px;border-radius:7px;font-size:14px;color:#e0e8f2;gap:12px;line-height:1.35}#appSidebar a:hover{background:#ffffff12}#appSidebar a[aria-current]{background:linear-gradient(110deg,#2463c3,#218dee);box-shadow:0 5px 14px #14233430}.ap-nav-icon{width:21px;height:21px;flex:0 0 21px;color:#c4d1df}#appSidebar a[aria-current] .ap-nav-icon{color:white}.side-note{color:#becbda}
body>header{min-height:88px;padding:20px 28px;background:white;color:#253345;border-bottom:1px solid #e1e6ed;box-shadow:0 3px 12px #25334509;gap:10px}body>header strong{font-size:18px;font-weight:650;color:#253345}body>header>div{font-size:12px;color:#627185}.ap-header-logo{width:64px;height:32px;object-fit:contain}body>header #identity{font-size:12px}body>header #logout{background:#f7f9fc;border:1px solid #dfe5ec;border-radius:7px;font-size:12px;padding:9px}
body.signed-in main{max-width:none;margin:0;padding:28px}section{border:1px solid var(--ap-border);border-radius:12px;box-shadow:0 4px 13px #26364b0a;background:#fff}h1{font-size:29px;letter-spacing:-.6px;color:#192a3d}h2,h3{color:#25364b}p{color:#657388}label{font-size:13px;font-weight:600}#status{background:transparent;padding:0 2px;margin:0 0 14px;color:#657388;font-size:12px}.headline-stats{gap:18px}.headline-card{min-height:134px;padding:20px;border-radius:12px;border-color:#e0e6ee;box-shadow:0 5px 13px #25334512,0 1px 3px #25334508}.headline-card span{font-size:14px;font-weight:550;color:#46556a}.headline-card strong{font-size:34px;letter-spacing:-.5px}.headline-card.blue{background:linear-gradient(125deg,#fff,#f0f4ff);color:#26384f}.headline-card.green{background:linear-gradient(125deg,#fff,#edfaf0);color:#269c59}.headline-card.teal{background:linear-gradient(125deg,#fff,#eff9fa);color:#245f64}.headline-card.amber{background:linear-gradient(125deg,#fff,#f4f2eb);color:#898b90}.summary-card{background:#fff;border-color:#e0e6ee;border-radius:12px}.summary-card strong{color:#26384f}
/* Match the centered Attendance quick entry, including its spacing and controls. */
#entry{max-width:480px;margin:6px auto 12px;padding:16px;background:white;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 14px 40px #152b4c14}#entry h1{font-size:18px;letter-spacing:0;text-align:center;color:#25364b;margin:2px 0 5px}#entryHint{font-size:12px;text-align:center;margin:4px 0 16px;color:#64748b}#entry label{margin-bottom:10px;font-size:13px}#entry input,#entry select{background:#f8fafc!important;border:1px solid #d1dae5;border-radius:10px;min-height:46px;padding:9px 12px;font-size:16px;margin-top:4px}#entry .grid{gap:0}#entry #packingExtras{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}#packingExtras label:first-child{grid-column:1/-1}#entry #preview{background:#f0f5fb;color:#34536a;border:1px solid #dce4ed;border-radius:10px;padding:12px;min-height:46px;font-size:13px}#entry #save{background:#2563eb;color:#fff;border:1px solid #2563eb;border-radius:10px;padding:13px;min-height:46px}#entryRegister,.secondary{background:#f0f4f8;color:#334d68;border:1px solid #d1dae5;border-radius:7px}#entryRegister{font-size:13px}.quantity-stepper button{background:#eef3f9;color:#34536a;border:1px solid #d1dae5;border-radius:10px;min-height:46px;font-size:21px}.quantity-stepper{gap:8px}
/* Reports and top-layer windows share Attendance typography and modal geometry. */
.register table{font-size:13px}.register th{background:#eef2f6;color:#526276;padding:13px 12px;font-weight:650}.register td{padding:12px;border-color:#e6ebf1}.register tbody tr:nth-child(even){background:#fafbfd}.register summary{padding:8px 0;color:#344b60;cursor:pointer;font-weight:600}.register-head h2{font-size:21px}.whatsapp-button{background:#168447;border:1px solid #168447;box-shadow:none;font-size:16px;min-height:46px;border-radius:7px}.danger{background:#ffe2df;color:#bc3935;border:1px solid #f0c9c5}.report-tools a{font-size:13px;border:1px solid #dfe5ec;background:#f7f9fc;color:#334d68}
dialog{width:min(560px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);margin:auto;padding:20px;border:1px solid #dce4ed!important;border-radius:16px!important;box-shadow:0 24px 80px #15273a44;color:#243247;background:#fff}dialog::backdrop{background:#172a4666}dialog h2{font-size:17px}dialog .register-head{position:sticky;top:-20px;background:#fff;padding:12px 0;border-bottom:1px solid #e8edf3;z-index:2}dialog input,dialog select{min-height:44px}#ownerRegisterDialog>button{position:sticky;top:0;background:#f0f4f8;color:#334d68}
/* Owner ERP: same shell, table and card values as the reference. */
.app-shell{grid-template-columns:var(--ap-side) minmax(0,1fr)}.sidebar{background:linear-gradient(150deg,#3a4c61,#29394b);padding:24px 14px}.sidebar .brand{font-size:18px}.sidebar .nav{display:flex;align-items:center;gap:12px;font-size:14px;padding:12px;border-radius:7px;min-height:44px}.sidebar .nav.active{background:linear-gradient(110deg,#2463c3,#218dee)}.main{background:var(--ap-bg)}.topbar{min-height:88px;border-color:#e1e6ed}.topbar h1{font-size:29px;letter-spacing:-.6px}.panel{border-color:#e0e6ee;border-radius:12px;box-shadow:0 4px 13px #26364b0a}.metric{border-radius:12px!important;box-shadow:0 5px 13px #25334512!important}.metric:nth-child(1){background:linear-gradient(125deg,#fff,#f0f4ff)}.metric:nth-child(2){background:linear-gradient(125deg,#fff,#edfaf0)}.metric:nth-child(3){background:linear-gradient(125deg,#fff,#fff0ed)}.metric:nth-child(4){background:linear-gradient(125deg,#fff,#f4f2eb)}.metric span{font-size:14px;color:#46556a}.metric b{font-size:34px}.filters{background:white;padding:16px 20px;border:1px solid #e0e6ee;border-radius:12px;gap:16px}th{background:#eef2f6;color:#526276;font-size:13px}td{font-size:13px;border-color:#e6ebf1}.modal{border-radius:16px!important;background:white!important}.modal-header{border-bottom:1px solid #e8edf3}
@media(max-width:1150px){:root{--ap-side:224px}body.signed-in main{padding:22px}.headline-stats{gap:12px}.headline-card{padding:16px}.headline-card span{font-size:12px}}
@media(max-width:760px){body.signed-in{padding-left:0}#appSidebar{width:min(290px,86vw);z-index:60}.menu-open #menuBackdrop{z-index:55;background:#1c2c4255}body>header{padding:12px;min-height:76px}body>header strong{font-size:14px}.ap-header-logo{width:55px}body.signed-in main{padding:18px 12px}#entry{width:100%;max-width:480px;margin:6px auto 12px;padding:16px}.headline-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.headline-card{min-height:118px;padding:14px}.headline-card strong{font-size:26px}.headline-card span{font-size:12px}input,select,textarea{font-size:16px}.register-head{display:block}.register-head label{min-width:0}.app-shell{display:block}.sidebar{width:min(290px,86vw)}.topbar h1{font-size:26px}.metric b{font-size:26px}.filters{padding:12px;gap:12px}dialog{padding:16px}#entry #packingExtras{gap:0 10px}}
@media print{.ap-nav-icon,.ap-header-logo{display:none}body.signed-in{padding-left:0}#entry{box-shadow:none}}
/* Existing owner register windows follow the same Attendance design. */
#pr-root{--ink:#243247;--ink-soft:#657388;--paper:#f0f3f7;--white:#fff;--rule:#dce4ed;--teal:#2563eb;--teal-deep:#25364b;--amber:#2563eb;font-family:'Segoe UI',Arial,sans-serif;background:#f0f3f7;color:#243247}.pr-top{background:#fff!important;color:#243247!important;border-bottom:1px solid #e1e6ed!important;padding:20px 24px!important}.pr-title{color:#253345!important;font-size:20px!important}.pr-subtitle{color:#627185!important}.pr-top-actions button,.pr-tab{background:#f7f9fc!important;color:#334d68!important;border:1px solid #dfe5ec!important;border-radius:7px!important}.pr-tab.active{background:#2563eb!important;color:white!important}.pr-tabstrip{background:#f0f3f7!important;border-color:#e0e6ee!important}.pr-main{max-width:none!important;padding:24px!important}.pr-card{background:white!important;border:1px solid #e0e6ee!important;border-radius:12px!important;box-shadow:0 5px 13px #25334512!important;padding:18px!important}.pr-card-label{color:#46556a!important;font-size:13px!important}.pr-card-value{color:#26384f!important;font-size:28px!important}.pr-table th{background:#eef2f6!important;color:#526276!important;padding:13px 12px!important;font-size:13px!important}.pr-table td{padding:12px!important;border-color:#e6ebf1!important;font-size:13px!important}.pr-table{border-color:#e0e6ee!important}.pr-total-row{background:#eef3f9!important}.pr-overlay{background:#172a4666!important;padding:16px!important;align-items:center!important}.pr-modal{background:white!important;border:1px solid #dce4ed!important;border-radius:16px!important;max-height:calc(100dvh - 32px)!important;box-shadow:0 24px 80px #15273a44!important}.pr-modal-head{background:white!important;padding:16px!important;border-bottom:1px solid #e8edf3!important;position:sticky;top:0;z-index:2}.pr-modal-head h2{font-size:17px!important;color:#25364b!important}.pr-modal-body{padding:16px!important}.pr-modal-footer{background:white!important;border-top:1px solid #e8edf3!important;padding:16px!important}.pr-field label{font-size:13px!important;color:#243247!important}.pr-field input,.pr-field select{background:#f8fafc!important;border:1px solid #d1dae5!important;border-radius:10px!important;min-height:46px!important;font-size:16px!important;color:#243247!important}.pr-btn-primary{background:#2563eb!important;color:white!important;border-radius:10px!important}.pr-btn-secondary,.pr-add-row-btn{background:#f0f4f8!important;color:#334d68!important;border:1px solid #d1dae5!important;border-radius:7px!important}.pr-preview{background:#f0f5fb!important;color:#34536a!important;border:1px solid #dce4ed!important}.pr-article-row{background:#f8fafc!important;border-color:#d1dae5!important}.pr-modal-close{background:#f0f4f8!important;color:#334d68!important}.pr-modal button{min-height:40px}
@media(max-width:760px){.pr-main{padding:14px!important}.pr-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.pr-card{padding:14px!important}.pr-card-value{font-size:26px!important}.pr-modal{width:100%!important}.pr-top{padding:12px!important}}
.ap-calendar-input{display:flex;align-items:stretch;width:100%;min-width:0}.ap-calendar-input input{flex:1;min-width:0;border-radius:7px 0 0 7px!important;margin-bottom:0}.ap-calendar-input>button{align-self:stretch;border:1px solid #d1dae5;border-left:0;border-radius:0 7px 7px 0;background:#f0f0f0;color:#2154c7;padding:6px 10px;font-size:12px;white-space:nowrap;margin-top:4px;font-weight:500}.ap-calendar{width:304px;padding:12px!important;border-radius:12px!important}.ap-calendar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.ap-calendar button{font:inherit;font-size:13px;background:#f7f9fc;color:#243247;border:1px solid #ccd3df;border-radius:7px;padding:7px;min-width:0}.ap-calendar-head button:disabled{background:transparent;opacity:1;border:0}.ap-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.ap-calendar-grid>span{font-size:12px;padding:6px 0;color:#657388}.ap-calendar-grid button[aria-pressed=true]{background:#2456cf;color:white}.ap-month-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ap-calendar-close{width:100%;margin-top:8px}.ap-calendar-input input::-webkit-calendar-picker-indicator{display:none}#entry .ap-calendar-input>button{min-width:86px}
/* Keep legacy controls inside the same compact form geometry. */
.pr-modal,.pr-modal *{box-sizing:border-box}.pr-modal{overflow:hidden!important}.pr-modal-body{min-width:0;overflow-x:hidden!important}.pr-field{min-width:0}.pr-field input,.pr-field select{max-width:100%;width:100%}.pr-article-row .pr-field:first-child{flex:1 1 100%!important}.pr-article-row{padding:10px;border:1px solid #d1dae5;border-radius:10px}.pr-article-row .pr-field.pcs,.pr-article-row .pr-field.pieces-disp{flex:1 1 100px!important}#prOpenEntry,#prOpenProd,#prOpenProdReg{background:#2563eb!important;color:white!important;border-radius:7px!important}.pr-section-title{border-color:#e0e6ee!important}

/* Audit: constrain long values and narrow entry/register controls. */
#productionSummary{align-items:start}#productionSummary .metric:last-child b{font-size:16px;line-height:1.55;overflow-wrap:anywhere}
input[type=checkbox],input[type=radio]{width:auto!important;min-height:0!important;flex:none}
#entry #preview:empty{display:none}#entry label,#entry input,#entry select{min-width:0;max-width:100%;box-sizing:border-box}
#history details p{white-space:normal;overflow-wrap:anywhere;font-size:13px;margin:8px 0}
@media(max-width:600px){
.filters{display:grid!important;grid-template-columns:minmax(0,1fr)!important}.filters>*{width:100%;min-width:0!important;box-sizing:border-box}
.ap-calendar-input{max-width:100%}.ap-calendar-input input{width:0;flex:1 1 0}.ap-calendar-input>button{flex:0 0 auto;min-width:0!important;padding:6px}
#history table,#history tbody,#history tr,#history td{display:block;width:100%;box-sizing:border-box}#history thead{display:none}#history tr{border:1px solid #dce4ed;border-radius:10px;margin:10px 0;overflow:hidden}#history tr tr{margin:6px 0}#history td{border:0;border-bottom:1px solid #e6ebf1;padding:10px;overflow-wrap:anywhere}#history td[data-label]::before{content:attr(data-label);display:block;font-size:11px;color:#64748b;margin-bottom:4px}#history .table-scroll{overflow:visible}#history .row-actions{display:flex;flex-wrap:wrap;gap:8px}#history .row-actions::before{width:100%}
}

/* Owner entry access belongs with the main sidebar navigation. */
.sidebar .sidebar-entry{display:flex;align-items:center;width:100%;box-sizing:border-box;color:#edf4fb;text-decoration:none;font-size:14px;font-family:inherit;font-weight:400;line-height:1.4;padding:12px;border-radius:7px;min-height:44px;margin:2px 0;cursor:pointer;background:transparent}.sidebar .sidebar-entry:hover,.sidebar .sidebar-entry:focus-visible{background:#ffffff20}.sidebar .sidebar-entry[hidden]{display:none}
#dashboard .metric{min-height:88px!important;padding:12px 14px!important;height:auto!important}#dashboard .metric b{font-size:24px!important;line-height:1.25;overflow-wrap:anywhere}#dashboard .metric span{font-size:12px}#dashboard .metric small{display:block;font-size:11px}#dashSecondaryCards .metric:nth-child(2) b{font-size:14px!important;max-height:62px;overflow:auto}#dashboard .metric-grid{gap:12px;margin-bottom:14px}.trend-controls{display:flex;gap:16px;flex-wrap:wrap;margin:12px 0}.trend-controls label{display:flex;gap:8px;align-items:center}.trend-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.trend-card{border:1px solid #dce5ef;border-radius:10px;padding:14px;min-width:0;background:white}.trend-card h3{margin:0}.trend-card svg{width:100%;height:auto;display:block}.trend-card svg text{font-size:10px;fill:#64748b}.trend-extremes{display:grid;gap:6px;font-size:12px;line-height:1.5;margin:8px 0}.trend-card summary{cursor:pointer;color:#2563eb;font-size:12px}.trend-card table{width:100%}#monthlyTrends>p{font-size:12px;line-height:1.5}@media(max-width:1100px){.trend-grid{grid-template-columns:1fr}}@media(max-width:760px){#dashboard .metric b{font-size:21px!important}.trend-controls{display:grid}.trend-card{padding:10px}}
/* Dialog overlays are separate from their white window content. */
body .modal{background:rgba(15,23,42,.5)!important;border-radius:0!important;padding:24px!important;backdrop-filter:blur(2px)}body .modal-box{width:min(980px,94vw);max-height:88vh;padding:0;border:1px solid #dce5ef;border-radius:14px;box-shadow:0 24px 70px #0f172a40;overflow:auto}body .modal-head{position:sticky;top:0;z-index:2;background:#f8fafc;border-bottom:1px solid #dce5ef;margin:0;padding:16px 22px}body #modalBody{padding:20px 22px}body .close{color:#17365d;background:#e7eef7;min-width:40px;min-height:40px;font-size:20px}body .btn.danger,body button.danger{color:#fff!important;background:#b42318!important;font-weight:700}body .btn.danger:disabled{color:#fff!important;opacity:.65}@media(max-width:600px){body .modal{padding:10px!important}body .modal-box{max-height:94dvh;width:100%}body #modalBody{padding:14px}body .modal-head{padding:12px 14px}}
