:root{
  --navy:#0f172a;
  --blue:#2563eb;
  --cyan:#06b6d4;
  --purple:#9333ea;
  --green:#10b981;
  --orange:#f97316;
  --red:#ef4444;
  --yellow:#facc15;
  --bg:#eef4ff;
  --card:#ffffff;
  --text:#172033;
  --muted:#64748b;
  --border:#cbd5e1;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
.topbar{height:68px;background:var(--navy);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:6px solid var(--blue)}
.brand{font-size:22px;font-weight:800;letter-spacing:.4px}
.userbox{font-size:14px;color:#dbeafe}
.layout{display:flex;min-height:calc(100vh - 68px)}
.sidebar{width:260px;background:white;border-right:1px solid var(--border);padding:22px 14px}
.sidebar a{display:block;padding:12px 14px;border-radius:12px;margin-bottom:8px;color:#334155;font-weight:700}
.sidebar a:hover,.sidebar a.active{background:#dbeafe;color:#1d4ed8}
.main{flex:1;padding:26px;overflow:auto}
.grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.card{background:var(--card);border:1px solid var(--border);border-radius:20px;padding:20px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.card h2,.card h3{margin:0 0 14px}
.metric{border-left:8px solid var(--blue)}
.metric .label{font-size:13px;color:var(--muted);font-weight:800;text-transform:uppercase}
.metric .value{font-size:34px;font-weight:900;margin-top:6px}
.btn{display:inline-block;border:0;border-radius:12px;background:var(--blue);color:white;padding:11px 16px;font-weight:800;cursor:pointer}
.btn.green{background:var(--green)}
.btn.red{background:var(--red)}
.btn.orange{background:var(--orange)}
.btn.gray{background:#475569}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--border);border-radius:12px;font-size:15px;background:white}
label{font-weight:800;font-size:13px;color:#334155;display:block;margin-bottom:6px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.table{width:100%;border-collapse:separate;border-spacing:0 8px}
.table th{text-align:left;color:#475569;font-size:13px;padding:8px}
.table td{background:white;padding:12px 8px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.table td:first-child{border-left:1px solid var(--border);border-radius:12px 0 0 12px}
.table td:last-child{border-right:1px solid var(--border);border-radius:0 12px 12px 0}
.status{font-weight:900;border-radius:999px;padding:6px 10px;display:inline-block}
.status.pending{background:#fff;color:#334155;border:1px solid #cbd5e1}
.status.done{background:#dcfce7;color:#166534}
.status.rush{background:#fee2e2;color:#991b1b}
.status.needs_attention{background:#ffedd5;color:#9a3412}
.status.partial{background:#fef9c3;color:#854d0e}
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0f172a,#1d4ed8)}
.login-card{width:420px;background:white;border-radius:24px;padding:32px;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.login-card h1{margin:0 0 10px}
.notice{padding:12px 14px;border-radius:12px;background:#dbeafe;color:#1e3a8a;font-weight:700;margin-bottom:14px}
.error{padding:12px 14px;border-radius:12px;background:#fee2e2;color:#991b1b;font-weight:700;margin-bottom:14px}

.floor-body{background:#0f172a;color:white}
.floor-header{padding:24px 34px;font-size:40px;font-weight:900;display:flex;justify-content:space-between;align-items:center}
.floor-header.compact{padding:14px 24px;font-size:28px;height:64px}
.floor-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;padding:0 28px 28px}
.floor-week-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:10px 14px 8px;height:calc(100vh - 110px)}
.floor-day{background:#1e293b;border-radius:18px;overflow:hidden;display:flex;flex-direction:column;border:2px solid #334155}
.floor-day-title{background:#2563eb;color:white;padding:10px 12px;font-weight:900;display:flex;justify-content:space-between;align-items:center;font-size:20px}
.floor-day-title span{background:rgba(255,255,255,.18);padding:4px 8px;border-radius:999px;font-size:15px}
.floor-job-list{padding:8px;display:grid;gap:7px;overflow:hidden}
.floor-row{border-radius:12px;padding:8px 9px;color:#0f172a;min-height:64px;border:2px solid rgba(255,255,255,.85)}
.floor-row.pending{background:#ffffff;color:#0f172a}
.floor-row.done{background:#22c55e;color:#ffffff}
.floor-row.rush{background:#ef4444;color:#ffffff}
.floor-row.needs_attention{background:#f97316;color:#ffffff}
.floor-row.partial{background:#facc15;color:#0f172a}
.floor-so{font-size:18px;font-weight:1000;line-height:1.05}
.floor-qty{font-size:24px;font-weight:1000;line-height:1.05}
.floor-status{font-size:11px;font-weight:900;text-transform:uppercase;opacity:.9}
.floor-notes{font-size:12px;font-weight:800;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.floor-legend{height:38px;display:flex;gap:12px;justify-content:center;align-items:center;background:#0f172a}
.legend{padding:6px 14px;border-radius:999px;font-weight:900;color:#0f172a}
.legend.pending{background:#ffffff}
.legend.done{background:#22c55e;color:#ffffff}
.legend.rush{background:#ef4444;color:#ffffff}
.legend.needs_attention{background:#f97316;color:#ffffff}
.legend.partial{background:#facc15;color:#0f172a}

.job-card{border-radius:24px;padding:22px;min-height:150px;color:#0f172a;background:white;border:4px solid transparent}
.job-card.pending{background:white}
.job-card.done{background:#22c55e;color:white}
.job-card.rush{background:#ef4444;color:white}
.job-card.needs_attention{background:#f97316;color:white}
.job-card .so{font-size:36px;font-weight:900}
.job-card .qty{font-size:30px;font-weight:900;margin-top:8px}
.job-card .notes{font-size:20px;margin-top:12px}

@media(max-width:1200px){.floor-week-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.layout{display:block}.sidebar{width:100%}.grid-2,.grid-3,.grid-4,.form-grid,.form-grid-3{grid-template-columns:1fr}}
