* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; color: #142132; background: #eef3f7; font-size: 14px; }
.shell { max-width: 1800px; margin: 0 auto; padding: 16px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; padding:18px 20px; background:#fff; border:1px solid #d8e2ea; border-radius:18px; box-shadow:0 8px 24px rgba(15,23,42,.05); }
.topbar h1 { margin:0 0 4px; font-size:28px; }
.topbar p { margin:0; color:#617385; font-size:14px; }
.upload { display:inline-flex; align-items:center; gap:10px; padding:12px 14px; background:#f8fafc; border:1px solid #d8e2ea; border-radius:14px; font-weight:700; }
.tabs,.toolbar,.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.tabs { margin-bottom:12px; }
.tab,.btn { appearance:none; border:1px solid #cdd7e1; background:#fff; color:#142132; border-radius:12px; padding:10px 14px; font-weight:700; cursor:pointer; font-size:14px; }
.tab.active,.btn.primary { background:#0f2743; color:#fff; border-color:#0f2743; }
.btn.light { background:#edf2f7; }
.toolbar { margin-bottom:14px; padding:14px; background:#fff; border:1px solid #d8e2ea; border-radius:16px; }
.toolbar input[type="search"],.toolbar input[type="date"],.toolbar select,.manualGrid input,.manualGrid select,.groupPlanGrid input,.groupPlanGrid select,.frissonUsersGrid input { padding:10px 12px; border:1px solid #cdd7e1; border-radius:12px; background:#fff; font-size:14px; width:100%; min-width:0; }
#searchInput { min-width:280px; flex:1 1 280px; }
.grid { display:grid; grid-template-columns:1fr; gap:16px; align-items:start; }
.panel,.boardCard,.dayCard,.skuCard,.orderCard { background:#fff; border:1px solid #d8e2ea; border-radius:16px; box-shadow:0 8px 24px rgba(15,23,42,.05); }
.panel,.boardCard { padding:16px; }
.panel h3,.boardCard h3 { margin:0 0 12px; font-size:24px; }
.small { color:#617385; font-size:13px; }
.note { margin-top:12px; padding:12px; border-radius:12px; background:#f8fafc; color:#516274; font-size:13px; }
.skuList,.multiCols { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.skuList {
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  align-content: start;
}
.cardList { display:flex; flex-direction:column; gap:12px; }
.skuCard,.orderCard,.dayCard { padding:14px; }
.skuCard.warn { border-color:#f4b76a; background:#fffaf4; }
.skuHead { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.skuTitle { font-size:16px; font-weight:700; line-height:1.2; margin-bottom:4px; }
.skuSub { color:#617385; font-size:13px; margin-bottom:6px; }
.meta { color:#314457; font-size:13px; line-height:1.45; }
.statusTag { display:inline-block; margin-top:4px; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.statusTag.ready { background:#dcfce7; color:#166534; }
.statusTag.forward { background:#e5e7eb; color:#475569; }
.groupPlanBox,.manualBox { margin-top:12px; padding:14px; border-radius:14px; border:1px solid #d8e2ea; background:#f8fafc; }
.groupPlanBox h4 { margin:0 0 8px; font-size:16px; }
.groupPlanBox p { margin:0 0 12px; color:#516274; font-size:13px; line-height:1.45; }
.groupOrderChecks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.groupOrderChecks label { display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid #d8e2ea; border-radius:12px; background:#fff; }
.manualGrid,.groupPlanGrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:end; }
.groupPlanGrid > div:nth-child(5) { grid-column:1 / 3; }
.groupPlanGrid > div:nth-child(6) { grid-column:3 / 4; }
.manualGrid label,.groupPlanGrid label { display:block; margin-bottom:6px; font-size:12px; font-weight:700; color:#516274; white-space:nowrap; }
.manualGrid .btn,.groupPlanGrid .btn { width:100%; min-height:46px; }
.boardWrap { overflow:auto; }
.board { min-width:1400px; }
.hours,.row { display:grid; grid-template-columns:200px minmax(0,1fr); }
.hours { border-bottom:1px solid #d8e2ea; }
.hours .left,.rowLabel { padding:12px; background:#f8fafc; font-weight:700; }
.hours .right { display:grid; }
.hour { padding:10px 0; text-align:center; border-left:1px solid #e4ebf0; font-size:11px; color:#617385; font-weight:700; }
.row { min-height:108px; border-bottom:1px solid #d8e2ea; }
.laneCode { font-size:18px; font-weight:700; }
.laneNote { margin-top:6px; font-size:12px; color:#617385; line-height:1.35; }
.track { position:relative; min-height:108px; }
.block { position:absolute; top:10px; min-height:84px; padding:10px 12px; border-radius:14px; color:#fff; overflow:visible; box-shadow:0 10px 24px rgba(15,23,42,.18); }
.block.mix { background:linear-gradient(135deg,#7c3aed,#6d28d9); }
.block.fill,.block.fill-ready { background:linear-gradient(135deg,#60d394,#7bcfa8); color:#113322; }
.block.fill-forward { background:repeating-linear-gradient(135deg,#cbd5e1 0 10px,#e5e7eb 10px 20px); color:#334155; }
.block.manual { background:linear-gradient(135deg,#2563eb,#1d4ed8); }
.block.done { opacity:.86; }
.block.open { z-index:5; }
.block .sku { font-weight:700; font-size:13px; margin-bottom:3px; }
.block .txt,.block .mini { font-size:11px; line-height:1.3; }
.blockBtns { position:absolute; right:6px; top:6px; }
.blockBtns button { width:24px; height:24px; border:0; border-radius:999px; background:rgba(255,255,255,.28); color:inherit; font-weight:700; cursor:pointer; }
.resizeHandle { position:absolute; top:0; bottom:0; width:8px; cursor:ew-resize; }
.resizeHandle.left { left:-2px; }
.resizeHandle.right { right:-2px; }
.weekGrid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.halfGrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.halfTitle { margin-bottom:8px; font-size:13px; font-weight:700; color:#516274; }
.laneGroup { margin-bottom:10px; }
.laneName { margin-bottom:6px; font-size:13px; font-weight:700; }
.pill { display:block; margin-bottom:6px; padding:8px 10px; border-radius:10px; color:#fff; font-size:11px; line-height:1.35; }
.pill.mix { background:#7c3aed; }
.pill.fill-ready { background:#60d394; color:#113322; }
.pill.fill-forward { background:#cbd5e1; color:#334155; }
.pill.manual { background:#2563eb; }
.dayCard.done { background:#dcfce7; }
.dayCard.overdue { background:#fee2e2; }
@media (max-width:1200px) {
  .skuList,.multiCols,.weekGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .topbar { flex-direction:column; }
  .groupOrderChecks,.skuList,.multiCols,.weekGrid,.halfGrid,.manualGrid,.groupPlanGrid { grid-template-columns:1fr; }
  .groupPlanGrid > div:nth-child(5),
  .groupPlanGrid > div:nth-child(6) { grid-column:auto; }
  .skuList { max-height:none; overflow:visible; padding-right:0; }
  .hours,.row { grid-template-columns:112px minmax(0,1fr); }
  .boardWrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .board { min-width:920px; }
  .panel h3,.boardCard h3 { font-size:20px; }
  .laneCode { font-size:15px; }
  .laneNote { font-size:11px; }
  .row,.track { min-height:92px; }
  .block { top:8px; min-height:74px; padding:8px 10px; border-radius:12px; }
  .block .sku { font-size:12px; }
  .block .txt,.block .mini { font-size:10px; line-height:1.25; }
  .hour { font-size:10px; padding:8px 0; }
}
@media (max-width:640px) {
  .shell { padding:10px; }
  .toolbar { padding:10px; }
  .hours,.row { grid-template-columns:92px minmax(0,1fr); }
  .board { min-width:760px; }
  .hours .left,.rowLabel { padding:10px 8px; }
  .laneCode { font-size:14px; }
  .laneNote { display:none; }
  .row,.track { min-height:84px; }
  .block { min-height:68px; padding:7px 8px; }
  .blockBtns button { width:22px; height:22px; }
}
