/* MI-BOX brand: yellow #FFDD00, dark #333333, gray #f8f9fa */
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f8f9fa; color: #333; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 12px; }
.muted { color: #666; }
.small-text { font-size: 12px; }

/* login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 32px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.08); width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { margin: 0 0 8px; font-size: 22px; background: #333; color: #FFDD00; padding: 12px; border-radius: 6px; text-align: center; }
.login-card h1 span { color: #ccc; font-weight: normal; font-size: 15px; display: block; }

/* shell */
.shell header { background: #333; color: #FFDD00; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; }
.brand span { color: #ccc; font-weight: normal; }
.shell nav button { background: none; border: 1px solid #555; color: #eee; padding: 6px 14px; margin-left: 8px; border-radius: 6px; cursor: pointer; }
.shell nav button.on { background: #FFDD00; color: #333; border-color: #FFDD00; font-weight: bold; }

/* day view */
.day-wrap { padding: 18px; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.day-title { text-align: center; }
.day-title input { border: none; background: none; font-size: 15px; font-weight: bold; }
.blackout { color: #b00020; font-weight: bold; }
.spacer { flex: 1; }

.lanes { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lane { background: #fff; border-radius: 10px; padding: 14px; flex: 1; min-width: 320px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.lane h3 { margin: 0 0 4px; }
.tray { background: #fffbe6; border: 1px dashed #d4b800; border-radius: 10px; padding: 14px; width: 300px; }
.tray h3 { margin: 0 0 10px; }

.card { border: 1px solid #e2e2e2; border-radius: 8px; padding: 10px; margin: 8px 0; background: #fff; }
.job-card.completed { border-left: 4px solid #2e7d32; }
.job-card.in_progress { border-left: 4px solid #FFDD00; }
.job-card.failed { border-left: 4px solid #b00020; }
.job-card .time { font-weight: bold; font-size: 14px; }
.pending-card { background: #fff; }
.failed { color: #b00020; font-size: 12px; margin-top: 4px; }
.finish { margin-top: 10px; padding-top: 8px; border-top: 2px solid #FFDD00; }

.row { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.row.right { justify-content: flex-end; }
.truck-name { min-width: 140px; font-weight: bold; }

/* buttons + inputs */
.btn { background: #fff; border: 1px solid #ccc; border-radius: 6px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn.primary { background: #FFDD00; border-color: #FFDD00; color: #333; font-weight: bold; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.tiny { padding: 2px 8px; font-size: 11px; }
input, select, textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit; }
label { display: block; font-size: 13px; color: #555; margin: 8px 0; }
.error { color: #b00020; font-size: 13px; }
.saved { color: #2e7d32; font-weight: bold; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 10px; padding: 20px; width: 480px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* settings */
.settings { background: #fff; max-width: 560px; margin: 24px auto; padding: 24px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* booking requests */
.request-card { background: #fff8dc; border-color: #d4b800; }
.tray hr { border: none; border-top: 1px solid #d4b800; margin: 14px 0; }

/* environment banner */
.env-banner { background: #6a1b9a; color: #fff; text-align: center; padding: 6px; font-size: 13px; font-weight: bold; }
.live-tag { color: #ff5252; margin-left: 8px; }

.space-between { justify-content: space-between; margin-top: 0; }
.space-between h3 { margin: 0; }

/* week + month overview */
.overview-wrap { padding: 18px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-col-head { text-align: center; font-weight: bold; font-size: 13px; margin-bottom: 6px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-head { text-align: center; font-weight: bold; font-size: 12px; color: #666; padding: 4px 0; }
.cell { background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; min-height: 84px; padding: 6px; cursor: pointer; font-size: 12px; }
.cell:hover { border-color: #FFDD00; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.cell-date { font-weight: bold; margin-bottom: 2px; }
.cell-line { margin-top: 2px; }
.cell-today { outline: 2px solid #FFDD00; }
.cell-blackout { background: #f3f3f3; color: #999; }
.blackout-line { color: #b00020; }
.request-line { color: #9a7d00; font-weight: bold; }
.failed-line { color: #b00020; font-weight: bold; }
.cell-outside { opacity: .35; }
.week-grid .cell { min-height: 140px; font-size: 13px; }
