/* MJS Contractor Portal. Change --mjscp-accent to match your brand. */
.mjscp {
	--mjscp-accent: #111111;
	--mjscp-accent-text: #ffffff;
	--mjscp-border: #e3e3e3;
	--mjscp-muted: #6b6b6b;
	--mjscp-bg: #ffffff;
	--mjscp-soft: #f6f6f6;
	max-width: 980px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
	color: #1a1a1a;
	box-sizing: border-box;
}
.mjscp *, .mjscp *::before, .mjscp *::after { box-sizing: inherit; }
.mjscp h2 { margin: 0 0 .25em; font-size: 1.6em; }
.mjscp h3 { margin: 1.6em 0 .4em; font-size: 1.1em; }
.mjscp h3:first-of-type { margin-top: .2em; }
.mjscp-muted { color: var(--mjscp-muted); margin: 0 0 .75em; }
.mjscp-small { font-size: .85em; }

.mjscp-card { background: var(--mjscp-bg); border: 1px solid var(--mjscp-border); border-radius: 10px; padding: 24px; margin-bottom: 16px; }
.mjscp-login { max-width: 440px; margin: 40px auto; }
.mjscp-login input[type=text], .mjscp-login input[type=password] { width: 100%; }
.mjscp-login .login-submit input { background: var(--mjscp-accent); color: var(--mjscp-accent-text); border: 0; border-radius: 6px; padding: 10px 22px; cursor: pointer; font-weight: 600; }

.mjscp input[type=text], .mjscp input[type=email], .mjscp input[type=tel], .mjscp input[type=date],
.mjscp input[type=number], .mjscp input[type=password], .mjscp select, .mjscp textarea {
	width: 100%; padding: 9px 11px; border: 1px solid #cfcfcf; border-radius: 6px; font: inherit; background: #fff; color: inherit; margin-top: 4px;
}
.mjscp label { display: block; font-weight: 600; font-size: .92em; }
.mjscp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.mjscp-span-2 { grid-column: span 2; }

.mjscp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.mjscp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mjscp-stat { background: var(--mjscp-soft); border-radius: 10px; padding: 14px 16px; }
.mjscp-stat span { display: block; font-size: .82em; color: var(--mjscp-muted); }
.mjscp-stat strong { font-size: 1.35em; }

.mjscp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--mjscp-border); margin-bottom: 16px; flex-wrap: wrap; }
.mjscp-tabs a { padding: 10px 16px; text-decoration: none; color: var(--mjscp-muted); border-bottom: 3px solid transparent; font-weight: 600; }
.mjscp-tabs a.is-active { color: #111; border-bottom-color: var(--mjscp-accent); }

.mjscp-btn { display: inline-block; border-radius: 6px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.mjscp-btn-primary { background: var(--mjscp-accent); color: var(--mjscp-accent-text); }
.mjscp-btn-primary:disabled { opacity: .6; cursor: wait; }
.mjscp-btn-ghost { background: transparent; border-color: #cfcfcf; color: #1a1a1a; }
.mjscp-btn-ghost:hover { background: var(--mjscp-soft); }
.mjscp-btn.mjscp-small { padding: 6px 12px; }

.mjscp-line { display: grid; gap: 8px 10px; align-items: center; padding: 12px; margin-bottom: 10px; background: var(--mjscp-soft); border-radius: 8px; }
.mjscp-line input, .mjscp-line select { margin-top: 0; min-width: 0; }
.mjscp-rate-row { grid-template-columns: minmax(0, 1fr) 150px 100px 28px; grid-template-areas: "sel qty total rm" "det det rate ."; }
.mjscp-rate-row .mjscp-rate-select { grid-area: sel; }
.mjscp-rate-row .mjscp-qty-wrap { grid-area: qty; }
.mjscp-rate-row .mjscp-line-total { grid-area: total; }
.mjscp-rate-row .mjscp-remove { grid-area: rm; }
.mjscp-rate-row input[type=text] { grid-area: det; }
.mjscp-rate-row .mjscp-rate-display { grid-area: rate; text-align: right; }
.mjscp-expense-row { grid-template-columns: 190px minmax(0, 1fr) 28px; grid-template-areas: "cat det rm" "amt file ."; }
.mjscp-expense-row select { grid-area: cat; }
.mjscp-expense-row input[type=text] { grid-area: det; }
.mjscp-expense-row .mjscp-money-wrap { grid-area: amt; }
.mjscp-expense-row .mjscp-file { grid-area: file; }
.mjscp-expense-row .mjscp-remove { grid-area: rm; }
.mjscp-qty-wrap, .mjscp-money-wrap { display: flex !important; align-items: center; gap: 6px; font-weight: 400 !important; }
.mjscp-qty-wrap input { width: 80px !important; flex: none; }
.mjscp-money-wrap input { flex: 1; }
.mjscp-unit-label { font-size: .8em; color: var(--mjscp-muted); white-space: nowrap; }
.mjscp-line-total { font-weight: 700; text-align: right; }
.mjscp-rate-display { font-size: .85em; color: var(--mjscp-muted); }
.mjscp-file { font-weight: 400 !important; font-size: .85em !important; display: flex !important; gap: 6px; align-items: center; }
.mjscp-file input { font-size: .9em; min-width: 0; }
.mjscp-remove { background: none; border: 0; font-size: 22px; line-height: 1; color: #999; cursor: pointer; padding: 0; }
.mjscp-remove:hover { color: #c0392b; }
.mjscp-add { margin-top: 10px; }

.mjscp-total-bar { display: flex; justify-content: space-between; align-items: center; background: var(--mjscp-soft); border-radius: 8px; padding: 14px 18px; margin-top: 20px; font-size: 1.1em; }
.mjscp-total-bar strong { font-size: 1.4em; }

.mjscp-alert { padding: 12px 14px; border-radius: 8px; background: var(--mjscp-soft); margin: 10px 0; }
.mjscp-alert-success { background: #e8f6ec; color: #1e6b34; }
.mjscp-alert-error { background: #fdecea; color: #a12a1e; }

.mjscp-job summary { display: grid; grid-template-columns: 110px 1fr auto 110px; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.mjscp-job summary::-webkit-details-marker { display: none; }
.mjscp-job { padding: 16px 20px; }
.mjscp-job[open] summary { margin-bottom: 12px; }
.mjscp-job-date { color: var(--mjscp-muted); font-size: .9em; }
.mjscp-job-name { font-weight: 600; }
.mjscp-job-total { text-align: right; }
.mjscp-badge { font-size: .75em; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.mjscp-badge-pending { background: #fff4d6; color: #8a5a00; }
.mjscp-badge-approved { background: #e3efff; color: #1b4f9c; }
.mjscp-badge-paid { background: #e8f6ec; color: #1e6b34; }
.mjscp-badge-rejected { background: #fdecea; color: #a12a1e; }
.mjscp-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.mjscp-table th, .mjscp-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--mjscp-border); }
.mjscp-table td:last-child, .mjscp-table th:last-child { text-align: right; }

.mjscp-footer-link { font-weight: 600; }

/* ---------- Agreements ---------- */
.mjscp-agreements { border-color: #e7c66b; }
.mjscp-agr-pending + .mjscp-agr-pending { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--mjscp-border); }
.mjscp-agreement { max-height: 420px; overflow: auto; border: 1px solid var(--mjscp-border); border-radius: 8px; padding: 14px 18px; background: #fafafa; font-size: .9em; line-height: 1.5; }
.mjscp-agreement p { margin: 0 0 .55em; }
.mjscp-agr-title { text-align: center; margin: 0 0 .8em !important; font-size: 1.05em; }
.mjscp-agr-h { margin-top: 1em !important; }
.mjscp-agr-li { padding-left: 1.2em; text-indent: -.8em; }
.mjscp-agr-li2 { padding-left: 2.4em; text-indent: -.8em; }
.mjscp-sign { margin-top: 14px; }
.mjscp-agr-done { padding: 8px 0; }

/* ---------- Write-in agreed rate ---------- */
.mjscp-custom-row { grid-template-columns: minmax(0, 1fr) 130px 150px 100px 28px; grid-template-areas: "desc qty rate total rm"; }
.mjscp-custom-row input[type=text] { grid-area: desc; }
.mjscp-custom-row .mjscp-qty-wrap { grid-area: qty; }
.mjscp-custom-row .mjscp-money-wrap { grid-area: rate; }
.mjscp-custom-row .mjscp-line-total { grid-area: total; }
.mjscp-custom-row .mjscp-remove { grid-area: rm; }
.mjscp-add + .mjscp-add { margin-left: 8px; }

/* ---------- Setup / My Info ---------- */
.mjscp-setup { border-color: #e7c66b; background: #fffaf0; }
.mjscp-setup.is-complete { border-color: #cfe8d6; background: #f3faf5; }
.mjscp-setup summary { cursor: pointer; }
.mjscp-checklist { list-style: none; margin: 10px 0 0; padding: 0; }
.mjscp-checklist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.mjscp-check-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: #eee; }
.mjscp-checklist .is-done .mjscp-check-icon { background: #2e8b4f; color: #fff; }
.mjscp-checklist .is-todo .mjscp-check-icon { background: #fff; border: 2px solid #c48a00; color: #c48a00; }
.mjscp-checklist em { color: var(--mjscp-muted); font-style: normal; font-size: .85em; }
.mjscp-tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.mjscp-tag-picker label { font-weight: 500 !important; border: 1px solid #cfcfcf; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.mjscp-tag-picker label:has(input:checked) { background: var(--mjscp-accent); color: var(--mjscp-accent-text); border-color: var(--mjscp-accent); }
.mjscp-tag-picker input { margin-right: 4px; }
.mjscp-doc { padding: 10px 0; border-bottom: 1px dashed var(--mjscp-border); }
.mjscp-agreement { max-height: 220px; overflow: auto; border: 1px solid var(--mjscp-border); border-radius: 8px; padding: 12px 16px; background: #fafafa; font-size: .9em; }
.mjscp-prefs td:last-child { text-align: right; white-space: nowrap; }
.mjscp-lock { font-size: .85em; color: var(--mjscp-muted); }
.mjscp-switch { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 500 !important; }
.mjscp-prefs select { width: auto; }
.mjscp-tags { margin: 2px 0 6px; }
.mjscp-tag { display: inline-block; font-size: .72em; font-weight: 700; background: var(--mjscp-soft); border: 1px solid var(--mjscp-border); border-radius: 999px; padding: 1px 8px; margin-right: 4px; }

/* ---------- Paycheck grouping ---------- */
.mjscp-group { margin-bottom: 22px; }
.mjscp-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--mjscp-border); padding-bottom: 6px; margin-bottom: 10px; }
.mjscp-group-head h3 { margin: 0 !important; }
.mjscp-group.is-paid .mjscp-group-head { border-bottom-width: 1px; }
.mjscp-paid-title { margin-top: 28px !important; color: var(--mjscp-muted); }
.mjscp-ready { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-color: #e7c66b; background: #fffaf0; padding: 14px 18px; }
.mjscp-unpaid summary { cursor: pointer; }
.mjscp-unpaid table { margin-top: 10px; }
.mjscp-check { font-weight: 400 !important; margin: 16px 0 0; padding: 12px; background: #fffaf0; border: 1px solid #e7c66b; border-radius: 8px; }
.mjscp-check input { margin-right: 6px; }

/* ---------- Shift Board ---------- */
.mjscp-badge-requested { background: #fff4d6; color: #8a5a00; }
.mjscp-badge-confirmed { background: #e8f6ec; color: #1e6b34; }
.mjscp-badge-declined, .mjscp-badge-withdrawn, .mjscp-badge-cancelled, .mjscp-badge-closed { background: #eee; color: #555; }
.mjscp-shift-line { grid-template-columns: 1fr auto; border: 2px solid #cfe8d6; background: #f3faf5; }
.mjscp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mjscp-cal-head h3 { margin: 0 !important; }
.mjscp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mjscp-cal-dow { font-size: .75em; text-transform: uppercase; color: var(--mjscp-muted); text-align: center; padding: 4px 0; }
.mjscp-cal-day { min-height: 84px; border: 1px solid var(--mjscp-border); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.mjscp-cal-day.is-empty { border: 0; }
.mjscp-cal-day.is-past { background: #fafafa; }
.mjscp-cal-day.is-today { border-color: var(--mjscp-accent); box-shadow: inset 0 0 0 1px var(--mjscp-accent); }
.mjscp-cal-num { font-size: .8em; font-weight: 700; color: var(--mjscp-muted); }
.mjscp-cal-event { display: block; font-size: .72em; line-height: 1.25; padding: 3px 5px; border-radius: 4px; text-decoration: none !important; color: #111 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mjscp-cal-event small { display: block; font-size: .9em; opacity: .75; }
.mjscp-cal-event.is-open, .mjscp-dot.is-open { background: #e3f4e8; border-left: 3px solid #2e8b4f; }
.mjscp-cal-event.is-full, .mjscp-dot.is-full { background: #fff4d6; border-left: 3px solid #c48a00; }
.mjscp-cal-event.is-done, .mjscp-dot.is-done { background: #f0f0f0; border-left: 3px solid #aaa; }
.mjscp-dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; }
.mjscp-shoot { scroll-margin-top: 90px; }
.mjscp-shoot:target { box-shadow: 0 0 0 2px var(--mjscp-accent); }
.mjscp-shoot-head { display: flex; gap: 18px; align-items: flex-start; }
.mjscp-shoot-date { flex: none; width: 64px; text-align: center; background: var(--mjscp-soft); border-radius: 8px; padding: 6px 0; line-height: 1.15; }
.mjscp-shoot-date span { display: block; font-size: .75em; text-transform: uppercase; color: var(--mjscp-muted); }
.mjscp-shoot-date strong { display: block; font-size: 1.6em; }
.mjscp-shoot-info h3 { margin: 0 0 6px !important; }
.mjscp-shoot-info div { font-size: .93em; }
.mjscp-shoot-desc { margin: 12px 0 0; font-size: .93em; color: #333; }
.mjscp-shoot-desc p { margin: 0 0 .6em; }
.mjscp-slots { margin-top: 14px; border-top: 1px solid var(--mjscp-border); }
.mjscp-slot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--mjscp-border); }
.mjscp-slot.is-mine { background: #f3faf5; margin: 0 -10px; padding: 10px; border-radius: 6px; }
.mjscp-slot-role strong { display: block; }
.mjscp-slot-pay { font-weight: 600; }
.mjscp-slot-action { text-align: right; display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.mjscp-inline { display: inline; margin: 0; }
.mjscp-linkbtn { background: none; border: 0; padding: 0; color: #a12a1e; text-decoration: underline; cursor: pointer; font: inherit; font-size: .85em; }
.mjscp-actions { white-space: nowrap; }
.mjscp-actions > * { margin-left: 8px; }
.mjscp-myshifts .mjscp-alert .mjscp-btn { margin: 4px 4px 0 0; }

@media (max-width: 720px) {
	.mjscp-cal-day { min-height: 54px; }
	.mjscp-cal-event { font-size: 0; padding: 0; height: 8px; }
	.mjscp-cal-event small { display: none; }
	.mjscp-slot { grid-template-columns: 1fr; }
	.mjscp-slot-action { justify-content: flex-start; }
	.mjscp-actions { white-space: normal; }
}

@media (max-width: 720px) {
	.mjscp-myshifts thead { display: none; }
	.mjscp-myshifts tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--mjscp-border); }
	.mjscp-myshifts td { display: inline-block; border: 0; padding: 2px 8px 2px 0; text-align: left !important; }
	.mjscp-myshifts td.mjscp-actions { display: block; }
	.mjscp-myshifts td.mjscp-actions > * { margin: 0 12px 0 0; }

	.mjscp-grid-2, .mjscp-stats { grid-template-columns: 1fr; }
	.mjscp-span-2 { grid-column: auto; }
	.mjscp-rate-row { grid-template-columns: minmax(0, 1fr) auto 28px; grid-template-areas: "sel sel rm" "qty total total" "det det det" "rate rate rate"; }
	.mjscp-expense-row { grid-template-columns: minmax(0, 1fr) 28px; grid-template-areas: "cat rm" "det det" "amt amt" "file file"; }
	.mjscp-custom-row { grid-template-columns: minmax(0, 1fr) auto 28px; grid-template-areas: "desc desc rm" "qty rate rate" "total total total"; }
	.mjscp-add + .mjscp-add { margin-left: 0; }
	.mjscp-job summary { grid-template-columns: 1fr auto; }
	.mjscp-job-name { grid-column: span 2; order: -1; }
	.mjscp-header { flex-direction: column; }
}

@media (max-width: 720px) {
	.mjscp-prefs td { display: block; border: 0; padding: 2px 0; text-align: left !important; }
	.mjscp-prefs tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--mjscp-border); }
	.mjscp-prefs select { width: 100%; }
}
