/* Team schedule (admin) */

.schedule-migration-hint {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    max-width: 48rem;
}

.schedule-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.schedule-tabs__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--admin-text, #1f2937);
    background: var(--admin-surface, #fff);
    border: 1px solid var(--admin-border, #e5e7eb);
}

.schedule-tabs__link:hover {
    border-color: var(--admin-accent, #9c1c34);
    color: var(--admin-accent, #9c1c34);
}

.schedule-tabs__link.is-active {
    background: rgba(156, 28, 52, 0.1);
    border-color: var(--admin-accent, #9c1c34);
    color: var(--admin-accent, #9c1c34);
}

.schedule-tabs__badge {
    display: inline-block;
    min-width: 1.25rem;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--admin-accent, #9c1c34);
    color: #fff;
}

.schedule-tabs__badge--warn {
    background: #b45309;
}

.schedule-toolbar__hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--admin-text-muted, #6b7280);
    margin-left: 6px;
}

.schedule-toolbar__copy {
    margin-left: auto;
}

.schedule-toolbar__copy-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--admin-accent, #9c1c34);
    list-style: none;
}

.schedule-toolbar__copy-summary::-webkit-details-marker {
    display: none;
}

.schedule-copy-week {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    background: var(--admin-surface-2, #f9fafb);
    border-radius: 8px;
    border: 1px solid var(--admin-border, #e5e7eb);
}

.schedule-copy-week__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.schedule-toolbar--coverage {
    margin-bottom: 16px;
}

.schedule-coverage-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.schedule-coverage-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.schedule-coverage-wrap {
    overflow-x: auto;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 10px;
}

.schedule-coverage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.schedule-coverage-table th,
.schedule-coverage-table td {
    border-bottom: 1px solid var(--admin-border, #e5e7eb);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.schedule-coverage-table th {
    background: var(--admin-surface-2, #f9fafb);
    font-weight: 600;
}

.schedule-coverage-table__notes {
    max-width: 14rem;
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.85rem;
}

.schedule-inbox-list .schedule-to-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.schedule-inbox-list__body {
    flex: 1;
    min-width: 200px;
}

.schedule-inbox-list__meta {
    font-size: 0.8rem;
}

.schedule-inbox-list__actions {
    flex-shrink: 0;
}

.schedule-publish-banner {
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    max-width: 52rem;
}

.schedule-publish-banner--warn {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.schedule-publish-banner--ok {
    background: #ecfdf5;
    border: 1px solid #34d399;
    color: #065f46;
}

.schedule-toolbar__publish .schedule-form__full {
    display: block;
    width: 100%;
    max-width: 28rem;
    margin-top: 8px;
}

.schedule-toolbar__publish textarea {
    width: 100%;
    margin-top: 4px;
}

.schedule-my-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 40rem;
}

.schedule-my-list__item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--admin-border, #e5e7eb);
    font-size: 0.92rem;
}

.schedule-my-list__date {
    grid-column: 1 / -1;
    font-weight: 700;
    color: var(--admin-text, #1f2937);
}

.schedule-my-list__time {
    font-weight: 600;
}

.schedule-my-list__role,
.schedule-my-list__loc {
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.88rem;
}

.schedule-my-list__notes {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-ics-url-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
    max-width: 48rem;
}

.schedule-ics-url {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: ui-monospace, monospace;
}

.schedule-ics-regen {
    margin-top: 8px;
}

.schedule-my-list__actions {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--admin-border, #e5e7eb);
}

.schedule-wf-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 8px;
    margin-bottom: 6px;
}

.schedule-wf-badge--awaiting_peer {
    background: #fef3c7;
    color: #92400e;
}

.schedule-wf-badge--pending_manager {
    background: #e0e7ff;
    color: #3730a3;
}

.schedule-wf-details__summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--admin-accent, #9c1c34);
    font-size: 0.88rem;
    list-style: none;
}

.schedule-wf-details__summary::-webkit-details-marker {
    display: none;
}

.schedule-wf-details__body {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--admin-surface-2, #f9fafb);
    border-radius: 8px;
    border: 1px solid var(--admin-border, #e5e7eb);
}

.schedule-wf-form {
    margin-bottom: 12px;
}

.schedule-wf-form:last-child {
    margin-bottom: 0;
}

.schedule-wf-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.schedule-wf-form input,
.schedule-wf-form select {
    margin-right: 8px;
    margin-bottom: 6px;
}

.schedule-wf-peer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.schedule-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.schedule-bulk-stack {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 56rem;
}

.schedule-bulk-bar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border, #e5e7eb);
    background: #f9fafb;
}

.schedule-bulk-inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.schedule-bulk-edit-details {
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 8px;
    padding: 8px 12px 12px;
    background: var(--admin-surface, #fff);
}

.schedule-bulk-edit-summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--admin-accent, #9c1c34);
}

.schedule-bulk-edit-hint {
    margin: 8px 0 10px 0 !important;
}

.schedule-bulk-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
}

.schedule-bulk-edit-field {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    gap: 4px;
}

.schedule-bulk-edit-field--full {
    grid-column: 1 / -1;
}

.schedule-bulk-edit-times {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.schedule-bulk-edit-sep {
    color: var(--admin-text-muted, #6b7280);
}

.schedule-bulk-edit-select,
.schedule-bulk-time,
.schedule-bulk-date,
.schedule-bulk-break,
.schedule-bulk-notes {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--admin-border, #e5e7eb);
    font-size: 0.88rem;
}

.schedule-bulk-bar__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-bulk-bar__danger:disabled {
    opacity: 0.55;
}

.schedule-grid__row--open-shifts .schedule-grid__name {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), transparent);
}

.schedule-shift--open {
    border-style: dashed;
    opacity: 0.98;
}

.schedule-wf-form .schedule-wf-claim-note {
    display: block;
    margin-bottom: 8px;
}

.schedule-wf-form .schedule-wf-claim-note input {
    display: block;
    width: 100%;
    max-width: 280px;
    margin-top: 4px;
}

.schedule-bulk-bar__danger:not(:disabled) {
    border-color: #fecaca;
    color: #b91c1c;
}

.schedule-toolbar__label {
    font-weight: 600;
    color: var(--admin-text-muted, #6b7280);
    margin-left: 4px;
}

.schedule-grid-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 10px;
    background: var(--admin-surface, #fff);
}

.schedule-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 720px;
}

.schedule-grid th,
.schedule-grid td {
    border: 1px solid var(--admin-border, #e5e7eb);
    vertical-align: top;
    padding: 8px;
}

.schedule-grid__corner {
    width: 140px;
    min-width: 120px;
    background: #f9fafb;
    font-weight: 600;
}

.schedule-grid__day {
    text-align: center;
    background: #f9fafb;
}

.schedule-grid__day--today {
    background: rgba(156, 28, 52, 0.08);
}

.schedule-grid__dow {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-grid__dom {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
}

.schedule-grid__labor-hint {
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-grid__row--labor-totals {
    background: #f8fafc;
}

.schedule-grid__row--labor-totals .schedule-grid__cell--labor {
    vertical-align: top;
    background: #f1f5f9;
}

.schedule-grid__labor-foot {
    vertical-align: top;
}

.schedule-grid__labor-week-total {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--admin-accent, #9c1c34);
}

.schedule-labor-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 5rem;
}

.schedule-labor-cell__hours {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--admin-text, #1f2937);
}

.schedule-labor-cell__roles {
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--admin-text-muted, #6b7280);
    word-break: break-word;
}

.schedule-labor-cell__cost {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-accent, #9c1c34);
}

.schedule-grid__labor-week-cost {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--admin-accent, #9c1c34);
}

.schedule-pay-matrix-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1rem;
    max-width: 100%;
}

.schedule-pay-matrix {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.schedule-pay-matrix th,
.schedule-pay-matrix td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    vertical-align: middle;
}

.schedule-pay-matrix thead th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.schedule-pay-matrix__input {
    width: 5.5rem;
    max-width: 100%;
    font-size: 0.8rem;
}

.schedule-directory-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.schedule-directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.schedule-directory-table th,
.schedule-directory-table td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.schedule-directory-table thead th {
    background: #f8fafc;
    font-weight: 600;
}

.schedule-directory-table__inactive {
    opacity: 0.55;
}

.staff-profile-fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin: 0 0 1.25rem;
}

.staff-profile-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.staff-profile-form label {
    display: block;
    margin-bottom: 0.65rem;
}

.staff-profile-form input[type="text"] {
    width: 100%;
    max-width: 28rem;
}

.schedule-grid__name {
    text-align: left;
    font-weight: 600;
    white-space: normal;
}

.schedule-grid__row--self .schedule-grid__name {
    color: var(--admin-accent, #9c1c34);
}

.schedule-grid__badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-accent, #9c1c34);
}

.schedule-grid__cell {
    min-width: 100px;
    max-width: 140px;
}

.schedule-off {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border-radius: 4px;
    padding: 4px 6px;
    margin-bottom: 6px;
}

.schedule-off--pending {
    color: #6b7280;
    background: #f3f4f6;
}

.schedule-shift {
    position: relative;
    border-left: 3px solid var(--shift-accent, #9c1c34);
    background: #fafafa;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 6px;
}

.schedule-shift--bulkable {
    padding-top: 22px;
}

.schedule-shift__bulk {
    position: absolute;
    top: 4px;
    left: 6px;
    margin: 0;
    line-height: 1;
    cursor: pointer;
}

.schedule-shift__bulk input {
    margin: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.schedule-shift__time {
    font-weight: 600;
    font-size: 0.8rem;
}

.schedule-shift__loc {
    font-size: 0.72rem;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-shift__actions,
.schedule-shift__delete {
    margin-top: 6px;
}

.schedule-shift__btn {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--admin-border, #e5e7eb);
    background: #fff;
    cursor: pointer;
}

.schedule-shift__btn--danger {
    color: #b91c1c;
    border-color: #fecaca;
}

a.schedule-shift__btn--link {
    display: inline-block;
    text-decoration: none;
    color: var(--admin-text, #1f2937);
    margin-left: 4px;
}

a.schedule-shift__btn--link:hover {
    border-color: var(--admin-accent, #9c1c34);
    color: var(--admin-accent, #9c1c34);
}

.schedule-cell-add {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 4px;
    font-size: 0.72rem;
    border: 1px dashed var(--admin-border, #d1d5db);
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-cell-add:hover {
    border-color: var(--admin-accent, #9c1c34);
    color: var(--admin-accent, #9c1c34);
}

.schedule-panel {
    margin-bottom: 28px;
    max-width: 52rem;
}

.schedule-panel__title {
    font-size: 1.1rem;
    margin: 0 0 12px 0;
}

.schedule-panel__hint {
    font-size: 0.88rem;
    color: var(--admin-text-muted, #6b7280);
    margin: -4px 0 12px 0;
}

.schedule-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.schedule-form input,
.schedule-form select,
.schedule-form textarea {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 6px;
}

.schedule-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.schedule-form__full {
    display: block;
    margin-bottom: 12px;
}

.schedule-form__full input,
.schedule-form__full textarea {
    width: 100%;
    max-width: 32rem;
}

.schedule-form--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.schedule-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
}

.schedule-subh {
    font-size: 1rem;
    margin: 18px 0 10px 0;
}

.schedule-pattern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.schedule-pattern-table th,
.schedule-pattern-table td {
    border: 1px solid var(--admin-border, #e5e7eb);
    padding: 8px 10px;
    text-align: left;
}

.schedule-pattern-table thead {
    background: #f9fafb;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 6px 10px;
}

.schedule-danger-zone {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--admin-border, #e5e7eb);
}

.schedule-to-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.schedule-to-list__item {
    padding: 10px 12px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.schedule-to-list__item--approved {
    border-left: 3px solid #16a34a;
}

.schedule-to-list__item--denied {
    border-left: 3px solid #dc2626;
}

.schedule-to-list__item--pending {
    border-left: 3px solid #ca8a04;
}

.schedule-to-list__item--cancelled {
    border-left: 3px solid #9ca3af;
}

.schedule-status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 8px;
    vertical-align: middle;
}

.schedule-status-pill--pending {
    background: #fef3c7;
    color: #92400e;
}

.schedule-status-pill--approved {
    background: #dcfce7;
    color: #166534;
}

.schedule-status-pill--denied {
    background: #fee2e2;
    color: #991b1b;
}

.schedule-status-pill--cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

.schedule-to-banner {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    max-width: 52rem;
    border: 1px solid var(--admin-border, #e5e7eb);
}

.schedule-to-banner--pending {
    background: #fffbeb;
    border-color: #fcd34d;
}

.schedule-to-banner a {
    font-weight: 600;
    color: var(--admin-accent, #9c1c34);
    margin-left: 6px;
}

.schedule-to-admin-note {
    flex-basis: 100%;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--admin-text-muted, #6b7280);
}

.schedule-inline-form {
    display: inline;
}

.schedule-approve-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.schedule-approve-form__notes {
    min-width: 160px;
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 6px;
}

.schedule-avail-list {
    list-style: none;
    margin: 12px 0 0 0;
    padding: 0;
}

.schedule-avail-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.schedule-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(156, 28, 52, 0.12);
    color: var(--admin-accent, #9c1c34);
    padding: 2px 6px;
    border-radius: 4px;
}

.schedule-muted {
    color: var(--admin-text-muted, #6b7280);
    font-size: 0.9rem;
}

/* Modal */
.schedule-modal[hidden] {
    display: none !important;
}

.schedule-modal:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.schedule-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.schedule-modal__dialog {
    position: relative;
    background: var(--admin-surface, #fff);
    border-radius: 12px;
    padding: 20px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.schedule-modal__dialog h2 {
    margin: 0 0 14px 0;
    font-size: 1.1rem;
}

.schedule-edit-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.schedule-edit-form input,
.schedule-edit-form select {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 6px;
}

.schedule-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.schedule-grid__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.schedule-primary-role-form {
    margin-top: 6px;
}

.schedule-primary-role-form__select {
    font-size: 11px;
    max-width: 150px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid var(--admin-border, #e5e7eb);
}

.schedule-shift__role {
    font-size: 0.68rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 2px;
}

.schedule-shift--draggable {
    cursor: grab;
}

.schedule-shift--dragging {
    opacity: 0.55;
}

.schedule-grid__cell--drop {
    min-height: 52px;
}

.schedule-grid__cell--drop-hover {
    outline: 2px dashed var(--admin-accent, #9c1c34);
    outline-offset: -2px;
    background: rgba(156, 28, 52, 0.07);
}

.schedule-move-form {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.schedule-preset-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
    font-size: 0.9rem;
}

.schedule-preset-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.schedule-preset-card {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--admin-border, #e5e7eb);
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.86rem;
    color: var(--admin-text, #1f2937);
    cursor: grab;
    text-align: left;
}

.schedule-preset-card strong {
    font-size: 0.9rem;
}

.schedule-preset-card--draggable:hover {
    border-color: var(--admin-accent, #9c1c34);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.schedule-preset-card--dragging {
    opacity: 0.65;
    cursor: grabbing;
}

.schedule-pref-roles {
    border: none;
    padding: 0;
    margin: 0 0 14px 0;
}

.schedule-pref-roles__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.schedule-pref-roles__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/* Schedule “app” chrome — body.schedule-app on admin/schedule.php only      */
/* -------------------------------------------------------------------------- */

body.schedule-app {
    --sched-font-mono: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --sched-canvas: #e2e8f0;
    --sched-panel: #f8fafc;
    --sched-panel-deep: #ffffff;
    --sched-header-bg: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    --sched-header-border: #475569;
    --sched-today-header: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    --sched-today-ring: #93c5fd;
}

body.schedule-app .admin-main {
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(156, 28, 52, 0.06), transparent 55%),
        linear-gradient(180deg, var(--sched-canvas) 0%, #eef2f7 100%);
}

body.schedule-app .admin-topbar {
    border-bottom-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.schedule-app .admin-topbar__title {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

body.schedule-app .schedule-tabs {
    gap: 4px;
    padding: 6px;
    margin-bottom: 1.1rem;
    background: var(--sched-panel-deep);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.schedule-app .schedule-tabs__link {
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px 12px;
    color: var(--admin-text-muted);
}

body.schedule-app .schedule-tabs__link:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: transparent;
    color: var(--admin-text);
}

body.schedule-app .schedule-tabs__link.is-active {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-accent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.schedule-app .schedule-toolbar {
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 1rem;
    background: var(--sched-panel-deep);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.schedule-app .schedule-toolbar__label {
    font-size: 0.8125rem;
    font-weight: 650;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}

body.schedule-app .schedule-bulk-bar {
    background: var(--sched-panel);
    border-radius: 8px;
}

body.schedule-app .schedule-bulk-edit-details {
    border-radius: 10px;
}

body.schedule-app .schedule-grid-wrap {
    border-radius: 12px;
    border: 1px solid #94a3b8;
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.08),
        0 2px 4px -2px rgba(15, 23, 42, 0.05);
    background: var(--sched-panel-deep);
}

body.schedule-app .schedule-grid {
    font-size: 0.8125rem;
}

body.schedule-app .schedule-grid thead .schedule-grid__corner,
body.schedule-app .schedule-grid thead .schedule-grid__day {
    background: var(--sched-header-bg);
    color: #f1f5f9;
    border-color: var(--sched-header-border);
    padding: 10px 8px;
}

body.schedule-app .schedule-grid thead .schedule-grid__dow {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
}

body.schedule-app .schedule-grid thead .schedule-grid__dom {
    color: #f8fafc;
    font-size: 1.125rem;
    font-weight: 750;
    margin-top: 2px;
}

body.schedule-app .schedule-grid thead .schedule-grid__day--today {
    background: var(--sched-today-header);
    box-shadow: inset 0 0 0 2px var(--sched-today-ring);
}

body.schedule-app .schedule-grid tbody tr:nth-child(even) .schedule-grid__cell {
    background: rgba(241, 245, 249, 0.55);
}

body.schedule-app .schedule-grid tbody tr:nth-child(even) .schedule-grid__name {
    background: rgba(226, 232, 240, 0.65);
}

body.schedule-app .schedule-grid th,
body.schedule-app .schedule-grid td {
    border-color: #cbd5e1;
}

body.schedule-app .schedule-grid__name {
    font-size: 0.8125rem;
    font-weight: 650;
    background: var(--sched-panel);
}

body.schedule-app .schedule-grid__row--self .schedule-grid__name {
    background: rgba(156, 28, 52, 0.08);
    color: var(--admin-accent);
}

body.schedule-app .schedule-grid__row--labor-totals .schedule-grid__cell--labor {
    background: #e2e8f0;
}

body.schedule-app .schedule-shift {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    border-left-width: 4px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    margin-bottom: 7px;
}

body.schedule-app .schedule-shift--open {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-style: solid;
    border-color: #fbbf24;
    border-left-color: #d97706;
}

body.schedule-app .schedule-shift__time {
    font-family: var(--sched-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

body.schedule-app .schedule-shift__loc,
body.schedule-app .schedule-shift__role {
    font-size: 0.6875rem;
}

body.schedule-app .schedule-shift__btn {
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.12s ease, border-color 0.12s ease;
}

body.schedule-app .schedule-cell-add {
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.6875rem;
}

body.schedule-app .schedule-panel__title,
body.schedule-app .schedule-subh {
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #0f172a;
}

body.schedule-app .schedule-pattern-table thead,
body.schedule-app .schedule-coverage-table th {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 650;
}

body.schedule-app .schedule-coverage-wrap {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.schedule-app .schedule-to-list__item {
    border-radius: 10px;
    background: var(--sched-panel-deep);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.schedule-app .schedule-my-list__item {
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border);
    background: var(--sched-panel-deep);
    border-bottom: 1px solid var(--admin-border);
}

body.schedule-app .schedule-modal__dialog {
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

body.schedule-app .schedule-modal__backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

body.schedule-app .schedule-migration-hint {
    border-radius: 10px;
    max-width: 56rem;
}

body.schedule-app .schedule-publish-banner {
    border-radius: 10px;
    max-width: 56rem;
}

@media (max-width: 900px) {
    body.schedule-app .schedule-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    body.schedule-app .schedule-tabs__link {
        flex-shrink: 0;
    }
}
