.assignment-timesheet-setup {
    border: 1px solid #cddbea;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    container-type: inline-size;
}

.assignment-timesheet-setup.is-loading {
    padding: 20px;
    color: #526886;
    font-weight: 700;
}

.assignment-timesheet-setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #dce6f2;
    background: #f7fafc;
}

.assignment-timesheet-setup.is-ready .assignment-timesheet-setup-header {
    background: #f2fbf6;
}

.assignment-timesheet-setup-header h3,
.assignment-timesheet-setup-header p,
.assignment-timesheet-section-heading h4,
.assignment-timesheet-section-heading p { margin: 0; }

.assignment-timesheet-setup-header h3 { font-size: 18px; }

.assignment-timesheet-setup-header p,
.assignment-timesheet-section-heading p {
    margin-top: 4px;
    color: #526886;
    line-height: 1.4;
}

.assignment-timesheet-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #1767bf;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.assignment-timesheet-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.assignment-timesheet-status.ready { background: #dff8ea; color: #166534; }
.assignment-timesheet-status.required { background: #fff2cc; color: #8a5700; }

.assignment-timesheet-readiness {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid #dce6f2;
}

.assignment-timesheet-readiness span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    color: #526886;
    font-size: 12px;
    font-weight: 800;
}

.assignment-timesheet-readiness span + span { border-left: 1px solid #dce6f2; }
.assignment-timesheet-readiness b { color: #9a6700; }
.assignment-timesheet-readiness .complete b { color: #16804c; }

.assignment-timesheet-setup form {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.assignment-timesheet-form-fields {
    border: 0;
    display: grid;
    gap: 16px;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.assignment-timesheet-form-fields.is-readonly input:disabled,
.assignment-timesheet-form-fields.is-readonly select:disabled,
.assignment-timesheet-form-fields.is-readonly .assignment-timesheet-days button:disabled {
    color: #31425a;
    opacity: .78;
}

.assignment-timesheet-readonly-label {
    color: #5f6f87;
    font-size: 12px;
    font-weight: 700;
}

.assignment-timesheet-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.assignment-timesheet-section-heading h4 { font-size: 15px; }
.assignment-timesheet-section-heading.job-codes { margin-top: 4px; padding-top: 18px; border-top: 1px solid #dce6f2; }

.assignment-timesheet-heading-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.assignment-timesheet-heading-actions .outline-button {
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #b8d3f3;
    border-radius: 6px;
    background: #fff;
    color: #15599f;
    cursor: pointer;
}

.assignment-timesheet-heading-actions .outline-button:hover:not(:disabled) {
    border-color: #1767bf;
    background: #eef6ff;
}

.assignment-timesheet-heading-actions .outline-button:disabled {
    border-color: #dce5ef;
    background: #f3f6f9;
    color: #8b99aa;
    cursor: not-allowed;
    opacity: 1;
}

.assignment-timesheet-schedule-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(105px, 1fr));
    gap: 10px;
}

.assignment-timesheet-schedule-grid label,
.assignment-timesheet-jobcode-grid label {
    display: grid;
    gap: 6px;
    color: #526886;
    font-size: 12px;
    font-weight: 850;
}

.assignment-timesheet-schedule-grid input,
.assignment-timesheet-schedule-grid select,
.assignment-timesheet-jobcode-grid input,
.assignment-timesheet-jobcode-grid select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #cddbea;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    color: #10213d;
    font: inherit;
}

.assignment-timesheet-days {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.assignment-timesheet-days legend {
    margin-bottom: 7px;
    color: #526886;
    font-size: 12px;
    font-weight: 850;
}

.assignment-timesheet-days > div { display: flex; gap: 7px; flex-wrap: wrap; }

.assignment-timesheet-days button {
    width: 46px;
    min-height: 36px;
    border: 1px solid #cddbea;
    border-radius: 6px;
    background: #fff;
    color: #526886;
    font-weight: 850;
    cursor: pointer;
}

.assignment-timesheet-days button.selected {
    border-color: #1767bf;
    background: #eaf3ff;
    color: #15599f;
}

.assignment-timesheet-jobcodes { display: grid; gap: 10px; }

.assignment-timesheet-jobcode {
    border: 1px solid #d7e2ef;
    border-radius: 8px;
    padding: 14px;
    background: #fafcfe;
}

.assignment-timesheet-jobcode.collapsed { padding: 0; }

.assignment-timesheet-jobcode-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.assignment-timesheet-jobcode.collapsed .assignment-timesheet-jobcode-title {
    margin: 0;
    padding: 13px 14px;
}

.assignment-timesheet-jobcode-title > span:first-child { display: grid; gap: 3px; }
.assignment-timesheet-jobcode-title small { color: #66758b; font-size: 12px; font-weight: 700; }
.assignment-timesheet-period-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 8px;
    background: #e7f6ed;
    color: #166534;
    font-size: 11px;
    font-weight: 850;
}
.assignment-timesheet-period-status.upcoming { background: #eaf3ff; color: #15599f; }
.assignment-timesheet-period-status.ended { background: #eef1f5; color: #5f6f87; }
.assignment-timesheet-period-status.dates-needed { background: #fff2cc; color: #8a5700; }
.assignment-timesheet-chevron { color: #1767bf; font-size: 18px; font-weight: 900; transform: rotate(90deg); }
.assignment-timesheet-jobcode.expanded .assignment-timesheet-chevron { transform: rotate(-90deg); }

.assignment-timesheet-jobcode-title strong { color: #10213d; }

.assignment-timesheet-remove {
    width: 30px;
    height: 30px;
    border: 1px solid #f0c8c8;
    border-radius: 6px;
    background: #fff;
    color: #a61b1b;
    font-weight: 900;
    cursor: pointer;
}

.assignment-timesheet-jobcode-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.assignment-timesheet-remove-text {
    border: 0;
    background: transparent;
    color: #a61b1b;
    font-weight: 800;
    cursor: pointer;
}

.assignment-timesheet-jobcode-grid {
    display: grid;
    grid-template-columns: minmax(90px, .75fr) minmax(150px, 1.25fr) repeat(2, minmax(90px, .7fr));
    gap: 10px;
}

.assignment-timesheet-jobcode-grid .wide { grid-column: span 2; }
.assignment-timesheet-jobcode-grid .full { grid-column: 1 / -1; }

.assignment-timesheet-jobcode-grid .assignment-timesheet-notes {
    display: flex;
    align-items: center;
    align-self: end;
    min-height: 40px;
}

.assignment-timesheet-notes input { width: 16px; min-height: 16px; }

.assignment-timesheet-message {
    display: flex;
    gap: 6px;
    margin: 14px 20px 0;
    border: 1px solid #d7e2ef;
    border-radius: 6px;
    padding: 11px 12px;
    font-size: 13px;
}

.assignment-timesheet-message.warning { border-color: #f0cf8c; background: #fffaf0; color: #754c00; }
.assignment-timesheet-message.error { border-color: #f3b8b8; background: #fff5f5; color: #991b1b; }
.assignment-timesheet-message.success { border-color: #aee3c6; background: #f2fff7; color: #166534; }
.assignment-timesheet-message.info { border-color: #bed5f5; background: #f3f8ff; color: #244f87; }

.assignment-timesheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #dce6f2;
}

.assignment-timesheet-footer span { color: #66758b; font-size: 12px; font-weight: 700; }

@media (max-width: 1100px) {
    .assignment-timesheet-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 700px) {
    .assignment-timesheet-setup-header,
    .assignment-timesheet-section-heading,
    .assignment-timesheet-footer { flex-direction: column; align-items: stretch; }
    .assignment-timesheet-readiness { grid-template-columns: 1fr; }
    .assignment-timesheet-readiness span + span { border-left: 0; border-top: 1px solid #dce6f2; }
    .assignment-timesheet-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assignment-timesheet-jobcode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assignment-timesheet-jobcode-grid .wide { grid-column: auto; }
    .assignment-timesheet-jobcode-grid .full { grid-column: 1 / -1; }
    .assignment-timesheet-footer button { width: 100%; }
}

@container (max-width: 430px) {
    .assignment-timesheet-schedule-grid,
    .assignment-timesheet-jobcode-grid { grid-template-columns: 1fr; }
    .assignment-timesheet-jobcode-grid .full { grid-column: auto; }
}

@media (max-width: 720px) {
    .assignment-timesheet-setup-header,
    .assignment-timesheet-section-heading,
    .assignment-timesheet-footer { flex-direction: column; align-items: stretch; }
    .assignment-timesheet-readiness { grid-template-columns: 1fr; }
    .assignment-timesheet-readiness span + span { border-left: 0; border-top: 1px solid #dce6f2; }
    .assignment-timesheet-schedule-grid,
    .assignment-timesheet-jobcode-grid { grid-template-columns: 1fr; }
    .assignment-timesheet-jobcode-grid .wide { grid-column: auto; }
    .assignment-timesheet-jobcode-grid .full { grid-column: auto; }
    .assignment-timesheet-footer button { width: 100%; }
}
