:root{--ink:#1d2b32;--muted:#65757c;--line:#d9e0df;--panel:#fff;--paper:#f4f7f4;--accent:#2f7d6f;--accent2:#d85f3d;--soft:#e8f2ef;--shadow:0 12px 28px rgba(32,45,48,.08)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Segoe UI","Malgun Gothic",Arial,sans-serif;letter-spacing:0}button,input,select{font:inherit}.app{max-width:1480px;margin:0 auto;padding:24px}.topbar,.filterbar,.table-toolbar,.panel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}.topbar{margin-bottom:14px}h1,h2,p{margin:0}h1{font-size:28px;line-height:1.25}h2{font-size:17px}.topbar p,.panel-head span,.metric span,label,.muted{color:var(--muted);font-size:13px}.actions,.filterbar,.form-actions{display:flex;flex-wrap:wrap;gap:10px}.filterbar{justify-content:flex-start;margin-bottom:14px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fff}label{display:grid;gap:5px}select,input{height:38px;min-width:140px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);padding:0 10px}input[type=search]{min-width:230px}button,.upload-button{display:inline-grid;place-items:center;min-height:38px;border:1px solid var(--accent);border-radius:8px;background:var(--accent);color:#fff;cursor:pointer;padding:0 14px;text-align:center}.upload-button input{display:none}.light{background:#fff;color:var(--accent)}.tabs{display:flex;gap:8px;margin-bottom:16px;border-bottom:1px solid var(--line)}.tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--muted);height:42px;padding:0 14px}.tabs button.active{color:var(--ink);border-bottom-color:var(--accent);font-weight:700}.view{display:none}.active-view{display:block}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;margin-bottom:14px}.metric,.panel,.editor-panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow)}.metric{display:grid;gap:8px;min-height:96px;padding:18px}.metric strong{font-size:22px;line-height:1.22}.grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.85fr);gap:14px}.panel,.editor-panel{min-width:0;padding:16px}.editor-panel{margin-bottom:14px}.edit-form{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr)) auto;gap:10px;align-items:end}.product-form{grid-template-columns:repeat(4,minmax(150px,1fr)) auto}.edit-form input,.edit-form select{width:100%;min-width:0}canvas{display:block;width:100%;max-width:100%}.rank-list,.compact-list,.product-list,.detail-strip{display:grid;gap:8px}.rank-row,.owner-row,.product-row,.detail-item{display:grid;gap:8px;align-items:center}.rank-row{grid-template-columns:minmax(120px,1fr) minmax(120px,2fr) 96px}.owner-row,.product-row{grid-template-columns:minmax(110px,1fr) auto}.product-row{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);cursor:pointer;min-height:44px;padding:8px 10px;text-align:left}.product-row.active{border-color:var(--accent);background:var(--soft)}.bar-track{height:10px;overflow:hidden;border-radius:999px;background:#e9eeee}.bar-fill{height:100%;border-radius:inherit;background:var(--accent)}.table-toolbar{margin-bottom:12px}.table-wrap{overflow:auto;max-height:calc(100vh - 250px);border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}table{width:100%;min-width:980px;border-collapse:collapse}th,td{border-bottom:1px solid #e8eeee;padding:10px 12px;text-align:left;white-space:nowrap}th{position:sticky;top:0;z-index:1;background:#edf3f1;color:#435057;font-size:13px}td:nth-child(3),td:nth-child(6),th:nth-child(3),th:nth-child(6){text-align:right}.row-actions{display:flex;gap:6px}.row-actions button{min-height:30px;padding:0 9px;border-color:var(--line);background:#fff;color:var(--ink)}.row-actions button.delete{color:var(--accent2)}.detail-strip{grid-template-columns:repeat(3,minmax(120px,1fr));margin-top:14px}.detail-item{border:1px solid var(--line);border-radius:8px;padding:12px}.detail-item strong{font-size:18px}.toast{position:fixed;right:20px;bottom:20px;max-width:360px;padding:12px 14px;border-radius:8px;background:#203134;color:#fff;box-shadow:var(--shadow);opacity:0;pointer-events:none;transform:translateY(8px);transition:.2s ease}.toast.show{opacity:1;transform:translateY(0)}@media(max-width:1120px){.edit-form,.product-form{grid-template-columns:repeat(2,minmax(160px,1fr))}}@media(max-width:980px){.topbar{align-items:stretch;flex-direction:column}.metric-grid,.grid,.detail-strip{grid-template-columns:1fr}.filterbar label,.filterbar select,.filterbar input{min-width:0;width:100%}}@media(max-width:640px){.app{padding:16px}.tabs{overflow-x:auto}.tabs button{min-width:92px}.rank-row,.edit-form,.product-form{grid-template-columns:1fr}}.aggregate-grid{grid-template-columns:1fr}.table-wrap.compact{max-height:none}.table-wrap.compact table{min-width:1080px}.table-wrap.compact td:not(:first-child),.table-wrap.compact th:not(:first-child){text-align:right}.panel-head label{min-width:220px}.panel-head select{width:100%}

/* Cleaner spreadsheet-style alignment */
th { text-align: center; vertical-align: middle; }
td { vertical-align: middle; }
.table-wrap.compact th,
.table-wrap.compact td { text-align: center; }
.table-wrap.compact td:first-child,
.table-wrap.compact th:first-child { text-align: center; }
.table-wrap.compact td:nth-child(2),
.table-wrap.compact th:nth-child(2) { text-align: center; }
.table-wrap.compact td strong { display: inline-block; min-width: 88px; text-align: right; }
#recordsBody td:nth-child(1),
#recordsBody td:nth-child(4),
#recordsBody td:nth-child(5),
#recordsBody td:nth-child(6),
#recordsBody td:nth-child(8) { text-align: center; }
#recordsBody td:nth-child(2),
#recordsBody td:nth-child(7) { text-align: left; }
#recordsBody td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.product-row strong,
.product-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row strong,
.owner-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Product list: three-column catalog */
.product-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.product-row {
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 72px;
}
.product-row strong,
.product-row span {
  min-width: 0;
}
@media (max-width: 1180px) {
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .product-list { grid-template-columns: 1fr; }
}

/* Year picker and equal action buttons */
.title-row{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.year-picker{min-width:128px}.year-picker select{min-width:120px}.actions button,.actions .upload-button{height:38px;min-width:92px;font-size:14px;font-weight:600;line-height:1;padding:0 14px;white-space:nowrap}.actions{align-items:end}.topbar h1{white-space:nowrap}@media(max-width:640px){.title-row{align-items:stretch}.topbar h1{white-space:normal}.year-picker,.year-picker select{width:100%}.actions button,.actions .upload-button{flex:1 1 120px}}

/* Admin settings */
.admin-box{max-width:760px}.admin-lock,.admin-panel{display:grid;gap:14px}.admin-login-row{display:flex;gap:10px;align-items:center}.admin-login-row input{min-width:240px}.admin-actions{display:flex;flex-wrap:wrap;gap:10px}.danger{border-color:var(--accent2);background:var(--accent2);color:#fff}.password-form{grid-template-columns:repeat(2,minmax(180px,1fr)) auto}.actions button,.actions .upload-button{font-size:14px}@media(max-width:720px){.admin-login-row,.admin-actions,.password-form{display:grid;grid-template-columns:1fr}.admin-login-row input{min-width:0;width:100%}}


/* Admin icon actions */
.admin-action-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:132px;font-size:14px;font-weight:700}.admin-action-button .action-icon{font-size:16px;line-height:1}.password-form[hidden]{display:none}.password-form{margin-top:4px;padding-top:14px;border-top:1px solid var(--line)}

/* Admin locked/unlocked colors */
.admin-box-locked{border-color:#e3c56d;background:#fffaf0}
.admin-box-unlocked{border-color:#3d5f8f;background:#f3f6ff}
.admin-box-locked h2::before{content:'잠김 · ';color:#b1852f}
.admin-box-unlocked h2::before{content:none}

/* Admin lock icon */
#openAdmin{gap:7px}.admin-lock-icon{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;font-size:13px;line-height:1}.admin-lock-icon.is-locked{background:#f3d881;color:#6f4f11}.admin-lock-icon.is-unlocked{background:#dff3ed;color:#1f695c}

/* Admin inner lock button */
.admin-lock-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:92px;height:38px;border-radius:8px;font-weight:700}.admin-lock-button.is-locked{border-color:#b1852f;background:#fff7df;color:#6f4f11}.admin-lock-button.is-unlocked{border-color:#3d5f8f;background:#3d5f8f;color:#fff}.admin-panel-lock-icon{font-size:14px;line-height:1}

/* Login screen */
.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--paper)}.login-screen[hidden]{display:none}.login-card{width:min(420px,100%);display:grid;gap:14px;padding:24px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}.login-card h1{font-size:24px}.login-card p{color:var(--muted);font-size:14px}.login-card input{width:100%;min-width:0}.login-card button{width:100%}#logoutButton{border-color:#65757c;color:#405057;background:#fff}

.login-error{margin:0;padding:10px 12px;border:1px solid #d85f3d;border-radius:8px;background:#fff0ea;color:#9a321a;font-size:13px;font-weight:700}.login-error[hidden]{display:none}

/* Split monthly dashboard chart */
.split-chart{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch}.chart-half{min-width:0;border:1px solid var(--line);border-radius:8px;padding:10px;background:#fbfdfc}.chart-label{margin-bottom:8px;color:var(--muted);font-size:13px;font-weight:700;text-align:center}@media(max-width:900px){.split-chart{grid-template-columns:1fr}}


/* Bigger mixer and S/D labels */
.split-chart .chart-label{font-size:20px;font-weight:800;color:var(--ink);margin-bottom:10px}

/* Product grouped headings */
.product-group-heading{grid-column:1 / -1;margin-top:6px;padding:8px 10px;border-radius:8px;background:#edf3f1;color:#203134;font-weight:800;text-align:center}.product-group-heading:first-child{margin-top:0}

/* Daily record table alignment fix */
#records table th:nth-child(1),#records table th:nth-child(4),#records table th:nth-child(5),#records table th:nth-child(6),#records table th:nth-child(8),
#records table td:nth-child(1),#records table td:nth-child(4),#records table td:nth-child(5),#records table td:nth-child(6),#records table td:nth-child(8){text-align:center;vertical-align:middle}
#records table th:nth-child(3),#records table td:nth-child(3){text-align:right;vertical-align:middle;font-variant-numeric:tabular-nums}
#records table th:nth-child(2),#records table th:nth-child(7),#records table td:nth-child(2),#records table td:nth-child(7){text-align:left;vertical-align:middle}
#records .row-actions{justify-content:center;align-items:center}

/* Header text centered, body content preserved */
#records table thead th,
.table-wrap table thead th,
.table-wrap.compact table thead th { text-align:center !important; vertical-align:middle; }
#records table tbody td:nth-child(2),
#records table tbody td:nth-child(7) { text-align:left; }
#records table tbody td:nth-child(3) { text-align:right; }
#records table tbody td:nth-child(1),
#records table tbody td:nth-child(4),
#records table tbody td:nth-child(5),
#records table tbody td:nth-child(6),
#records table tbody td:nth-child(8) { text-align:center; }

/* Date sort header */
.table-sort-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:0;height:auto;border:0;background:transparent;color:inherit;padding:0;font-weight:800;cursor:pointer}.table-sort-button:hover{text-decoration:underline}.table-sort-button span{font-size:12px}

/* Bulk daily record entry */
.bulk-entry{grid-column:1 / -1;border:1px solid var(--line);border-radius:8px;background:#fbfdfc;padding:12px}.bulk-entry-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.extra-items{display:grid;gap:8px}.extra-item{display:grid;grid-template-columns:minmax(160px,1fr) minmax(140px,180px) auto;gap:10px;align-items:end}.extra-item select,.extra-item input{width:100%;min-width:0}.extra-item button{height:38px}@media(max-width:720px){.bulk-entry-head,.extra-item{grid-template-columns:1fr;display:grid}.bulk-entry-head button{width:100%}}

/* Inline multi-product entry */
.product-add-wrap{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}.icon-add-button,.icon-remove-button{width:38px;height:38px;min-width:38px;min-height:38px;padding:0;border-radius:8px;font-size:20px;font-weight:800;line-height:1}.icon-add-button{background:var(--accent);border-color:var(--accent);color:#fff}.icon-remove-button{background:#fff;border:1px solid var(--accent2);color:var(--accent2)}.inline-extra-items{grid-column:2 / 4;display:grid;gap:8px}.extra-item{display:grid;grid-template-columns:minmax(180px,1fr) minmax(130px,180px) 38px;gap:8px;align-items:end}.extra-item label{min-width:0}.extra-item select,.extra-item input{width:100%;min-width:0}@media(max-width:1120px){.inline-extra-items{grid-column:1 / -1}}@media(max-width:720px){.extra-item{grid-template-columns:1fr}.icon-remove-button{width:100%}}

/* Keep first row, add extra boxes below */
.quantity-add-wrap{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}.quantity-add-wrap input{width:100%;min-width:0}.inline-extra-items{grid-column:1 / -1;margin-top:2px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fbfdfc}.inline-extra-items:empty{display:none}.extra-item{padding:8px;border:1px solid #e8eeee;border-radius:8px;background:#fff}

/* Extra rows align under product and quantity */
.product-with-add{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}.product-with-add select{width:100%;min-width:0}.inline-extra-items{grid-column:1 / -1;display:grid;gap:8px;margin-top:-2px;padding:0;border:0;background:transparent}.inline-extra-items:empty{display:none}.extra-item{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr)) auto;gap:10px;align-items:end;padding:0;border:0;background:transparent}.extra-item label{min-width:0}.extra-item select,.extra-item input{width:100%;min-width:0}.extra-item .icon-remove-button{align-self:end}@media(max-width:1120px){.extra-item{grid-template-columns:repeat(2,minmax(160px,1fr))}.extra-item>div{display:none}}@media(max-width:640px){.extra-item{grid-template-columns:1fr}.extra-item>div{display:none}}

/* Final inline extra alignment */
#recordForm .inline-extra-items{grid-column:2 / 4;display:grid;gap:8px;margin-top:0;padding:0;border:0;background:transparent}
#recordForm .inline-extra-items:empty{display:none}
#recordForm .extra-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 38px;gap:10px;align-items:end;padding:0;border:0;background:transparent}
#recordForm .extra-item label{min-width:0}
#recordForm .extra-item select,#recordForm .extra-item input{width:100%;min-width:0}
@media(max-width:1120px){#recordForm .inline-extra-items{grid-column:1 / -1}#recordForm .extra-item{grid-template-columns:repeat(2,minmax(160px,1fr)) 38px}}
@media(max-width:640px){#recordForm .extra-item{grid-template-columns:1fr}#recordForm .extra-item .icon-remove-button{width:100%}}

/* Wider product column for daily entry */
#recordForm{grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) auto}
#recordForm .inline-extra-items{grid-column:2 / 4}
#recordForm .extra-item{grid-template-columns:minmax(220px,1.55fr) minmax(150px,1fr) 38px}
#recordForm .product-with-add{grid-template-columns:minmax(0,1fr) 38px}
@media(max-width:1120px){#recordForm{grid-template-columns:repeat(2,minmax(160px,1fr))}#recordForm .inline-extra-items{grid-column:1 / -1}#recordForm .extra-item{grid-template-columns:repeat(2,minmax(160px,1fr)) 38px}}
@media(max-width:640px){#recordForm{grid-template-columns:1fr}#recordForm .extra-item{grid-template-columns:1fr}}

/* Exact extra row alignment */
#recordForm .inline-extra-items{grid-column:1 / -1;display:grid;gap:8px;margin-top:0;padding:0;border:0;background:transparent}
#recordForm .extra-item{display:grid;grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) auto;gap:10px;align-items:end;padding:0;border:0;background:transparent}
#recordForm .extra-product-with-space{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}
#recordForm .add-space-placeholder{display:block;width:38px;height:38px}
#recordForm .extraProduct,#recordForm .extraQuantity{height:38px;width:100%;min-width:0}
#recordForm .extra-empty{min-height:1px}
@media(max-width:1120px){#recordForm .extra-item{grid-template-columns:repeat(2,minmax(160px,1fr)) 38px}#recordForm .extra-empty{display:none}#recordForm .extra-product-with-space{grid-template-columns:minmax(0,1fr) 38px}}
@media(max-width:640px){#recordForm .extra-item{grid-template-columns:1fr}#recordForm .add-space-placeholder{display:none}}

/* Extra row vertical alignment */
#recordForm .extra-item{align-items:start}
#recordForm .extra-item label{display:block;padding-top:18px}
#recordForm .extra-item label{font-size:0;color:transparent}
#recordForm .extra-item label select,#recordForm .extra-item label input{font-size:13px;color:var(--ink)}
#recordForm .extra-item .icon-remove-button{margin-top:18px}
#recordForm .extra-empty{padding-top:18px}
@media(max-width:640px){#recordForm .extra-item label,#recordForm .extra-item .icon-remove-button{padding-top:0;margin-top:0}}

/* Screenshot-aligned extra product rows */
#recordForm{grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) auto !important;align-items:end}
#recordForm .product-with-add,#recordForm .extra-product-with-space{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}
#recordForm .inline-extra-items{grid-column:1 / -1 !important;display:grid;gap:8px;margin-top:0;padding:0;border:0;background:transparent}
#recordForm .inline-extra-items:empty{display:none}
#recordForm .extra-item{display:grid !important;grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) auto !important;gap:10px;align-items:start;padding:0;border:0;background:transparent}
#recordForm .extra-item label{display:block;padding-top:0 !important;font-size:0;color:transparent;min-width:0}
#recordForm .extra-item label select,#recordForm .extra-item label input{height:38px;width:100%;min-width:0;font-size:13px;color:var(--ink)}
#recordForm .extra-empty{min-height:38px;padding-top:0 !important}
#recordForm .add-space-placeholder{display:block;width:38px;height:38px}
#recordForm .extra-item .icon-remove-button{margin-top:0 !important;align-self:start}
@media(max-width:1120px){#recordForm{grid-template-columns:repeat(2,minmax(160px,1fr)) !important}#recordForm .extra-item{grid-template-columns:repeat(2,minmax(160px,1fr)) 38px !important}#recordForm .extra-empty{display:none}}
@media(max-width:640px){#recordForm{grid-template-columns:1fr !important}#recordForm .extra-item{grid-template-columns:1fr !important}#recordForm .add-space-placeholder{display:none}}

/* Final same-column-width fix */
#recordForm{grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(188px,max-content) !important}
#recordForm .extra-item{grid-template-columns:minmax(120px,.95fr) minmax(220px,1.55fr) minmax(150px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(188px,max-content) !important}
#recordForm .extra-item .icon-remove-button{justify-self:end;width:38px;min-width:38px}
#recordForm .form-actions{justify-content:flex-start;min-width:188px}
@media(max-width:1120px){#recordForm{grid-template-columns:repeat(2,minmax(160px,1fr)) !important}#recordForm .extra-item{grid-template-columns:repeat(2,minmax(160px,1fr)) 38px !important}#recordForm .form-actions{min-width:0}}
@media(max-width:640px){#recordForm{grid-template-columns:1fr !important}#recordForm .extra-item{grid-template-columns:1fr !important}}

.login-user-badge{display:inline-flex;align-items:center;min-height:38px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:13px;font-weight:700;white-space:nowrap}
@media(max-width:640px){.login-user-badge{flex:1 1 120px;justify-content:center}}

.login-history-box{display:grid;gap:10px;margin-top:4px;padding-top:14px;border-top:1px solid var(--line)}.login-history-list{display:grid;gap:6px}.login-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}.login-history-row span{color:var(--muted);font-size:13px;white-space:nowrap}@media(max-width:640px){.login-history-row{align-items:flex-start;flex-direction:column}.login-history-row span{white-space:normal}}

.login-account-list-box{display:grid;gap:10px;margin-top:4px;padding-top:14px;border-top:1px solid var(--line)}

#productMonthlyBody tr.group-separator td{border-top:2px solid var(--accent)}
#productMonthlyBody tr.group-separator td:first-child{position:relative}

.read-only-user #records #productionPhotoBatch,.read-only-user #records .editor-panel,.read-only-user #products>.editor-panel,.read-only-user #notes .editor-panel{display:none}.login-account-row{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:5px 6px 5px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}.login-account-row:hover{border-color:var(--accent);background:var(--soft)}.login-account-main{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;min-width:0;min-height:32px;padding:3px 5px;border:0;background:transparent;color:var(--ink);text-align:left}.login-account-main:hover{background:transparent}.login-account-main span,.login-account-protected{color:var(--muted);font-size:13px;font-weight:700}.login-account-delete{flex:0 0 auto;min-width:58px;min-height:32px;padding:5px 10px;border:1px solid #e2b8ad;border-radius:6px;background:#fff8f5;color:#b6422c;font-weight:700}.login-account-delete:hover{border-color:#c84c35;background:#fff0eb}.login-account-protected{flex:0 0 58px;text-align:center}

/* Blue grid table theme */
:root{--ink:#071b33;--muted:#596d83;--line:#c9d7e8;--panel:#ffffff;--paper:#e8eef5;--accent:#1f5d9d;--accent2:#d25a43;--soft:#eaf3fc;--shadow:0 10px 24px rgba(32,59,92,.09)}
body{background:var(--paper);color:var(--ink)}
.app{max-width:1688px;padding:20px 28px 28px}
.topbar{align-items:flex-end;margin-bottom:12px}
.metric,.panel,.editor-panel,.filterbar,.login-card{border-color:#cfdbea;border-radius:6px;box-shadow:0 8px 20px rgba(24,56,88,.07)}
.panel,.editor-panel,.filterbar{background:#fff}
button,.upload-button{border-color:var(--accent);background:var(--accent);border-radius:6px;font-weight:700}
.light{border-color:#bccada;background:#fff;color:#37566f}
.light:hover,.row-actions button:hover,.product-row:hover{border-color:var(--accent);background:#f1f7fd;color:var(--accent)}
.tabs{gap:7px;margin-bottom:14px;border-bottom:0}
.tabs button{height:42px;border:1px solid #c2cede;border-radius:6px;background:#fff;color:#53677d;font-weight:800;box-shadow:0 1px 0 rgba(0,0,0,.03)}
.tabs button.active{border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:none}
.table-wrap{border:1px solid #b8c9dc;border-radius:6px;background:#fff;box-shadow:0 8px 20px rgba(28,58,91,.07)}
table{border-collapse:collapse;background:#fff}
th,td{border:1px solid #cfdbea;border-top:0;border-left:0;padding:10px 11px;color:#061a31}
th:first-child,td:first-child{border-left:0}
th{background:#d9e7f6;color:#061a31;font-weight:800;border-bottom:2px solid #8faac8;text-align:center !important}
tbody tr:nth-child(even) td{background:#fbfdff}
tbody tr:hover td{background:#f0f7ff}
td:nth-child(3),td:nth-child(6),th:nth-child(3),th:nth-child(6){font-variant-numeric:tabular-nums}
.table-wrap.compact td:not(:first-child),.table-wrap.compact th:not(:first-child){text-align:center}
.table-wrap.compact td strong{min-width:auto;text-align:inherit}
#records table tbody td:nth-child(3){text-align:right}
#records table tbody td:nth-child(6){text-align:center;vertical-align:middle}
#records table tbody td:nth-child(2),#records table tbody td:nth-child(7){text-align:left}
.product-row,.detail-item,.login-history-row,.login-account-row{border-color:#cfdbea;border-radius:6px;background:#fff}
.product-row.active{border-color:var(--accent);background:#e8f2fc}
.product-group-heading{background:#d9e7f6;color:#061a31;border:1px solid #c5d5e8;border-radius:6px}
.row-actions button{border-color:#b8c9dc;background:#fff;color:#1a426b;border-radius:6px;font-weight:700}
.row-actions button.delete{border-color:#e2b8ad;color:#b6422c;background:#fff8f5}
input,select{border-color:#c4d3e4;border-radius:6px;color:#061a31}
input:focus,select:focus{outline:2px solid #a9c9eb;outline-offset:1px;border-color:var(--accent)}
.login-user-badge{border-color:#b8c9dc;border-radius:6px;background:#fff;color:#233f5d}
.chart-half{border-color:#cfdbea;background:#fbfdff;border-radius:6px}
#productMonthlyBody tr.group-separator td{border-top:2px solid #6e93bb}

/* Product monthly equal month columns */
.product-monthly-table{table-layout:fixed;min-width:1320px}
.product-monthly-table th:nth-child(1),.product-monthly-table td:nth-child(1){width:190px;min-width:190px;text-align:left}
.product-monthly-table th:nth-child(2),.product-monthly-table td:nth-child(2){width:86px;min-width:86px;text-align:center}
.product-monthly-table th:nth-child(n+3):nth-child(-n+14),.product-monthly-table td:nth-child(n+3):nth-child(-n+14){width:78px;min-width:78px;text-align:right;font-variant-numeric:tabular-nums}
.product-monthly-table th:nth-child(15),.product-monthly-table td:nth-child(15){width:108px;min-width:108px;text-align:right;font-variant-numeric:tabular-nums}
.product-monthly-table td strong{display:block;min-width:0;text-align:inherit}

/* Line monthly equal month columns */
.line-monthly-table{table-layout:fixed;min-width:1180px}
.line-monthly-table th:nth-child(1),.line-monthly-table td:nth-child(1){width:160px;min-width:160px;text-align:center}
.line-monthly-table th:nth-child(n+2):nth-child(-n+13),.line-monthly-table td:nth-child(n+2):nth-child(-n+13){width:78px;min-width:78px;text-align:right;font-variant-numeric:tabular-nums}
.line-monthly-table th:nth-child(14),.line-monthly-table td:nth-child(14){width:112px;min-width:112px;text-align:right;font-variant-numeric:tabular-nums}
.line-monthly-table td strong{display:block;min-width:0;text-align:inherit}

/* Autosave settings */
.autosave-box{display:grid;gap:10px;margin-top:4px;padding-top:14px;border-top:1px solid var(--line)}
.autosave-form{display:grid;grid-template-columns:minmax(180px,240px) auto;gap:10px;align-items:end}
.autosave-form input{width:100%;min-width:0}
@media(max-width:720px){.autosave-form{grid-template-columns:1fr}.autosave-form .form-actions{width:100%}}

/* Daily special notes */
.note-form{grid-template-columns:minmax(140px,.9fr) minmax(180px,1fr) minmax(140px,.8fr) minmax(280px,2fr) auto}
.note-content-field textarea{width:100%;min-height:38px;resize:vertical;border:1px solid var(--line);border-radius:6px;padding:8px 10px;font:inherit;color:var(--ink)}
.notes-table{min-width:980px;table-layout:fixed}
.notes-table th:nth-child(1),.notes-table td:nth-child(1){width:130px;text-align:center}
.notes-table th:nth-child(2),.notes-table td:nth-child(2){width:160px;text-align:center}
.notes-table th:nth-child(3),.notes-table td:nth-child(3){white-space:normal;text-align:left;line-height:1.45}
.notes-table th:nth-child(4),.notes-table td:nth-child(4){width:120px;text-align:center}
.notes-table th:nth-child(5),.notes-table td:nth-child(5){width:140px;text-align:center}
@media(max-width:1120px){.note-form{grid-template-columns:repeat(2,minmax(160px,1fr))}.note-content-field{grid-column:1 / -1}}
@media(max-width:640px){.note-form{grid-template-columns:1fr}}

/* Module launcher */
.module-screen{min-height:100vh;background:var(--paper);padding:28px;display:grid;place-items:center}
.module-screen[hidden]{display:none}
.module-shell{width:min(960px,100%);display:grid;gap:20px}
.module-head h1{font-size:30px;color:var(--ink)}
.module-head p{margin-top:6px;color:var(--muted);font-size:14px}
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,260px));gap:14px}
.module-card{display:grid;justify-items:start;gap:10px;min-height:188px;padding:22px;border:1px solid #b8c9dc;border-radius:8px;background:#fff;color:var(--ink);box-shadow:0 8px 20px rgba(28,58,91,.07);text-align:left}
.module-card:hover{border-color:var(--accent);background:#f3f8fe}
.module-icon{display:inline-grid;place-items:center;width:72px;height:72px;border-radius:16px;background:var(--accent);color:#fff;font-size:20px;font-weight:900;letter-spacing:0}
.module-card strong{font-size:20px;color:#061a31}
.module-card small{color:var(--muted);font-size:13px;line-height:1.5}
.module-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px}
@media(max-width:640px){.module-screen{padding:18px}.module-grid{grid-template-columns:1fr}.module-footer{align-items:stretch;flex-direction:column}.module-footer button{width:100%}}

/* Coming soon modules */
.module-icon.material{background:#6a7d96}
.module-icon.quality{background:#7b68a6}
.coming-soon-screen{min-height:100vh;background:var(--paper);display:grid;place-items:center;padding:28px}
.coming-soon-screen[hidden]{display:none}
.coming-soon-card{width:min(420px,100%);display:grid;justify-items:center;gap:14px;padding:30px;border:1px solid #b8c9dc;border-radius:8px;background:#fff;box-shadow:0 8px 20px rgba(28,58,91,.07);text-align:center}
.coming-soon-card h1{font-size:26px;color:var(--ink)}
.coming-soon-card p{color:var(--muted);font-size:15px;font-weight:700}

/* Embedded material app */
.embedded-app-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid #b8c9dc;border-radius:8px;background:#fff;box-shadow:0 8px 20px rgba(28,58,91,.07)}
.embedded-app-bar>div{display:grid;gap:2px}.embedded-app-bar strong{font-size:18px;color:var(--ink)}.embedded-app-bar span{font-size:13px;color:var(--muted)}

/* Header module switcher */
.module-switcher{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.module-chip{height:34px;min-height:34px;min-width:58px;padding:0 12px;border:1px solid #b8c9dc;border-radius:8px;background:#fff;color:#37566f;font-size:14px;font-weight:900;box-shadow:0 1px 0 rgba(0,0,0,.03)}
.module-chip.active{border-color:var(--accent);background:var(--accent);color:#fff}
.module-chip:hover{border-color:var(--accent);background:#eef6ff;color:var(--accent)}
.module-chip.active:hover{background:var(--accent);color:#fff}
.coming-soon-card{width:min(420px,100%);display:grid;justify-items:center;gap:14px;padding:30px;border:1px solid #b8c9dc;border-radius:8px;background:#fff;box-shadow:0 8px 20px rgba(28,58,91,.07);text-align:center}
@media(max-width:640px){.module-switcher{width:100%}.module-chip{flex:1 1 30%}}

/* Unified module layout */
.module-content{display:block}
.embedded-app-screen{min-height:0;padding:0;background:transparent}
.embedded-app-screen[hidden]{display:none}
.embedded-app-frame{width:100%;height:calc(100vh - 176px);border:1px solid #b8c9dc;border-radius:8px;background:#fff;box-shadow:0 8px 20px rgba(28,58,91,.07)}
.coming-soon-screen{display:grid;place-items:center;min-height:calc(100vh - 176px);padding:16px;background:transparent}
.coming-soon-screen[hidden]{display:none}
@media(max-width:640px){.embedded-app-frame{height:calc(100vh - 230px)}}

/* Unified module visibility */
.module-dashboard .production-tabs,.module-material .production-tabs,.module-quality .production-tabs{display:none}
.module-dashboard .material-tabs,.module-production .material-tabs,.module-quality .material-tabs{display:none}
.module-dashboard #periodText,.module-material #periodText,.module-quality #periodText{display:none}
.module-dashboard .filterbar,.module-material .filterbar,.module-quality .filterbar{display:none}
.module-material .embedded-app-screen{margin-top:4px}
.module-material .embedded-app-frame{height:auto;min-height:calc(100vh - 176px);border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}
.production-daily-view{margin:0 -2px}
.production-daily-frame{display:block;width:100%;height:calc(100vh - 176px);min-height:760px;border:0;background:transparent;overflow:hidden}
.production-plan-view{margin:0 -2px}
.production-plan-frame{display:block;width:100%;height:calc(100vh - 176px);min-height:720px;border:0;background:transparent;overflow:hidden}
.module-production:not(.view-records) .filterbar{display:none}
.module-quality .embedded-app-screen{margin-top:4px}
.module-quality .embedded-app-frame{height:auto;min-height:calc(100vh - 176px);border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}

/* PNFS integrated header */
.topbar{align-items:center;border:1px solid #d5dee9;border-radius:6px;background:#fff;padding:12px;height:86px;min-height:86px;overflow:hidden}
.title-row{align-items:center;gap:18px}
.brand-title{font-size:22px;font-weight:900;color:#143a67;white-space:nowrap}
.module-switcher{gap:0;flex-wrap:nowrap}
.module-chip{position:relative;height:30px;min-height:30px;min-width:auto;padding:0 15px;border:0;border-radius:0;background:transparent;color:#0c2b4c;box-shadow:none;font-size:15px}
.module-chip:not(:last-child)::after{content:"|";position:absolute;right:-2px;top:50%;transform:translateY(-50%);color:#2f608f;font-weight:800}
.module-chip.active{background:transparent;color:var(--accent);text-decoration:underline;text-underline-offset:7px;text-decoration-thickness:2px}
.module-chip:hover,.module-chip.active:hover{background:#eef5fc;color:var(--accent)}
.year-picker{margin-left:auto}
.topbar>.actions{flex-wrap:nowrap;align-items:center}
.topbar>div:first-child{display:grid;gap:4px;min-width:0}
#periodText{display:none}
.module-material .material-tabs{display:flex}
.module-quality .material-tabs{display:none!important}
.production-tabs[hidden],.material-tabs[hidden]{display:none!important}
.module-page-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 10px;padding:12px 14px;border:1px solid #d5dee9;border-radius:6px;background:#fff;color:#061a31;font-size:22px;line-height:1.25;font-weight:900}
.module-page-title>span{white-space:nowrap}
.module-page-title .production-tabs{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0;border:0;flex-wrap:wrap}
.module-page-title .production-tabs button{height:36px;min-height:36px;padding:0 12px;font-size:16px}
.module-material .module-page-title,.module-quality .module-page-title{display:none}
.filterbar{display:none}
.module-production.view-records .filterbar{display:flex}
.form-actions button[type="submit"],
#records .form-actions button[type="submit"],
#products .form-actions button[type="submit"],
#notes .form-actions button[type="submit"]{height:38px;min-height:38px;border-color:var(--accent);background:var(--accent);color:#fff;font-size:14px;font-weight:700}

/* Integrated dashboard */
.module-dashboard .module-page-title{display:flex}
.integrated-grid{grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);margin-top:14px}
.integrated-material-panel{grid-column:1 / -1}
.integrated-metrics{margin-bottom:0}
@media(max-width:900px){.module-page-title{align-items:flex-start;flex-direction:column}.module-page-title .production-tabs{justify-content:flex-start;width:100%}}
@media(max-width:900px){.topbar{align-items:stretch}.title-row{align-items:flex-start;flex-direction:column;gap:8px}.year-picker{margin-left:0}.module-switcher{width:100%;overflow:auto}.module-chip{flex:0 0 auto}}

/* Unified coral workspace style */
:root{--ink:#101421;--muted:#687180;--line:#e5e9ef;--panel:#fff;--paper:#eef8fc;--accent:#ff4b4b;--accent2:#dd3737;--soft:#fff2f2;--shadow:0 14px 34px rgba(31,48,72,.07)}
body{background:linear-gradient(90deg,#fff 0 58%,#eef8fc 58%);font-family:"Pretendard","Noto Sans KR","Segoe UI","Malgun Gothic",Arial,sans-serif}
.app{max-width:none;padding:18px 4.5vw 30px}.topbar{height:82px;min-height:82px;padding:10px 18px;border-color:var(--line);border-radius:8px;box-shadow:0 10px 28px rgba(31,48,72,.06)}
.brand-lockup{display:flex;align-items:center;gap:11px;min-width:285px}.brand-logo{width:112px;height:52px;object-fit:contain}.brand-title{font-size:21px;color:#111827;font-weight:900}
.module-switcher{margin-left:8px;gap:25px}.module-chip{height:42px;min-height:42px;padding:0 2px;color:#141b2a;font-weight:850}.module-chip:not(:last-child)::after{display:none}.module-chip.active{color:var(--accent);text-decoration:none}.module-chip.active::before{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--accent);border-radius:3px}.module-chip:hover,.module-chip.active:hover{background:transparent;color:var(--accent)}
.topbar .actions>button,#exportExcel{border-color:var(--line);background:#fff;color:#1c2637;font-weight:750}.topbar .actions>button:hover,#exportExcel:hover{border-color:var(--accent);color:var(--accent)}.login-user-badge{border-color:var(--line);background:#f9fafb;color:#283246}
.module-page-title{min-height:58px;padding:9px 16px;border-color:var(--line);border-radius:8px;box-shadow:0 12px 28px rgba(31,48,72,.05)}.module-page-title>span{font-size:23px;color:#111827}.module-page-title .production-tabs{gap:18px}.module-page-title .production-tabs button{padding:0 2px;border-bottom:3px solid transparent;color:#202838;font-weight:800}.module-page-title .production-tabs button.active{border-bottom-color:var(--accent);color:var(--accent)}
.metric,.panel,.editor-panel,.filterbar,.table-wrap{border-color:var(--line);border-radius:8px;box-shadow:var(--shadow)}.panel-head h2,.table-toolbar h2{color:#111827}.filterbar{background:#fff}.edit-form input,.edit-form select,select,input{border-color:#d5dce6}.edit-form input:focus,.edit-form select:focus,input:focus,select:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(255,75,75,.1)}
button,.upload-button{border-color:var(--accent);background:var(--accent)}button:hover,.upload-button:hover{filter:brightness(.97)}.light{border-color:var(--line);background:#fff;color:#222c3b}.form-actions button[type="submit"],#records .form-actions button[type="submit"],#products .form-actions button[type="submit"],#notes .form-actions button[type="submit"]{border-color:var(--accent);background:var(--accent)}
th{background:#f7f9fb;color:#384152}tbody tr:hover td{background:#fffafa}.bar-fill{background:var(--accent)}.product-row.active{border-color:var(--accent);background:var(--soft)}
.login-screen{background:linear-gradient(120deg,#fff 0 50%,#eef8fc 50%)}.login-card{width:min(430px,calc(100vw - 32px));padding:30px;border-color:var(--line);border-radius:8px;box-shadow:0 24px 60px rgba(31,48,72,.14);text-align:center}.login-brand-logo{display:block;width:112px;height:72px;object-fit:contain;margin:0 auto 8px}.login-card h1{font-size:27px;color:#111827}.login-card p,.login-card label{text-align:left}.login-card button{background:var(--accent);border-color:var(--accent)}
@media(max-width:1050px){.app{padding:14px}.brand-lockup{min-width:0}.brand-title{display:none}.module-switcher{gap:14px}.topbar{height:auto;min-height:82px}}

/* Production title and context menus */
.production-mode-tabs{display:flex;align-items:center;align-self:stretch;gap:22px;margin-right:auto}
.production-mode-tabs[hidden]{display:none!important}
.production-mode-tabs button{height:42px;min-height:42px;padding:0 2px;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#687180;font-size:23px;font-weight:900;white-space:nowrap}
.production-mode-tabs button.active{border-bottom-color:var(--accent)!important;background:transparent!important;color:var(--accent)!important}
.production-mode-tabs button:hover{background:transparent!important;color:var(--accent);filter:none}
.production-daily-tabs button{font-size:15px!important}
#productionTabs button,#productionDailyTabs button{border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#202838!important}
#productionTabs button.active,#productionDailyTabs button.active{border-bottom-color:var(--accent)!important;background:transparent!important;color:var(--accent)!important}
#productionTabs button:hover,#productionDailyTabs button:hover{background:transparent!important;color:var(--accent)!important;filter:none}
@media(max-width:1100px){.module-page-title{align-items:flex-start;flex-wrap:wrap}.production-mode-tabs{align-self:auto;min-height:44px}.module-page-title .production-tabs{width:100%;justify-content:flex-start}}

/* Maintenance module */
.module-maintenance .production-tabs,.module-maintenance .material-tabs,.module-maintenance #periodText,.module-maintenance .filterbar,.module-maintenance .module-page-title{display:none!important}
.module-maintenance .embedded-app-screen{margin-top:4px}
.module-maintenance .embedded-app-frame{height:auto;min-height:calc(100vh - 176px);border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}


/* 2026-09-10: shared typography, controls, and action alignment */
:root{--control-height:40px;--control-radius:6px}
body{font-size:14px;line-height:1.45}
button,.upload-button,input,select,textarea{font-size:14px;letter-spacing:0}
button,.upload-button{white-space:nowrap}
input,select{min-height:var(--control-height)}
.topbar{min-height:82px}
.topbar>.actions{gap:8px}
.topbar>.actions>button,.topbar>.actions>.upload-button{height:var(--control-height);min-height:var(--control-height);padding:0 14px;border-radius:var(--control-radius)}
.module-chip,.production-mode-tabs button,.module-page-title .production-tabs button{white-space:nowrap}
.module-page-title{min-height:60px}
.module-page-title>span,.production-mode-tabs button{font-size:22px}
.production-mode-tabs button{font-size:16px}
.admin-box>.admin-lock,.admin-panel>.panel-head{display:none!important}
.module-page-title .production-tabs button,.production-daily-tabs button{height:42px;min-height:42px;font-size:15px!important}
.filterbar label,.edit-form label{font-size:13px}
.edit-form input,.edit-form select{height:var(--control-height);min-height:var(--control-height);font-size:14px}
.panel-head h2,.table-toolbar h2{font-size:18px}
th{font-size:13px}
td{font-size:14px}
.form-actions{display:flex;align-items:flex-end;gap:8px;flex-wrap:nowrap}
.form-actions button{height:var(--control-height)!important;min-height:var(--control-height)!important;min-width:92px;padding:0 14px;white-space:nowrap}
.row-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}
.row-actions button{min-width:44px;white-space:nowrap}

/* Mobile access and phone layout */
.mobile-access-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:18px;background:rgba(17,24,39,.48)}
.mobile-access-modal[hidden]{display:none}
.mobile-access-dialog{width:min(390px,100%);display:grid;gap:16px;padding:20px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 24px 70px rgba(17,24,39,.24)}
.mobile-access-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mobile-access-head h2{font-size:20px;color:var(--ink)}
.mobile-close-button{width:38px;min-width:38px;height:38px;padding:0;border:1px solid var(--line);background:#fff;color:#4b5563;font-size:24px;line-height:1}
.mobile-qr-frame{display:grid;place-items:center;min-height:250px;padding:12px;border:1px solid var(--line);border-radius:6px;background:#fff}
.mobile-qr-frame img{display:block;width:240px;height:240px;max-width:100%;object-fit:contain;image-rendering:pixelated}
.mobile-qr-frame span{color:var(--muted);font-weight:700}
.mobile-url-label{display:grid;gap:6px;color:var(--muted);font-size:13px;font-weight:700}
.mobile-url-label input{width:100%;background:#f8fafc;color:var(--ink);font-weight:700;text-align:center}
.mobile-access-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mobile-access-actions button:only-child{grid-column:1 / -1}
.modal-open{overflow:hidden}
.login-card .login-mobile-access{border:1px solid var(--line);background:#fff;color:#27364a}
.login-card .login-mobile-access:hover{border-color:var(--accent);color:var(--accent)}

@media(max-width:720px){
  body{background:#eef8fc}
  .app{padding:8px 8px max(16px,env(safe-area-inset-bottom))}
  .topbar{height:auto;min-height:0;padding:10px;align-items:stretch;flex-direction:column;gap:10px;overflow:visible}
  .topbar>div:first-child{width:100%}
  .title-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
  .brand-lockup{min-width:0;gap:7px}
  .brand-logo{width:88px;height:40px}
  .brand-title{font-size:18px}
  .year-picker{grid-column:2;margin:0;font-size:12px}
  .year-picker select{min-width:78px;height:36px;min-height:36px}
  .module-switcher{grid-column:1 / -1;margin:0;padding:2px 0 5px;gap:18px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
  .module-chip{height:38px;min-height:38px;font-size:15px;flex:0 0 auto}
  .topbar>.actions{display:flex;width:100%;gap:6px;overflow-x:auto;padding-bottom:2px}
  .topbar>.actions>button,.topbar>.actions>.upload-button,.login-user-badge{height:38px;min-height:38px;flex:0 0 auto;padding:0 11px;font-size:13px}
  .module-page-title{min-height:52px;padding:8px 10px;gap:8px;overflow:hidden}
  .module-page-title>span{font-size:20px}
  .production-mode-tabs,.module-page-title .production-tabs{width:100%;justify-content:flex-start;gap:15px;overflow-x:auto;flex-wrap:nowrap}
  .module-page-title .production-tabs button,.production-mode-tabs button{font-size:14px!important;flex:0 0 auto}
  .filterbar{padding:10px;overflow-x:auto;flex-wrap:nowrap}
  .filterbar label{min-width:150px;flex:0 0 150px}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid,.integrated-grid{grid-template-columns:1fr}
  .panel,.editor-panel{padding:12px}
  .panel-head{align-items:flex-start;gap:6px}
  .embedded-app-frame,.production-daily-frame,.production-plan-frame{height:calc(100vh - 190px);min-height:680px}
  .mobile-access-dialog{padding:16px}
  .mobile-qr-frame{min-height:226px}
  .mobile-qr-frame img{width:216px;height:216px}
}

/* Production label photo batch entry */
.toolbar-actions{display:flex;align-items:center;gap:8px}
.production-photo-batch{margin-bottom:14px;padding:16px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}
.production-photo-batch[hidden]{display:none}
.photo-batch-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.photo-batch-head>div{display:grid;gap:4px}.photo-batch-head h2{font-size:18px}.photo-batch-head span{color:var(--muted);font-size:13px}
.photo-batch-tools{display:grid;grid-template-columns:180px 200px auto auto minmax(120px,1fr);gap:10px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:6px;background:#f8fafc}
.photo-batch-tools label{min-width:0}.photo-batch-tools input{width:100%;min-width:0}
.photo-batch-picker{display:inline-grid!important;place-items:center;align-self:end;height:40px;padding:0 14px;border:1px solid var(--accent);border-radius:6px;background:var(--accent);color:#fff!important;font-size:14px!important;font-weight:800;cursor:pointer;white-space:nowrap}
.photo-batch-picker input{display:none}
.photo-file-picker{border-color:#bdc9d8;background:#fff;color:var(--text)!important}
.production-photo-batch-list{display:grid;gap:8px;margin-top:12px}
.photo-batch-empty{padding:28px;border:1px dashed #c8d1dc;border-radius:6px;color:var(--muted);text-align:center}
.photo-batch-row{display:grid;grid-template-columns:96px minmax(220px,1.5fr) minmax(140px,.8fr) minmax(130px,.75fr) minmax(120px,.65fr) 42px;gap:10px;align-items:end;padding:10px;border:1px solid var(--line);border-radius:6px;background:#fff}
.photo-batch-row.needs-review{border-left:4px solid #ef9f32}
.photo-batch-thumb{align-self:stretch;width:96px;height:82px;border:1px solid var(--line);border-radius:5px;background:#f2f4f7;object-fit:cover}
.photo-batch-row label{min-width:0}.photo-batch-row select,.photo-batch-row input{width:100%;min-width:0}
.photo-read-status{align-self:center;min-width:0;color:var(--muted);font-size:12px;line-height:1.35;white-space:normal}
.photo-read-status.complete{color:#177153;font-weight:700}.photo-read-status.review{color:#a56209;font-weight:700}
.photo-recognition-state{align-self:center;display:grid;gap:5px;min-width:0}.photo-retry-button{height:30px;min-height:30px;padding:0 9px;font-size:12px}
.photo-batch-remove{width:38px;min-width:38px;height:40px;padding:0;border-color:#e6aaa4;background:#fff;color:#c63d32;font-size:20px}
.photo-batch-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}
.record-photo-button{height:32px;min-height:32px;padding:0 10px;border:1px solid #9fc5b8;background:#fff;color:#17634f;font-weight:700}
.record-photo-viewer{position:fixed;inset:0;z-index:3100;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.68)}
.record-photo-viewer[hidden]{display:none}
.record-photo-viewer-card{width:min(940px,100%);max-height:92vh;display:grid;gap:12px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 28px 80px rgba(15,23,42,.28)}
.record-photo-viewer-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.record-photo-viewer-card h2{font-size:18px}.record-photo-viewer-card>div button{width:38px;min-width:38px;height:38px;padding:0;font-size:22px}
.record-photo-viewer-card img{display:block;max-width:100%;max-height:76vh;margin:auto;object-fit:contain}
@media(max-width:980px){.photo-batch-tools{grid-template-columns:repeat(2,minmax(150px,1fr))}.photo-batch-row{grid-template-columns:82px minmax(180px,1.4fr) minmax(120px,.8fr) minmax(120px,.8fr) 110px 38px}.photo-batch-thumb{width:82px}}
@media(max-width:680px){.table-toolbar{align-items:stretch;flex-direction:column}.toolbar-actions{width:100%}.toolbar-actions button{flex:1}.photo-batch-head{align-items:flex-start}.photo-batch-tools{grid-template-columns:1fr}.photo-batch-picker{width:100%}.photo-batch-row{grid-template-columns:72px minmax(0,1fr) 38px;align-items:start}.photo-batch-thumb{grid-row:1 / 3;width:72px;height:72px}.photo-batch-row label{grid-column:2 / 3}.photo-recognition-state{grid-column:1 / 3;grid-template-columns:1fr auto;align-items:center}.photo-batch-remove{grid-column:3;grid-row:1}.photo-batch-actions button{flex:1}.record-photo-viewer{padding:8px}.record-photo-viewer-card{max-height:96vh}}

@media screen{.filterbar #downloadCsv{margin-inline-start:auto;align-self:flex-end;flex-shrink:0}}

.production-record-pager{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:8px 0;font-size:13px}.production-record-pager button{min-height:30px;padding:4px 12px}

#admin .admin-box {max-width:none;width:100%;box-sizing:border-box}
.admin-columns {display:grid;grid-template-columns:minmax(0,3fr) minmax(265px,2fr);align-items:start;gap:clamp(14px,2vw,28px)}
.admin-management {min-width:0;display:grid;gap:16px}
#admin .login-history-box,#admin .login-account-list-box {margin:0;padding:14px;border:1px solid var(--line);border-radius:9px;min-width:0}
#admin .login-history-box .panel-head,#admin .login-account-list-box .panel-head {margin:0}
#admin #loginHistoryList {max-height:clamp(240px,60vh,640px);overflow:auto;overscroll-behavior:contain}
#admin .account-group {min-width:0;border:1px solid var(--line);border-radius:7px;overflow:hidden}
#admin .account-group summary {display:flex;align-items:center;gap:9px;min-height:38px;padding:4px 12px;cursor:pointer;list-style:none}
#admin .account-group summary::-webkit-details-marker {display:none}
#admin .account-group summary::after {content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-inline:4px}
#admin .account-group[open] summary::after {transform:rotate(45deg)}
#admin .account-group-count {margin-left:auto;font-size:.9em}
#admin .account-group-icon {display:inline-grid;place-items:center;width:22px;height:22px;flex:none}
#admin .account-group .login-account-row {border-width:1px 0 0;border-radius:0;flex-wrap:wrap}
#admin .account-group .login-account-main {flex:1 1 140px;flex-wrap:wrap;text-align:left}
#admin summary:focus-visible {outline:2px solid currentColor;outline-offset:-3px}
@media(max-width:1000px){.admin-columns{grid-template-columns:minmax(0,1fr)}#admin #loginHistoryList{max-height:320px}}

#workErrorToggle{min-width:36px;width:36px;padding-inline:0;flex:0 0 36px}#workErrorPanel[hidden]{display:none}
