/* Weekly shift schedule workspace (Organizational Structure) */
.ssw {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ssw-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: stretch;
    background: linear-gradient(135deg, #1b2a33 0%, #264653 50%, #e76f51 140%);
    color: #fff;
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 16px 36px rgba(27, 42, 51, 0.2);
}

.ssw-header h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.02em;
    color: #fff !important;
    font-weight: 700;
}

.ssw-eyebrow {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: 4px;
    color: #fff;
}

.ssw-sub {
    margin: 6px 0 0;
    opacity: .92;
    font-size: 13px;
    color: #fff;
}

.ssw-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 8px;
    min-width: min(320px, 100%);
}

.ssw-stat {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    color: #fff;
}

.ssw-stat strong {
    display: block;
    font-size: 20px;
    color: #fff;
}

.ssw-stat span {
    font-size: 11px;
    opacity: .85;
    color: #fff;
}

.ssw-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ssw-hint {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #f57f17;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
}

.ssw-hint.blocked {
    background: #eceff1;
    border-color: #cfd8dc;
    color: #546e7a;
}

.ssw-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1100px) {
    .ssw-week {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.ssw-day {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 16px;
    padding: 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 18px rgba(38, 50, 56, .04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ssw-day.working {
    border-color: #80cbc4;
    background: linear-gradient(180deg, #fff 0%, #f1faf8 100%);
}

.ssw-day.off {
    border-color: #ef9a9a;
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
}

.ssw-day.interactive {
    cursor: pointer;
}

.ssw-day.interactive:hover:not(:disabled):not(.busy) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(38, 50, 56, .08);
}

.ssw-day.busy {
    opacity: .7;
    pointer-events: none;
}

.ssw-day-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.ssw-day-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1b2a33;
}

.ssw-day-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.ssw-day-badge.working {
    background: #e0f2f1;
    color: #00695c;
}

.ssw-day-badge.off {
    background: #ffebee;
    color: #c62828;
}

.ssw-day-badge.unset {
    background: #eceff1;
    color: #607d8b;
}

.ssw-day-meta {
    font-size: 12px;
    color: #78909c;
    margin: 0;
}

.ssw-day-toggle {
    margin-top: auto;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.ssw-day-toggle.working {
    background: #00695c;
    color: #fff;
}

.ssw-day-toggle.off {
    background: #c62828;
    color: #fff;
}

.ssw-day-toggle.unset {
    background: #455a64;
    color: #fff;
}

.ssw-day-toggle:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ssw-matrix {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 16px;
    overflow: auto;
    box-shadow: 0 8px 18px rgba(38, 50, 56, .04);
}

.ssw-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.ssw-matrix-table th,
.ssw-matrix-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f5;
    text-align: center;
    vertical-align: middle;
}

.ssw-matrix-table thead th {
    position: sticky;
    top: 0;
    background: #f7fafb;
    color: #546e7a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    z-index: 1;
}

.ssw-matrix-table th.shift-col,
.ssw-matrix-table td.shift-col {
    text-align: start;
    position: sticky;
    inset-inline-start: 0;
    background: #fff;
    z-index: 2;
    min-width: 180px;
}

.ssw-matrix-table thead th.shift-col {
    background: #f7fafb;
    z-index: 3;
}

.ssw-shift-name {
    font-weight: 700;
    color: #1b2a33;
    display: block;
}

.ssw-shift-hours {
    font-size: 12px;
    color: #78909c;
}

.ssw-cell-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: transform .12s ease, box-shadow .12s ease;
}

.ssw-cell-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .1);
}

.ssw-cell-btn.working {
    background: #e0f2f1;
    border-color: #26a69a;
    color: #00695c;
}

.ssw-cell-btn.off {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

.ssw-cell-btn.unset {
    background: #eceff1;
    border-color: #cfd8dc;
    color: #607d8b;
}

.ssw-cell-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ssw-empty {
    text-align: center;
    padding: 48px 20px;
    color: #607d8b;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #cfd8dc;
}

.ssw-empty i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #90a4ae;
}

.ssw-empty h3 {
    margin: 0 0 8px;
    color: #263238;
}

.ssw-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #607d8b;
}

.ssw-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ssw-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.ssw-legend-swatch.working {
    background: #e0f2f1;
    border-color: #26a69a;
}

.ssw-legend-swatch.off {
    background: #ffebee;
    border-color: #ef9a9a;
}

.ssw-legend-swatch.unset {
    background: #eceff1;
    border-color: #cfd8dc;
}

.ssw-detail-panel {
    margin: 0 0 16px;
}
