/* ── Shift Report Template builder components (srt-*) ──────────────────── */

.srt-required {
    color: #b84c4c;
}

.srt-input-invalid {
    border-color: #e07070 !important;
    background-color: #fff8f8 !important;
}

.srt-field-error {
    color: #b84c4c;
    font-size: 0.82rem;
    margin-top: 2px;
}

.srt-list-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.srt-list-item-copy {
    flex: 1;
    min-width: 0;
}

.srt-list-item-actions {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.srt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d5e0ed;
    border-radius: 8px;
    background: #f8fbff;
    color: #3a5878;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.srt-icon-btn:hover:not(:disabled) {
    background: #e8f3ff;
    border-color: #aac8ea;
}

.srt-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.srt-icon-btn--danger {
    color: #8e1f2f;
    border-color: #e9c3c7;
    background: #fff4f5;
}

.srt-icon-btn--danger:hover:not(:disabled) {
    background: #fde8ea;
    border-color: #d8929a;
}

.srt-inline-editor {
    border: 1px solid #d2dfef;
    border-radius: 10px;
    padding: 12px;
    background: #f8fbff;
}

.srt-inline-editor--add {
    border-style: dashed;
    border-color: #93bce0;
    background: #f3f9ff;
}

.srt-inline-editor-label {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #274264;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.srt-list-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

/* ── Shift Reports shared status badges ─────────────────────────────────── */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.status-badge--draft {
    color: #705000;
    background: #fff8e1;
    border: 1px solid #ffe082;
}

.status-badge--submitted {
    color: #0d47a1;
    background: #e3f2fd;
    border: 1px solid #90caf9;
}

.status-badge--active {
    color: #1b5e20;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.status-badge--rejected {
    color: #b71c1c;
    background: #ffebee;
    border: 1px solid #ef9a9a;
}

/* Shared task status options used by ShiftReport and TaskStatusEditor */

.tse-options {
    display: inline-flex;
    gap: 0;
    border: 1px solid #d0dcea;
    border-radius: 10px;
    overflow: hidden;
}

.tse-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: none;
    border-right: 1px solid #d0dcea;
    background: #f5f9ff;
    color: #3a5878;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
    white-space: nowrap;
    user-select: none;
}

.tse-option:last-child {
    border-right: none;
}

.tse-option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tse-option:hover:not(:disabled):not(.tse-option--active) {
    background: #eaf3ff;
}

.tse-option--completed.tse-option--active {
    background: #e8f5e9;
    color: #1b5e20;
    border-right-color: #a5d6a7;
}

.tse-option--partial.tse-option--active {
    background: #fff3e0;
    color: #bf5b00;
    border-right-color: #ffcc80;
}

.tse-option--not-completed.tse-option--active {
    background: #ffebee;
    color: #b71c1c;
    border-right-color: #ef9a9a;
}

.tse-option .button-icon {
    font-size: 1.05rem;
}

.tse-option-label {
    font-size: 0.82rem;
}

@media (max-width: 600px) {
    .tse-options {
        flex-wrap: wrap;
    }

    .tse-option {
        flex: 1;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid #d0dcea;
    }

    .tse-option:last-child {
        border-bottom: none;
    }
}

/* ── Shift Report Fill page (srf-*) ────────────────────────────────────── */

.srf-page {
    max-width: 860px;
}

.srf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 0;
    color: #5f7a97;
}

.srf-back-row {
    margin-top: 12px;
}

.srf-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #d8e8f7;
    border-radius: 14px;
    background: #f8fbff;
    margin-bottom: 20px;
}

.srf-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.srf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d2dfef;
    border-radius: 8px;
    padding: 6px 10px;
    background: #edf3fa;
    color: #33475b;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}

.srf-back-btn:hover {
    background: #dfeaf7;
}

.srf-header-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.srf-template-name {
    margin: 0 0 2px;
    font-size: 1.4rem;
    color: #1a3a5c;
}

.srf-meta {
    color: #6a8aab;
    font-size: 0.82rem;
}

.srf-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.srf-progress-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #3a5878;
    font-weight: 600;
}

.srf-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #d8e8f7;
    overflow: hidden;
}

.srf-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2f80ed, #56cfe1);
    transition: width 300ms ease;
}

.srf-progress-fill--complete {
    background: linear-gradient(90deg, #00a67a, #20bf9a);
}

.srf-duties {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.srf-duty {
    border: 1px solid #d5e5f7;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.srf-duty-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f5f9ff;
    border-bottom: 1px solid #e3edf8;
}

.srf-duty-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2f80ed;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.srf-duty-name {
    margin: 0;
    font-size: 1rem;
    color: #1a3a5c;
}

.srf-duty-desc {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: #6a8aab;
}

.srf-duty-progress {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2f80ed;
    background: #e3f0ff;
    border: 1px solid #b3d4f9;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

.srf-tasks {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

@keyframes srf-spin-kf {
    to { transform: rotate(360deg); }
}

.srf-spin {
    display: inline-block;
    animation: srf-spin-kf 0.9s linear infinite;
}

